13 #include "G4NavigationHistory.hh" 14 #include "G4VPhysicalVolume.hh" 17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 32 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle intialized with factors: " << facTube
33 <<
" for the straight portion and " << facCone <<
" for the curved portion";
42 std::vector<double> neta;
44 for (
unsigned int ii = 0;
ii < neta.size();
ii++) {
45 int index =
static_cast<int>(neta[
ii]);
46 int ir = -1, ifib = -1;
55 for (
unsigned int ii = 0;
ii < neta.size();
ii++) {
56 int index =
static_cast<int>(neta[
ii]);
57 int ir = -1, ifib = -1;
65 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle: gets the Index matches for " << neta.size() <<
" PMTs";
66 for (
unsigned int ii = 0;
ii < neta.size();
ii++)
71 edm::LogWarning(
"HFShower") <<
"HFShowerFibreBundle: cannot get filtered " 72 <<
" view for " << attribute <<
" matching " <<
value;
84 std::stringstream sss;
85 for (
unsigned int ig = 0; ig <
rTable.size(); ig++) {
86 if (ig / 10 * 10 == ig) {
89 sss <<
" " <<
rTable[ig] / cm;
97 const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
98 const G4VTouchable* touch = preStepPoint->GetTouchable();
99 int boxNo = touch->GetReplicaNumber(1);
100 int pmtNo = touch->GetReplicaNumber(0);
110 double edep = aStep->GetTotalEnergyDeposit();
111 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle: Box " << boxNo <<
" PMT " << pmtNo <<
" Mapped Indices " 117 const G4Track* aTrack = aStep->GetTrack();
118 const G4ParticleDefinition* particleDef = aTrack->GetDefinition();
119 double stepl = aStep->GetStepLength();
120 double beta = preStepPoint->GetBeta();
121 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
122 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformAxis(pDir);
131 edm::LogVerbatim(
"HFShower") <<
"HFShowerFibreBundle::getHits: for particle " << particleDef->GetParticleName()
132 <<
" Step " << stepl <<
" Beta " << beta <<
" Direction " << pDir <<
" Local " 133 << localMom <<
" p.e. " <<
photons;
164 const std::vector<double>& fvec = value.
doubles();
165 int nval = fvec.size();
167 edm::LogError(
"HFShower") <<
"HFShowerFibreBundle: # of " << str <<
" bins " << nval <<
" < 2 ==> illegal";
168 throw cms::Exception(
"Unknown",
"HFShowerFibreBundle") <<
"nval < 2 for array " << str <<
"\n";
173 edm::LogError(
"HFShower") <<
"HFShowerFibreBundle: cannot get array " <<
str;
174 throw cms::Exception(
"Unknown",
"HFShowerFibreBundle") <<
"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
double getHits(const G4Step *aStep, bool type)
void initRun(const HcalDDDSimConstants *)
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)
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)