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;
52 edm::LogVerbatim(
"HFShowerPMT") <<
"HFShowerPMT: " << rTable.size() <<
" rTable(cm):" << sss.str();
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
Log< level::Info, true > LogVerbatim
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_
double getHits(const G4Step *aStep)
std::vector< int > pmtFiberLeft_
const std::vector< double > & getRTableHF() const
const HcalDDDSimConstants * hcalConstant_
std::vector< int > pmtFiberRight_
T getParameter(std::string const &) const
const HcalSimulationParameters * hcalsimpar_
std::vector< int > pmtFib2