4 #include "G4VPhysicalVolume.hh" 5 #include "G4PVPlacement.hh" 6 #include "G4HCofThisEvent.hh" 7 #include "G4TouchableHistory.hh" 10 #include "G4VSolid.hh" 11 #include "G4DynamicParticle.hh" 12 #include "G4ParticleDefinition.hh" 13 #include "G4SDManager.hh" 16 #include "G4PhysicalConstants.hh" 17 #include "G4SystemOfUnits.hh" 23 m_trackManager(manager), hcID(-1), theHC(
nullptr), currentHit(
nullptr) {
33 LogDebug(
"FiberSim") <<
"HFWedgeSD : Initialize called for " << GetName();
44 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
45 const G4VTouchable* touch = preStepPoint->GetTouchable();
47 trackID = aStep->GetTrack()->GetTrackID();
48 edep = aStep->GetTotalEnergyDeposit();
49 time = (preStepPoint->GetGlobalTime())/ns;
53 const G4DynamicParticle* particle = aStep->GetTrack()->GetDynamicParticle();
54 momDir = particle->GetMomentumDirection();
64 LogDebug(
"FiberSim") <<
"HFWedgeSD: Sees" <<
theHC->entries() <<
" hits";
82 std::map<int,HFShowerG4Hit*>::const_iterator it =
hitMap.find(
currentID);
95 <<
" MeV; Time: " <<
time <<
" ns; Position (local) " 97 <<
" direction " <<
momDir;
118 <<
" edep " <<
edep/
MeV <<
" MeV";
129 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
130 return (touch->GetReplicaNumber(0));
HFWedgeSD(const std::string &, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *)
std::vector< PCaloHit > PCaloHitContainer
void updateHit(HFShowerG4Hit *)
void Initialize(G4HCofThisEvent *HCE) override
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
void setLocalPos(const G4ThreeVector &xyz)
type of data representation of DDCompactView
void fillHits(edm::PCaloHitContainer &, const std::string &) override
std::string const collectionName[nCollections]
void setTrackId(G4int trackId)
void clearHits() override
void setHitId(G4int hitId)
HFShowerG4HitsCollection * theHC
void EndOfEvent(G4HCofThisEvent *eventHC) override
void setPrimMomDir(const G4ThreeVector &xyz)
uint32_t setDetUnitId(const G4Step *) override
HFShowerG4Hit * currentHit
void setGlobalPos(const G4ThreeVector &xyz)
void updateEnergy(G4double edep)
HFShowerG4Hit * createNewHit()
std::map< int, HFShowerG4Hit * > hitMap
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection