#include <ZDC_EscapedEnergyProcessing.h>
◆ ZDC_EscapedEnergyProcessing()
ZDC_EscapedEnergyProcessing::ZDC_EscapedEnergyProcessing |
( |
ZDC_G4CalibSD * |
SD | ) |
|
◆ ~ZDC_EscapedEnergyProcessing()
ZDC_EscapedEnergyProcessing::~ZDC_EscapedEnergyProcessing |
( |
| ) |
|
◆ Process()
G4bool ZDC_EscapedEnergyProcessing::Process |
( |
G4Step * |
fakeStep | ) |
|
|
virtual |
Implements CaloG4::VEscapedEnergyProcessing.
Definition at line 28 of file ZDC_EscapedEnergyProcessing.cxx.
44 G4StepPoint* fakePreStepPoint = fakeStep->GetPreStepPoint();
45 G4StepPoint* fakePostStepPoint = fakeStep->GetPostStepPoint();
46 G4TouchableHandle a_touchableHandle = fakePreStepPoint->GetTouchableHandle();
55 std::vector<G4double> energies;
56 energies.resize(4,0.);
57 energies[3] = fakeStep->GetTotalEnergyDeposit();
65 G4VPhysicalVolume* physicalVolume = a_touchableHandle->GetVolume();
71 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
72 <<
" particle created in volume '"
73 << physicalVolume->GetName()
77 G4LogicalVolume* logicalVolume = physicalVolume->GetLogicalVolume();
81 fakePreStepPoint->SetMaterial( logicalVolume->GetMaterial() );
82 fakePostStepPoint->SetMaterial( logicalVolume->GetMaterial() );
85 G4VSensitiveDetector* sensitiveDetector =
86 logicalVolume->GetSensitiveDetector();
90 G4cout <<
" ... which has sensitive detector '" << sensitiveDetector->GetName() <<
"'" << G4endl;
93 G4MultiSensitiveDetector* zdcG4MultSD =
dynamic_cast<G4MultiSensitiveDetector*
>(sensitiveDetector);
97 for(
unsigned int i=0;
i<zdcG4MultSD->GetSize();
i++){
98 zdcG4CalibSD =
dynamic_cast<ZDC_G4CalibSD*
>(zdcG4MultSD->GetSD(
i));
103 G4cout <<
" ... which contains calibration sensitive detector '" << zdcG4CalibSD->GetName() <<
"'" << G4endl;
105 zdcG4CalibSD->SpecialHit(fakeStep,energies);
110 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
111 <<
" particle (x,y,z)=("
112 << a_point.x() <<
","
113 << a_point.y() <<
","
114 << a_point.z() <<
") with energy="
116 <<
" was created in volume '"
117 << physicalVolume->GetName()
118 <<
"'; could not find a CalibrationSensitiveDetector"
119 <<
" within ZdcG4MultSD'"
120 << zdcG4MultSD->GetName() <<
"'"
122 G4cout <<
" Using default sensitive detector." << G4endl;
130 zdcG4CalibSD =
dynamic_cast<ZDC_G4CalibSD*
>(sensitiveDetector);
133 G4cout <<
" ... which is a ZDC_G4CalibSD " << G4endl;
135 zdcG4CalibSD->
SpecialHit( fakeStep, energies );
146 G4cout <<
" ... which is a calibration sensitive detector " << G4endl;
151 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
152 <<
" particle (x,y,z)=("
153 << a_point.x() <<
","
154 << a_point.y() <<
","
155 << a_point.z() <<
") with energy="
157 <<
" was created in volume '"
158 << physicalVolume->GetName()
159 <<
"' with sensitive detector '"
160 << sensitiveDetector->GetName()
161 <<
"' which is not a CalibrationSensitiveDetector."
163 G4cout <<
" Using default sensitive detector." << G4endl;
175 G4cout <<
"ZdcG4::ZDC_EscapedEnergyProcessing::Process - "
176 <<
" particle (x,y,z)=("
177 << a_point.x() <<
","
178 << a_point.y() <<
","
179 << a_point.z() <<
") with energy="
181 <<
" was created in volume '"
182 << physicalVolume->GetName()
183 <<
"' which is not sensitive."
185 G4cout <<
" Using default sensitive detector." << G4endl;
◆ m_defaultSD
The documentation for this class was generated from the following files: