9 #include "G4NavigationHistory.hh" 10 #include "G4VPhysicalVolume.hh" 13 #include <CLHEP/Units/PhysicalConstants.h> 14 #include <CLHEP/Units/SystemOfUnits.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] / CLHEP::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 76 <<
", " <<
indexF <<
" Edeposit " << edep / CLHEP::MeV <<
" MeV; PE " 82 G4Track* aTrack = aStep->GetTrack();
83 G4ParticleDefinition* particleDef = aTrack->GetDefinition();
84 double stepl = aStep->GetStepLength();
85 double beta = preStepPoint->GetBeta();
86 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
87 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformAxis(pDir);
88 photons =
cherenkov_->computeNPEinPMT(particleDef,
beta, localMom.x(), localMom.y(), localMom.z(), stepl);
90 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT::getHits: for particle " << particleDef->GetParticleName() <<
" Step " 91 << stepl <<
" Beta " <<
beta <<
" Direction " << pDir <<
" Local " << localMom
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
std::vector< int > pmtLeft_
std::vector< int > pmtRight_
HFShowerPMT(const std::string &name, const HcalDDDSimConstants *hcons, const HcalSimulationParameters *hps, edm::ParameterSet const &p)
std::vector< double > rTable
std::vector< int > pmtFib1
std::unique_ptr< HFCherenkov > cherenkov_
const std::vector< double > & getRTableHF() const
double getHits(const G4Step *aStep)
std::vector< int > pmtFiberLeft_
const HcalDDDSimConstants * hcalConstant_
std::vector< int > pmtFiberRight_
const HcalSimulationParameters * hcalsimpar_
std::vector< int > pmtFib2