13 #include "G4NavigationHistory.hh" 14 #include "G4VPhysicalVolume.hh" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 36 std::vector<double> neta;
38 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
39 int index =
static_cast<int>(neta[
ii]);
42 ir = index/10; ifib = index%10;
48 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
49 int index =
static_cast<int>(neta[
ii]);
52 ir = index/10; ifib = index%10;
59 << neta.size() <<
" PMTs";
60 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
62 <<
pmtR1[
ii] <<
" fibreR[" <<
ii <<
"] = " 64 <<
pmtR2[
ii] <<
" fibreL[" <<
ii <<
"] = " 70 <<
" view for " << attribute <<
" matching " 85 std::stringstream sss;
86 for (
unsigned int ig=0; ig<
rTable.size(); ++ig) {
87 if(ig/10*10 == ig) { sss <<
"\n"; }
88 sss <<
" " <<
rTable[ig]/cm;
91 <<
" rTable(cm):" << sss.str();
98 G4StepPoint * preStepPoint = aStep->GetPreStepPoint();
99 const G4VTouchable* touch = preStepPoint->GetTouchable();
100 int boxNo = touch->GetReplicaNumber(2);
101 int pmtNo = touch->GetReplicaNumber(1);
111 double edep = aStep->GetTotalEnergyDeposit();
112 LogDebug(
"HFShower") <<
"HFShowerPMT: Box " << boxNo <<
" PMT " 113 << pmtNo <<
" Mapped Indices " <<
indexR <<
", " 114 <<
indexF <<
" Edeposit " << edep/
MeV <<
" MeV; PE " 120 G4Track *aTrack = aStep->GetTrack();
121 G4ParticleDefinition *particleDef = aTrack->GetDefinition();
122 double stepl = aStep->GetStepLength();
123 double beta = preStepPoint->GetBeta();
124 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
125 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->
126 GetTopTransform().TransformAxis(pDir);
128 localMom.y(), localMom.z(), stepl);
130 LogDebug(
"HFShower") <<
"HFShowerPMT::getHits: for particle " 131 << particleDef->GetParticleName() <<
" Step " << stepl
132 <<
" Beta " << beta <<
" Direction " << pDir
133 <<
" Local " << localMom <<
" p.e. " <<
photons;
150 if (indexF == 2) r =-
r;
152 LogDebug(
"HFShower") <<
"HFShowerPMT: Radius (" <<
indexR <<
"/" << indexF
162 LogDebug(
"HFShower") <<
"HFShowerPMT:getDDDArray called for " <<
str;
169 const std::vector<double> & fvec = value.
doubles();
170 int nval = fvec.size();
173 <<
" bins " << nval <<
" < 2 ==> illegal";
175 <<
"nval < 2 for array " << str <<
"\n";
182 <<
"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
void initRun(const HcalDDDSimConstants *)
std::vector< double > rTable
std::vector< int > pmtFib1
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
double getHits(const G4Step *aStep)
const std::vector< double > & getRTableHF() const
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
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
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)