#include <G4VUserDetectorConstruction.hh>
Inherited by B01DetectorConstruction, B02DetectorConstruction, B03DetectorConstruction, B1DetectorConstruction, B1DetectorConstruction, B1DetectorConstruction, B2aDetectorConstruction, B2bDetectorConstruction, B2bDetectorConstruction, B3DetectorConstruction, B3DetectorConstruction, B4cDetectorConstruction, B4dDetectorConstruction, B4DetectorConstruction, B4DetectorConstruction, B5DetectorConstruction, BrachyDetectorConstruction, CCalDetectorConstruction, CexmcSetup, CML2WorldConstruction, Collimator100BeamLine, Collimator40BeamLine, Collimator50BeamLine, Collimator60BeamLine, Collimator70BeamLine, Collimator80BeamLine, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DicomDetectorConstruction, DMXDetectorConstruction, ElectronBenchmarkDetector, eRositaDetectorConstruction, ExErrorDetectorConstruction, ExExChDetectorConstruction, ExG4DetectorConstruction01, ExG4DetectorConstruction01, ExG4DetectorConstruction01, ExG4DetectorConstruction02, ExG4DetectorConstruction02, ExG4DetectorConstruction02, ExGflashDetectorConstruction, ExN01DetectorConstruction, ExN02DetectorConstruction, ExN03DetectorConstruction, ExN04DetectorConstruction, ExN04DetectorConstruction, ExP01DetectorConstruction, ExP02DetConstrReader, ExP02DetectorConstruction, ExTGDetectorConstruction, ExTGDetectorConstructionWithCpp, ExTGDetectorConstructionWithCuts, ExTGDetectorConstructionWithSD, ExUCNDetectorConstruction, EzDetectorConstruction, F01DetectorConstruction, F02DetectorConstruction, F03DetectorConstruction, F04DetectorConstruction, F05DetectorConstruction, F06DetectorConstruction, FCALTestbeamSetup, FFDetectorConstruction, G01DetectorConstruction, G02DetectorConstruction, G03DetectorConstruction, G04DetectorConstruction, G3toG4DetectorConstruction, G4HumanPhantomConstruction, GammaKnifeDetectorConstruction, GammaRayTelDetectorConstruction, GB01DetectorConstruction, GB02DetectorConstruction, GB03DetectorConstruction, GB04DetectorConstruction, GB05DetectorConstruction, GB06DetectorConstruction, GeometryConstruction, H02DetectorConstruction, LaserDrivenBeamLine, LXeDetectorConstruction, MyDetectorConstruction, OpNoviceDetectorConstruction, Par01DetectorConstruction, Par02DetectorConstruction, PassiveCarbonBeamLine, PassiveProtonBeamLine, PurgMagDetectorConstruction, pyG4VUserDetectorConstruction::CB_G4VUserDetectorConstruction, QDetectorConstruction, QDetectorConstruction, RE01DetectorConstruction, RE02DetectorConstruction, RE03DetectorConstruction, RE04DetectorConstruction, RE05DetectorConstruction, RE06DetectorConstruction, read_gdml.MyDetectorConstruction, read_gdml.MyDetectorConstruction, RMC01DetectorConstruction, test.MyDetectorConstruction, test.MyDetectorConstruction, test.MyDetectorConstruction, test.MyDetectorConstruction, test.MyDetectorConstruction, test.MyDetectorConstruction, TSDetectorConstruction, UltraDetectorConstruction, WLSDetectorConstruction, XDetectorConstruction, XrayFluoDetectorConstruction, XrayFluoGeometry, XrayFluoMercuryDetectorConstruction, XrayFluoPlaneDetectorConstruction, and XrayTelDetectorConstruction.
G4VUserDetectorConstruction::G4VUserDetectorConstruction |
( |
| ) |
|
G4VUserDetectorConstruction::~G4VUserDetectorConstruction |
( |
| ) |
|
|
virtual |
void G4VUserDetectorConstruction::CloneF |
( |
| ) |
|
|
virtual |
Definition at line 109 of file G4VUserDetectorConstruction.cc.
111 typedef std::map<G4FieldManager*,G4FieldManager*> FMtoFMmap;
112 typedef std::pair<G4FieldManager*,G4FieldManager*> FMpair;
113 FMtoFMmap masterToWorker;
115 assert( logVolStore != NULL );
116 for ( G4LogicalVolumeStore::const_iterator it = logVolStore->begin() ; it != logVolStore->end() ; ++it )
124 FMtoFMmap::iterator fmFound = masterToWorker.find(masterFM);
125 if ( fmFound == masterToWorker.end() )
129 std::pair<FMtoFMmap::iterator,bool> insertedEl = masterToWorker.insert( FMpair(masterFM, masterFM->
Clone()) );
130 clonedFM = (insertedEl.first)->
second;
135 msg <<
"Cloning of G4FieldManager failed."
136 <<
" But derived class does not implement cloning. Cannot continue.";
144 clonedFM = (*fmFound).second;
virtual G4FieldManager * Clone() const
std::ostringstream G4ExceptionDescription
static constexpr double second
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
static G4LogicalVolumeStore * GetInstance()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void G4VUserDetectorConstruction::CloneSD |
( |
| ) |
|
|
virtual |
Definition at line 155 of file G4VUserDetectorConstruction.cc.
159 assert( logVolStore != NULL );
161 typedef std::map<G4VSensitiveDetector*,G4VSensitiveDetector*> SDtoSDmap;
162 typedef std::pair<G4VSensitiveDetector*,G4VSensitiveDetector*> SDpair;
163 SDtoSDmap masterToWorker;
165 for ( G4LogicalVolumeStore::const_iterator it = logVolStore->begin() ; it != logVolStore->end() ; ++it )
173 SDtoSDmap::iterator sdFound = masterToWorker.find(masterSD);
174 if ( sdFound == masterToWorker.end() )
178 std::pair<SDtoSDmap::iterator,bool> insertedEl = masterToWorker.insert( SDpair(masterSD,masterSD->
Clone()) );
179 clonedSD = (insertedEl.first)->
second;
184 msg <<
"Cloning of G4VSensitiveDetector requested for:" << masterSD->
GetName() <<
"\n"
188 <<
" But derived class does not implement cloning. Cannot continue.";
196 clonedSD = (*sdFound).second;
std::ostringstream G4ExceptionDescription
static constexpr double second
virtual G4VSensitiveDetector * Clone() const
static G4LogicalVolumeStore * GetInstance()
G4String GetFullPathName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
Implemented in RE02DetectorConstruction, CexmcSetup, GammaRayTelDetectorConstruction, TSDetectorConstruction, CML2WorldConstruction, XrayFluoDetectorConstruction, DetectorConstruction, F01DetectorConstruction, F02DetectorConstruction, F03DetectorConstruction, XrayFluoMercuryDetectorConstruction, DetectorConstruction, DicomDetectorConstruction, DetectorConstruction, DetectorConstruction, XrayFluoPlaneDetectorConstruction, DetectorConstruction, ExN03DetectorConstruction, PurgMagDetectorConstruction, DMXDetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, UltraDetectorConstruction, DetectorConstruction, DetectorConstruction, ExErrorDetectorConstruction, DetectorConstruction, WLSDetectorConstruction, Collimator100BeamLine, Collimator40BeamLine, Collimator50BeamLine, Collimator60BeamLine, Collimator70BeamLine, Collimator80BeamLine, XrayTelDetectorConstruction, DetectorConstruction, G02DetectorConstruction, LaserDrivenBeamLine, RMC01DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, B4cDetectorConstruction, B4dDetectorConstruction, ExG4DetectorConstruction02, DetectorConstruction, ExG4DetectorConstruction02, ExG4DetectorConstruction02, DetectorConstruction, DetectorConstruction, DetectorConstruction, FCALTestbeamSetup, B4DetectorConstruction, B4DetectorConstruction, F04DetectorConstruction, F06DetectorConstruction, DetectorConstruction, DetectorConstruction, ExN02DetectorConstruction, Par02DetectorConstruction, G03DetectorConstruction, ExP01DetectorConstruction, ExG4DetectorConstruction01, ExG4DetectorConstruction01, F05DetectorConstruction, ExG4DetectorConstruction01, DetectorConstruction, LXeDetectorConstruction, DetectorConstruction, DetectorConstruction, FFDetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, XrayFluoGeometry, B5DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, ExExChDetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, RE04DetectorConstruction, BrachyDetectorConstruction, eRositaDetectorConstruction, B2aDetectorConstruction, B2bDetectorConstruction, ExUCNDetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, ElectronBenchmarkDetector, B2bDetectorConstruction, DetectorConstruction, DetectorConstruction, PassiveProtonBeamLine, GB04DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, ExN01DetectorConstruction, DetectorConstruction, DetectorConstruction, DicomPartialDetectorConstruction, DetectorConstruction, DetectorConstruction, MyDetectorConstruction, DetectorConstruction, GB01DetectorConstruction, GB02DetectorConstruction, GB06DetectorConstruction, G3toG4DetectorConstruction, B3DetectorConstruction, B3DetectorConstruction, ExGflashDetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, ExP02DetConstrReader, RE06DetectorConstruction, GammaKnifeDetectorConstruction, PassiveCarbonBeamLine, G4HumanPhantomConstruction, B01DetectorConstruction, B02DetectorConstruction, GB03DetectorConstruction, GB05DetectorConstruction, GeometryConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, G01DetectorConstruction, DetectorConstruction, EzDetectorConstruction, QDetectorConstruction, QDetectorConstruction, OpNoviceDetectorConstruction, ExN04DetectorConstruction, ExP02DetectorConstruction, RE05DetectorConstruction, B1DetectorConstruction, B1DetectorConstruction, B03DetectorConstruction, Par01DetectorConstruction, G04DetectorConstruction, ExTGDetectorConstruction, ExTGDetectorConstructionWithCpp, ExTGDetectorConstructionWithCuts, ExTGDetectorConstructionWithSD, RE01DetectorConstruction, RE03DetectorConstruction, B1DetectorConstruction, XDetectorConstruction, pyG4VUserDetectorConstruction::CB_G4VUserDetectorConstruction, DetectorConstruction, ExN04DetectorConstruction, CCalDetectorConstruction, H02DetectorConstruction, DetectorConstruction, DetectorConstruction, and DetectorConstruction.
G4int G4VUserDetectorConstruction::ConstructParallelGeometries |
( |
| ) |
|
Definition at line 65 of file G4VUserDetectorConstruction.cc.
68 std::vector<G4VUserParallelWorld*>::iterator pwItr;
69 for(pwItr=parallelWorld.begin();pwItr!=parallelWorld.end();pwItr++)
71 (*pwItr)->Construct();
void G4VUserDetectorConstruction::ConstructParallelSD |
( |
| ) |
|
Definition at line 77 of file G4VUserDetectorConstruction.cc.
79 std::vector<G4VUserParallelWorld*>::iterator pwItr;
80 for(pwItr=parallelWorld.begin();pwItr!=parallelWorld.end();pwItr++)
81 { (*pwItr)->ConstructSD(); }
void G4VUserDetectorConstruction::ConstructSDandField |
( |
| ) |
|
|
virtual |
Reimplemented in RE02DetectorConstruction, DicomDetectorConstruction, TSDetectorConstruction, GammaRayTelDetectorConstruction, XrayFluoDetectorConstruction, F01DetectorConstruction, F02DetectorConstruction, XrayFluoMercuryDetectorConstruction, F03DetectorConstruction, DetectorConstruction, XrayFluoPlaneDetectorConstruction, DetectorConstruction, DetectorConstruction, PurgMagDetectorConstruction, DMXDetectorConstruction, DetectorConstruction, WLSDetectorConstruction, UltraDetectorConstruction, DetectorConstruction, LaserDrivenBeamLine, DetectorConstruction, B01DetectorConstruction, DetectorConstruction, DetectorConstruction, B4cDetectorConstruction, B4dDetectorConstruction, F04DetectorConstruction, Par02DetectorConstruction, FCALTestbeamSetup, B4DetectorConstruction, B4DetectorConstruction, F06DetectorConstruction, F05DetectorConstruction, DetectorConstruction, LXeDetectorConstruction, DetectorConstruction, ElectronBenchmarkDetector, B5DetectorConstruction, DetectorConstruction, B2aDetectorConstruction, B2bDetectorConstruction, ExUCNDetectorConstruction, B2bDetectorConstruction, G4HumanPhantomConstruction, GB04DetectorConstruction, DetectorConstruction, DetectorConstruction, DetectorConstruction, GB01DetectorConstruction, GB02DetectorConstruction, GB06DetectorConstruction, B3DetectorConstruction, B3DetectorConstruction, ExGflashDetectorConstruction, RE06DetectorConstruction, GB03DetectorConstruction, GB05DetectorConstruction, RE05DetectorConstruction, Par01DetectorConstruction, G04DetectorConstruction, ExTGDetectorConstructionWithSD, RE01DetectorConstruction, RE03DetectorConstruction, DetectorConstruction, XDetectorConstruction, DetectorConstruction, DetectorConstruction, and DetectorConstruction.
Definition at line 95 of file G4VUserDetectorConstruction.cc.
G4int G4VUserDetectorConstruction::GetNumberOfParallelWorld |
( |
| ) |
const |
Definition at line 48 of file G4VUserDetectorConstruction.cc.
50 std::vector<G4VUserParallelWorld*>::iterator pwItr;
51 for(pwItr=parallelWorld.begin();pwItr!=parallelWorld.end();pwItr++)
53 if((*pwItr)->GetName()==aPW->
GetName())
57 eM +=
"> is already registered to the user detector construction.";
58 G4Exception(
"G4VUserDetectorConstruction::RegisterParallelWorld",
62 parallelWorld.push_back(aPW);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition at line 206 of file G4VUserDetectorConstruction.cc.
210 for(G4LogicalVolumeStore::iterator
pos=store->begin();
pos!=store->end();
pos++)
212 if((*pos)->GetName()==logVolName)
216 G4String eM =
"More than one logical volumes of the name <";
217 eM += (*pos)->GetName();
218 eM +=
"> are found and thus the sensitive detector <";
220 eM +=
"> cannot be uniquely assigned.";
221 G4Exception(
"G4VUserDetectorConstruction::SetSensitiveDetector",
230 G4String eM2 =
"No logical volume of the name <";
232 eM2 +=
"> is found. The specified sensitive detector <";
234 eM2 +=
"> couldn't be assigned to any volume.";
235 G4Exception(
"G4VUserDetectorConstruction::SetSensitiveDetector",
static G4LogicalVolumeStore * GetInstance()
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const G4double pos
Definition at line 241 of file G4VUserDetectorConstruction.cc.
243 assert(logVol!=
nullptr&&aSD!=
nullptr);
253 if ( originalSD ==
nullptr ) {
257 if ( msd !=
nullptr ) {
260 std::ostringstream mn;
261 mn<<
"/MultiSD_"<<logVol->
GetName()<<
"_"<<logVol;
266 msd->
AddSD(originalSD);
void AddSD(G4VSensitiveDetector *sd)
void AddNewDetector(G4VSensitiveDetector *aSD)
static G4SDManager * GetSDMpointer()
const G4String & GetName() const
G4VSensitiveDetector * GetSensitiveDetector() const
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
The documentation for this class was generated from the following files: