9 #include "G4NavigationHistory.hh"
10 #include "G4VPhysicalVolume.hh"
13 #include "CLHEP/Units/GlobalPhysicalConstants.h"
14 #include "CLHEP/Units/GlobalSystemOfUnits.h"
23 : hcalConstant_(hcons), hcalsimpar_(hps) {
33 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT: gets the Index matches for " <<
pmtR1.size() <<
" PMTs";
34 for (
unsigned int ii = 0;
ii <
pmtR1.size();
ii++) {
40 cherenkov_ = std::make_unique<HFCherenkov>(m_HF);
45 std::stringstream sss;
46 for (
unsigned int ig = 0; ig <
rTable.size(); ++ig) {
47 if (ig / 10 * 10 == ig) {
50 sss <<
" " <<
rTable[ig] / cm;
61 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
62 const G4VTouchable* touch = preStepPoint->GetTouchable();
63 int boxNo = touch->GetReplicaNumber(2);
64 int pmtNo = touch->GetReplicaNumber(1);
74 double edep = aStep->GetTotalEnergyDeposit();
75 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT: Box " << boxNo <<
" PMT " << pmtNo <<
" Mapped Indices " <<
indexR
81 G4Track* aTrack = aStep->GetTrack();
82 G4ParticleDefinition* particleDef = aTrack->GetDefinition();
83 double stepl = aStep->GetStepLength();
84 double beta = preStepPoint->GetBeta();
85 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
86 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformAxis(pDir);
87 photons =
cherenkov_->computeNPEinPMT(particleDef,
beta, localMom.x(), localMom.y(), localMom.z(), stepl);
89 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT::getHits: for particle " << particleDef->GetParticleName() <<
" Step "
90 << stepl <<
" Beta " <<
beta <<
" Direction " << pDir <<
" Local " << localMom