9 #include "G4MultiSensitiveDetector.hh"
10 #include "G4TouchableHandle.hh"
12 #include "G4StepPoint.hh"
13 #include "G4VPhysicalVolume.hh"
14 #include "G4LogicalVolume.hh"
15 #include "G4VSensitiveDetector.hh"
43 G4StepPoint* fakePreStepPoint = fakeStep->GetPreStepPoint();
44 G4StepPoint* fakePostStepPoint = fakeStep->GetPostStepPoint();
45 G4TouchableHandle a_touchableHandle = fakePreStepPoint->GetTouchableHandle();
54 std::vector<G4double> energies;
55 energies.resize(4,0.);
56 energies[3] = fakeStep->GetTotalEnergyDeposit();
64 G4VPhysicalVolume* physicalVolume = a_touchableHandle->GetVolume();
70 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
71 <<
" particle created in volume '"
72 << physicalVolume->GetName()
76 G4LogicalVolume* logicalVolume = physicalVolume->GetLogicalVolume();
80 fakePreStepPoint->SetMaterial( logicalVolume->GetMaterial() );
81 fakePostStepPoint->SetMaterial( logicalVolume->GetMaterial() );
84 G4VSensitiveDetector* sensitiveDetector =
85 logicalVolume->GetSensitiveDetector();
89 G4cout <<
" ... which has sensitive detector '" << sensitiveDetector->GetName() <<
"'" << G4endl;
92 G4MultiSensitiveDetector* zdcG4MultSD =
dynamic_cast<G4MultiSensitiveDetector*
>(sensitiveDetector);
96 for(
unsigned int i=0;
i<zdcG4MultSD->GetSize();
i++){
97 zdcG4CalibSD =
dynamic_cast<ZDC_G4CalibSD*
>(zdcG4MultSD->GetSD(
i));
102 G4cout <<
" ... which contains calibration sensitive detector '" << zdcG4CalibSD->GetName() <<
"'" << G4endl;
109 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
110 <<
" particle (x,y,z)=("
111 << a_point.x() <<
","
112 << a_point.y() <<
","
113 << a_point.z() <<
") with energy="
115 <<
" was created in volume '"
116 << physicalVolume->GetName()
117 <<
"'; could not find a CalibrationSensitiveDetector"
118 <<
" within ZdcG4MultSD'"
119 << zdcG4MultSD->GetName() <<
"'"
121 G4cout <<
" Using default sensitive detector." << G4endl;
129 zdcG4CalibSD =
dynamic_cast<ZDC_G4CalibSD*
>(sensitiveDetector);
132 G4cout <<
" ... which is a ZDC_G4CalibSD " << G4endl;
134 zdcG4CalibSD->
SpecialHit( fakeStep, energies );
145 G4cout <<
" ... which is a calibration sensitive detector " << G4endl;
150 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
151 <<
" particle (x,y,z)=("
152 << a_point.x() <<
","
153 << a_point.y() <<
","
154 << a_point.z() <<
") with energy="
156 <<
" was created in volume '"
157 << physicalVolume->GetName()
158 <<
"' with sensitive detector '"
159 << sensitiveDetector->GetName()
160 <<
"' which is not a CalibrationSensitiveDetector."
162 G4cout <<
" Using default sensitive detector." << G4endl;
174 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
175 <<
" particle (x,y,z)=("
176 << a_point.x() <<
","
177 << a_point.y() <<
","
178 << a_point.z() <<
") with energy="
180 <<
" was created in volume '"
181 << physicalVolume->GetName()
182 <<
"' which is not sensitive."
184 G4cout <<
" Using default sensitive detector." << G4endl;