CMS 3D CMS Logo

CaloSteppingAction.cc
Go to the documentation of this file.
1 // to make hits in EB/EE/HC
4 
7 #ifdef HcalNumberingTest
10 #endif
11 
17 
18 #include "G4LogicalVolumeStore.hh"
19 #include "G4NavigationHistory.hh"
20 #include "G4ParticleTable.hh"
21 #include "G4PhysicalVolumeStore.hh"
22 #include "G4RegionStore.hh"
23 #include "G4Trap.hh"
24 #include "G4UnitsTable.hh"
25 #include "G4SystemOfUnits.hh"
26 
27 #include <cmath>
28 #include <iostream>
29 #include <iomanip>
30 
31 //#define EDM_ML_DEBUG
32 
34  edm::ParameterSet iC = p.getParameter<edm::ParameterSet>("CaloSteppingAction");
35  nameEBSD_ = iC.getParameter<std::vector<std::string> >("EBSDNames");
36  nameEESD_ = iC.getParameter<std::vector<std::string> >("EESDNames");
37  nameHCSD_ = iC.getParameter<std::vector<std::string> >("HCSDNames");
38  nameHitC_ = iC.getParameter<std::vector<std::string> >("HitCollNames");
39  allSteps_ = iC.getParameter<int>("AllSteps");
40  slopeLY_ = iC.getParameter<double>("SlopeLightYield");
41  birkC1EC_ = iC.getParameter<double>("BirkC1EC");
42  birkSlopeEC_ = iC.getParameter<double>("BirkSlopeEC");
43  birkCutEC_ = iC.getParameter<double>("BirkCutEC");
44  birkC1HC_ = iC.getParameter<double>("BirkC1HC");
45  birkC2HC_ = iC.getParameter<double>("BirkC2HC");
46  birkC3HC_ = iC.getParameter<double>("BirkC3HC");
47  timeSliceUnit_ = iC.getUntrackedParameter<double>("TimeSliceUnit", 1.0);
48 
49  edm::LogVerbatim("Step") << "CaloSteppingAction:: " << nameEBSD_.size() << " names for EB SD's";
50  for (unsigned int k = 0; k < nameEBSD_.size(); ++k)
51  edm::LogVerbatim("Step") << "[" << k << "] " << nameEBSD_[k];
52  edm::LogVerbatim("Step") << "CaloSteppingAction:: " << nameEESD_.size() << " names for EE SD's";
53  for (unsigned int k = 0; k < nameEESD_.size(); ++k)
54  edm::LogVerbatim("Step") << "[" << k << "] " << nameEESD_[k];
55  edm::LogVerbatim("Step") << "CaloSteppingAction:: " << nameHCSD_.size() << " names for HC SD's";
56  for (unsigned int k = 0; k < nameHCSD_.size(); ++k)
57  edm::LogVerbatim("Step") << "[" << k << "] " << nameHCSD_[k];
58  edm::LogVerbatim("Step") << "CaloSteppingAction::Constants for ECAL: slope " << slopeLY_ << " Birk constants "
59  << birkC1EC_ << ":" << birkSlopeEC_ << ":" << birkCutEC_;
60  edm::LogVerbatim("Step") << "CaloSteppingAction::Constants for HCAL: Birk "
61  << "constants " << birkC1HC_ << ":" << birkC2HC_ << ":" << birkC3HC_;
62  edm::LogVerbatim("Step") << "CaloSteppingAction::Constant for time slice " << timeSliceUnit_;
63  edm::LogVerbatim("Step") << "CaloSteppingAction:: " << nameHitC_.size() << " hit collections";
64  for (unsigned int k = 0; k < nameHitC_.size(); ++k)
65  edm::LogVerbatim("Step") << "[" << k << "] " << nameHitC_[k];
66 
67  ebNumberingScheme_ = std::make_unique<EcalBarrelNumberingScheme>();
68  eeNumberingScheme_ = std::make_unique<EcalEndcapNumberingScheme>();
69  hcNumberingPS_ = std::make_unique<HcalNumberingFromPS>(iC);
70  hcNumberingScheme_ = std::make_unique<HcalNumberingScheme>();
71 #ifdef HcalNumberingTest
72  hcNumbering_.reset(nullptr);
73 #endif
74  for (int k = 0; k < CaloSteppingAction::nSD_; ++k) {
75  slave_[k] = std::make_unique<CaloSlaveSD>(nameHitC_[k]);
76  produces<edm::PCaloHitContainer>(nameHitC_[k]);
77  }
78  if (allSteps_ != 0)
79  produces<edm::PassiveHitContainer>("AllPassiveHits");
80  edm::LogVerbatim("Step") << "CaloSteppingAction:: All Steps Flag " << allSteps_ << " for passive hits";
81 }
82 
84  edm::LogVerbatim("Step") << "CaloSteppingAction: --------> Total number of "
85  << "selected entries : " << count_;
86 }
87 
89  for (int k = 0; k < CaloSteppingAction::nSD_; ++k) {
90  saveHits(k);
91  auto product = std::make_unique<edm::PCaloHitContainer>();
92  fillHits(*product, k);
93  e.put(std::move(product), nameHitC_[k]);
94  }
95  if (allSteps_ != 0) {
96  std::unique_ptr<edm::PassiveHitContainer> hgcPH(new edm::PassiveHitContainer);
97  fillPassiveHits(*hgcPH);
98  e.put(std::move(hgcPH), "AllPassiveHits");
99  }
100 }
101 
103  edm::LogVerbatim("Step") << "CaloSteppingAction::fillHits for type " << type << " with "
104  << slave_[type].get()->hits().size() << " hits";
105  cc = slave_[type].get()->hits();
106  slave_[type].get()->Clean();
107 }
108 
110  edm::LogVerbatim("Step") << "CaloSteppingAction::fillPassiveHits with " << store_.size() << " hits";
111  for (const auto& element : store_) {
112  auto lv = std::get<0>(element);
113  auto it = mapLV_.find(lv);
114  if (it != mapLV_.end()) {
115  PassiveHit hit(it->second,
116  std::get<1>(element),
117  std::get<5>(element),
118  std::get<6>(element),
119  std::get<4>(element),
120  std::get<2>(element),
121  std::get<3>(element),
122  std::get<7>(element),
123  std::get<8>(element),
124  std::get<9>(element),
125  std::get<10>(element));
126  cc.emplace_back(hit);
127  }
128  }
129 }
130 
132  edm::LogVerbatim("Step") << "CaloSteppingAction:: Enter BeginOfJob";
133 
134 #ifdef HcalNumberingTest
135  // Numbering From DDD
137  (*job)()->get<HcalSimNumberingRecord>().get(hdc);
138  const HcalDDDSimConstants* hcons_ = hdc.product();
139  edm::LogVerbatim("Step") << "CaloSteppingAction:: Initialise "
140  << "HcalNumberingFromDDD";
141  hcNumbering_ = std::make_unique<HcalNumberingFromDDD>(hcons_);
142 #endif
143 }
144 
145 //==================================================================== per RUN
147  int irun = (*run)()->GetRunID();
148  edm::LogVerbatim("Step") << "CaloSteppingAction:: Begin of Run = " << irun;
149 
150  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
151  if (lvs) {
152  std::map<const std::string, const G4LogicalVolume*> nameMap;
153  std::map<const std::string, const G4LogicalVolume*>::const_iterator itr;
154  for (auto lvi = lvs->begin(), lve = lvs->end(); lvi != lve; ++lvi) {
155  nameMap.emplace((*lvi)->GetName(), *lvi);
156  if (allSteps_ < 0)
157  mapLV_[*lvi] = (*lvi)->GetName();
158  }
159 
160  for (auto const& name : nameEBSD_) {
161  for (itr = nameMap.begin(); itr != nameMap.end(); ++itr) {
162  const std::string& lvname = itr->first;
163  if (lvname.find(name) != std::string::npos) {
164  volEBSD_.emplace_back(itr->second);
165  int type = (lvname.find("refl") == std::string::npos) ? -1 : 1;
166  G4Trap* solid = static_cast<G4Trap*>(itr->second->GetSolid());
167  double dz = 2 * solid->GetZHalfLength() / CLHEP::mm;
168  xtalMap_.insert(std::pair<const G4LogicalVolume*, double>(itr->second, dz * type));
169  if ((allSteps_ > 0) && ((allSteps_ % 10) > 0))
170  mapLV_[itr->second] = itr->first;
171  }
172  }
173  }
174  for (auto const& name : nameEESD_) {
175  for (itr = nameMap.begin(); itr != nameMap.end(); ++itr) {
176  const std::string& lvname = itr->first;
177  if (lvname.find(name) != std::string::npos) {
178  volEESD_.emplace_back(itr->second);
179  int type = (lvname.find("refl") == std::string::npos) ? 1 : -1;
180  G4Trap* solid = static_cast<G4Trap*>(itr->second->GetSolid());
181  double dz = 2 * solid->GetZHalfLength() / CLHEP::mm;
182  xtalMap_.insert(std::pair<const G4LogicalVolume*, double>(itr->second, dz * type));
183  if ((allSteps_ > 0) && (((allSteps_ / 10) % 10) > 0))
184  mapLV_[itr->second] = itr->first;
185  }
186  }
187  }
188 
189  for (auto const& name : nameHCSD_) {
190  for (itr = nameMap.begin(); itr != nameMap.end(); ++itr) {
191  const std::string& lvname = itr->first;
192  if (lvname.find(name) != std::string::npos) {
193  volHCSD_.emplace_back(itr->second);
194  if ((allSteps_ > 0) && (((allSteps_ / 100) % 10) > 0))
195  mapLV_[itr->second] = itr->first;
196  }
197  }
198  }
199  }
200 #ifdef EDM_ML_DEBUG
201  edm::LogVerbatim("Step") << volEBSD_.size() << " logical volumes for EB SD";
202  for (unsigned int k = 0; k < volEBSD_.size(); ++k)
203  edm::LogVerbatim("Step") << "[" << k << "] " << volEBSD_[k];
204  edm::LogVerbatim("Step") << volEESD_.size() << " logical volumes for EE SD";
205  for (unsigned int k = 0; k < volEESD_.size(); ++k)
206  edm::LogVerbatim("Step") << "[" << k << "] " << volEESD_[k];
207  edm::LogVerbatim("Step") << volHCSD_.size() << " logical volumes for HC SD";
208  for (unsigned int k = 0; k < volHCSD_.size(); ++k)
209  edm::LogVerbatim("Step") << "[" << k << "] " << volHCSD_[k];
210  edm::LogVerbatim("Step") << mapLV_.size() << " logical volumes for Passive hits";
211  unsigned int k(0);
212  for (auto itr = mapLV_.begin(); itr != mapLV_.end(); ++itr) {
213  edm::LogVerbatim("Step") << "[" << k << "] " << itr->second << ":" << itr->first;
214  ++k;
215  }
216 #endif
217 }
218 
219 //=================================================================== per EVENT
221  eventID_ = (*evt)()->GetEventID();
222  edm::LogVerbatim("Step") << "CaloSteppingAction: Begin of event = " << eventID_;
223  for (int k = 0; k < CaloSteppingAction::nSD_; ++k) {
224  hitMap_[k].erase(hitMap_[k].begin(), hitMap_[k].end());
225  slave_[k].get()->Initialize();
226  }
227  if (allSteps_ != 0)
228  store_.clear();
229 }
230 
231 //=================================================================== each STEP
232 void CaloSteppingAction::update(const G4Step* aStep) {
233  // edm::LogVerbatim("Step") <<"CaloSteppingAction: At each Step";
234  NaNTrap(aStep);
235  auto lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
236  bool hc = (std::find(volHCSD_.begin(), volHCSD_.end(), lv) != volHCSD_.end());
237  bool eb = (std::find(volEBSD_.begin(), volEBSD_.end(), lv) != volEBSD_.end());
238  bool ee = (std::find(volEESD_.begin(), volEESD_.end(), lv) != volEESD_.end());
239  uint32_t unitID(0);
240  if (hc || eb || ee) {
241  double dEStep = aStep->GetTotalEnergyDeposit() / CLHEP::MeV;
242  auto const theTrack = aStep->GetTrack();
243  double time = theTrack->GetGlobalTime() / CLHEP::nanosecond;
244  int primID = theTrack->GetTrackID();
246  auto const touch = aStep->GetPreStepPoint()->GetTouchable();
247  auto const& hitPoint = aStep->GetPreStepPoint()->GetPosition();
248  if (hc) {
249  int depth = (touch->GetReplicaNumber(0)) % 10 + 1;
250  int lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
251  int det = (touch->GetReplicaNumber(1)) / 1000;
252  unitID = getDetIDHC(det, lay, depth, math::XYZVectorD(hitPoint.x(), hitPoint.y(), hitPoint.z()));
253  if (unitID > 0 && dEStep > 0.0) {
254  dEStep *= getBirkHC(dEStep,
255  (aStep->GetStepLength() / CLHEP::cm),
256  aStep->GetPreStepPoint()->GetCharge(),
257  (aStep->GetPreStepPoint()->GetMaterial()->GetDensity() / (CLHEP::g / CLHEP::cm3)));
258  fillHit(unitID, dEStep, time, primID, 0, em, 2);
259  }
260  } else {
261  EcalBaseNumber theBaseNumber;
262  int size = touch->GetHistoryDepth() + 1;
263  if (theBaseNumber.getCapacity() < size)
264  theBaseNumber.setSize(size);
265  //Get name and copy numbers
266  if (size > 1) {
267  for (int ii = 0; ii < size; ii++) {
268  theBaseNumber.addLevel(touch->GetVolume(ii)->GetName(), touch->GetReplicaNumber(ii));
269  }
270  }
271  unitID = (eb ? (ebNumberingScheme_->getUnitID(theBaseNumber)) : (eeNumberingScheme_->getUnitID(theBaseNumber)));
272  if (unitID > 0 && dEStep > 0.0) {
273  auto local = touch->GetHistory()->GetTopTransform().TransformPoint(hitPoint);
274  auto ite = xtalMap_.find(lv);
275  double crystalLength = ((ite == xtalMap_.end()) ? 230.0 : std::abs(ite->second));
276  double crystalDepth =
277  ((ite == xtalMap_.end()) ? 0.0 : (std::abs(0.5 * (ite->second) + (local.z() / CLHEP::mm))));
278  double radl = aStep->GetPreStepPoint()->GetMaterial()->GetRadlen() / CLHEP::mm;
279  bool flag = ((ite == xtalMap_.end()) ? true : (((ite->second) >= 0) ? true : false));
280  auto depth = getDepth(flag, crystalDepth, radl);
281  dEStep *= (getBirkL3(dEStep,
282  (aStep->GetStepLength() / CLHEP::cm),
283  aStep->GetPreStepPoint()->GetCharge(),
284  (aStep->GetPreStepPoint()->GetMaterial()->GetDensity() / (CLHEP::g / CLHEP::cm3))) *
285  curve_LY(crystalLength, crystalDepth));
286  fillHit(unitID, dEStep, time, primID, depth, em, (eb ? 0 : 1));
287  }
288  }
289  }
290 
291  if (allSteps_ != 0) {
292  auto it = mapLV_.find(lv);
293  if (it != mapLV_.end()) {
294  double energy = aStep->GetTotalEnergyDeposit() / CLHEP::MeV;
295  auto const touch = aStep->GetPreStepPoint()->GetTouchable();
296  double time = aStep->GetTrack()->GetGlobalTime() / CLHEP::nanosecond;
297  int trackId = aStep->GetTrack()->GetTrackID();
298  int pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
299  double stepl = (aStep->GetStepLength() / CLHEP::cm);
300  double xp = aStep->GetPreStepPoint()->GetPosition().x() / CLHEP::cm;
301  double yp = aStep->GetPreStepPoint()->GetPosition().y() / CLHEP::cm;
302  double zp = aStep->GetPreStepPoint()->GetPosition().z() / CLHEP::cm;
303 #ifdef EDM_ML_DEBUG
304  edm::LogVerbatim("Step") << "CaloSteppingAction: Volume " << lv->GetName() << " History "
305  << touch->GetHistoryDepth() << " Pointers " << aStep->GetPostStepPoint() << ":"
306  << aStep->GetTrack()->GetNextVolume() << ":" << aStep->IsLastStepInVolume() << " E "
307  << energy << " T " << time << " PDG " << pdg << " step " << stepl << " Position (" << xp
308  << ", " << yp << ", " << zp << ")";
309 #endif
310  uint32_t copy = (allSteps_ < 0) ? 0 : unitID;
311  if (((aStep->GetPostStepPoint() == nullptr) || (aStep->GetTrack()->GetNextVolume() == nullptr)) &&
312  (aStep->IsLastStepInVolume())) {
313  energy += (aStep->GetPreStepPoint()->GetKineticEnergy() / CLHEP::MeV);
314  } else {
315  time = aStep->GetPostStepPoint()->GetGlobalTime() / CLHEP::nanosecond;
316  if (copy == 0)
317  copy = (touch->GetHistoryDepth() < 1)
318  ? static_cast<uint32_t>(touch->GetReplicaNumber(0))
319  : static_cast<uint32_t>(touch->GetReplicaNumber(0) + 1000 * touch->GetReplicaNumber(1));
320  }
321  PassiveData key(std::make_tuple(lv, copy, trackId, pdg, time, energy, energy, stepl, xp, yp, zp));
322  store_.push_back(key);
323  }
324  }
325 }
326 
327 //================================================================ End of EVENT
329  ++count_;
330  // Fill event input
331  edm::LogVerbatim("Step") << "CaloSteppingAction: EndOfEvent " << (*evt)()->GetEventID();
332 }
333 
334 void CaloSteppingAction::NaNTrap(const G4Step* aStep) const {
335  auto currentPos = aStep->GetTrack()->GetPosition();
336  double xyz = currentPos.x() + currentPos.y() + currentPos.z();
337  auto currentMom = aStep->GetTrack()->GetMomentum();
338  xyz += currentMom.x() + currentMom.y() + currentMom.z();
339 
340  if (edm::isNotFinite(xyz)) {
341  auto pCurrentVol = aStep->GetPreStepPoint()->GetPhysicalVolume();
342  auto& nameOfVol = pCurrentVol->GetName();
343  throw cms::Exception("Unknown", "CaloSteppingAction")
344  << " Corrupted Event - NaN detected in volume " << nameOfVol << "\n";
345  }
346 }
347 
348 uint32_t CaloSteppingAction::getDetIDHC(int det, int lay, int depth, const math::XYZVectorD& pos) const {
349  HcalNumberingFromDDD::HcalID tmp = hcNumberingPS_.get()->unitID(det, lay, depth, pos);
350 #ifdef HcalNumberingTest
351  auto id0 = hcNumberingScheme_.get()->getUnitID(tmp);
352  HcalNumberingFromDDD::HcalID tmpO = hcNumbering_.get()->unitID(det, pos, depth, lay);
353  auto idO = hcNumberingScheme_.get()->getUnitID(tmpO);
354  std::string error = (id0 == idO) ? " ** OK **" : " ** ERROR **";
355  edm::LogVerbatim("Step") << "Det ID " << HcalDetId(id0) << " Original " << HcalDetId(idO) << error;
356 #endif
357  return (hcNumberingScheme_.get()->getUnitID(tmp));
358 }
359 
360 void CaloSteppingAction::fillHit(uint32_t id, double dE, double time, int primID, uint16_t depth, double em, int flag) {
361  CaloHitID currentID(id, time, primID, depth, timeSliceUnit_);
362  double edepEM = (em ? dE : 0);
363  double edepHAD = (em ? 0 : dE);
364  std::pair<int, CaloHitID> evID = std::make_pair(eventID_, currentID);
365  auto it = hitMap_[flag].find(evID);
366  if (it != hitMap_[flag].end()) {
367  (it->second).addEnergyDeposit(edepEM, edepHAD);
368  } else {
369  CaloGVHit aHit;
370  aHit.setEventID(eventID_);
371  aHit.setID(currentID);
372  aHit.addEnergyDeposit(edepEM, edepHAD);
373  hitMap_[flag][evID] = aHit;
374  }
375 }
376 
377 uint16_t CaloSteppingAction::getDepth(bool flag, double crystalDepth, double radl) const {
378  uint16_t depth1 = (flag ? 0 : PCaloHit::kEcalDepthRefz);
379  uint16_t depth2 = (uint16_t)floor(crystalDepth / radl);
380  uint16_t depth = (((depth2 & PCaloHit::kEcalDepthMask) << PCaloHit::kEcalDepthOffset) | depth1);
381 #ifdef EDM_ML_DEBUG
382  edm::LogVerbatim("Step") << "CaloSteppingAction::getDepth radl " << radl << ":" << crystalDepth << " depth " << depth;
383 #endif
384  return depth;
385 }
386 
387 double CaloSteppingAction::curve_LY(double crystalLength, double crystalDepth) const {
388  double weight = 1.;
389  double dapd = crystalLength - crystalDepth;
390  if (dapd >= -0.1 || dapd <= crystalLength + 0.1) {
391  if (dapd <= 100.)
392  weight = 1.0 + slopeLY_ - dapd * 0.01 * slopeLY_;
393 #ifdef EDM_ML_DEBUG
394  edm::LogVerbatim("Step") << "CaloSteppingAction::curve_LY " << crystalDepth << ":" << crystalLength << ":" << dapd
395  << ":" << weight;
396 #endif
397  } else {
398  edm::LogWarning("Step") << "CaloSteppingAction: light coll curve : wrong "
399  << "distance to APD " << dapd << " crlength = " << crystalLength
400  << " crystal Depth = " << crystalDepth << " weight = " << weight;
401  }
402  return weight;
403 }
404 
405 double CaloSteppingAction::getBirkL3(double dEStep, double step, double charge, double density) const {
406  double weight = 1.;
407  if (charge != 0. && step > 0.) {
408  double dedx = dEStep / step;
409  double rkb = birkC1EC_ / density;
410  if (dedx > 0) {
411  weight = 1. - birkSlopeEC_ * log(rkb * dedx);
412  if (weight < birkCutEC_)
413  weight = birkCutEC_;
414  else if (weight > 1.)
415  weight = 1.;
416  }
417 #ifdef EDM_ML_DEBUG
418  edm::LogVerbatim("Step") << "CaloSteppingAction::getBirkL3 Charge " << charge << " dE/dx " << dedx << " Birk Const "
419  << rkb << " Weight = " << weight << " dE " << dEStep << " step " << step;
420 #endif
421  }
422  return weight;
423 }
424 
425 double CaloSteppingAction::getBirkHC(double dEStep, double step, double charge, double density) const {
426  double weight = 1.;
427  if (charge != 0. && step > 0.) {
428  double dedx = dEStep / step;
429  double rkb = birkC1HC_ / density;
430  double c = birkC2HC_ * rkb * rkb;
431  if (std::abs(charge) >= 2.)
432  rkb /= birkC3HC_;
433  weight = 1. / (1. + rkb * dedx + c * dedx * dedx);
434 #ifdef EDM_ML_DEBUG
435  edm::LogVerbatim("Step") << "CaloSteppingAction::getBirkHC Charge " << charge << " dE/dx " << dedx << " Birk Const "
436  << rkb << ", " << c << " Weight = " << weight << " dE " << dEStep;
437 #endif
438  }
439  return weight;
440 }
441 
443  edm::LogVerbatim("Step") << "CaloSteppingAction:: saveHits for type " << type << " with " << hitMap_[type].size()
444  << " hits";
445  slave_[type].get()->ReserveMemory(hitMap_[type].size());
446  for (auto const& hit : hitMap_[type]) {
447  slave_[type].get()->processHits(hit.second.getUnitID(),
448  0.001 * hit.second.getEM(),
449  0.001 * hit.second.getHadr(),
450  hit.second.getTimeSlice(),
451  hit.second.getTrackID(),
452  hit.second.getDepth());
453  }
454 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CaloSteppingAction::birkSlopeEC_
double birkSlopeEC_
Definition: CaloSteppingAction.h:99
CaloSteppingAction::nSD_
static const int nSD_
Definition: CaloSteppingAction.h:83
MessageLogger.h
CaloSteppingAction::store_
std::vector< PassiveData > store_
Definition: CaloSteppingAction.h:105
CaloSteppingAction::curve_LY
double curve_LY(double crystalLength, double crystalDepth) const
Definition: CaloSteppingAction.cc:387
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
ESHandle.h
HcalSimNumberingRecord.h
step
step
Definition: StallMonitor.cc:94
edm::isNotFinite
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
CaloGVHit::setEventID
void setEventID(int id)
Definition: CaloGVHit.h:46
mps_merge.weight
weight
Definition: mps_merge.py:88
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloSteppingAction::getDepth
uint16_t getDepth(bool flag, double crystalDepth, double radl) const
Definition: CaloSteppingAction.cc:377
CaloGVHit
Definition: CaloGVHit.h:30
pos
Definition: PixelAliasList.h:18
EcalBaseNumber::getCapacity
int getCapacity()
Definition: EcalBaseNumber.cc:36
CaloSteppingAction::fillHits
void fillHits(edm::PCaloHitContainer &cc, int type)
Definition: CaloSteppingAction.cc:102
EcalBaseNumber::addLevel
void addLevel(const std::string &name, const int &copyNumber)
Definition: EcalBaseNumber.cc:15
MeV
const double MeV
PCaloHit::kEcalDepthOffset
static const int kEcalDepthOffset
Definition: PCaloHit.h:62
CaloSteppingAction::birkC3HC_
double birkC3HC_
Definition: CaloSteppingAction.h:101
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalBaseNumber
Definition: EcalBaseNumber.h:12
CaloSteppingAction::volEESD_
std::vector< const G4LogicalVolume * > volEESD_
Definition: CaloSteppingAction.h:95
CaloSteppingAction::CaloSteppingAction
CaloSteppingAction(const edm::ParameterSet &p)
Definition: CaloSteppingAction.cc:33
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
CaloGVHit::setID
void setID(uint32_t i, double d, int j, uint16_t k=0)
Definition: CaloGVHit.h:55
relativeConstraints.error
error
Definition: relativeConstraints.py:53
CaloSteppingAction::allSteps_
int allSteps_
Definition: CaloSteppingAction.h:98
end
#define end
Definition: vmac.h:39
G4TrackToParticleID::isGammaElectronPositron
static bool isGammaElectronPositron(int pdgCode)
Definition: G4TrackToParticleID.cc:17
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
CaloSteppingAction::volHCSD_
std::vector< const G4LogicalVolume * > volHCSD_
Definition: CaloSteppingAction.h:95
CaloSteppingAction::nameHCSD_
std::vector< std::string > nameHCSD_
Definition: CaloSteppingAction.h:93
CaloSteppingAction::xtalMap_
std::map< const G4LogicalVolume *, double > xtalMap_
Definition: CaloSteppingAction.h:96
CaloSteppingAction::getDetIDHC
uint32_t getDetIDHC(int det, int lay, int depth, const math::XYZVectorD &pos) const
Definition: CaloSteppingAction.cc:348
CaloSteppingAction::fillPassiveHits
void fillPassiveHits(edm::PassiveHitContainer &cc)
Definition: CaloSteppingAction.cc:109
CaloSteppingAction.h
edm::ESHandle
Definition: DTSurvey.h:22
CaloSteppingAction::birkC1HC_
double birkC1HC_
Definition: CaloSteppingAction.h:100
CaloSteppingAction::fillHit
void fillHit(uint32_t id, double dE, double time, int primID, uint16_t depth, double em, int flag)
Definition: CaloSteppingAction.cc:360
PassiveHit
Definition: PassiveHit.h:9
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
BeginOfJob
Definition: BeginOfJob.h:8
dqmdumpme.k
k
Definition: dqmdumpme.py:60
EndOfEvent
Definition: EndOfEvent.h:6
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloSteppingAction::nameEBSD_
std::vector< std::string > nameEBSD_
Definition: CaloSteppingAction.h:93
CaloSteppingAction::birkC2HC_
double birkC2HC_
Definition: CaloSteppingAction.h:100
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloSteppingAction::getBirkHC
double getBirkHC(double dE, double step, double chg, double dens) const
Definition: CaloSteppingAction.cc:425
edm::LogWarning
Definition: MessageLogger.h:141
math::XYZVectorD
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
CaloSteppingAction::PassiveData
std::tuple< const G4LogicalVolume *, uint32_t, int, int, double, double, double, double, double, double, double > PassiveData
Definition: CaloSteppingAction.h:104
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
funct::true
true
Definition: Factorize.h:173
edm::ParameterSet
Definition: ParameterSet.h:36
CaloSteppingAction::birkCutEC_
double birkCutEC_
Definition: CaloSteppingAction.h:100
HcalDetId.h
PCaloHit.h
CaloSteppingAction::NaNTrap
void NaNTrap(const G4Step *) const
Definition: CaloSteppingAction.cc:334
HcalDetId
Definition: HcalDetId.h:12
CaloSteppingAction::nameHitC_
std::vector< std::string > nameHitC_
Definition: CaloSteppingAction.h:94
edm::PassiveHitContainer
std::vector< PassiveHit > PassiveHitContainer
Definition: PassiveHit.h:100
edm::LogVerbatim
Definition: MessageLogger.h:297
CaloSteppingAction::mapLV_
std::map< const G4LogicalVolume *, std::string > mapLV_
Definition: CaloSteppingAction.h:97
PCaloHit::kEcalDepthMask
static const int kEcalDepthMask
Definition: PCaloHit.h:61
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CaloSteppingAction::eeNumberingScheme_
std::unique_ptr< EcalEndcapNumberingScheme > eeNumberingScheme_
Definition: CaloSteppingAction.h:85
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
CaloSteppingAction::nameEESD_
std::vector< std::string > nameEESD_
Definition: CaloSteppingAction.h:93
cc
CaloSteppingAction::eventID_
int eventID_
Definition: CaloSteppingAction.h:98
CaloSteppingAction::saveHits
void saveHits(int flag)
Definition: CaloSteppingAction.cc:442
CaloSteppingAction::getBirkL3
double getBirkL3(double dE, double step, double chg, double dens) const
Definition: CaloSteppingAction.cc:405
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CaloGVHit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: CaloGVHit.cc:29
G4TrackToParticleID.h
type
type
Definition: HCALResponse.h:21
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
CaloSteppingAction::slave_
std::unique_ptr< CaloSlaveSD > slave_[nSD_]
Definition: CaloSteppingAction.h:91
isFinite.h
PVValHelper::dz
Definition: PVValidationHelpers.h:50
CaloHitID
Definition: CaloHitID.h:11
Exception
Definition: hltDiff.cc:246
CaloSteppingAction::~CaloSteppingAction
~CaloSteppingAction() override
Definition: CaloSteppingAction.cc:83
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
CaloSteppingAction::timeSliceUnit_
double timeSliceUnit_
Definition: CaloSteppingAction.h:101
pdg
Definition: pdg_functions.h:28
CaloSteppingAction::count_
int count_
Definition: CaloSteppingAction.h:98
Exception.h
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
CaloSteppingAction::hitMap_
std::map< std::pair< int, CaloHitID >, CaloGVHit > hitMap_[nSD_]
Definition: CaloSteppingAction.h:102
CaloSteppingAction::volEBSD_
std::vector< const G4LogicalVolume * > volEBSD_
Definition: CaloSteppingAction.h:95
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
CaloSteppingAction::hcNumberingPS_
std::unique_ptr< HcalNumberingFromPS > hcNumberingPS_
Definition: CaloSteppingAction.h:86
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CaloSteppingAction::hcNumberingScheme_
std::unique_ptr< HcalNumberingScheme > hcNumberingScheme_
Definition: CaloSteppingAction.h:90
ntuplemaker.time
time
Definition: ntuplemaker.py:310
edm::Event
Definition: Event.h:73
crabWrapper.key
key
Definition: crabWrapper.py:19
EcalBaseNumber::setSize
void setSize(const int &size)
Definition: EcalBaseNumber.cc:10
cuy.ii
ii
Definition: cuy.py:590
begin
#define begin
Definition: vmac.h:32
CaloSteppingAction::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CaloSteppingAction.cc:88
PCaloHit::kEcalDepthRefz
static const int kEcalDepthRefz
Definition: PCaloHit.h:63
weight
Definition: weight.py:1
hit
Definition: SiStripHitEffFromCalibTree.cc:88
CaloSteppingAction::slopeLY_
double slopeLY_
Definition: CaloSteppingAction.h:99
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
CaloSteppingAction::birkC1EC_
double birkC1EC_
Definition: CaloSteppingAction.h:99
fastSimProducer_cff.density
density
Definition: fastSimProducer_cff.py:61
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
CaloSteppingAction::update
void update(const BeginOfJob *job) override
This routine will be called when the appropriate signal arrives.
Definition: CaloSteppingAction.cc:131
CaloSteppingAction::ebNumberingScheme_
std::unique_ptr< EcalBarrelNumberingScheme > ebNumberingScheme_
Definition: CaloSteppingAction.h:84
HcalDDDSimConstants.h
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37