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]);
39 int ir = -1, ifib = -1;
48 for (
unsigned int ii = 0;
ii < neta.size();
ii++) {
49 int index =
static_cast<int>(neta[
ii]);
50 int ir = -1, ifib = -1;
59 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT: gets the Index matches for " << neta.size() <<
" PMTs";
60 for (
unsigned int ii = 0;
ii < neta.size();
ii++) {
68 <<
" view for " << attribute <<
" matching " <<
value;
82 std::stringstream sss;
83 for (
unsigned int ig = 0; ig <
rTable.size(); ++ig) {
84 if (ig / 10 * 10 == ig) {
87 sss <<
" " <<
rTable[ig] / cm;
95 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
96 const G4VTouchable* touch = preStepPoint->GetTouchable();
97 int boxNo = touch->GetReplicaNumber(2);
98 int pmtNo = touch->GetReplicaNumber(1);
108 double edep = aStep->GetTotalEnergyDeposit();
109 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT: Box " << boxNo <<
" PMT " << pmtNo <<
" Mapped Indices " <<
indexR 115 G4Track* aTrack = aStep->GetTrack();
116 G4ParticleDefinition* particleDef = aTrack->GetDefinition();
117 double stepl = aStep->GetStepLength();
118 double beta = preStepPoint->GetBeta();
119 G4ThreeVector pDir = aTrack->GetDynamicParticle()->GetMomentumDirection();
120 G4ThreeVector localMom = preStepPoint->GetTouchable()->GetHistory()->GetTopTransform().TransformAxis(pDir);
123 edm::LogVerbatim(
"HFShower") <<
"HFShowerPMT::getHits: for particle " << particleDef->GetParticleName() <<
" Step " 124 << stepl <<
" Beta " << beta <<
" Direction " << pDir <<
" Local " << localMom
156 const std::vector<double>& fvec = value.
doubles();
157 int nval = fvec.size();
159 edm::LogError(
"HFShower") <<
"HFShowerPMT: # of " << str <<
" bins " << nval <<
" < 2 ==> illegal";
160 throw cms::Exception(
"Unknown",
"HFShowerPMT") <<
"nval < 2 for array " << str <<
"\n";
166 throw cms::Exception(
"Unknown",
"HFShowerPMT") <<
"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)