Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -26,7 +26,7 @@
/// \file runAndEvent/RE01/src/RE01CalorimeterROGeometry.cc
/// \brief Implementation of the RE01CalorimeterROGeometry class
//
// $Id: RE01CalorimeterROGeometry.cc 75295 2013-10-30 09:32:52Z gcosmo $
// $Id: RE01CalorimeterROGeometry.cc 97383 2016-06-02 09:56:35Z gcosmo $
//
#include "RE01CalorimeterROGeometry.hh"
@@ -43,15 +43,9 @@
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01CalorimeterROGeometry::RE01CalorimeterROGeometry()
: G4VReadOutGeometry()
{
#include "RE01DetectorParameterDef.icc"
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01CalorimeterROGeometry::RE01CalorimeterROGeometry(G4String aString)
: G4VReadOutGeometry(aString)
RE01CalorimeterROGeometry::
RE01CalorimeterROGeometry(G4String& parallelWorldName)
: G4VUserParallelWorld(parallelWorldName)
{
#include "RE01DetectorParameterDef.icc"
}
@@ -61,34 +55,26 @@ RE01CalorimeterROGeometry::~RE01CalorimeterROGeometry()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
void RE01CalorimeterROGeometry::Construct()
{
// Material Information imported from NIST database.
//
G4NistManager* NISTman = G4NistManager::Instance();
// A dummy material is used to fill the volumes of the readout geometry.
// ( It will be allowed to set a NULL pointer in volumes of such virtual
// division in future, since this material is irrelevant for tracking.)
G4Material* dummyMat = NISTman->FindOrBuildMaterial("G4_AIR");
G4Material* dummyMat = nullptr;
//the ReadOut World:
G4VPhysicalVolume* ROWorldPhys = GetWorld();
G4LogicalVolume *ROWorldLog = ROWorldPhys->GetLogicalVolume();
//Builds the ReadOut World:
G4Box *ROWorldBox = new G4Box("ROWorldBox",fExpHall_x,fExpHall_y,fExpHall_z);
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
"ROWorldLogical", 0, 0, 0);
G4PVPlacement *ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
"ROWorldPhysical",
ROWorldLog,
0,false,0);
// Calorimeter volume:
G4VSolid * caloROtub
= new G4Tubs("caloROtub",fCaloTubs_rmin,fCaloTubs_rmax,
fCaloTubs_dz,fCaloTubs_sphi,fCaloTubs_dphi);
G4LogicalVolume * caloROlog
= new G4LogicalVolume(caloROtub,dummyMat,"caloROlogical",0,0,0);
G4VPhysicalVolume * caloROphys
= new G4PVPlacement(0,G4ThreeVector(),"calROphysical",caloROlog,
ROWorldPhys,false,0);
// G4VPhysicalVolume * caloROphys =
new G4PVPlacement(0,G4ThreeVector(),caloROlog,"calROphysical",
ROWorldLog,false,0);
// -------------------------------
// Calorimeter readout division:
@@ -100,9 +86,9 @@ G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
G4LogicalVolume * caloROphiDivisionLog
= new G4LogicalVolume(caloROphiDivisionTub, dummyMat,
"caloROphiDivisionLogical",0,0,0);
G4VPhysicalVolume * caloROphiDivisionPhys
= new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog,
caloROphys, kPhi, fSegmentsinPhi, fCaloCell_dphi);
// G4VPhysicalVolume * caloROphiDivisionPhys =
new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog,
caloROlog, kPhi, fSegmentsinPhi, fCaloCell_dphi);
// then z division: 20 slices:
G4VSolid * caloROcellTub
= new G4Tubs("caloROcellTub", fCaloRing_rmin, fCaloRing_rmax,
@@ -110,8 +96,20 @@ G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
G4LogicalVolume * caloROcellLog
= new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical",0,0,0);
// G4VPhysicalVolume * caloROcellPhys =
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionPhys,
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionLog,
kZAxis, fSegmentsinZ,2.*fCaloRing_dz);
return ROWorldPhys;
}
#include "RE01CalorimeterSD.hh"
void RE01CalorimeterROGeometry::ConstructSD()
{
//------------------------------------------------------------------
// Sensitive Detector
//------------------------------------------------------------------
G4String calorimeterSDname = "/mydet/calorimeter";
RE01CalorimeterSD * calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
SetSensitiveDetector("caloROcellLogical", calorimeterSD);
}
@@ -26,7 +26,7 @@
/// \file runAndEvent/RE01/src/RE01CalorimeterSD.cc
/// \brief Implementation of the RE01CalorimeterSD class
//
// $Id: RE01CalorimeterSD.cc 68761 2013-04-05 12:35:00Z gcosmo $
// $Id: RE01CalorimeterSD.cc 97383 2016-06-02 09:56:35Z gcosmo $
//
#include "RE01CalorimeterSD.hh"
@@ -78,23 +78,24 @@ void RE01CalorimeterSD::Initialize(G4HCofThisEvent* HCE)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool RE01CalorimeterSD::ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist)
G4bool RE01CalorimeterSD::ProcessHits(G4Step*aStep,G4TouchableHistory*)
{
if(!ROhist) return false;
//***** RE05CalorimeterSD has been migrated to Geant4 version 10 that does not
//***** support Readout Geometry in multi-threaded mode. Now RE05CalorimeterSD
//***** is assigned to a dedicaed parallel world. The pointer "aStep" points to
//***** a G4Step object for the parallel world.
G4double edep = aStep->GetTotalEnergyDeposit();
if(edep==0.) return false;
G4VPhysicalVolume* physVol = ROhist->GetVolume();
//ROhist->MoveUpHistory();
//G4VPhysicalVolume* mothVol = ROhist->GetVolume(1);
const G4VTouchable* ROhist = aStep->GetPreStepPoint()->GetTouchable();
G4int copyIDinZ = ROhist->GetReplicaNumber();
G4int copyIDinPhi = ROhist->GetReplicaNumber(1);
if(fCellID[copyIDinZ][copyIDinPhi]==-1)
{
RE01CalorimeterHit* calHit
= new RE01CalorimeterHit
(physVol->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
RE01CalorimeterHit* calHit = new RE01CalorimeterHit
(ROhist->GetVolume()->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
calHit->SetEdep( edep );
G4AffineTransform aTrans = ROhist->GetHistory()->GetTopTransform();
aTrans.Invert();
@@ -26,13 +26,11 @@
/// \file runAndEvent/RE01/src/RE01DetectorConstruction.cc
/// \brief Implementation of the RE01DetectorConstruction class
//
// $Id: RE01DetectorConstruction.cc 75598 2013-11-04 13:00:59Z gcosmo $
// $Id: RE01DetectorConstruction.cc 97383 2016-06-02 09:56:35Z gcosmo $
//
#include "RE01DetectorConstruction.hh"
#include "RE01TrackerSD.hh"
#include "RE01CalorimeterSD.hh"
#include "RE01CalorimeterROGeometry.hh"
#include "RE01TrackerParametrisation.hh"
#include "RE01CalorimeterParametrisation.hh"
#include "RE01Field.hh"
@@ -60,36 +58,20 @@
#include "G4RegionStore.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01DetectorConstruction::RE01DetectorConstruction()
: G4VUserDetectorConstruction()
{
#include "RE01DetectorParameterDef.icc"
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01DetectorConstruction::~RE01DetectorConstruction()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* RE01DetectorConstruction::Construct()
{
//-------------------------------------------------------------------------
// Magnetic field
//-------------------------------------------------------------------------
/******************************************************************
static G4bool fieldIsInitialized = false;
if(!fieldIsInitialized)
{
RE01Field* myField = new RE01Field;
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()
->GetFieldManager();
fieldMgr->SetDetectorField(myField);
fieldMgr->CreateChordFinder(myField);
fieldIsInitialized = true;
}
*******************************************************************/
//-------------------------------------------------------------------------
// Materials
//-------------------------------------------------------------------------
@@ -183,23 +165,20 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
fCalorimeter_log
= new G4LogicalVolume(calorimeter_tubs,scinti,"caloT_L",0,0,0);
// G4VPhysicalVolume * calorimeter_phys =
new G4PVPlacement(0,G4ThreeVector(),fCalorimeter_log,"caloM_P",
new G4PVPlacement(0,G4ThreeVector(),fCalorimeter_log,"caloM_P",
experimentalHall_log,false,0);
G4VisAttributes* calorimeter_logVisATT
= new G4VisAttributes(G4Colour(1.0,1.0,0.0));
calorimeter_logVisATT->SetForceWireframe(true);
fCalorimeter_log->SetVisAttributes(calorimeter_logVisATT);
G4Region* calorimeterRegion = new G4Region("CalorimeterRegion");
RE01RegionInformation* calorimeterInfo = new RE01RegionInformation();
RE01RegionInformation* calorimeterInfo
= new RE01RegionInformation();
calorimeterInfo->SetCalorimeter();
calorimeterRegion->SetUserInformation(calorimeterInfo);
fCalorimeter_log->SetRegion(calorimeterRegion);
calorimeterRegion->AddRootLogicalVolume(fCalorimeter_log);
G4String ROgeometryName = "CalorimeterROGeom";
fCalorimeterRO = new RE01CalorimeterROGeometry(ROgeometryName);
fCalorimeterRO->BuildROGeometry();
//------------------------------- Lead layers
// As an example for Parameterised volume
// dummy values for G4Tubs -- modified by parameterised volume
@@ -212,7 +191,7 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
= new RE01CalorimeterParametrisation;
// dummy value : kXAxis -- modified by parameterised volume
// G4VPhysicalVolume * caloLayer_phys =
new G4PVParameterised("caloLayer_phys",caloLayer_log,fCalorimeter_log,
new G4PVParameterised("caloLayer_phys",caloLayer_log,fCalorimeter_log,
kXAxis, fNocaloLayers, calorimeterParam);
G4VisAttributes* caloLayer_logVisAtt
= new G4VisAttributes(G4Colour(0.7,1.0,0.0));
@@ -224,23 +203,26 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01DetectorConstruction::ConstructSDandField() {
void RE01DetectorConstruction::ConstructSDandField()
{
//------------------------------------------------------------------
// Sensitive Detector
//------------------------------------------------------------------
//G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4String trackerSDname = "/mydet/tracker";
RE01TrackerSD * trackerSD = new RE01TrackerSD(trackerSDname);
//SDman->AddNewDetector(trackerSD);
SetSensitiveDetector(fTrackerLayer_log, trackerSD);
G4String calorimeterSDname = "/mydet/calorimeter";
RE01CalorimeterSD * calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
calorimeterSD->SetROgeometry(fCalorimeterRO);
//SDman->AddNewDetector(calorimeterSD);
SetSensitiveDetector(fCalorimeter_log, calorimeterSD);
// N.B. Calorimeter SD is defined in the parallel world.
//-------------------------------------------------------------------------
// Magnetic field
//-------------------------------------------------------------------------
RE01Field* myField = new RE01Field;
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
fieldMgr->SetDetectorField(myField);
fieldMgr->CreateChordFinder(myField);
}
@@ -26,7 +26,7 @@
/// \file runAndEvent/RE01/src/RE01EventAction.cc
/// \brief Implementation of the RE01EventAction class
//
// $Id: RE01EventAction.cc 90679 2015-06-08 07:58:19Z gcosmo $
// $Id: RE01EventAction.cc 97383 2016-06-02 09:56:35Z gcosmo $
//
#include "RE01EventAction.hh"
@@ -47,17 +47,17 @@
#include "G4PrimaryParticle.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01EventAction::RE01EventAction()
:G4UserEventAction(),
fTrackerCollID(-1),fCalorimeterCollID(-1)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01EventAction::~RE01EventAction()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01EventAction::BeginOfEventAction(const G4Event*)
{
G4SDManager * SDman = G4SDManager::GetSDMpointer();
@@ -69,10 +69,15 @@ void RE01EventAction::BeginOfEventAction(const G4Event*)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01EventAction::EndOfEventAction(const G4Event* evt)
{
G4cout << ">>> Summary of Event " << evt->GetEventID() << G4endl;
if(evt->GetNumberOfPrimaryVertex()==0)
{
G4cout << "Event is empty." << G4endl;
return;
}
if(fTrackerCollID<0||fCalorimeterCollID<0) return;
@@ -160,7 +165,7 @@ void RE01EventAction::EndOfEventAction(const G4Event* evt)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01EventAction::PrintPrimary(G4PrimaryParticle* pp,G4int ind)
{
for(G4int ii=0;ii<=ind;ii++)
@@ -1,93 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE01/src/RE01PhysicsList.cc
/// \brief Implementation of the RE01PhysicsList class
//
// $Id: RE01PhysicsList.cc 68026 2013-03-13 13:45:22Z gcosmo $
//
#include "RE01PhysicsList.hh"
#include "RE01UnknownDecayPhysics.hh"
#include "G4DecayPhysics.hh"
#include "G4EmStandardPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4IonPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4DataQuestionaire.hh"
#include "G4HadronPhysicsQGSP_BERT.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01PhysicsList::RE01PhysicsList(): G4VModularPhysicsList()
{
G4DataQuestionaire it(photon);
G4cout << "<<< Geant4 Physics List simulation engine: QGSP_BERT 3.4"<<G4endl;
G4cout <<G4endl;
defaultCutValue = 0.7*CLHEP::mm;
G4int ver = 1;
SetVerboseLevel(ver);
// EM Physics
RegisterPhysics( new G4EmStandardPhysics(ver) );
// Synchroton Radiation & GN Physics
RegisterPhysics( new G4EmExtraPhysics(ver) );
// Decays
RegisterPhysics( new G4DecayPhysics(ver) );
RegisterPhysics( new RE01UnknownDecayPhysics());
// Hadron Elastic scattering
RegisterPhysics( new G4HadronElasticPhysics(ver) );
// Hadron Physics
RegisterPhysics( new G4HadronPhysicsQGSP_BERT(ver));
// Stopping Physics
RegisterPhysics( new G4StoppingPhysics(ver) );
// Ion Physics
RegisterPhysics( new G4IonPhysics(ver));
// Neutron tracking cut
RegisterPhysics( new G4NeutronTrackingCut(ver));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01PhysicsList::~RE01PhysicsList()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01PhysicsList::SetCuts()
{
// Use default cut values gamma and e processes
SetCutsWithDefault();
}
@@ -26,7 +26,7 @@
/// \file runAndEvent/RE01/src/RE01PrimaryGeneratorAction.cc
/// \brief Implementation of the RE01PrimaryGeneratorAction class
//
// $Id: RE01PrimaryGeneratorAction.cc 90679 2015-06-08 07:58:19Z gcosmo $
// $Id: RE01PrimaryGeneratorAction.cc 97383 2016-06-02 09:56:35Z gcosmo $
//
#include "RE01PrimaryGeneratorAction.hh"
@@ -39,7 +39,7 @@
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01PrimaryGeneratorAction::RE01PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fHEPEvt(0), fParticleGun(0), fMessenger(0)
@@ -79,13 +79,19 @@ RE01PrimaryGeneratorAction::~RE01PrimaryGeneratorAction()
delete fMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
if(fUseHEPEvt)
{
G4AutoLock lock(&RE01PrimGenMutex);
fHEPEvt->GeneratePrimaryVertex(anEvent); }
fHEPEvt->GeneratePrimaryVertex(anEvent);
if(anEvent->GetNumberOfPrimaryVertex()==0)
{ // End-of-file
G4Exception("RE01PrimaryGeneratorAction::GeneratePrimaries",
"RE01_0001",RunMustBeAborted,"End of file detected.");
}
}
else
{ fParticleGun->GeneratePrimaryVertex(anEvent); }
}
@@ -26,11 +26,12 @@
/// \file runAndEvent/RE01/src/RE01SteppingAction.cc
/// \brief Implementation of the RE01SteppingAction class
//
// $Id: RE01SteppingAction.cc 66379 2012-12-18 09:46:33Z gcosmo $
// $Id: RE01SteppingAction.cc 97671 2016-06-07 08:25:00Z gcosmo $
//
#include "RE01SteppingAction.hh"
#include "RE01RegionInformation.hh"
#include "RE01TrackInformation.hh"
#include "G4Track.hh"
#include "G4Step.hh"
@@ -39,17 +40,18 @@
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4Region.hh"
#include "G4SteppingManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01SteppingAction::RE01SteppingAction()
: G4UserSteppingAction()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01SteppingAction::~RE01SteppingAction()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01SteppingAction::UserSteppingAction(const G4Step * theStep)
{
// Suspend a track if it is entering into the calorimeter
@@ -72,5 +74,23 @@ void RE01SteppingAction::UserSteppingAction(const G4Step * theStep)
// check if it is entering to the calorimeter volume
if(!(thePreRInfo->IsCalorimeter()) && (thePostRInfo->IsCalorimeter()))
{ theTrack->SetTrackStatus(fSuspend); }
{
// if the track had already been suspended at the previous step, let it go.
RE01TrackInformation* trackInfo
= static_cast<RE01TrackInformation*>(theTrack->GetUserInformation());
if(trackInfo->GetSuspendedStepID()>-1)
{
if(fpSteppingManager->GetverboseLevel()>0)
{
G4cout<<"++++ This track had already been suspended at step #"
<<trackInfo->GetSuspendedStepID()<<". Tracking resumed."
<<G4endl;
}
}
else
{
trackInfo->SetSuspendedStepID(theTrack->GetCurrentStepNumber());
theTrack->SetTrackStatus(fSuspend);
}
}
}
@@ -27,17 +27,17 @@
/// \brief Implementation of the RE01TrackInformation class
//
//
// $Id: RE01TrackInformation.cc 75295 2013-10-30 09:32:52Z gcosmo $
// $Id: RE01TrackInformation.cc 97671 2016-06-07 08:25:00Z gcosmo $
//
#include "RE01TrackInformation.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
G4ThreadLocal G4Allocator<RE01TrackInformation> * aTrackInformationAllocator = 0;
//G4Allocator<RE01TrackInformation> aTrackInformationAllocator;
G4ThreadLocal G4Allocator<RE01TrackInformation> *
aTrackInformationAllocator = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01TrackInformation::RE01TrackInformation()
: G4VUserTrackInformation()
{
@@ -54,9 +54,10 @@ RE01TrackInformation::RE01TrackInformation()
fSourceMomentum = G4ThreeVector(0.,0.,0.);
fSourceEnergy = 0.;
fSourceTime = 0.;
fSuspendedStepID = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01TrackInformation::RE01TrackInformation(const G4Track* aTrack)
: G4VUserTrackInformation()
{
@@ -73,9 +74,10 @@ RE01TrackInformation::RE01TrackInformation(const G4Track* aTrack)
fSourceMomentum = G4ThreeVector(0.,0.,0.);
fSourceEnergy = 0.;
fSourceTime = 0.;
fSuspendedStepID = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01TrackInformation
::RE01TrackInformation(const RE01TrackInformation* aTrackInfo)
: G4VUserTrackInformation()
@@ -93,13 +95,14 @@ RE01TrackInformation
fSourceMomentum = aTrackInfo->fSourceMomentum;
fSourceEnergy = aTrackInfo->fSourceEnergy;
fSourceTime = aTrackInfo->fSourceTime;
fSuspendedStepID = -1;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01TrackInformation::~RE01TrackInformation()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01TrackInformation& RE01TrackInformation
::operator =(const RE01TrackInformation& aTrackInfo)
{
@@ -116,11 +119,12 @@ RE01TrackInformation& RE01TrackInformation
fSourceMomentum = aTrackInfo.fSourceMomentum;
fSourceEnergy = aTrackInfo.fSourceEnergy;
fSourceTime = aTrackInfo.fSourceTime;
fSuspendedStepID = -1;
return *this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01TrackInformation::SetSourceTrackInformation(const G4Track* aTrack)
{
fSourceTrackID = aTrack->GetTrackID();
@@ -131,7 +135,7 @@ void RE01TrackInformation::SetSourceTrackInformation(const G4Track* aTrack)
fSourceTime = aTrack->GetGlobalTime();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01TrackInformation::Print() const
{
G4cout
@@ -1,64 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file runAndEvent/RE01/src/RE01UnknownDecayPhysics.cc
/// \brief Implementation of the RE01UnknownDecayPhysics class
//
// $Id: RE01UnknownDecayPhysics.cc 68761 2013-04-05 12:35:00Z gcosmo $
//
#include "RE01UnknownDecayPhysics.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01UnknownDecayPhysics::RE01UnknownDecayPhysics(const G4String& name)
: G4VPhysicsConstructor(name)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RE01UnknownDecayPhysics::~RE01UnknownDecayPhysics()
{;}
#include "G4ProcessManager.hh"
#include "G4UnknownParticle.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01UnknownDecayPhysics::ConstructParticle()
{
G4UnknownParticle::UnknownParticleDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RE01UnknownDecayPhysics::ConstructProcess()
{
// Add Decay Process
aParticleIterator->reset();
while( (*aParticleIterator)() ){
G4ParticleDefinition* particle = aParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if(particle->GetParticleName()=="unknown") {
pmanager ->AddProcess(&fUnknownDecay);
pmanager ->SetProcessOrdering(&fUnknownDecay, idxPostStep);
}
}
}