13 #include "G4NavigationHistory.hh" 14 #include "G4VPhysicalVolume.hh" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 32 edm::LogInfo(
"HFShower") <<
"HFShowerFibreBundle intialized with factors: " 33 << facTube <<
" for the straight portion and " 34 << facCone <<
" for the curved portion";
43 std::vector<double> neta;
45 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
46 int index =
static_cast<int>(neta[
ii]);
49 ir = index/10; ifib = index%10;
55 for (
unsigned int ii=0;
ii<neta.size();
ii++) {
56 int index =
static_cast<int>(neta[
ii]);
59 ir = index/10; ifib = index%10;
64 edm::LogInfo(
"HFShower") <<
"HFShowerFibreBundle: gets the Index matches " 65 <<
"for " << neta.size() <<
" PMTs";
66 for (
unsigned int ii=0;
ii<neta.size();
ii++)
68 <<
"] = " <<
pmtR1[
ii] <<
" fibreR[" <<
ii 70 <<
"] = " <<
pmtR2[
ii] <<
" fibreL[" <<
ii 73 edm::LogWarning(
"HFShower") <<
"HFShowerFibreBundle: cannot get filtered " 74 <<
" view for " << attribute <<
" matching " 91 for (
unsigned int ig=0; ig<
rTable.size(); ig++)
92 edm::LogInfo(
"HFShower") <<
"HFShowerFibreBundle: rTable[" << ig <<
"] = " 100 const G4StepPoint * preStepPoint = aStep->GetPreStepPoint();
101 const G4VTouchable* touch = preStepPoint->GetTouchable();
102 int boxNo = touch->GetReplicaNumber(1);
103 int pmtNo = touch->GetReplicaNumber(0);
113 double edep = aStep->GetTotalEnergyDeposit();
114 LogDebug(
"HFShower") <<
"HFShowerFibreBundle: Box " << boxNo <<
" PMT " 115 << pmtNo <<
" Mapped Indices " <<
indexR <<
", " 116 <<
indexF <<
" Edeposit " << edep/
MeV <<
" MeV";
121 const G4Track *aTrack = aStep->GetTrack();
122 const G4ParticleDefinition *particleDef = aTrack->GetDefinition();
123 double stepl = aStep->GetStepLength();
124 double beta = preStepPoint->GetBeta();
125 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
126 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->
127 GetTopTransform().TransformAxis(pDir);
130 localMom.x(), localMom.y(),
131 localMom.z(), stepl);
134 localMom.x(), localMom.y(),
135 localMom.z(), stepl);
138 LogDebug(
"HFShower") <<
"HFShowerFibreBundle::getHits: for particle " 139 << particleDef->GetParticleName() <<
" Step " << stepl
140 <<
" Beta " << beta <<
" Direction " << pDir
141 <<
" Local " << localMom <<
" p.e. " <<
photons;
155 LogDebug(
"HFShower") <<
"HFShowerFibreBundle::getRadius: R " <<
indexR 158 if (indexF == 2) r =-
r;
160 LogDebug(
"HFShower") <<
"HFShowerFibreBundle: Radius (" <<
indexR <<
"/" 161 << indexF <<
") " <<
r;
170 LogDebug(
"HFShower") <<
"HFShowerFibreBundle:getDDDArray called for " <<
str;
177 const std::vector<double> & fvec = value.
doubles();
178 int nval = fvec.size();
180 edm::LogError(
"HFShower") <<
"HFShowerFibreBundle: # of " << str
181 <<
" bins " << nval <<
" < 2 ==> illegal";
183 <<
"nval < 2 for array " << str <<
"\n";
190 <<
"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)
type of data representation of DDCompactView
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(G4ParticleTable *, 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 &)