CMS 3D CMS Logo

ECalSD.cc
Go to the documentation of this file.
1 // File: ECalSD.cc
3 // Description: Sensitive Detector class for electromagnetic calorimeters
17 
21 
22 #include "DD4hep/Filter.h"
23 
24 #include "G4LogicalVolumeStore.hh"
25 #include "G4LogicalVolume.hh"
26 #include "G4Step.hh"
27 #include "G4Track.hh"
28 #include "G4VProcess.hh"
29 #include "G4SystemOfUnits.hh"
30 
31 #include <algorithm>
32 
33 //#define EDM_ML_DEBUG
34 
35 using namespace geant_units::operators;
36 
37 template <class T>
38 bool any(const std::vector<T>& v, const T& what) {
39  return std::find(v.begin(), v.end(), what) != v.end();
40 }
41 
43  const edm::EventSetup& es,
44  const SensitiveDetectorCatalog& clg,
45  edm::ParameterSet const& p,
46  const SimTrackManager* manager)
47  : CaloSD(name,
48  es,
49  clg,
50  p,
51  manager,
52  (float)(p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("TimeSliceUnit")),
53  p.getParameter<edm::ParameterSet>("ECalSD").getParameter<bool>("IgnoreTrackID")),
54  ecalSimParameters_(nullptr),
55  numberingScheme_(nullptr) {
56  // static SimpleConfigurable<bool> on1(false, "ECalSD:UseBirkLaw");
57  // static SimpleConfigurable<double> bk1(0.00463,"ECalSD:BirkC1");
58  // static SimpleConfigurable<double> bk2(-0.03, "ECalSD:BirkC2");
59  // static SimpleConfigurable<double> bk3(1.0, "ECalSD:BirkC3");
60  // Values from NIM A484 (2002) 239-244: as implemented in Geant3
61  // useBirk = on1.value();
62  // birk1 = bk1.value()*(g/(MeV*cm2));
63  // birk2 = bk2.value()*(g/(MeV*cm2))*(g/(MeV*cm2));
64  edm::ParameterSet m_EC = p.getParameter<edm::ParameterSet>("ECalSD");
65  useBirk = m_EC.getParameter<bool>("UseBirkLaw");
66  useBirkL3 = m_EC.getParameter<bool>("BirkL3Parametrization");
67  double bunit = (CLHEP::g / (CLHEP::MeV * CLHEP::cm2));
68  birk1 = m_EC.getParameter<double>("BirkC1") * bunit;
69  birk2 = m_EC.getParameter<double>("BirkC2");
70  birk3 = m_EC.getParameter<double>("BirkC3");
71  birkSlope = m_EC.getParameter<double>("BirkSlope");
72  birkCut = m_EC.getParameter<double>("BirkCut");
73  slopeLY = m_EC.getParameter<double>("SlopeLightYield");
74  storeTrack = m_EC.getParameter<bool>("StoreSecondary");
75  crystalMat = m_EC.getUntrackedParameter<std::string>("XtalMat", "E_PbWO4");
76  bool isItTB = m_EC.getUntrackedParameter<bool>("TestBeam", false);
77  bool nullNS = m_EC.getUntrackedParameter<bool>("NullNumbering", false);
78  storeRL = m_EC.getUntrackedParameter<bool>("StoreRadLength", false);
79  scaleRL = m_EC.getUntrackedParameter<double>("ScaleRadLength", 1.0);
80  int dumpGeom = m_EC.getUntrackedParameter<int>("DumpGeometry", 0);
81 
82  //Changes for improved timing simulation
83  storeLayerTimeSim = m_EC.getUntrackedParameter<bool>("StoreLayerTimeSim", false);
84 
85  ageingWithSlopeLY = m_EC.getUntrackedParameter<bool>("AgeingWithSlopeLY", false);
87  ageing.setLumies(p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("DelivLuminosity"),
88  p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("InstLuminosity"));
89 
91  es.get<IdealGeometryRecord>().get(name, esp);
92  if (esp.isValid()) {
94  } else {
95  edm::LogError("EcalSim") << "ECalSD : Cannot find EcalSimulationParameters for " << name;
96  throw cms::Exception("Unknown", "ECalSD") << "Cannot find EcalSimulationParameters for " << name << "\n";
97  }
98 
99  // Use of Weight
101 #ifdef EDM_ML_DEBUG
102  edm::LogVerbatim("EcalSim") << "ECalSD:: useWeight " << useWeight;
103 #endif
106 #ifdef EDM_ML_DEBUG
107  edm::LogVerbatim("EcalSim") << "Names (Depth 1):" << depth1Name << " (Depth 2):" << depth2Name << std::endl;
108 #endif
109  int type(-1);
110  bool dump(false);
111  EcalNumberingScheme* scheme = nullptr;
112  if (nullNS) {
113  scheme = nullptr;
114  } else if (name == "EcalHitsEB") {
115  scheme = dynamic_cast<EcalNumberingScheme*>(new EcalBarrelNumberingScheme());
116  type = 0;
117  dump = ((dumpGeom % 10) > 0);
118  } else if (name == "EcalHitsEE") {
119  scheme = dynamic_cast<EcalNumberingScheme*>(new EcalEndcapNumberingScheme());
120  type = 1;
121  dump = (((dumpGeom / 10) % 10) > 0);
122  } else if (name == "EcalHitsES") {
123  if (isItTB)
124  scheme = dynamic_cast<EcalNumberingScheme*>(new ESTBNumberingScheme());
125  else
126  scheme = dynamic_cast<EcalNumberingScheme*>(new EcalPreshowerNumberingScheme());
127  useWeight = false;
128  type = 2;
129  dump = (((dumpGeom / 100) % 10) > 0);
130  } else {
131  edm::LogWarning("EcalSim") << "ECalSD: ReadoutName not supported";
132  }
133  int type0 = dumpGeom / 1000;
134  type += (10 * type0);
135 
136  if (scheme)
138 #ifdef EDM_ML_DEBUG
139  edm::LogVerbatim("EcalSim") << "Constructing a ECalSD with name " << GetName();
140 #endif
141  if (useWeight) {
142  edm::LogVerbatim("EcalSim") << "ECalSD:: Use of Birks law is set to " << useBirk
143  << " with three constants kB = " << birk1 / bunit << ", C1 = " << birk2
144  << ", C2 = " << birk3 << "\n Use of L3 parametrization " << useBirkL3
145  << " with slope " << birkSlope << " and cut off " << birkCut << "\n"
146  << " Slope for Light yield is set to " << slopeLY;
147  } else {
148  edm::LogVerbatim("EcalSim") << "ECalSD:: energy deposit is not corrected "
149  << " by Birk or light yield curve";
150  }
151 
152  edm::LogVerbatim("EcalSim") << "ECalSD:: Suppression Flag " << suppressHeavy << "\tprotons below "
153  << kmaxProton / CLHEP::MeV << " MeV,\tneutrons below " << kmaxNeutron / CLHEP::MeV
154  << " MeV,\tions below " << kmaxIon / CLHEP::MeV << " MeV \n\tDepth1 Name = " << depth1Name
155  << "\tDepth2 Name = " << depth2Name << "\n\tstoreRL " << storeRL << ":" << scaleRL
156  << "\tstoreLayerTimeSim " << storeLayerTimeSim << "\n\ttime Granularity "
157  << p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("TimeSliceUnit")
158  << " ns";
159  if (useWeight)
160  initMap();
161 #ifdef plotDebug
163  if (tfile.isAvailable()) {
164  TFileDirectory ecDir = tfile->mkdir("ProfileFromECalSD");
165  static const std::string ctype[4] = {"EB", "EBref", "EE", "EERef"};
166  for (int k = 0; k < 4; ++k) {
167  std::string name = "ECLL_" + ctype[k];
168  std::string title = "Local vs Global for " + ctype[k];
169  double xmin = (k > 1) ? 3000.0 : 1000.0;
170  g2L_[k] = ecDir.make<TH2F>(name.c_str(), title.c_str(), 100, xmin, xmin + 1000., 100, 0.0, 3000.);
171  }
172  } else {
173  for (int k = 0; k < 4; ++k)
174  g2L_[k] = 0;
175  }
176 #endif
177  if (dump) {
178  const auto& lvNames = clg.logicalNames(name);
180  geom.update();
181  }
182 }
183 
185 
186 double ECalSD::getEnergyDeposit(const G4Step* aStep) {
187  const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
188  const G4Track* theTrack = aStep->GetTrack();
189  double edep = aStep->GetTotalEnergyDeposit();
190 
191  // take into account light collection curve for crystals
192  double weight = 1.;
193  if (suppressHeavy) {
194  TrackInformation* trkInfo = (TrackInformation*)(theTrack->GetUserInformation());
195  if (trkInfo) {
196  int pdg = theTrack->GetDefinition()->GetPDGEncoding();
197  if (!(trkInfo->isPrimary())) { // Only secondary particles
198  double ke = theTrack->GetKineticEnergy();
199  if (((pdg / 1000000000 == 1 && ((pdg / 10000) % 100) > 0 && ((pdg / 10) % 100) > 0)) && (ke < kmaxIon))
200  weight = 0;
201  if ((pdg == 2212) && (ke < kmaxProton))
202  weight = 0;
203  if ((pdg == 2112) && (ke < kmaxNeutron))
204  weight = 0;
205  }
206  }
207  }
208  const G4LogicalVolume* lv = preStepPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
209  double wt1 = 1.0;
210  if (useWeight && !any(noWeight, lv)) {
211  weight *= curve_LY(lv);
212  if (useBirk) {
213  if (useBirkL3)
214  weight *= getBirkL3(aStep);
215  else
216  weight *= getAttenuation(aStep, birk1, birk2, birk3);
217  }
218  wt1 = getResponseWt(theTrack);
219  }
220  edep *= weight * wt1;
221  // Russian Roulette
222  double wt2 = theTrack->GetWeight();
223  if (wt2 > 0.0) {
224  edep *= wt2;
225  }
226 #ifdef EDM_ML_DEBUG
227  edm::LogVerbatim("EcalSim") << lv->GetName() << " " << dd4hep::dd::noNamespace(lv->GetName())
228  << " Light Collection Efficiency " << weight << ":" << wt1 << " wt2= " << wt2
229  << " Weighted Energy Deposit " << edep / CLHEP::MeV << " MeV at "
230  << preStepPoint->GetPosition();
231 #endif
232  return edep;
233 }
234 
235 double ECalSD::EnergyCorrected(const G4Step& step, const G4Track* track) {
236  double edep = step.GetTotalEnergyDeposit();
237  const G4StepPoint* hitPoint = step.GetPreStepPoint();
238  const G4LogicalVolume* lv = hitPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
239 
240  if (useWeight && !any(noWeight, lv)) {
241  currentLocalPoint = setToLocal(hitPoint->GetPosition(), hitPoint->GetTouchable());
242  auto ite = xtalLMap.find(lv);
243  crystalLength = (ite == xtalLMap.end()) ? 230._mm : std::abs(ite->second);
244  crystalDepth = (ite == xtalLMap.end()) ? 0.0 : (std::abs(0.5 * (ite->second) + currentLocalPoint.z()));
245  edep *= curve_LY(lv) * getResponseWt(track);
246  }
247  return edep;
248 }
249 
250 int ECalSD::getTrackID(const G4Track* aTrack) {
251  int primaryID(0);
252  if (storeTrack && depth > 0) {
253  forceSave = true;
254  primaryID = aTrack->GetTrackID();
255  } else {
256  primaryID = CaloSD::getTrackID(aTrack);
257  }
258  return primaryID;
259 }
260 
261 uint16_t ECalSD::getDepth(const G4Step* aStep) {
262  // this method should be called first at a step
263  const G4StepPoint* hitPoint = aStep->GetPreStepPoint();
264  currentLocalPoint = setToLocal(hitPoint->GetPosition(), hitPoint->GetTouchable());
265  const G4LogicalVolume* lv = hitPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
266 
267  auto ite = xtalLMap.find(lv);
268  crystalLength = (ite == xtalLMap.end()) ? 230._mm : std::abs(ite->second);
269  crystalDepth = (ite == xtalLMap.end()) ? 0.0 : (std::abs(0.5 * (ite->second) + currentLocalPoint.z()));
270  depth = any(useDepth1, lv) ? 1 : (any(useDepth2, lv) ? 2 : 0);
271  uint16_t depth1(0), depth2(0);
272  if (storeRL) {
273  depth1 = (ite == xtalLMap.end()) ? 0 : (((ite->second) >= 0) ? 0 : PCaloHit::kEcalDepthRefz);
274  depth2 = getRadiationLength(hitPoint, lv);
275  depth |= (((depth2 & PCaloHit::kEcalDepthMask) << PCaloHit::kEcalDepthOffset) | depth1);
276  } else if (storeLayerTimeSim) {
277  depth2 = getLayerIDForTimeSim();
279  }
280 #ifdef EDM_ML_DEBUG
281  if (isXtal(lv))
282  edm::LogVerbatim("EcalSimX") << "ECalSD::Volume " << lv->GetName() << " DetId " << std::hex << setDetUnitId(aStep)
283  << std::dec << " Global " << (hitPoint->GetPosition()).rho() << ":"
284  << (hitPoint->GetPosition()).z() << " Local Z " << currentLocalPoint.z() << " Depth "
285  << crystalDepth;
286  edm::LogVerbatim("EcalSim") << "ECalSD::Depth " << std::hex << depth1 << ":" << depth2 << ":" << depth << std::dec
287  << " L " << (ite == xtalLMap.end()) << ":" << ite->second << " local "
288  << currentLocalPoint << " Crystal length " << crystalLength << ":" << crystalDepth;
289 #endif
290  return depth;
291 }
292 
293 uint16_t ECalSD::getRadiationLength(const G4StepPoint* hitPoint, const G4LogicalVolume* lv) {
294  uint16_t thisX0 = 0;
295  if (useWeight) {
296  double radl = hitPoint->GetMaterial()->GetRadlen();
297  thisX0 = (uint16_t)floor(scaleRL * crystalDepth / radl);
298 #ifdef plotDebug
299  const std::string& lvname = dd4hep::dd::noNamespace(lv->GetName());
300  int k1 = (lvname.find("EFRY") != std::string::npos) ? 2 : 0;
301  int k2 = (lvname.find("refl") != std::string::npos) ? 1 : 0;
302  int kk = k1 + k2;
303  double rz = (k1 == 0) ? (hitPoint->GetPosition()).rho() : std::abs((hitPoint->GetPosition()).z());
304  edm::LogVerbatim("EcalSim") << lvname << " # " << k1 << ":" << k2 << ":" << kk << " rz " << rz << " D " << thisX0;
305  g2L_[kk]->Fill(rz, thisX0);
306 #endif
307 #ifdef EDM_ML_DEBUG
308  G4ThreeVector localPoint = setToLocal(hitPoint->GetPosition(), hitPoint->GetTouchable());
309  edm::LogVerbatim("EcalSim") << lv->GetName() << " " << dd4hep::dd::noNamespace(lv->GetName()) << " Global "
310  << hitPoint->GetPosition() << ":" << (hitPoint->GetPosition()).rho() << " Local "
311  << localPoint << " Crystal Length " << crystalLength << " Radl " << radl
312  << " crystalDepth " << crystalDepth << " Index " << thisX0 << " : "
314 #endif
315  }
316  return thisX0;
317 }
318 
320  const double invLayerSize = 0.1; //layer size in 1/mm
321  return (int)crystalDepth * invLayerSize;
322 }
323 
324 uint32_t ECalSD::setDetUnitId(const G4Step* aStep) {
325  if (numberingScheme_ == nullptr) {
326  return EBDetId(1, 1)();
327  } else {
328  getBaseNumber(aStep);
330  }
331 }
332 
334  if (scheme != nullptr) {
335  edm::LogVerbatim("EcalSim") << "EcalSD: updates numbering scheme for " << GetName();
336  if (numberingScheme_)
337  delete numberingScheme_;
339  }
340 }
341 
343  std::vector<const G4LogicalVolume*> lvused;
344  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
345  std::map<const std::string, const G4LogicalVolume*> nameMap;
346  for (auto lvi = lvs->begin(), lve = lvs->end(); lvi != lve; ++lvi)
347  nameMap.emplace(dd4hep::dd::noNamespace((*lvi)->GetName()), *lvi);
348 
349  for (unsigned int it = 0; it < ecalSimParameters_->lvNames_.size(); ++it) {
350  const std::string& matname = ecalSimParameters_->matNames_[it];
351  const std::string& lvname = ecalSimParameters_->lvNames_[it];
352  const G4LogicalVolume* lv = nameMap[lvname];
353  int ibec = (lvname.find("EFRY") == std::string::npos) ? 0 : 1;
354  int iref = (lvname.find("refl") == std::string::npos) ? 0 : 1;
355  int type = (ibec + iref == 1) ? 1 : -1;
356  if (depth1Name != " ") {
357  if (strncmp(lvname.c_str(), depth1Name.c_str(), 4) == 0) {
358  if (!any(useDepth1, lv)) {
359  useDepth1.push_back(lv);
360 #ifdef EDM_ML_DEBUG
361  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " in Depth 1 volume list";
362 #endif
363  }
364  const G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
365  if (lvr != nullptr && !any(useDepth1, lvr)) {
366  useDepth1.push_back(lvr);
367 #ifdef EDM_ML_DEBUG
368  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << "_refl"
369  << " in Depth 1 volume list";
370 #endif
371  }
372  }
373  }
374  if (depth2Name != " ") {
375  if (strncmp(lvname.c_str(), depth2Name.c_str(), 4) == 0) {
376  if (!any(useDepth2, lv)) {
377  useDepth2.push_back(lv);
378 #ifdef EDM_ML_DEBUG
379  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " in Depth 2 volume list";
380 #endif
381  }
382  const G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
383  if (lvr != nullptr && !any(useDepth2, lvr)) {
384  useDepth2.push_back(lvr);
385 #ifdef EDM_ML_DEBUG
386  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << "_refl"
387  << " in Depth 2 volume list";
388 #endif
389  }
390  }
391  }
392  if (lv != nullptr) {
393  if (crystalMat.size() == matname.size() && !strcmp(crystalMat.c_str(), matname.c_str())) {
394  if (!any(lvused, lv)) {
395  lvused.push_back(lv);
396  double dz = ecalSimParameters_->dzs_[it];
397  xtalLMap.insert(std::pair<const G4LogicalVolume*, double>(lv, dz * type));
398  lv = nameMap[lvname + "_refl"];
399  if (lv != nullptr) {
400  xtalLMap.insert(std::pair<const G4LogicalVolume*, double>(lv, -dz * type));
401  }
402  }
403  } else {
404  if (!any(noWeight, lv)) {
405  noWeight.push_back(lv);
406 #ifdef EDM_ML_DEBUG
407  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " Material " << matname
408  << " in noWeight list";
409 #endif
410  }
411  lv = nameMap[lvname];
412  if (lv != nullptr && !any(noWeight, lv)) {
413  noWeight.push_back(lv);
414 #ifdef EDM_ML_DEBUG
415  edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " Material " << matname
416  << " in noWeight list";
417 #endif
418  }
419  }
420  }
421  }
422 #ifdef EDM_ML_DEBUG
423  edm::LogVerbatim("EcalSim") << "ECalSD: Length Table:";
424  int i = 0;
425  for (auto ite : xtalLMap) {
426  std::string name("Unknown");
427  if (ite.first != nullptr)
428  name = dd4hep::dd::noNamespace((ite.first)->GetName());
429  edm::LogVerbatim("EcalSim") << " " << i << " " << ite.first << " " << name << " L = " << ite.second;
430  ++i;
431  }
432 #endif
433 }
434 
435 double ECalSD::curve_LY(const G4LogicalVolume* lv) {
436  double weight = 1.;
437  if (ageingWithSlopeLY) {
438  //position along the crystal in mm from 0 to 230 (in EB)
439  if (crystalDepth >= -0.1 || crystalDepth <= crystalLength + 0.1)
441  } else {
442  double dapd = crystalLength - crystalDepth;
443  if (dapd >= -0.1 || dapd <= crystalLength + 0.1) {
444  if (dapd <= 100.)
445  weight = 1.0 + slopeLY - dapd * 0.01 * slopeLY;
446  } else {
447  edm::LogWarning("EcalSim") << "ECalSD: light coll curve : wrong distance "
448  << "to APD " << dapd << " crlength = " << crystalLength << ":" << crystalDepth
449  << " crystal name = " << lv->GetName() << " " << dd4hep::dd::noNamespace(lv->GetName())
450  << " z of localPoint = " << currentLocalPoint.z() << " take weight = " << weight;
451  }
452  }
453 #ifdef EDM_ML_DEBUG
454  edm::LogVerbatim("EcalSim") << "ECalSD: light coll curve : crlength = " << crystalLength << " Depth " << crystalDepth
455  << " crystal name = " << lv->GetName() << " " << dd4hep::dd::noNamespace(lv->GetName())
456  << " z of localPoint = " << currentLocalPoint.z() << " take weight = " << weight;
457 #endif
458  return weight;
459 }
460 
461 void ECalSD::getBaseNumber(const G4Step* aStep) {
463  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
464  int theSize = touch->GetHistoryDepth() + 1;
465  if (theBaseNumber.getCapacity() < theSize)
466  theBaseNumber.setSize(theSize);
467  //Get name and copy numbers
468  if (theSize > 1) {
469  for (int ii = 0; ii < theSize; ii++) {
470  std::string_view name = dd4hep::dd::noNamespace(touch->GetVolume(ii)->GetName());
471  theBaseNumber.addLevel(std::string(name), touch->GetReplicaNumber(ii));
472 #ifdef EDM_ML_DEBUG
473  edm::LogVerbatim("EcalSim") << "ECalSD::getBaseNumber(): Adding level " << ii << ": " << name << "["
474  << touch->GetReplicaNumber(ii) << "]";
475 #endif
476  }
477  }
478 }
479 
480 double ECalSD::getBirkL3(const G4Step* aStep) {
481  double weight = 1.;
482  const G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
483  double charge = preStepPoint->GetCharge();
484 
485  if (charge != 0. && aStep->GetStepLength() > 0.) {
486  const G4Material* mat = preStepPoint->GetMaterial();
487  double density = mat->GetDensity();
488  double dedx = aStep->GetTotalEnergyDeposit() / aStep->GetStepLength();
489  double rkb = birk1 / density;
490  if (dedx > 0) {
491  weight = 1. - birkSlope * log(rkb * dedx);
492  if (weight < birkCut)
493  weight = birkCut;
494  else if (weight > 1.)
495  weight = 1.;
496  }
497 #ifdef EDM_ML_DEBUG
498  edm::LogVerbatim("EcalSim") << "ECalSD::getBirkL3 in " << dd4hep::dd::noNamespace(mat->GetName()) << " Charge "
499  << charge << " dE/dx " << dedx << " Birk Const " << rkb << " Weight = " << weight
500  << " dE " << aStep->GetTotalEnergyDeposit();
501 #endif
502  }
503  return weight;
504 }
505 
506 bool ECalSD::isXtal(const G4LogicalVolume* lv) { return (xtalLMap.find(lv) != xtalLMap.end()); }
EcalBarrelNumberingScheme
Definition: EcalBarrelNumberingScheme.h:10
EcalDumpGeometry.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SimTrackManager
Definition: SimTrackManager.h:35
ESTBNumberingScheme
Definition: ESTBNumberingScheme.h:6
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
electrons_cff.bool
bool
Definition: electrons_cff.py:393
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
ECalSD::currentLocalPoint
G4ThreeVector currentLocalPoint
Definition: ECalSD.h:71
ESTransientHandle.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
ECalSD::scaleRL
double scaleRL
Definition: ECalSD.h:62
ECalSD::numberingScheme_
EcalNumberingScheme * numberingScheme_
Definition: ECalSD.h:58
CaloSD::kmaxProton
double kmaxProton
Definition: CaloSD.h:142
ECalSD::depth2Name
std::string depth2Name
Definition: ECalSD.h:63
ECalSD::storeLayerTimeSim
bool storeLayerTimeSim
Definition: ECalSD.h:59
step
step
Definition: StallMonitor.cc:94
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
mps_merge.weight
weight
Definition: mps_merge.py:88
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ECalSD::crystalMat
std::string crystalMat
Definition: ECalSD.h:63
EcalBaseNumber::getCapacity
int getCapacity()
Definition: EcalBaseNumber.cc:37
EBDetId.h
ECalSD::~ECalSD
~ECalSD() override
Definition: ECalSD.cc:184
EnergyResolutionVsLumi::calcLightCollectionEfficiencyWeighted
double calcLightCollectionEfficiencyWeighted(DetId id, double z)
Definition: EnergyResolutionVsLumi.cc:92
EcalBaseNumber::addLevel
void addLevel(const std::string &name, const int &copyNumber)
Definition: EcalBaseNumber.cc:16
CaloSD::getAttenuation
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:517
ECalSD::getRadiationLength
uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv)
Definition: ECalSD.cc:293
ECalSD::useBirkL3
bool useBirkL3
Definition: ECalSD.h:60
MeV
const double MeV
PCaloHit::kEcalDepthOffset
static const int kEcalDepthOffset
Definition: PCaloHit.h:62
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ECalSD::storeTrack
bool storeTrack
Definition: ECalSD.h:59
TFileDirectory
Definition: TFileDirectory.h:24
ECalSD::isXtal
bool isXtal(const G4LogicalVolume *)
Definition: ECalSD.cc:506
geant_units::operators
Definition: GeantUnits.h:18
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CaloHitID::unitID
uint32_t unitID() const
Definition: CaloHitID.h:20
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
ECalSD::birk2
double birk2
Definition: ECalSD.h:61
CaloSD::kmaxIon
double kmaxIon
Definition: CaloSD.h:142
ECalSD::curve_LY
double curve_LY(const G4LogicalVolume *)
Definition: ECalSD.cc:435
EcalSimulationParameters::dzs_
std::vector< double > dzs_
Definition: EcalSimulationParameters.h:22
any
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:38
ECalSD::depth
uint16_t depth
Definition: ECalSD.h:74
ECalSD::useDepth2
std::vector< const G4LogicalVolume * > useDepth2
Definition: ECalSD.h:65
CaloSD::getResponseWt
double getResponseWt(const G4Track *)
Definition: CaloSD.cc:709
EcalNumberingScheme
Definition: EcalNumberingScheme.h:14
ECalSD::noWeight
std::vector< const G4LogicalVolume * > noWeight
Definition: ECalSD.h:65
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
TrackInformation::isPrimary
bool isPrimary() const
Definition: TrackInformation.h:23
ECalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: ECalSD.cc:324
ECalSD::ECalSD
ECalSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:42
CaloSD::setToLocal
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *) const
Definition: CaloSD.cc:373
Service.h
ECalSD::EnergyCorrected
double EnergyCorrected(const G4Step &, const G4Track *) override
Definition: ECalSD.cc:235
ECalSD::ecalSimParameters_
const EcalSimulationParameters * ecalSimParameters_
Definition: ECalSD.h:57
ECalSD::setNumberingScheme
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:333
tfile
Definition: tfile.py:1
DDAxes::z
edm::ESHandle
Definition: DTSurvey.h:22
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
ECalSD::ageingWithSlopeLY
bool ageingWithSlopeLY
Definition: ECalSD.h:68
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
dqmdumpme.k
k
Definition: dqmdumpme.py:60
EcalPreshowerNumberingScheme
Definition: EcalPreshowerNumberingScheme.h:10
CaloSD::currentID
CaloHitID currentID
Definition: CaloSD.h:135
ECalSD::birk3
double birk3
Definition: ECalSD.h:61
DDAxes::rho
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TFileService.h
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
ECalSD::getTrackID
int getTrackID(const G4Track *) override
Definition: ECalSD.cc:250
edm::ParameterSet
Definition: ParameterSet.h:47
EcalBarrelNumberingScheme.h
ParameterSet
Definition: Functions.h:16
ECalSD::initMap
void initMap()
Definition: ECalSD.cc:342
ECalSD::getBaseNumber
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:461
ke
int ke
Definition: CascadeWrapper.h:13
GeantUnits.h
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
EnergyResolutionVsLumi::setLumies
void setLumies(double x, double y)
Definition: EnergyResolutionVsLumi.h:47
CaloSD::kmaxNeutron
double kmaxNeutron
Definition: CaloSD.h:142
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
ECalSD::depth1Name
std::string depth1Name
Definition: ECalSD.h:63
ECalSD::theBaseNumber
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:66
PCaloHit.h
EcalBaseNumber::reset
void reset()
Definition: EcalBaseNumber.cc:39
FrontierConditions_GlobalTag_cff.dump
dump
Definition: FrontierConditions_GlobalTag_cff.py:12
TrackInformation
Definition: TrackInformation.h:8
edm::Service< TFileService >
PCaloHit::kEcalDepthMask
static const int kEcalDepthMask
Definition: PCaloHit.h:61
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:57
EcalSimulationParameters::depth1Name_
std::string depth1Name_
Definition: EcalSimulationParameters.h:18
TrackInformation.h
EcalBaseNumber.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
ECalSD.h
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
ESTBNumberingScheme.h
ECalSD::crystalDepth
double crystalDepth
Definition: ECalSD.h:73
generator_cfi.scheme
scheme
Definition: generator_cfi.py:22
compare.tfile
tfile
Definition: compare.py:325
ECalSD::ageing
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:67
ECalSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: ECalSD.cc:186
ECalSD::useWeight
bool useWeight
Definition: ECalSD.h:59
CaloSD::getTrackID
virtual int getTrackID(const G4Track *)
Definition: CaloSD.cc:655
EcalSimulationParameters::matNames_
std::vector< std::string > matNames_
Definition: EcalSimulationParameters.h:21
ECalSD::birkCut
double birkCut
Definition: ECalSD.h:61
PVValHelper::dz
Definition: PVValidationHelpers.h:50
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
T
long double T
Definition: Basic3DVectorLD.h:48
ECalSD::getDepth
uint16_t getDepth(const G4Step *) override
Definition: ECalSD.cc:261
Exception
Definition: hltDiff.cc:246
EcalSimulationParameters::lvNames_
std::vector< std::string > lvNames_
Definition: EcalSimulationParameters.h:20
SensitiveDetectorCatalog::logicalNames
const std::vector< std::string_view > logicalNames(const std::string &readoutName) const
Definition: SensitiveDetectorCatalog.cc:31
EcalSimulationParameters::depth2Name_
std::string depth2Name_
Definition: EcalSimulationParameters.h:19
ECalSD::crystalLength
double crystalLength
Definition: ECalSD.h:72
EcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const EcalBaseNumber &baseNumber) const =0
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
pdg
Definition: pdg_functions.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalPreshowerNumberingScheme.h
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
ECalSD::useDepth1
std::vector< const G4LogicalVolume * > useDepth1
Definition: ECalSD.h:65
CaloSD::forceSave
bool forceSave
Definition: CaloSD.h:144
ECalSD::useBirk
bool useBirk
Definition: ECalSD.h:60
ECalSD::birkSlope
double birkSlope
Definition: ECalSD.h:61
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ECalSD::storeRL
bool storeRL
Definition: ECalSD.h:59
ECalSD::slopeLY
double slopeLY
Definition: ECalSD.h:62
EcalEndcapNumberingScheme
Definition: EcalEndcapNumberingScheme.h:10
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
ECalSD::getBirkL3
double getBirkL3(const G4Step *)
Definition: ECalSD.cc:480
EcalSimulationParameters::useWeight_
bool useWeight_
Definition: EcalSimulationParameters.h:17
EcalEndcapNumberingScheme.h
CaloSD::suppressHeavy
bool suppressHeavy
Definition: CaloSD.h:141
EcalBaseNumber::setSize
void setSize(const int &size)
Definition: EcalBaseNumber.cc:11
edm::Log
Definition: MessageLogger.h:70
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
ECalSD::birk1
double birk1
Definition: ECalSD.h:61
cuy.ii
ii
Definition: cuy.py:590
PCaloHit::kEcalDepthRefz
static const int kEcalDepthRefz
Definition: PCaloHit.h:63
ECalSD::getLayerIDForTimeSim
uint16_t getLayerIDForTimeSim()
Definition: ECalSD.cc:319
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
fastSimProducer_cff.density
density
Definition: fastSimProducer_cff.py:61
ECalSD::xtalLMap
std::map< const G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:64
EcalDumpGeometry
Definition: EcalDumpGeometry.h:22