test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ECalSD.cc
Go to the documentation of this file.
1 // File: ECalSD.cc
3 // Description: Sensitive Detector class for electromagnetic calorimeters
18 
20 
21 #include "G4LogicalVolumeStore.hh"
22 #include "G4LogicalVolume.hh"
23 #include "G4Step.hh"
24 #include "G4Track.hh"
25 #include "G4VProcess.hh"
26 
27 #include "G4SystemOfUnits.hh"
28 
29 #include<algorithm>
30 
31 //#define DebugLog
32 
33 template <class T>
34 bool any(const std::vector<T> & v, const T &what)
35 {
36  return std::find(v.begin(), v.end(), what) != v.end();
37 }
38 
39 ECalSD::ECalSD(G4String name, const DDCompactView & cpv,
41  edm::ParameterSet const & p, const SimTrackManager* manager) :
42  CaloSD(name, cpv, clg, p, manager,
43  p.getParameter<edm::ParameterSet>("ECalSD").getParameter<int>("TimeSliceUnit"),
44  p.getParameter<edm::ParameterSet>("ECalSD").getParameter<bool>("IgnoreTrackID")),
45  numberingScheme(0){
46 
47  // static SimpleConfigurable<bool> on1(false, "ECalSD:UseBirkLaw");
48  // static SimpleConfigurable<double> bk1(0.00463,"ECalSD:BirkC1");
49  // static SimpleConfigurable<double> bk2(-0.03, "ECalSD:BirkC2");
50  // static SimpleConfigurable<double> bk3(1.0, "ECalSD:BirkC3");
51  // Values from NIM A484 (2002) 239-244: as implemented in Geant3
52  // useBirk = on1.value();
53  // birk1 = bk1.value()*(g/(MeV*cm2));
54  // birk2 = bk2.value()*(g/(MeV*cm2))*(g/(MeV*cm2));
55 
57  useBirk = m_EC.getParameter<bool>("UseBirkLaw");
58  useBirkL3 = m_EC.getParameter<bool>("BirkL3Parametrization");
59  birk1 = m_EC.getParameter<double>("BirkC1")*(g/(MeV*cm2));
60  birk2 = m_EC.getParameter<double>("BirkC2");
61  birk3 = m_EC.getParameter<double>("BirkC3");
62  birkSlope = m_EC.getParameter<double>("BirkSlope");
63  birkCut = m_EC.getParameter<double>("BirkCut");
64  slopeLY = m_EC.getParameter<double>("SlopeLightYield");
65  storeTrack = m_EC.getParameter<bool>("StoreSecondary");
66  crystalMat = m_EC.getUntrackedParameter<std::string>("XtalMat","E_PbWO4");
67  bool isItTB = m_EC.getUntrackedParameter<bool>("TestBeam", false);
68  bool nullNS = m_EC.getUntrackedParameter<bool>("NullNumbering", false);
69  storeRL = m_EC.getUntrackedParameter<bool>("StoreRadLength", false);
70 
71  ageingWithSlopeLY = m_EC.getUntrackedParameter<bool>("AgeingWithSlopeLY", false);
72  if(ageingWithSlopeLY) ageing.setLumies(p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("DelivLuminosity"),
73  p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("InstLuminosity"));
74 
75  //Material list for HB/HE/HO sensitive detectors
76  std::string attribute = "ReadOutName";
78  DDValue ddv(attribute,name,0);
80  DDFilteredView fv(cpv);
81  fv.addFilter(filter);
82  fv.firstChild();
84  // Use of Weight
85  useWeight= true;
86  std::vector<double> tempD = getDDDArray("EnergyWeight",sv);
87  if (tempD.size() > 0) { if (tempD[0] < 0.1) useWeight = false; }
88  std::vector<std::string> tempS = getStringArray("Depth1Name",sv);
89  if (tempS.size() > 0) depth1Name = tempS[0];
90  else depth1Name = " ";
91  tempS = getStringArray("Depth2Name",sv);
92  if (tempS.size() > 0) depth2Name = tempS[0];
93  else depth2Name = " ";
94 
95  EcalNumberingScheme* scheme=0;
96  if (nullNS) scheme = 0;
97  else if (name == "EcalHitsEB") scheme = dynamic_cast<EcalNumberingScheme*>(new EcalBarrelNumberingScheme());
98  else if (name == "EcalHitsEE") scheme = dynamic_cast<EcalNumberingScheme*>(new EcalEndcapNumberingScheme());
99  else if (name == "EcalHitsES") {
100  if (isItTB) scheme = dynamic_cast<EcalNumberingScheme*>(new ESTBNumberingScheme());
101  else scheme = dynamic_cast<EcalNumberingScheme*>(new EcalPreshowerNumberingScheme());
102  useWeight = false;
103  } else {edm::LogWarning("EcalSim") << "ECalSD: ReadoutName not supported\n";}
104 
105  if (scheme) setNumberingScheme(scheme);
106 #ifdef DebugLog
107  LogDebug("EcalSim") << "Constructing a ECalSD with name " << GetName();
108 #endif
109  if (useWeight) {
110  edm::LogInfo("EcalSim") << "ECalSD:: Use of Birks law is set to "
111  << useBirk << " with three constants kB = "
112  << birk1 << ", C1 = " << birk2 << ", C2 = "
113  << birk3 <<"\n Use of L3 parametrization "
114  << useBirkL3 << " with slope " << birkSlope
115  << " and cut off " << birkCut << "\n"
116  << " Slope for Light yield is set to "
117  << slopeLY;
118  } else {
119  edm::LogInfo("EcalSim") << "ECalSD:: energy deposit is not corrected "
120  << " by Birk or light yield curve";
121  }
122 
123  edm::LogInfo("EcalSim") << "ECalSD:: Suppression Flag " << suppressHeavy
124  << " protons below " << kmaxProton << " MeV,"
125  << " neutrons below " << kmaxNeutron << " MeV and"
126  << " ions below " << kmaxIon << " MeV\n"
127  << " Depth1 Name = " << depth1Name
128  << " and Depth2 Name = " << depth2Name;
129 
130  if (useWeight) initMap(name,cpv);
131 
132 }
133 
135  if (numberingScheme) delete numberingScheme;
136 }
137 
138 double ECalSD::getEnergyDeposit(G4Step * aStep) {
139 
140  if (aStep == NULL) {
141  return 0;
142  } else {
143  preStepPoint = aStep->GetPreStepPoint();
144  G4Track* theTrack = aStep->GetTrack();
145  double wt2 = theTrack->GetWeight();
146  G4String nameVolume = preStepPoint->GetPhysicalVolume()->GetName();
147 
148  // take into account light collection curve for crystals
149  double weight = 1.;
150  if (suppressHeavy) {
151  TrackInformation * trkInfo = (TrackInformation *)(theTrack->GetUserInformation());
152  if (trkInfo) {
153  int pdg = theTrack->GetDefinition()->GetPDGEncoding();
154  if (!(trkInfo->isPrimary())) { // Only secondary particles
155  double ke = theTrack->GetKineticEnergy()/MeV;
156  if (((pdg/1000000000 == 1 && ((pdg/10000)%100) > 0 &&
157  ((pdg/10)%100) > 0)) && (ke<kmaxIon)) weight = 0;
158  if ((pdg == 2212) && (ke < kmaxProton)) weight = 0;
159  if ((pdg == 2112) && (ke < kmaxNeutron)) weight = 0;
160 #ifdef DebugLog
161  if (weight == 0)
162  LogDebug("EcalSim") << "Ignore Track " << theTrack->GetTrackID()
163  << " Type " << theTrack->GetDefinition()->GetParticleName()
164  << " Kinetic Energy " << ke << " MeV";
165 #endif
166  }
167  }
168  }
169  G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume();
170  if (useWeight && !any(noWeight,lv)) {
171  weight *= curve_LY(aStep);
172  if (useBirk) {
173  if (useBirkL3) weight *= getBirkL3(aStep);
174  else weight *= getAttenuation(aStep, birk1, birk2, birk3);
175  }
176  }
177  double wt1 = getResponseWt(theTrack);
178  double edep = aStep->GetTotalEnergyDeposit()*weight*wt1;
179  /*
180  if(wt2 != 1.0) {
181  std::cout << "ECalSD:: " << nameVolume
182  <<" LightWeight= " <<weight << " wt1= " <<wt1
183  << " wt2= " << wt2 << " "
184  << " Weighted Energy Deposit " << edep/MeV << " MeV"
185  << std::endl;
186  std::cout << theTrack->GetDefinition()->GetParticleName()
187  << " " << theTrack->GetKineticEnergy()
188  << " Id=" << theTrack->GetTrackID()
189  << " IdP=" << theTrack->GetParentID();
190  const G4VProcess* pr = theTrack->GetCreatorProcess();
191  if(pr) std::cout << " from " << pr->GetProcessName();
192  std::cout << std::endl;
193  }
194  */
195  if(wt2 > 0.0) { edep *= wt2; }
196 #ifdef DebugLog
197  LogDebug("EcalSim") << "ECalSD:: " << nameVolume
198  <<" Light Collection Efficiency " <<weight << ":" <<wt1
199  << " Weighted Energy Deposit " << edep/MeV << " MeV";
200 #endif
201  return edep;
202  }
203 }
204 
205 int ECalSD::getTrackID(G4Track* aTrack) {
206 
207  int primaryID(0);
208  bool flag(false);
209  if (storeTrack) {
210  G4LogicalVolume* lv = preStepPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
211  if (any(useDepth1,lv)) {
212  flag = true;
213  } else if (any(useDepth2,lv)) {
214  flag = true;
215  }
216  }
217  if (flag) {
218  forceSave = true;
219  primaryID = aTrack->GetTrackID();
220  } else {
221  primaryID = CaloSD::getTrackID(aTrack);
222  }
223  return primaryID;
224 }
225 
226 uint16_t ECalSD::getDepth(G4Step * aStep) {
227  G4LogicalVolume* lv = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume();
228  uint16_t ret = 0;
229  if (any(useDepth1,lv)) ret = 1;
230  else if (any(useDepth2,lv)) ret = 2;
231  else if (storeRL) ret = getRadiationLength(aStep);
232 #ifdef DebugLog
233  LogDebug("EcalSim") << "Volume " << lv->GetName() << " Depth " << ret;
234 #endif
235  return ret;
236 }
237 
238 uint16_t ECalSD::getRadiationLength(G4Step * aStep) {
239 
240  uint16_t thisX0 = 0;
241  if (aStep != NULL) {
242  G4StepPoint* hitPoint = aStep->GetPreStepPoint();
243  G4LogicalVolume* lv = hitPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
244 
245  if (useWeight) {
246  G4ThreeVector localPoint = setToLocal(hitPoint->GetPosition(),
247  hitPoint->GetTouchable());
248  double crlength = crystalLength(lv);
249  double radl = hitPoint->GetMaterial()->GetRadlen();
250  double detz = (float)(0.5*crlength + localPoint.z());
251  thisX0 = (uint16_t)floor(detz/radl);
252  }
253  }
254  return thisX0;
255 }
256 
257 uint32_t ECalSD::setDetUnitId(G4Step * aStep) {
258  if (numberingScheme == 0) {
259  return EBDetId(1,1)();
260  } else {
261  getBaseNumber(aStep);
263  }
264 }
265 
267  if (scheme != 0) {
268  edm::LogInfo("EcalSim") << "EcalSD: updates numbering scheme for "
269  << GetName() << "\n";
270  if (numberingScheme) delete numberingScheme;
271  numberingScheme = scheme;
272  }
273 }
274 
275 
276 void ECalSD::initMap(G4String sd, const DDCompactView & cpv) {
277 
278  G4String attribute = "ReadOutName";
280  DDValue ddv(attribute,sd,0);
282  DDFilteredView fv(cpv);
283  fv.addFilter(filter);
284  fv.firstChild();
285 
286  std::vector<G4LogicalVolume*> lvused;
287  const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
288  std::vector<G4LogicalVolume *>::const_iterator lvcite;
289  std::map<std::string, G4LogicalVolume *> nameMap;
290  for (auto lvi = lvs->begin(), lve = lvs->end(); lvi != lve; ++lvi)
291  nameMap.insert(std::make_pair((*lvi)->GetName(), *lvi));
292 
293  bool dodet=true;
294  while (dodet) {
295  const std::string &matname = fv.logicalPart().material().name().name();
296  const std::string &lvname = fv.logicalPart().name().name();
297  G4LogicalVolume* lv = nameMap[lvname];
298  if (depth1Name != " ") {
299  if (strncmp(lvname.c_str(), depth1Name.c_str(), 4) == 0) {
300  if (!any(useDepth1, lv)) {
301  useDepth1.push_back(lv);
302 #ifdef DebugLog
303  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname
304  <<" in Depth 1 volume list";
305 #endif
306  }
307  G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
308  if (lvr != 0 && !any(useDepth1, lvr)) {
309  useDepth1.push_back(lvr);
310 #ifdef DebugLog
311  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << "_refl"
312  <<" in Depth 1 volume list";
313 #endif
314  }
315  }
316  }
317  if (depth2Name != " ") {
318  if (strncmp(lvname.c_str(), depth2Name.c_str(), 4) == 0) {
319  if (!any(useDepth2, lv)) {
320  useDepth2.push_back(lv);
321 #ifdef DebugLog
322  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname
323  <<" in Depth 2 volume list";
324 #endif
325  }
326  G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
327  if (lvr != 0 && !any(useDepth2,lvr)) {
328  useDepth2.push_back(lvr);
329 #ifdef DebugLog
330  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << "_refl"
331  <<" in Depth 2 volume list";
332 #endif
333  }
334  }
335  }
336  if (lv != 0) {
337  if (crystalMat.size() == matname.size() && !strcmp(crystalMat.c_str(), matname.c_str())) {
338  if (!any(lvused,lv)) {
339  lvused.push_back(lv);
340  const DDSolid & sol = fv.logicalPart().solid();
341  const std::vector<double> & paras = sol.parameters();
342 #ifdef DebugLog
343  LogDebug("EcalSim") << "ECalSD::initMap (for " << sd << "): Solid "
344  << lvname << " Shape " << sol.shape()
345  << " Parameter 0 = "<< paras[0]
346  << " Logical Volume " << lv;
347 #endif
348  if (sol.shape() == ddtrap) {
349  double dz = 2*paras[0];
350  xtalLMap.insert(std::pair<G4LogicalVolume*,double>(lv,dz));
351  lv = nameMap[lvname + "_refl"];
352  if (lv != 0)
353  xtalLMap.insert(std::pair<G4LogicalVolume*,double>(lv,dz));
354  }
355  }
356  } else {
357  if (!any(noWeight,lv)) {
358  noWeight.push_back(lv);
359 #ifdef DebugLog
360  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname
361  << " Material " << matname <<" in noWeight list";
362 #endif
363  }
364  lv = nameMap[lvname];
365  if (lv != 0 && !any(noWeight,lv)) {
366  noWeight.push_back(lv);
367 #ifdef DebugLog
368  LogDebug("EcalSim") << "ECalSD::initMap Logical Volume " << lvname
369  << " Material " << matname <<" in noWeight list";
370 #endif
371  }
372  }
373  }
374  dodet = fv.next();
375  }
376 #ifdef DebugLog
377  LogDebug("EcalSim") << "ECalSD: Length Table for " << attribute << " = "
378  << sd << ":";
379  std::map<G4LogicalVolume*,double>::const_iterator ite = xtalLMap.begin();
380  int i=0;
381  for (; ite != xtalLMap.end(); ite++, i++) {
382  G4String name = "Unknown";
383  if (ite->first != 0) name = (ite->first)->GetName();
384  LogDebug("EcalSim") << " " << i << " " << ite->first << " " << name
385  << " L = " << ite->second;
386  }
387 #endif
388 }
389 
390 double ECalSD::curve_LY(G4Step* aStep) {
391 
392  G4StepPoint* stepPoint = aStep->GetPreStepPoint();
393  G4LogicalVolume* lv = stepPoint->GetTouchable()->GetVolume(0)->GetLogicalVolume();
394 
395  double weight = 1.;
396  G4ThreeVector localPoint = setToLocal(stepPoint->GetPosition(),
397  stepPoint->GetTouchable());
398 
399  double crlength = crystalLength(lv);
400 
401  if(ageingWithSlopeLY){
402  //position along the crystal in mm from 0 to 230 (in EB)
403  double depth = 0.5 * crlength + localPoint.z();
404 
405  if (depth >= -0.1 || depth <= crlength+0.1)
406  weight = ageing.calcLightCollectionEfficiencyWeighted(currentID.unitID(), depth/crlength);
407  }
408  else{
409  double dapd = 0.5 * crlength - localPoint.z();
410  if (dapd >= -0.1 || dapd <= crlength+0.1) {
411  if (dapd <= 100.)
412  weight = 1.0 + slopeLY - dapd * 0.01 * slopeLY;
413  } else {
414  edm::LogWarning("EcalSim") << "ECalSD: light coll curve : wrong distance "
415  << "to APD " << dapd << " crlength = "
416  << crlength <<" crystal name = " <<lv->GetName()
417  << " z of localPoint = " << localPoint.z()
418  << " take weight = " << weight;
419  }
420  }
421 #ifdef DebugLog
422  LogDebug("EcalSim") << "ECalSD, light coll curve : " << dapd
423  << " crlength = " << crlength
424  << " crystal name = " << lv->GetName()
425  << " z of localPoint = " << localPoint.z()
426  << " take weight = " << weight;
427 #endif
428  return weight;
429 }
430 
431 double ECalSD::crystalLength(G4LogicalVolume* lv) {
432 
433  double length= 230.;
434  std::map<G4LogicalVolume*,double>::const_iterator ite = xtalLMap.find(lv);
435  if (ite != xtalLMap.end()) length = ite->second;
436  return length;
437 }
438 
439 void ECalSD::getBaseNumber(const G4Step* aStep) {
440 
442  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
443  int theSize = touch->GetHistoryDepth()+1;
444  if ( theBaseNumber.getCapacity() < theSize ) theBaseNumber.setSize(theSize);
445  //Get name and copy numbers
446  if ( theSize > 1 ) {
447  for (int ii = 0; ii < theSize ; ii++) {
448  theBaseNumber.addLevel(touch->GetVolume(ii)->GetName(),touch->GetReplicaNumber(ii));
449 #ifdef DebugLog
450  LogDebug("EcalSim") << "ECalSD::getBaseNumber(): Adding level " << ii
451  << ": " << touch->GetVolume(ii)->GetName() << "["
452  << touch->GetReplicaNumber(ii) << "]";
453 #endif
454  }
455  }
456 
457 }
458 
459 double ECalSD::getBirkL3(G4Step* aStep) {
460 
461  double weight = 1.;
462  double charge = aStep->GetPreStepPoint()->GetCharge();
463 
464  if (charge != 0. && aStep->GetStepLength() > 0) {
465  G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
466  double density = mat->GetDensity();
467  double dedx = aStep->GetTotalEnergyDeposit()/aStep->GetStepLength();
468  double rkb = birk1/density;
469  if (dedx > 0) {
470  weight = 1. - birkSlope*log(rkb*dedx);
471  if (weight < birkCut) weight = birkCut;
472  else if (weight > 1.) weight = 1.;
473  }
474 #ifdef DebugLog
475  LogDebug("EcalSim") << "ECalSD::getBirkL3 in " << mat->GetName()
476  << " Charge " << charge << " dE/dx " << dedx
477  << " Birk Const " << rkb << " Weight = " << weight
478  << " dE " << aStep->GetTotalEnergyDeposit();
479 #endif
480  }
481  return weight;
482 
483 }
484 
485 std::vector<double> ECalSD::getDDDArray(const std::string & str,
486  const DDsvalues_type & sv) {
487 
488 #ifdef DebugLog
489  LogDebug("EcalSim") << "ECalSD:getDDDArray called for " << str;
490 #endif
491  DDValue value(str);
492  if (DDfetch(&sv,value)) {
493 #ifdef DebugLog
494  LogDebug("EcalSim") << value;
495 #endif
496  const std::vector<double> & fvec = value.doubles();
497  return fvec;
498  } else {
499  std::vector<double> fvec;
500  return fvec;
501  }
502 }
503 
504 std::vector<std::string> ECalSD::getStringArray(const std::string & str,
505  const DDsvalues_type & sv) {
506 
507 #ifdef DebugLog
508  LogDebug("EcalSim") << "ECalSD:getStringArray called for " << str;
509 #endif
510  DDValue value(str);
511  if (DDfetch(&sv,value)) {
512 #ifdef DebugLog
513  LogDebug("EcalSim") << value;
514 #endif
515  const std::vector<std::string> & fvec = value.strings();
516  return fvec;
517  } else {
518  std::vector<std::string> fvec;
519  return fvec;
520  }
521 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:150
bool useBirkL3
Definition: ECalSD.h:54
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
Definition: DDValue.cc:134
double kmaxNeutron
Definition: CaloSD.h:134
void addFilter(const DDFilter &, log_op op=AND)
const N & name() const
Definition: DDBase.h:82
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:504
double birkSlope
Definition: ECalSD.h:55
double slopeLY
Definition: ECalSD.h:56
std::vector< G4LogicalVolume * > useDepth1
Definition: ECalSD.h:59
void setLumies(double x, double y)
Definition: CaloSD.h:42
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:439
virtual double getEnergyDeposit(G4Step *)
Definition: ECalSD.cc:138
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:34
double birk1
Definition: ECalSD.h:55
virtual int getTrackID(G4Track *)
Definition: CaloSD.cc:574
bool useWeight
Definition: ECalSD.h:53
#define NULL
Definition: scimark2.h:8
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
int ii
Definition: cuy.py:588
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
type of data representation of DDCompactView
Definition: DDCompactView.h:77
double kmaxProton
Definition: CaloSD.h:134
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:102
double charge(const std::vector< uint8_t > &Ampls)
std::vector< G4LogicalVolume * > noWeight
Definition: ECalSD.h:59
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
bool storeRL
Definition: ECalSD.h:53
std::vector< G4LogicalVolume * > useDepth2
Definition: ECalSD.h:59
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
static TrackerG4SimHitNumberingScheme & numberingScheme(const DDCompactView &cpv, const GeometricDet &det)
virtual uint16_t getDepth(G4Step *)
Definition: ECalSD.cc:226
const double MeV
bool forceSave
Definition: CaloSD.h:137
std::string depth1Name
Definition: ECalSD.h:57
void addLevel(const std::string &name, const int &copyNumber)
virtual ~ECalSD()
Definition: ECalSD.cc:134
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:60
bool storeTrack
Definition: ECalSD.h:53
double kmaxIon
Definition: CaloSD.h:134
bool suppressHeavy
Definition: CaloSD.h:132
bool next()
set current node to the next node in the filtered tree
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
double crystalLength(G4LogicalVolume *)
Definition: ECalSD.cc:431
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:144
virtual int getTrackID(G4Track *)
Definition: ECalSD.cc:205
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
Definition: CaloSD.cc:465
void initMap(G4String, const DDCompactView &)
Definition: ECalSD.cc:276
G4Track * theTrack
Definition: CaloSD.h:118
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
Definition: DDValue.h:71
double curve_LY(G4Step *)
Definition: ECalSD.cc:390
std::string depth2Name
Definition: ECalSD.h:57
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
bool ageingWithSlopeLY
Definition: ECalSD.h:62
bool useBirk
Definition: ECalSD.h:54
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:485
CaloHitID currentID
Definition: CaloSD.h:117
double sd
virtual uint16_t getRadiationLength(G4Step *)
Definition: ECalSD.cc:238
double getBirkL3(G4Step *)
Definition: ECalSD.cc:459
bool isPrimary() const
double calcLightCollectionEfficiencyWeighted(DetId id, double z)
DDsvalues_type mergedSpecifics() const
double getResponseWt(G4Track *)
Definition: CaloSD.cc:607
double birk2
Definition: ECalSD.h:55
ECalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:39
bool firstChild()
set the current node to the first child ...
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:285
virtual uint32_t setDetUnitId(G4Step *)
Definition: ECalSD.cc:257
EcalNumberingScheme * numberingScheme
Definition: ECalSD.h:52
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:61
std::map< G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:58
int weight
Definition: histoStyle.py:50
uint32_t unitID() const
Definition: CaloHitID.h:22
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:266
void setSize(const int &size)
long double T
double birkCut
Definition: ECalSD.h:55
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::string crystalMat
Definition: ECalSD.h:57
virtual uint32_t getUnitID(const EcalBaseNumber &baseNumber) const =0
double birk3
Definition: ECalSD.h:55
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:37
G4ThreeVector setToLocal(const G4ThreeVector &, const G4VTouchable *)
Definition: CaloSD.cc:296