13 #include "G4NavigationHistory.hh" 14 #include "G4VPhysicalVolume.hh" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 35 std::vector<double> neta;
37 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
38 int index =
static_cast<int>(neta[
ii]);
41 ir = index/10; ifib = index%10;
47 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
48 int index =
static_cast<int>(neta[
ii]);
51 ir = index/10; ifib = index%10;
56 edm::LogInfo(
"HFShower") <<
"HFShowerPMT: gets the Index matches for " 57 << neta.size() <<
" PMTs";
58 for (
unsigned int ii=0;
ii<neta.size();
ii++)
59 edm::LogInfo(
"HFShower") <<
"HFShowerPMT: rIndexR[" <<
ii <<
"] = " 60 <<
pmtR1[
ii] <<
" fibreR[" <<
ii <<
"] = " 62 <<
pmtR2[
ii] <<
" fibreL[" <<
ii <<
"] = " 66 <<
" view for " << attribute <<
" matching " 83 for (
unsigned int ig=0; ig<
rTable.size(); ig++)
84 edm::LogInfo(
"HFShower") <<
"HFShowerPMT: rTable[" << ig <<
"] = " 92 G4StepPoint * preStepPoint = aStep->GetPreStepPoint();
93 const G4VTouchable* touch = preStepPoint->GetTouchable();
94 int boxNo = touch->GetReplicaNumber(2);
95 int pmtNo = touch->GetReplicaNumber(1);
105 double edep = aStep->GetTotalEnergyDeposit();
106 LogDebug(
"HFShower") <<
"HFShowerPMT: Box " << boxNo <<
" PMT " 107 << pmtNo <<
" Mapped Indices " <<
indexR <<
", " 108 <<
indexF <<
" Edeposit " << edep/
MeV <<
" MeV; PE " 114 G4Track *aTrack = aStep->GetTrack();
115 G4ParticleDefinition *particleDef = aTrack->GetDefinition();
116 double stepl = aStep->GetStepLength();
117 double beta = preStepPoint->GetBeta();
118 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
119 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->
120 GetTopTransform().TransformAxis(pDir);
122 localMom.y(), localMom.z(), stepl);
124 LogDebug(
"HFShower") <<
"HFShowerPMT::getHits: for particle " 125 << particleDef->GetParticleName() <<
" Step " << stepl
126 <<
" Beta " << beta <<
" Direction " << pDir
127 <<
" Local " << localMom <<
" p.e. " <<
photons;
144 if (indexF == 2) r =-
r;
146 LogDebug(
"HFShower") <<
"HFShowerPMT: Radius (" <<
indexR <<
"/" << indexF
156 LogDebug(
"HFShower") <<
"HFShowerPMT:getDDDArray called for " <<
str;
163 const std::vector<double> & fvec = value.
doubles();
164 int nval = fvec.size();
167 <<
" bins " << nval <<
" < 2 ==> illegal";
169 <<
"nval < 2 for array " << str <<
"\n";
176 <<
"cannot get array " << str <<
"\n";
T getParameter(std::string const &) const
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
std::vector< double > rTable
std::vector< int > pmtFib1
type of data representation of DDCompactView
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void initRun(G4ParticleTable *, HcalDDDSimConstants *)
double getHits(const G4Step *aStep)
const std::vector< double > & getRTableHF() const
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
HFShowerPMT(const std::string &name, const DDCompactView &cpv, edm::ParameterSet const &p)
DDsvalues_type mergedSpecifics() const
bool firstChild()
set the current node to the first child ...
std::vector< int > pmtFib2
int computeNPEinPMT(const G4ParticleDefinition *pDef, double pBeta, double u, double v, double w, double step_length)