CMS 3D CMS Logo

DreamSD.cc
Go to the documentation of this file.
1 
2 #include <memory>
3 
14 
15 #include "G4LogicalVolume.hh"
16 #include "G4LogicalVolumeStore.hh"
17 #include "G4Poisson.hh"
18 #include "G4Step.hh"
19 #include "G4Track.hh"
20 #include "G4VProcess.hh"
21 
23 
24 // Histogramming
26 
27 // Cherenkov
30 
31 #include "G4PhysicalConstants.hh"
32 #include "G4SystemOfUnits.hh"
33 
34 //#define EDM_ML_DEBUG
35 
36 //________________________________________________________________________________________
38  const edm::EventSetup &es,
39  const SensitiveDetectorCatalog &clg,
40  edm::ParameterSet const &p,
41  const SimTrackManager *manager)
42  : CaloSD(name, es, clg, p, manager) {
43  edm::ParameterSet m_EC = p.getParameter<edm::ParameterSet>("ECalSD");
44  useBirk_ = m_EC.getParameter<bool>("UseBirkLaw");
45  doCherenkov_ = m_EC.getParameter<bool>("doCherenkov");
46  birk1_ = m_EC.getParameter<double>("BirkC1") * (CLHEP::g / (CLHEP::MeV * CLHEP::cm2));
47  birk2_ = m_EC.getParameter<double>("BirkC2");
48  birk3_ = m_EC.getParameter<double>("BirkC3");
49  slopeLY_ = m_EC.getParameter<double>("SlopeLightYield");
50  readBothSide_ = m_EC.getUntrackedParameter<bool>("ReadBothSide", false);
51  dd4hep_ = p.getParameter<bool>("g4GeometryDD4hepSource");
52 
53  chAngleIntegrals_.reset(nullptr);
54 
55  edm::LogVerbatim("EcalSim") << "Constructing a DreamSD with name " << GetName()
56  << "\nDreamSD:: Use of Birks law is set to " << useBirk_
57  << " with three constants kB = " << birk1_ << ", C1 = " << birk2_ << ", C2 = " << birk3_
58  << "\n Slope for Light yield is set to " << slopeLY_
59  << "\n Parameterization of Cherenkov is set to " << doCherenkov_
60  << ", readout both sides is " << readBothSide_ << " and dd4hep flag " << dd4hep_;
61 #ifdef EDM_ML_DEBUG
62  edm::LogVerbatim("EcalSim") << GetName() << " initialized";
63  const G4LogicalVolumeStore *lvs = G4LogicalVolumeStore::GetInstance();
64  unsigned int k(0);
65  for (auto lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite, ++k)
66  edm::LogVerbatim("EcalSim") << "Volume[" << k << "] " << (*lvcite)->GetName();
67 #endif
68  initMap(name, es);
69 }
70 
71 //________________________________________________________________________________________
72 double DreamSD::getEnergyDeposit(const G4Step *aStep) {
73  // take into account light collection curve for crystals
74  double weight = curve_LY(aStep, side_);
75  if (useBirk_)
77  double edep = aStep->GetTotalEnergyDeposit() * weight;
78 
79  // Get Cerenkov contribution
80  if (doCherenkov_) {
81  edep += cherenkovDeposit_(aStep);
82  }
83 #ifdef EDM_ML_DEBUG
84  edm::LogVerbatim("EcalSim") << "DreamSD:: " << aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() << " Side "
85  << side_ << " Light Collection Efficiency " << weight << " Weighted Energy Deposit "
86  << edep / CLHEP::MeV << " MeV";
87 #endif
88  return edep;
89 }
90 
91 //________________________________________________________________________________________
93  // Get the material and set properties if needed
94  DimensionMap::const_iterator ite = xtalLMap_.begin();
95  const G4LogicalVolume *lv = (ite->first);
96  G4Material *material = lv->GetMaterial();
97 #ifdef EDM_ML_DEBUG
98  edm::LogVerbatim("EcalSim") << "DreamSD::initRun: Initializes for material " << material->GetName() << " in "
99  << lv->GetName();
100 #endif
101  materialPropertiesTable_ = material->GetMaterialPropertiesTable();
103  if (!setPbWO2MaterialProperties_(material)) {
104  edm::LogWarning("EcalSim") << "Couldn't retrieve material properties table\n Material = " << material->GetName();
105  }
106  materialPropertiesTable_ = material->GetMaterialPropertiesTable();
107  }
108 }
109 
110 //________________________________________________________________________________________
111 uint32_t DreamSD::setDetUnitId(const G4Step *aStep) {
112  const G4VTouchable *touch = aStep->GetPreStepPoint()->GetTouchable();
113  uint32_t id = (touch->GetReplicaNumber(1)) * 10 + (touch->GetReplicaNumber(0));
114  side_ = readBothSide_ ? -1 : 1;
115  if (side_ < 0) {
116  ++id;
117  }
118 #ifdef EDM_ML_DEBUG
119  edm::LogVerbatim("EcalSim") << "DreamSD:: ID " << id;
120 #endif
121  return id;
122 }
123 
124 //________________________________________________________________________________________
126  if (dd4hep_) {
128  es.get<IdealGeometryRecord>().get(cpv);
129  const cms::DDFilter filter("ReadOutName", sd);
130  cms::DDFilteredView fv((*cpv), filter);
131  while (fv.firstChild()) {
132  std::string name = static_cast<std::string>(dd4hep::dd::noNamespace(fv.name()));
133  std::vector<double> paras(fv.parameters());
134 #ifdef EDM_ML_DEBUG
135  edm::LogVerbatim("EcalSim") << "DreamSD::initMap (for " << sd << "): Solid " << name << " Shape "
136  << cms::dd::name(cms::DDSolidShapeMap, fv.shape()) << " Parameter 0 = " << paras[0];
137 #endif
138  // Set length to be the largest size, width the smallest
139  std::sort(paras.begin(), paras.end());
140  double length = 2.0 * k_ScaleFromDD4HepToG4 * paras.back();
141  double width = 2.0 * k_ScaleFromDD4HepToG4 * paras.front();
142  fillMap(name, length, width);
143  }
144  } else {
146  es.get<IdealGeometryRecord>().get(cpv);
147  DDSpecificsMatchesValueFilter filter{DDValue("ReadOutName", sd, 0)};
148  DDFilteredView fv((*cpv), filter);
149  fv.firstChild();
150  bool dodet = true;
151  const G4LogicalVolumeStore *lvs = G4LogicalVolumeStore::GetInstance();
152  while (dodet) {
153  const DDSolid &sol = fv.logicalPart().solid();
154  std::vector<double> paras(sol.parameters());
155  G4String name = sol.name().name();
156 #ifdef EDM_ML_DEBUG
157  edm::LogVerbatim("EcalSim") << "DreamSD::initMap (for " << sd << "): Solid " << name << " Shape " << sol.shape()
158  << " Parameter 0 = " << paras[0];
159 #endif
160  // Set length to be the largest size, width the smallest
161  std::sort(paras.begin(), paras.end());
162  double length = 2.0 * k_ScaleFromDDDToG4 * paras.back();
163  double width = 2.0 * k_ScaleFromDDDToG4 * paras.front();
164  G4LogicalVolume *lv = nullptr;
165  for (auto lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
166  if ((*lvcite)->GetName() == name) {
167  lv = (*lvcite);
168  break;
169  }
170  xtalLMap_.insert(std::pair<G4LogicalVolume *, Doubles>(lv, Doubles(length, width)));
171 #ifdef EDM_ML_DEBUG
172  edm::LogVerbatim("EcalSim") << "DreamSD " << name << ":" << lv << ":" << length << ":" << width;
173 #endif
174  dodet = fv.next();
175  }
176  }
177 #ifdef EDM_ML_DEBUG
178  edm::LogVerbatim("EcalSim") << "DreamSD: Length Table for ReadOutName = " << sd << ":";
179 #endif
180  DimensionMap::const_iterator ite = xtalLMap_.begin();
181  int i = 0;
182  for (; ite != xtalLMap_.end(); ite++, i++) {
183  G4String name = "Unknown";
184  if (ite->first != nullptr)
185  name = (ite->first)->GetName();
186 #ifdef EDM_ML_DEBUG
187  edm::LogVerbatim("EcalSim") << " " << i << " " << ite->first << " " << name << " L = " << ite->second.first
188  << " W = " << ite->second.second;
189 #endif
190  }
191 }
192 
193 //________________________________________________________________________________________
194 void DreamSD::fillMap(const std::string &name, double length, double width) {
195  const G4LogicalVolumeStore *lvs = G4LogicalVolumeStore::GetInstance();
196  edm::LogVerbatim("EcalSim") << "LV Store with " << lvs->size() << " elements";
197  G4LogicalVolume *lv = nullptr;
198  for (auto lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++) {
199  edm::LogVerbatim("EcalSim") << name << " vs " << (*lvcite)->GetName();
200  if ((*lvcite)->GetName() == static_cast<G4String>(name)) {
201  lv = (*lvcite);
202  break;
203  }
204  }
205 #ifdef EDM_ML_DEBUG
206  edm::LogVerbatim("EcalSim") << "DreamSD::fillMap (for " << name << " Logical Volume " << lv << " Length " << length
207  << " Width " << width;
208 #endif
209  xtalLMap_.insert(std::pair<G4LogicalVolume *, Doubles>(lv, Doubles(length, width)));
210 }
211 
212 //________________________________________________________________________________________
213 double DreamSD::curve_LY(const G4Step *aStep, int flag) {
214  auto const stepPoint = aStep->GetPreStepPoint();
215  auto const lv = stepPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
216  G4String nameVolume = lv->GetName();
217 
218  double weight = 1.;
219  G4ThreeVector localPoint = setToLocal(stepPoint->GetPosition(), stepPoint->GetTouchable());
220  double crlength = crystalLength(lv);
221  double localz = localPoint.x();
222  double dapd = 0.5 * crlength - flag * localz; // Distance from closest APD
223  if (dapd >= -0.1 || dapd <= crlength + 0.1) {
224  if (dapd <= 100.)
225  weight = 1.0 + slopeLY_ - dapd * 0.01 * slopeLY_;
226  } else {
227  edm::LogWarning("EcalSim") << "DreamSD: light coll curve : wrong distance "
228  << "to APD " << dapd << " crlength = " << crlength << " crystal name = " << nameVolume
229  << " z of localPoint = " << localz << " take weight = " << weight;
230  }
231 #ifdef EDM_ML_DEBUG
232  edm::LogVerbatim("EcalSim") << "DreamSD, light coll curve : " << dapd << " crlength = " << crlength
233  << " crystal name = " << nameVolume << " z of localPoint = " << localz
234  << " take weight = " << weight;
235 #endif
236  return weight;
237 }
238 
239 //________________________________________________________________________________________
240 double DreamSD::crystalLength(G4LogicalVolume *lv) const {
241  double length = -1.;
242  DimensionMap::const_iterator ite = xtalLMap_.find(lv);
243  if (ite != xtalLMap_.end())
244  length = ite->second.first;
245  return length;
246 }
247 
248 //________________________________________________________________________________________
249 double DreamSD::crystalWidth(G4LogicalVolume *lv) const {
250  double width = -1.;
251  DimensionMap::const_iterator ite = xtalLMap_.find(lv);
252  if (ite != xtalLMap_.end())
253  width = ite->second.second;
254  return width;
255 }
256 
257 //________________________________________________________________________________________
258 // Calculate total cherenkov deposit
259 // Inspired by Geant4's Cherenkov implementation
260 double DreamSD::cherenkovDeposit_(const G4Step *aStep) {
261  double cherenkovEnergy = 0;
263  return cherenkovEnergy;
264  G4Material *material = aStep->GetTrack()->GetMaterial();
265 
266  // Retrieve refractive index
267  G4MaterialPropertyVector *Rindex = materialPropertiesTable_->GetProperty("RINDEX");
268  if (Rindex == nullptr) {
269  edm::LogWarning("EcalSim") << "Couldn't retrieve refractive index";
270  return cherenkovEnergy;
271  }
272 
273  // V.Ivanchenko - temporary close log output for 9.5
274  // Material refraction properties
275  int Rlength = Rindex->GetVectorLength() - 1;
276  double Pmin = Rindex->Energy(0);
277  double Pmax = Rindex->Energy(Rlength);
278 #ifdef EDM_ML_DEBUG
279  edm::LogVerbatim("EcalSim") << "Material properties: \n Pmin = " << Pmin << " Pmax = " << Pmax;
280 #endif
281  // Get particle properties
282  const G4StepPoint *pPreStepPoint = aStep->GetPreStepPoint();
283  const G4StepPoint *pPostStepPoint = aStep->GetPostStepPoint();
284  const G4ThreeVector &x0 = pPreStepPoint->GetPosition();
285  G4ThreeVector p0 = aStep->GetDeltaPosition().unit();
286  const G4DynamicParticle *aParticle = aStep->GetTrack()->GetDynamicParticle();
287  const double charge = aParticle->GetDefinition()->GetPDGCharge();
288  // beta is averaged over step
289  double beta = 0.5 * (pPreStepPoint->GetBeta() + pPostStepPoint->GetBeta());
290  double BetaInverse = 1.0 / beta;
291 
292 #ifdef EDM_ML_DEBUG
293  edm::LogVerbatim("EcalSim") << "Particle properties: \n charge = " << charge << " beta = " << beta;
294 #endif
295 
296  // Now get number of photons generated in this step
297  double meanNumberOfPhotons = getAverageNumberOfPhotons_(charge, beta, material, Rindex);
298  if (meanNumberOfPhotons <= 0.0) { // Don't do anything
299 #ifdef EDM_ML_DEBUG
300  edm::LogVerbatim("EcalSim") << "Mean number of photons is zero: " << meanNumberOfPhotons << ", stopping here";
301 #endif
302  return cherenkovEnergy;
303  }
304 
305  // number of photons is in unit of Geant4...
306  meanNumberOfPhotons *= aStep->GetStepLength();
307 
308  // Now get a poisson distribution
309  int numPhotons = static_cast<int>(G4Poisson(meanNumberOfPhotons));
310  // edm::LogVerbatim("EcalSim") << "Number of photons = " << numPhotons;
311  if (numPhotons <= 0) {
312 #ifdef EDM_ML_DEBUG
313  edm::LogVerbatim("EcalSim") << "Poission number of photons is zero: " << numPhotons << ", stopping here";
314 #endif
315  return cherenkovEnergy;
316  }
317 
318  // Material refraction properties
319  double dp = Pmax - Pmin;
320  double maxCos = BetaInverse / (*Rindex)[Rlength];
321  double maxSin2 = (1.0 - maxCos) * (1.0 + maxCos);
322 
323  // Finally: get contribution of each photon
324  for (int iPhoton = 0; iPhoton < numPhotons; ++iPhoton) {
325  // Determine photon momentum
326  double randomNumber;
327  double sampledMomentum, sampledRI;
328  double cosTheta, sin2Theta;
329 
330  // sample a momentum (not sure why this is needed!)
331  do {
332  randomNumber = G4UniformRand();
333  sampledMomentum = Pmin + randomNumber * dp;
334  sampledRI = Rindex->Value(sampledMomentum);
335  cosTheta = BetaInverse / sampledRI;
336 
337  sin2Theta = (1.0 - cosTheta) * (1.0 + cosTheta);
338  randomNumber = G4UniformRand();
339 
340  } while (randomNumber * maxSin2 > sin2Theta);
341 
342  // Generate random position of photon on cone surface
343  // defined by Theta
344  randomNumber = G4UniformRand();
345 
346  double phi = twopi * randomNumber;
347  double sinPhi = sin(phi);
348  double cosPhi = cos(phi);
349 
350  // Create photon momentum direction vector
351  // The momentum direction is still w.r.t. the coordinate system where the
352  // primary particle direction is aligned with the z axis
353  double sinTheta = sqrt(sin2Theta);
354  double px = sinTheta * cosPhi;
355  double py = sinTheta * sinPhi;
356  double pz = cosTheta;
357  G4ThreeVector photonDirection(px, py, pz);
358 
359  // Rotate momentum direction back to global (crystal) reference system
360  photonDirection.rotateUz(p0);
361 
362  // Create photon position and momentum
363  randomNumber = G4UniformRand();
364  G4ThreeVector photonPosition = x0 + randomNumber * aStep->GetDeltaPosition();
365  G4ThreeVector photonMomentum = sampledMomentum * photonDirection;
366 
367  // Collect energy on APD
368  cherenkovEnergy += getPhotonEnergyDeposit_(photonMomentum, photonPosition, aStep);
369  }
370  return cherenkovEnergy;
371 }
372 
373 //________________________________________________________________________________________
374 // Returns number of photons produced per GEANT-unit (millimeter) in the current
375 // medium. From G4Cerenkov.cc
377  const double beta,
378  const G4Material *aMaterial,
379  const G4MaterialPropertyVector *Rindex) {
380  const double rFact = 369.81 / (eV * cm);
381 
382  if (beta <= 0.0)
383  return 0.0;
384 
385  double BetaInverse = 1. / beta;
386 
387  // Vectors used in computation of Cerenkov Angle Integral:
388  // - Refraction Indices for the current material
389  // - new G4PhysicsOrderedFreeVector allocated to hold CAI's
390 
391  // Min and Max photon momenta
392  int Rlength = Rindex->GetVectorLength() - 1;
393  double Pmin = Rindex->Energy(0);
394  double Pmax = Rindex->Energy(Rlength);
395 
396  // Min and Max Refraction Indices
397  double nMin = (*Rindex)[0];
398  double nMax = (*Rindex)[Rlength];
399 
400  // Max Cerenkov Angle Integral
401  double CAImax = chAngleIntegrals_.get()->GetMaxValue();
402 
403  double dp = 0., ge = 0., CAImin = 0.;
404 
405  // If n(Pmax) < 1/Beta -- no photons generated
406  if (nMax < BetaInverse) {
407  }
408 
409  // otherwise if n(Pmin) >= 1/Beta -- photons generated
410  else if (nMin > BetaInverse) {
411  dp = Pmax - Pmin;
412  ge = CAImax;
413  }
414  // If n(Pmin) < 1/Beta, and n(Pmax) >= 1/Beta, then
415  // we need to find a P such that the value of n(P) == 1/Beta.
416  // Interpolation is performed by the GetPhotonEnergy() and
417  // GetProperty() methods of the G4MaterialPropertiesTable and
418  // the GetValue() method of G4PhysicsVector.
419  else {
420  Pmin = Rindex->Value(BetaInverse);
421  dp = Pmax - Pmin;
422  // need boolean for current implementation of G4PhysicsVector
423  // ==> being phased out
424  double CAImin = chAngleIntegrals_->Value(Pmin);
425  ge = CAImax - CAImin;
426  }
427 
428  // Calculate number of photons
429  double numPhotons = rFact * charge / eplus * charge / eplus * (dp - ge * BetaInverse * BetaInverse);
430 
431  edm::LogVerbatim("EcalSim") << "@SUB=getAverageNumberOfPhotons\nCAImin = " << CAImin << "\nCAImax = " << CAImax
432  << "\ndp = " << dp << ", ge = " << ge << "\nnumPhotons = " << numPhotons;
433  return numPhotons;
434 }
435 
436 //________________________________________________________________________________________
437 // Set lead tungstate material properties on the fly.
438 // Values from Ts42 detector construction
439 bool DreamSD::setPbWO2MaterialProperties_(G4Material *aMaterial) {
440  std::string pbWO2Name("E_PbWO4");
441  if (pbWO2Name != aMaterial->GetName()) { // Wrong material!
442  edm::LogWarning("EcalSim") << "This is not the right material: "
443  << "expecting " << pbWO2Name << ", got " << aMaterial->GetName();
444  return false;
445  }
446 
447  G4MaterialPropertiesTable *table = new G4MaterialPropertiesTable();
448 
449  // Refractive index as a function of photon momentum
450  // FIXME: Should somehow put that in the configuration
451  const int nEntries = 14;
452  double PhotonEnergy[nEntries] = {1.7712 * eV,
453  1.8368 * eV,
454  1.90745 * eV,
455  1.98375 * eV,
456  2.0664 * eV,
457  2.15625 * eV,
458  2.25426 * eV,
459  2.3616 * eV,
460  2.47968 * eV,
461  2.61019 * eV,
462  2.75521 * eV,
463  2.91728 * eV,
464  3.09961 * eV,
465  3.30625 * eV};
466  double RefractiveIndex[nEntries] = {2.17728,
467  2.18025,
468  2.18357,
469  2.18753,
470  2.19285,
471  2.19813,
472  2.20441,
473  2.21337,
474  2.22328,
475  2.23619,
476  2.25203,
477  2.27381,
478  2.30282,
479  2.34666};
480 
481  table->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex, nEntries);
482  aMaterial->SetMaterialPropertiesTable(table); // FIXME: could this leak? What does G4 do?
483 
484  // Calculate Cherenkov angle integrals:
485  // This is an ad-hoc solution (we hold it in the class, not in the material)
486  chAngleIntegrals_ = std::make_unique<G4PhysicsOrderedFreeVector>();
487 
488  int index = 0;
489  double currentRI = RefractiveIndex[index];
490  double currentPM = PhotonEnergy[index];
491  double currentCAI = 0.0;
492  chAngleIntegrals_.get()->InsertValues(currentPM, currentCAI);
493  double prevPM = currentPM;
494  double prevCAI = currentCAI;
495  double prevRI = currentRI;
496  while (++index < nEntries) {
497  currentRI = RefractiveIndex[index];
498  currentPM = PhotonEnergy[index];
499  currentCAI = 0.5 * (1.0 / (prevRI * prevRI) + 1.0 / (currentRI * currentRI));
500  currentCAI = prevCAI + (currentPM - prevPM) * currentCAI;
501 
502  chAngleIntegrals_.get()->InsertValues(currentPM, currentCAI);
503 
504  prevPM = currentPM;
505  prevCAI = currentCAI;
506  prevRI = currentRI;
507  }
508 
509 #ifdef EDM_ML_DEBUG
510  edm::LogVerbatim("EcalSim") << "Material properties set for " << aMaterial->GetName();
511 #endif
512  return true;
513 }
514 
515 //________________________________________________________________________________________
516 // Calculate energy deposit of a photon on APD
517 // - simple tracing to APD position (straight line);
518 // - configurable reflection probability if not straight to APD;
519 // - APD response function
520 double DreamSD::getPhotonEnergyDeposit_(const G4ThreeVector &p, const G4ThreeVector &x, const G4Step *aStep) {
521  double energy = 0;
522 
523  // Crystal dimensions
524 
525  // edm::LogVerbatim("EcalSim") << p << x;
526 
527  // 1. Check if this photon goes straight to the APD:
528  // - assume that APD is at x=xtalLength/2.0
529  // - extrapolate from x=x0 to x=xtalLength/2.0 using momentum in x-y
530 
531  G4StepPoint *stepPoint = aStep->GetPreStepPoint();
532  G4LogicalVolume *lv = stepPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
533  G4String nameVolume = lv->GetName();
534 
535  double crlength = crystalLength(lv);
536  double crwidth = crystalWidth(lv);
537  double dapd = 0.5 * crlength - x.x(); // Distance from closest APD
538  double y = p.y() / p.x() * dapd;
539 
540 #ifdef EDM_ML_DEBUG
541  edm::LogVerbatim("EcalSim") << "Distance to APD: " << dapd << " - y at APD: " << y;
542 #endif
543  // Not straight: compute probability
544  if (std::abs(y) > crwidth * 0.5) {
545  }
546 
547  // 2. Retrieve efficiency for this wavelength (in nm, from MeV)
548  double waveLength = p.mag() * 1.239e8;
549 
550  energy = p.mag() * PMTResponse::getEfficiency(waveLength);
551 #ifdef EDM_ML_DEBUG
552  edm::LogVerbatim("EcalSim") << "Wavelength: " << waveLength << " - Energy: " << energy;
553 #endif
554  return energy;
555 }
DreamSD::chAngleIntegrals_
std::unique_ptr< G4PhysicsOrderedFreeVector > chAngleIntegrals_
Table of Cherenkov angle integrals vs photon momentum.
Definition: DreamSD.h:65
DreamSD::readBothSide_
bool readBothSide_
Definition: DreamSD.h:57
DDAxes::y
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
SimTrackManager
Definition: SimTrackManager.h:35
DreamSD::Doubles
std::pair< double, double > Doubles
Definition: DreamSD.h:33
mps_fire.i
i
Definition: mps_fire.py:428
cms::DDFilteredView::parameters
const std::vector< double > parameters() const
extract shape parameters
Definition: DDFilteredView.cc:536
ESTransientHandle.h
metDiagnosticParameterSet_cfi.nMin
nMin
Definition: metDiagnosticParameterSet_cfi.py:10
DreamSD::fillMap
void fillMap(const std::string &, double, double)
Definition: DreamSD.cc:194
HLT_FULL_cff.beta
beta
Definition: HLT_FULL_cff.py:8686
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
mps_merge.weight
weight
Definition: mps_merge.py:88
DreamSD::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: DreamSD.h:54
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
DDSplit.h
DreamSD::initRun
void initRun() override
Definition: DreamSD.cc:92
DreamSD::cherenkovDeposit_
double cherenkovDeposit_(const G4Step *aStep)
Returns the total energy due to Cherenkov radiation.
Definition: DreamSD.cc:260
PMTResponse.h
DreamSD::dd4hep_
bool dd4hep_
Definition: DreamSD.h:57
CaloSD::getAttenuation
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:685
DreamSD::getPhotonEnergyDeposit_
double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep)
Returns energy deposit for a given photon.
Definition: DreamSD.cc:520
MeV
const double MeV
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
DreamSD::crystalWidth
double crystalWidth(G4LogicalVolume *) const
Definition: DreamSD.cc:249
DreamSD::doCherenkov_
bool doCherenkov_
Definition: DreamSD.h:57
cms::DDFilteredView
Definition: DDFilteredView.h:70
DreamSD::materialPropertiesTable_
G4MaterialPropertiesTable * materialPropertiesTable_
Definition: DreamSD.h:66
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DDCompactView.h
cms::DDFilteredView::name
std::string_view name() const
Definition: DDFilteredView.cc:854
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DreamSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: DreamSD.cc:111
DDSolid::shape
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:119
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDFilteredView::firstChild
bool firstChild()
set the current node to the first child ...
Definition: DDFilteredView.cc:86
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DDFilteredView.h
cms::DDFilter
Definition: DDFilteredView.h:59
DreamSD::initMap
void initMap(const std::string &, const edm::EventSetup &)
Definition: DreamSD.cc:125
cms::dd::name
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
CaloSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
Definition: CaloSD.cc:387
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:158
DreamSD::useBirk_
bool useBirk_
Definition: DreamSD.h:57
Service.h
DreamSD::getAverageNumberOfPhotons_
double getAverageNumberOfPhotons_(const double charge, const double beta, const G4Material *aMaterial, const G4MaterialPropertyVector *rIndex)
Returns average number of photons created by track.
Definition: DreamSD.cc:376
DDFilteredView::next
bool next()
set current node to the next node in the filtered tree
Definition: DDFilteredView.cc:67
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDBase::name
const N & name() const
Definition: DDBase.h:59
cms::DDFilteredView::firstChild
bool firstChild()
set the current node to the first child
Definition: DDFilteredView.cc:268
DreamSD::xtalLMap_
DimensionMap xtalLMap_
Definition: DreamSD.h:60
DDSolid.h
cms::DDFilteredView::shape
const cms::DDSolidShape shape() const
Definition: DDFilteredView.cc:553
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
DDFilteredView.h
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
DDCompactView.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
DDValue.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DreamSD::setPbWO2MaterialProperties_
bool setPbWO2MaterialProperties_(G4Material *aMaterial)
Sets material properties at run-time...
Definition: DreamSD.cc:439
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
DreamSD::birk1_
double birk1_
Definition: DreamSD.h:58
edm::ParameterSet
Definition: ParameterSet.h:47
cms::DDSolidShapeMap
const std::array< const cms::dd::NameValuePair< DDSolidShape >, 19 > DDSolidShapeMap
Definition: DDSolidShapes.h:97
PMTResponse::getEfficiency
static double getEfficiency(const double &waveLengthNm)
Return efficiency for given photon wavelength (in nm)
Definition: PMTResponse.cc:6
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
DreamSD.h
DDFilter.h
DDName::name
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
TrackInformation.h
get
#define get
DreamSD::birk2_
double birk2_
Definition: DreamSD.h:58
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
DreamSD::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: DreamSD.h:55
DDAxes::phi
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
DreamSD::crystalLength
double crystalLength(G4LogicalVolume *) const
Definition: DreamSD.cc:240
dataAnalyzerFineBiningParameters_cff.Pmax
Pmax
Definition: dataAnalyzerFineBiningParameters_cff.py:10
DDValue
Definition: DDValue.h:21
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
genVertex_cff.x
x
Definition: genVertex_cff.py:12
DreamSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: DreamSD.cc:72
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:121
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
DreamSD::curve_LY
double curve_LY(const G4Step *, int)
Definition: DreamSD.cc:213
DreamSD::side_
int side_
Definition: DreamSD.h:62
sd
double sd
Definition: CascadeWrapper.h:113
DreamSD::DreamSD
DreamSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: DreamSD.cc:37
DDFilteredView
Definition: DDFilteredView.h:20
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DreamSD::slopeLY_
double slopeLY_
Definition: DreamSD.h:59
TableParser.table
table
Definition: TableParser.py:111
edm::Log
Definition: MessageLogger.h:70
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
metDiagnosticParameterSet_cfi.nMax
nMax
Definition: metDiagnosticParameterSet_cfi.py:11
weight
Definition: weight.py:1
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
CaloSD
Definition: CaloSD.h:38
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
DreamSD::birk3_
double birk3_
Definition: DreamSD.h:58