13 #include "G4NavigationHistory.hh" 14 #include "G4VPhysicalVolume.hh" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 33 edm::LogInfo(
"HFShower") <<
"HFShowerFibreBundle intialized with factors: " 34 << facTube <<
" for the straight portion and " 35 << facCone <<
" for the curved portion";
44 std::vector<double> neta;
46 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
47 int index =
static_cast<int>(neta[
ii]);
50 ir = index/10; ifib = index%10;
56 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
57 int index =
static_cast<int>(neta[
ii]);
60 ir = index/10; ifib = index%10;
65 edm::LogInfo(
"HFShower") <<
"HFShowerFibreBundle: gets the Index matches " 66 <<
"for " << neta.size() <<
" PMTs";
67 for (
unsigned int ii=0;
ii<neta.size();
ii++)
69 <<
"] = " <<
pmtR1[
ii] <<
" fibreR[" <<
ii 71 <<
"] = " <<
pmtR2[
ii] <<
" fibreL[" <<
ii 74 edm::LogWarning(
"HFShower") <<
"HFShowerFibreBundle: cannot get filtered " 75 <<
" view for " << attribute <<
" matching " 90 std::stringstream sss;
91 for (
unsigned int ig=0; ig<
rTable.size(); ig++) {
92 if(ig/10*10 == ig) { sss <<
"\n"; }
93 sss <<
" " <<
rTable[ig]/cm;
96 <<
" rTable(cm):" << sss.str();
103 const G4StepPoint * preStepPoint = aStep->GetPreStepPoint();
104 const G4VTouchable* touch = preStepPoint->GetTouchable();
105 int boxNo = touch->GetReplicaNumber(1);
106 int pmtNo = touch->GetReplicaNumber(0);
116 double edep = aStep->GetTotalEnergyDeposit();
117 LogDebug(
"HFShower") <<
"HFShowerFibreBundle: Box " << boxNo <<
" PMT " 118 << pmtNo <<
" Mapped Indices " <<
indexR <<
", " 119 <<
indexF <<
" Edeposit " << edep/
MeV <<
" MeV";
124 const G4Track *aTrack = aStep->GetTrack();
125 const G4ParticleDefinition *particleDef = aTrack->GetDefinition();
126 double stepl = aStep->GetStepLength();
127 double beta = preStepPoint->GetBeta();
128 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
129 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->
130 GetTopTransform().TransformAxis(pDir);
133 localMom.x(), localMom.y(),
134 localMom.z(), stepl);
137 localMom.x(), localMom.y(),
138 localMom.z(), stepl);
141 LogDebug(
"HFShower") <<
"HFShowerFibreBundle::getHits: for particle " 142 << particleDef->GetParticleName() <<
" Step " << stepl
143 <<
" Beta " << beta <<
" Direction " << pDir
144 <<
" Local " << localMom <<
" p.e. " <<
photons;
158 LogDebug(
"HFShower") <<
"HFShowerFibreBundle::getRadius: R " <<
indexR 161 if (indexF == 2) r =-
r;
163 LogDebug(
"HFShower") <<
"HFShowerFibreBundle: Radius (" <<
indexR <<
"/" 164 << indexF <<
") " <<
r;
173 LogDebug(
"HFShower") <<
"HFShowerFibreBundle:getDDDArray called for " <<
str;
180 const std::vector<double> & fvec = value.
doubles();
181 int nval = fvec.size();
183 edm::LogError(
"HFShower") <<
"HFShowerFibreBundle: # of " << str
184 <<
" bins " << nval <<
" < 2 ==> illegal";
186 <<
"nval < 2 for array " << str <<
"\n";
193 <<
"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
virtual ~HFShowerFibreBundle()
std::vector< int > pmtFib1
std::vector< double > rTable
HFShowerFibreBundle(const std::string &name, const DDCompactView &cpv, edm::ParameterSet const &p)
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
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::...
double getHits(const G4Step *aStep, bool type)
void initRun(const HcalDDDSimConstants *)
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)
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)