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) {
28 facCone = m_HF2.getParameter<
double>(
"FactorBundle");
31 <<
" for the straight portion and " <<
facCone <<
" for the curved portion";
39 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT: gets the Index matches for " <<
pmtR1.size() <<
" PMTs";
40 for (
unsigned int ii = 0;
ii <
pmtR1.size();
ii++) {
50 std::stringstream sss;
51 for (
unsigned int ig = 0; ig <
rTable.size(); ig++) {
52 if (ig / 10 * 10 == ig) {
55 sss <<
" " <<
rTable[ig] / CLHEP::cm;
66 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
67 const G4VTouchable* touch = preStepPoint->GetTouchable();
68 int boxNo = touch->GetReplicaNumber(1);
69 int pmtNo = touch->GetReplicaNumber(0);
79 double edep = aStep->GetTotalEnergyDeposit();
80 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle: Box " << boxNo <<
" PMT " << pmtNo <<
" Mapped Indices " 81 <<
indexR <<
", " <<
indexF <<
" Edeposit " << edep / MeV <<
" MeV";
86 const G4Track* aTrack = aStep->GetTrack();
87 const G4ParticleDefinition* particleDef = aTrack->GetDefinition();
88 double stepl = aStep->GetStepLength();
89 double beta = preStepPoint->GetBeta();
90 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
91 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformAxis(pDir);
94 facCone *
cherenkov2_->computeNPEinPMT(particleDef,
beta, localMom.x(), localMom.y(), localMom.z(), stepl);
97 facTube *
cherenkov1_->computeNPEinPMT(particleDef,
beta, localMom.x(), localMom.y(), localMom.z(), stepl);
100 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle::getHits: for particle " << particleDef->GetParticleName()
101 <<
" Step " << stepl <<
" Beta " <<
beta <<
" Direction " << pDir <<
" Local " 102 << localMom <<
" p.e. " <<
photons;
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
std::vector< int > pmtLeft_
virtual ~HFShowerFibreBundle()
std::vector< int > pmtRight_
std::vector< int > pmtFib1
std::vector< double > rTable
const HcalDDDSimConstants * hcalConstant_
const std::vector< double > & getRTableHF() const
HFShowerFibreBundle(const std::string &name, const HcalDDDSimConstants *hcons, const HcalSimulationParameters *hps, edm::ParameterSet const &p)
std::vector< int > pmtFiberLeft_
double getHits(const G4Step *aStep, bool type)
std::unique_ptr< HFCherenkov > cherenkov2_
const HcalSimulationParameters * hcalsimpar_
std::vector< int > pmtFiberRight_
std::unique_ptr< HFCherenkov > cherenkov1_
std::vector< int > pmtFib2