8 #include "G4VPhysicalVolume.hh"
9 #include "G4PVPlacement.hh"
10 #include "G4HCofThisEvent.hh"
11 #include "G4TouchableHistory.hh"
14 #include "G4VSolid.hh"
15 #include "G4DynamicParticle.hh"
16 #include "G4ParticleDefinition.hh"
17 #include "G4SDManager.hh"
40 edm::LogVerbatim(
"FiberSim") <<
"FiberSD : Initialize called for " << GetName() <<
" in collection "
52 double zoffset = 1000;
56 std::vector<HFShowerPhoton> thePE;
57 for (
unsigned int i = 0;
i <
hits.size();
i++) {
63 int trackID = aStep->GetTrack()->GetTrackID();
64 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
65 const G4VTouchable* touch = preStepPoint->GetTouchable();
66 G4LogicalVolume* lv = touch->GetVolume(0)->GetLogicalVolume();
67 int depth = (touch->GetReplicaNumber(0)) % 10;
70 preStepPoint->GetPosition().x(), preStepPoint->GetPosition().y(), preStepPoint->GetPosition().z());
76 edm::LogVerbatim(
"FiberSim") <<
"FiberSD :pre hit position " << aHit->hitPos();
78 aHit->setNpe(
hits.size());
79 aHit->setPos(theHitPos);
80 aHit->setTime(preStepPoint->GetGlobalTime());
81 aHit->setPhoton(thePE);
83 edm::LogVerbatim(
"FiberSim") <<
"FiberSD :ShowerPhoton position " << thePE[0].x() <<
" "
84 << thePE[0].y() <<
" " << thePE[0].z();
87 <<
" DetID: " << aHit->towerId() <<
" Depth: " << aHit->depth()
88 <<
" Track ID: " << aHit->trackId() <<
" Nb. of Cerenkov Photons: " << aHit->npe()
89 <<
" Time: " << aHit->time() <<
" at " << aHit->hitPos();
90 for (
unsigned int i = 0;
i < thePE.size();
i++)
121 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
122 int fibre = (touch->GetReplicaNumber(1)) % 10;
123 int cell = (touch->GetReplicaNumber(2));
124 int tower = (touch->GetReplicaNumber(3));
125 return ((
tower * 1000 + cell) * 10 + fibre);