34# define DBG(msg) G4cout << msg << G4endl
38#define VDBG(vl, msg) \
39 if(vl <= verboseLevel) \
40 G4cout << msg << G4endl
48 VDBG(1,
"Creating G4MultiSenstiveDetector with name: " << name);
53 VDBG(2,
GetName() <<
" : Destructing G4MultiSensitiveDetector");
60 , fSensitiveDetectors(rhs.fSensitiveDetectors)
62 VDBG(3,
GetName() <<
" : Copy constructor called.");
74 fSensitiveDetectors = rhs.fSensitiveDetectors;
95 for(
auto sd : fSensitiveDetectors)
101 for(
auto sd : fSensitiveDetectors)
107 for(
auto sd : fSensitiveDetectors)
113 VDBG(2,
GetName() <<
" : Called processHits: " << aStep
116 for(
auto sd : fSensitiveDetectors)
117 result &= sd->Hit(aStep);
125 <<
" : This method cannot be called for an instance of type "
126 "G4MultiSensitiveDetector."
127 <<
" First retrieve a contained G4VSensitiveDetector with. i.e. GetSD "
129 <<
" call this method.";
130 G4Exception(
"G4MultiSensitiveDetector::GetCollectionID",
"Det0011",
138 VDBG(2,
GetName() <<
"Cloning an instance of G4MultiSensitiveDetector");
141 for(
auto sd : fSensitiveDetectors)
142 newInst->
AddSD(sd->Clone());
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4MultiSensitiveDetector & operator=(const G4MultiSensitiveDetector &rhs)
virtual G4int GetCollectionID(G4int i) final
void AddSD(G4VSensitiveDetector *sd)
virtual void Initialize(G4HCofThisEvent *)
virtual void EndOfEvent(G4HCofThisEvent *)
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
virtual ~G4MultiSensitiveDetector()
virtual G4VSensitiveDetector * Clone() const
G4MultiSensitiveDetector(G4String name)
G4double GetTotalEnergyDeposit() const
G4VSensitiveDetector & operator=(const G4VSensitiveDetector &right)