CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HCalSD Class Reference

#include <HCalSD.h>

Inheritance diagram for HCalSD:
CaloSD Observer< const BeginOfJob * > SensitiveCaloDetector Observer< const BeginOfRun * > Observer< const BeginOfEvent * > Observer< const BeginOfTrack * > Observer< const EndOfTrack * > Observer< const EndOfEvent * > SensitiveDetector

Public Member Functions

 HCalSD (const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
uint32_t setDetUnitId (const G4Step *step) override
 
void setNumberingScheme (HcalNumberingScheme *)
 
 ~HCalSD () override=default
 
- Public Member Functions inherited from CaloSD
 CaloSD (const std::string &aSDname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
 
void clear () override
 
void clearHits () override
 
void DrawAll () override
 
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
void fillHits (edm::PCaloHitContainer &, const std::string &) override
 
void Initialize (G4HCofThisEvent *HCE) override
 
bool isItFineCalo (const G4VTouchable *touch)
 
void PrintAll () override
 
bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *) override
 
G4bool ProcessHits (G4Step *step, G4TouchableHistory *) override
 
void reset () override
 
 ~CaloSD () override
 
- Public Member Functions inherited from SensitiveCaloDetector
 SensitiveCaloDetector (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- Public Member Functions inherited from SensitiveDetector
void EndOfEvent (G4HCofThisEvent *eventHC) override
 
const std::vector< std::string > & getNames () const
 
void Initialize (G4HCofThisEvent *eventHC) override
 
bool isCaloSD () const
 
 SensitiveDetector (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, bool calo)
 
 ~SensitiveDetector () override
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent * >
 Observer ()
 
void slotForUpdate (const BeginOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack * >
 Observer ()
 
void slotForUpdate (const EndOfTrack * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent * >
 Observer ()
 
void slotForUpdate (const EndOfEvent * iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfJob * >
 Observer ()
 
void slotForUpdate (const BeginOfJob * iT)
 
virtual ~Observer ()
 

Protected Member Functions

bool filterHit (CaloG4Hit *, double) override
 
double getEnergyDeposit (const G4Step *) override
 
bool getFromLibrary (const G4Step *) override
 
void initRun () override
 
void update (const ::EndOfEvent *) override
 
void update (const BeginOfEvent *) override
 
void update (const BeginOfJob *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *) override
 
void update (const BeginOfTrack *trk) override
 
void update (const EndOfTrack *trk) override
 
- Protected Member Functions inherited from CaloSD
bool checkHit ()
 
CaloG4HitcreateNewHit (const G4Step *, const G4Track *)
 
virtual void endEvent ()
 
virtual double EnergyCorrected (const G4Step &step, const G4Track *)
 
double getAttenuation (const G4Step *aStep, double birk1, double birk2, double birk3) const
 
virtual uint16_t getDepth (const G4Step *)
 
int getNumberOfHits ()
 
double getResponseWt (const G4Track *)
 
virtual int getTrackID (const G4Track *)
 
bool hitExists (const G4Step *)
 
void ignoreRejection ()
 
virtual void initEvent (const BeginOfEvent *)
 
void processHit (const G4Step *step)
 
void resetForNewPrimary (const G4Step *)
 
void setNumberCheckedHits (int val)
 
void setParameterized (bool val)
 
G4ThreeVector setToGlobal (const G4ThreeVector &, const G4VTouchable *) const
 
G4ThreeVector setToLocal (const G4ThreeVector &, const G4VTouchable *) const
 
virtual int setTrackID (const G4Step *)
 
void setUseMap (bool val)
 
void update (const ::EndOfEvent *) override
 
void update (const BeginOfEvent *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *trk) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *trk) override
 This routine will be called when the appropriate signal arrives. More...
 
void updateHit (CaloG4Hit *)
 
- Protected Member Functions inherited from SensitiveDetector
TrackInformationcmsTrackInformation (const G4Track *aTrack)
 
Local3DPoint ConvertToLocal3DPoint (const G4ThreeVector &point) const
 
Local3DPoint FinalStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint InitialStepPosition (const G4Step *step, coordinates) const
 
Local3DPoint LocalPostStepPosition (const G4Step *step) const
 
Local3DPoint LocalPreStepPosition (const G4Step *step) const
 
void NaNTrap (const G4Step *step) const
 
void setNames (const std::vector< std::string > &)
 
- Protected Member Functions inherited from Observer< const EndOfEvent * >
virtual void update (const EndOfEvent *)=0
 This routine will be called when the appropriate signal arrives. More...
 

Private Member Functions

void fillLogVolumeVector (const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
 
void getFromHFLibrary (const G4Step *step, bool &isKilled)
 
void getFromParam (const G4Step *step, bool &isKilled)
 
void getHitFibreBundle (const G4Step *step, bool type)
 
void getHitPMT (const G4Step *step)
 
void hitForFibre (const G4Step *step)
 
bool isItConicalBundle (const G4LogicalVolume *)
 
bool isItFibre (const G4LogicalVolume *)
 
bool isItFibre (const G4String &)
 
bool isItHF (const G4Step *)
 
bool isItHF (const G4String &)
 
bool isItinFidVolume (const G4ThreeVector &)
 
bool isItPMT (const G4LogicalVolume *)
 
bool isItScintillator (const G4Material *)
 
bool isItStraightBundle (const G4LogicalVolume *)
 
double layerWeight (int, const G4ThreeVector &, int, int)
 
void modifyDepth (HcalNumberingFromDDD::HcalID &id)
 
void plotHF (const G4ThreeVector &pos, bool emType)
 
void plotProfile (const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
 
void readWeightFromFile (const std::string &)
 
uint32_t setDetUnitId (HcalNumberingFromDDD::HcalID &tmp)
 
uint32_t setDetUnitId (int, const G4ThreeVector &, int, int)
 

Private Attributes

bool agingFlagHB
 
bool agingFlagHE
 
bool applyFidCut
 
double betaThr
 
double birk1
 
double birk2
 
double birk3
 
double deliveredLumi
 
int depth_
 
TH1F * dist_ [9]
 
double eminHitHB
 
double eminHitHE
 
double eminHitHF
 
double eminHitHO
 
std::vector< const G4LogicalVolume * > fibre1LV
 
std::vector< const G4LogicalVolume * > fibre2LV
 
std::vector< const G4LogicalVolume * > fibreLV
 
std::vector< std::string > fibreNames
 
std::vector< double > gpar
 
const HcalDDDSimConstantshcalConstants_
 
const HcalSimulationConstantshcalSimConstants_
 
std::vector< int > hfLevels
 
std::vector< const G4LogicalVolume * > hfLV
 
std::vector< std::string > hfNames
 
std::unique_ptr< HFShowerhfshower
 
TH1F * hit_ [9]
 
TH1F * hzvem
 
TH1F * hzvhad
 
bool isHF
 
std::map< uint32_t, double > layerWeights
 
const HBHEDarkeningm_HBDarkening
 
std::unique_ptr< HcalTestNSm_HcalTestNS
 
const HBHEDarkeningm_HEDarkening
 
std::unique_ptr< HFDarkeningm_HFDarkening
 
std::vector< const G4Material * > materials
 
std::vector< std::string > matNames
 
bool neutralDensity
 
std::unique_ptr< HcalNumberingFromDDDnumberingFromDDD
 
std::unique_ptr< HcalNumberingSchemenumberingScheme
 
std::vector< const G4LogicalVolume * > pmtLV
 
std::unique_ptr< HFShowerFibreBundleshowerBundle
 
std::unique_ptr< HFShowerLibraryshowerLibrary
 
std::unique_ptr< HFShowerParamshowerParam
 
std::unique_ptr< HFShowerPMTshowerPMT
 
bool testNS_
 
bool testNumber
 
TH1F * time_ [9]
 
bool useBirk
 
bool useFibreBundle
 
bool useHF
 
bool useLayerWt
 
bool useParam
 
bool usePMTHit
 
bool useShowerLibrary
 
double weight_
 

Additional Inherited Members

- Protected Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 
- Protected Attributes inherited from CaloSD
CaloG4HitcurrentHit
 
CaloHitID currentID
 
float edepositEM
 
float edepositHAD
 
double eminHit
 
double energyCut
 
G4ThreeVector entranceLocal
 
G4ThreeVector entrancePoint
 
bool forceSave
 
float incidentEnergy
 
double kmaxIon
 
double kmaxNeutron
 
double kmaxProton
 
G4ThreeVector posGlobal
 
CaloHitID previousID
 
bool suppressHeavy
 
double tmaxHit
 

Detailed Description

Definition at line 38 of file HCalSD.h.

Constructor & Destructor Documentation

◆ HCalSD()

HCalSD::HCalSD ( const std::string &  name,
const edm::EventSetup es,
const SensitiveDetectorCatalog clg,
edm::ParameterSet const &  p,
const SimTrackManager manager 
)

Definition at line 47 of file HCalSD.cc.

52  : CaloSD(name,
53  es,
54  clg,
55  p,
56  manager,
57  (float)(p.getParameter<edm::ParameterSet>("HCalSD").getParameter<double>("TimeSliceUnit")),
58  p.getParameter<edm::ParameterSet>("HCalSD").getParameter<bool>("IgnoreTrackID")),
59  hcalConstants_(nullptr),
60  hcalSimConstants_(nullptr),
61  m_HBDarkening(nullptr),
62  m_HEDarkening(nullptr),
63  isHF(false),
64  weight_(1.0),
65  depth_(1) {
66  numberingFromDDD.reset(nullptr);
67  numberingScheme.reset(nullptr);
68  showerLibrary.reset(nullptr);
69  hfshower.reset(nullptr);
70  showerParam.reset(nullptr);
71  showerPMT.reset(nullptr);
72  showerBundle.reset(nullptr);
73  m_HFDarkening.reset(nullptr);
74  m_HcalTestNS.reset(nullptr);
75 
76  //static SimpleConfigurable<double> bk1(0.013, "HCalSD:BirkC1");
77  //static SimpleConfigurable<double> bk2(0.0568,"HCalSD:BirkC2");
78  //static SimpleConfigurable<double> bk3(1.75, "HCalSD:BirkC3");
79  // Values from NIM 80 (1970) 239-244: as implemented in Geant3
80 
81  edm::ParameterSet m_HC = p.getParameter<edm::ParameterSet>("HCalSD");
82  useBirk = m_HC.getParameter<bool>("UseBirkLaw");
83  double bunit = (CLHEP::g / (CLHEP::MeV * CLHEP::cm2));
84  birk1 = m_HC.getParameter<double>("BirkC1") * bunit;
85  birk2 = m_HC.getParameter<double>("BirkC2");
86  birk3 = m_HC.getParameter<double>("BirkC3");
87  useShowerLibrary = m_HC.getParameter<bool>("UseShowerLibrary");
88  useParam = m_HC.getParameter<bool>("UseParametrize");
89  testNumber = m_HC.getParameter<bool>("TestNumberingScheme");
90  neutralDensity = m_HC.getParameter<bool>("doNeutralDensityFilter");
91  usePMTHit = m_HC.getParameter<bool>("UsePMTHits");
92  betaThr = m_HC.getParameter<double>("BetaThreshold");
93  eminHitHB = m_HC.getParameter<double>("EminHitHB") * MeV;
94  eminHitHE = m_HC.getParameter<double>("EminHitHE") * MeV;
95  eminHitHO = m_HC.getParameter<double>("EminHitHO") * MeV;
96  eminHitHF = m_HC.getParameter<double>("EminHitHF") * MeV;
97  useFibreBundle = m_HC.getParameter<bool>("UseFibreBundleHits");
98  deliveredLumi = m_HC.getParameter<double>("DelivLuminosity");
99  agingFlagHB = m_HC.getParameter<bool>("HBDarkening");
100  agingFlagHE = m_HC.getParameter<bool>("HEDarkening");
101  bool agingFlagHF = m_HC.getParameter<bool>("HFDarkening");
102  useHF = m_HC.getUntrackedParameter<bool>("UseHF", true);
103  bool forTBHC = m_HC.getUntrackedParameter<bool>("ForTBHCAL", false);
104  bool forTBH2 = m_HC.getUntrackedParameter<bool>("ForTBH2", false);
105  useLayerWt = m_HC.getUntrackedParameter<bool>("UseLayerWt", false);
106  std::string file = m_HC.getUntrackedParameter<std::string>("WtFile", "None");
107  testNS_ = m_HC.getUntrackedParameter<bool>("TestNS", false);
108  edm::ParameterSet m_HF = p.getParameter<edm::ParameterSet>("HFShower");
109  applyFidCut = m_HF.getParameter<bool>("ApplyFiducialCut");
110  bool dumpGeom = m_HC.getUntrackedParameter<bool>("DumpGeometry", false);
111 
112 #ifdef EDM_ML_DEBUG
113  edm::LogVerbatim("HcalSim") << "***************************************************"
114  << "\n"
115  << "* Constructing a HCalSD with name " << name << "\n"
116  << "\n"
117  << "***************************************************";
118 #endif
119  edm::LogVerbatim("HcalSim") << "HCalSD:: Use of HF code is set to " << useHF
120  << "\n Use of shower parametrization set to " << useParam
121  << "\n Use of shower library is set to " << useShowerLibrary
122  << "\n Use PMT Hit is set to " << usePMTHit << " with beta Threshold " << betaThr
123  << "\n USe of FibreBundle Hit set to " << useFibreBundle
124  << "\n Use of Birks law is set to " << useBirk
125  << " with three constants kB = " << birk1 / bunit << ", C1 = " << birk2
126  << ", C2 = " << birk3;
127  edm::LogVerbatim("HcalSim") << "HCalSD:: Suppression Flag " << suppressHeavy << " protons below " << kmaxProton
128  << " MeV,"
129  << " neutrons below " << kmaxNeutron << " MeV and"
130  << " ions below " << kmaxIon << " MeV\n"
131  << " Threshold for storing hits in HB: " << eminHitHB << " HE: " << eminHitHE
132  << " HO: " << eminHitHO << " HF: " << eminHitHF << "\n"
133  << "Delivered luminosity for Darkening " << deliveredLumi << " Flag (HE) " << agingFlagHE
134  << " Flag (HB) " << agingFlagHB << " Flag (HF) " << agingFlagHF << "\n"
135  << "Application of Fiducial Cut " << applyFidCut
136  << "Flag for test number|neutral density filter " << testNumber << " " << neutralDensity;
137 
138  // Get pointers to HcalDDDConstant and HcalSimulationParameters
140  es.get<HcalSimNumberingRecord>().get(hdc);
141  if (hdc.isValid()) {
142  hcalConstants_ = hdc.product();
143  } else {
144  edm::LogError("HcalSim") << "HCalSD : Cannot find HcalDDDSimConstant";
145  throw cms::Exception("Unknown", "HCalSD") << "Cannot find HcalDDDSimConstant\n";
146  }
147  if (forTBHC) {
148  useHF = false;
149  matNames.emplace_back("Scintillator");
150  } else {
152  es.get<HcalSimNumberingRecord>().get(hdsc);
153  if (hdsc.isValid()) {
154  hcalSimConstants_ = hdsc.product();
156  } else {
157  edm::LogError("HcalSim") << "HCalSD : Cannot find HcalDDDSimulationConstant";
158  throw cms::Exception("Unknown", "HCalSD") << "Cannot find HcalDDDSimulationConstant\n";
159  }
160  }
161 
163  if (testNumber || forTBH2) {
164  scheme = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(forTBH2));
165  } else {
166  scheme = new HcalNumberingScheme();
167  }
169 
170  // always call getFromLibrary() method to identify HF region
171  setParameterized(true);
172 
173  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
174  // std::vector<G4LogicalVolume *>::const_iterator lvcite;
175  const G4LogicalVolume* lv;
176  std::string attribute, value;
177 
178  if (useHF) {
179  if (useParam) {
180  showerParam = std::make_unique<HFShowerParam>(name, hcalConstants_, hcalSimConstants_->hcalsimpar(), p);
181  } else {
182  if (useShowerLibrary) {
183  showerLibrary = std::make_unique<HFShowerLibrary>(name, hcalConstants_, hcalSimConstants_->hcalsimpar(), p);
184  }
185  hfshower = std::make_unique<HFShower>(name, hcalConstants_, hcalSimConstants_->hcalsimpar(), p, 0);
186  }
187 
188  // HF volume names
190  const std::vector<int>& temp = hcalSimConstants_->hcalsimpar()->hfLevels_;
191 #ifdef EDM_ML_DEBUG
192  std::stringstream ss0;
193  ss0 << "HCalSD: Names to be tested for Volume = HF has " << hfNames.size() << " elements";
194 #endif
195  for (unsigned int i = 0; i < hfNames.size(); ++i) {
196  G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(hfNames[i])));
197  lv = nullptr;
198  for (auto lvol : *lvs) {
199  if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
200  lv = lvol;
201  break;
202  }
203  }
204  hfLV.emplace_back(lv);
205  hfLevels.emplace_back(temp[i]);
206 #ifdef EDM_ML_DEBUG
207  ss0 << "\n HF[" << i << "] = " << namv << " LV " << lv << " at level " << temp[i];
208 #endif
209  }
210 #ifdef EDM_ML_DEBUG
211  edm::LogVerbatim("HcalSim") << ss0.str();
212 #endif
213  // HF Fibre volume names
216  const std::vector<std::string>& pmtNames = hcalSimConstants_->hcalsimpar()->hfPMTNames_;
217  fillLogVolumeVector("HFPMT", pmtNames, pmtLV);
218  const std::vector<std::string>& straightNames = hcalSimConstants_->hcalsimpar()->hfFibreStraightNames_;
219  fillLogVolumeVector("HFFibreBundleStraight", straightNames, fibre1LV);
220  const std::vector<std::string>& conicalNames = hcalSimConstants_->hcalsimpar()->hfFibreConicalNames_;
221  fillLogVolumeVector("HFFibreBundleConical", conicalNames, fibre2LV);
222  }
223 
224  //Material list for HB/HE/HO sensitive detectors
225  const G4MaterialTable* matTab = G4Material::GetMaterialTable();
226  std::vector<G4Material*>::const_iterator matite;
227  for (auto const& namx : matNames) {
228  const G4Material* mat = nullptr;
229  for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
230  if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
231  mat = (*matite);
232  break;
233  }
234  }
235  materials.emplace_back(mat);
236  }
237 #ifdef EDM_ML_DEBUG
238  std::stringstream ss1;
239  for (unsigned int i = 0; i < matNames.size(); ++i) {
240  if (i / 10 * 10 == i) {
241  ss1 << "\n";
242  }
243  ss1 << " " << matNames[i];
244  }
245  edm::LogVerbatim("HcalSim") << "HCalSD: Material names for HCAL: " << ss1.str();
246 #endif
247  if (useLayerWt) {
249  }
250  numberingFromDDD = std::make_unique<HcalNumberingFromDDD>(hcalConstants_);
251 
252  //Special Geometry parameters
254 #ifdef EDM_ML_DEBUG
255  std::stringstream ss2;
256  for (unsigned int ig = 0; ig < gpar.size(); ig++) {
257  ss2 << "\n gpar[" << ig << "] = " << gpar[ig] / cm << " cm";
258  }
259  edm::LogVerbatim("HcalSim") << "Maximum depth for HF " << hcalConstants_->getMaxDepth(2) << gpar.size()
260  << " gpar (cm)" << ss2.str();
261 #endif
262 
263  //Test Hcal Numbering Scheme
264  if (testNS_)
265  m_HcalTestNS = std::make_unique<HcalTestNS>(&es);
266 
267  if (agingFlagHB) {
269  es.get<HBHEDarkeningRecord>().get("HB", hdark);
270  m_HBDarkening = &*hdark;
271  }
272  if (agingFlagHE) {
274  es.get<HBHEDarkeningRecord>().get("HE", hdark);
275  m_HEDarkening = &*hdark;
276  }
277 
278  for (int i = 0; i < 9; ++i) {
279  hit_[i] = time_[i] = dist_[i] = nullptr;
280  }
281  hzvem = hzvhad = nullptr;
282 
283  if (agingFlagHF) {
284  m_HFDarkening = std::make_unique<HFDarkening>(m_HC.getParameter<edm::ParameterSet>("HFDarkeningParameterBlock"));
285  }
286 #ifdef plotDebug
288 
289  if (tfile.isAvailable()) {
290  static const char* const labels[] = {"HB",
291  "HE",
292  "HO",
293  "HF Absorber",
294  "HF PMT",
295  "HF Absorber Long",
296  "HF Absorber Short",
297  "HF PMT Long",
298  "HF PMT Short"};
299  TFileDirectory hcDir = tfile->mkdir("ProfileFromHCalSD");
300  char name[20], title[60];
301  for (int i = 0; i < 9; ++i) {
302  sprintf(title, "Hit energy in %s", labels[i]);
303  sprintf(name, "HCalSDHit%d", i);
304  hit_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
305  sprintf(title, "Energy (MeV)");
306  hit_[i]->GetXaxis()->SetTitle(title);
307  hit_[i]->GetYaxis()->SetTitle("Hits");
308  sprintf(title, "Time of the hit in %s", labels[i]);
309  sprintf(name, "HCalSDTime%d", i);
310  time_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
311  sprintf(title, "Time (ns)");
312  time_[i]->GetXaxis()->SetTitle(title);
313  time_[i]->GetYaxis()->SetTitle("Hits");
314  sprintf(title, "Longitudinal profile in %s", labels[i]);
315  sprintf(name, "HCalSDDist%d", i);
316  dist_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
317  sprintf(title, "Distance (mm)");
318  dist_[i]->GetXaxis()->SetTitle(title);
319  dist_[i]->GetYaxis()->SetTitle("Hits");
320  }
321  if (useHF && (!useParam)) {
322  hzvem = hcDir.make<TH1F>("hzvem", "Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
323  hzvem->GetXaxis()->SetTitle("Longitudinal Profile (EM Part)");
324  hzvhad = hcDir.make<TH1F>("hzvhad", "Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
325  hzvhad->GetXaxis()->SetTitle("Longitudinal Profile (Hadronic Part)");
326  }
327  }
328 #endif
329  if (dumpGeom) {
331  const auto& lvNames = clg.logicalNames(name);
332  HcalDumpGeometry geom(lvNames, hcn, testNumber, false);
333  geom.update();
334  delete hcn;
335  }
336 }

References agingFlagHB, agingFlagHE, applyFidCut, betaThr, birk1, birk2, birk3, deliveredLumi, dist_, eminHitHB, eminHitHE, eminHitHF, eminHitHO, Exception, fibre1LV, fibre2LV, fibreLV, fibreNames, FrontierConditions_GlobalTag_cff::file, fillLogVolumeVector(), g, relativeConstraints::geom, edm::EventSetup::get(), get, HcalDDDSimConstants::getGparHF(), HcalDDDSimConstants::getMaxDepth(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gpar, hcalConstants_, HcalSimulationParameters::hcalMaterialNames_, hcalSimConstants_, HcalSimulationConstants::hcalsimpar(), HcalSimulationParameters::hfFibreConicalNames_, HcalSimulationParameters::hfFibreNames_, HcalSimulationParameters::hfFibreStraightNames_, hfLevels, HcalSimulationParameters::hfLevels_, hfLV, hfNames, HcalSimulationParameters::hfNames_, HcalSimulationParameters::hfPMTNames_, hfshower, hit_, hzvem, hzvhad, mps_fire::i, edm::ESHandleBase::isValid(), CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, SummaryClient_cfi::labels, SensitiveDetectorCatalog::logicalNames(), m_HBDarkening, m_HcalTestNS, m_HEDarkening, m_HFDarkening, TFileDirectory::make(), materials, matNames, MeV, Skims_PA_cff::name, neutralDensity, numberingFromDDD, numberingScheme, AlCaHLTBitMon_ParallelJobs::p, pmtLV, edm::ESHandle< T >::product(), readWeightFromFile(), generator_cfi::scheme, setNumberingScheme(), CaloSD::setParameterized(), showerBundle, showerLibrary, showerParam, showerPMT, AlCaHLTBitMon_QueryRunRegistry::string, CaloSD::suppressHeavy, groupFilesInBlocks::temp, testNS_, testNumber, compare::tfile, time_, runGCPTkAlMap::title, useBirk, useFibreBundle, useHF, useLayerWt, useParam, usePMTHit, useShowerLibrary, and relativeConstraints::value.

◆ ~HCalSD()

HCalSD::~HCalSD ( )
overridedefault

Member Function Documentation

◆ fillLogVolumeVector()

void HCalSD::fillLogVolumeVector ( const std::string &  value,
const std::vector< std::string > &  lvnames,
std::vector< const G4LogicalVolume * > &  lvvec 
)
private

Definition at line 338 of file HCalSD.cc.

340  {
341  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
342  const G4LogicalVolume* lv;
343  std::stringstream ss3;
344  ss3 << "HCalSD: " << lvnames.size() << " names to be tested for Volume <" << value << ">:";
345  for (unsigned int i = 0; i < lvnames.size(); ++i) {
346  G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[i])));
347  lv = nullptr;
348  for (auto lvol : *lvs) {
349  if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
350  lv = lvol;
351  break;
352  }
353  }
354  lvvec.emplace_back(lv);
355  if (i / 10 * 10 == i) {
356  ss3 << "\n";
357  }
358  ss3 << " " << namv;
359  }
360  edm::LogVerbatim("HcalSim") << ss3.str();
361 }

References mps_fire::i.

Referenced by HCalSD().

◆ filterHit()

bool HCalSD::filterHit ( CaloG4Hit aHit,
double  time 
)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 575 of file HCalSD.cc.

575  {
576  double threshold = 0;
577  DetId theId(aHit->getUnitID());
578  switch (theId.subdetId()) {
579  case HcalBarrel:
581  break;
582  case HcalEndcap:
584  break;
585  case HcalOuter:
587  break;
588  case HcalForward:
590  break;
591  default:
592  break;
593  }
594  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
595 }

References eminHitHB, eminHitHE, eminHitHF, eminHitHO, CaloG4Hit::getEnergyDeposit(), CaloG4Hit::getUnitID(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, remoteMonitoring_LED_IterMethod_cfg::threshold, ntuplemaker::time, and CaloSD::tmaxHit.

◆ getEnergyDeposit()

double HCalSD::getEnergyDeposit ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 420 of file HCalSD.cc.

420  {
421  double destep(0.0);
422  auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
423  auto const theTrack = aStep->GetTrack();
424 
425  if (isHF) {
426  if (useShowerLibrary && G4TrackToParticleID::isMuon(theTrack) && isItFibre(lv)) {
427 #ifdef EDM_ML_DEBUG
428  edm::LogVerbatim("HcalSim") << "HCalSD: Hit at Fibre in LV " << lv->GetName() << " for track "
429  << aStep->GetTrack()->GetTrackID() << " ("
430  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
431 #endif
432  hitForFibre(aStep);
433  }
434  return destep;
435  }
436 
437  if (isItPMT(lv)) {
438  if (usePMTHit && showerPMT) {
439  getHitPMT(aStep);
440  }
441 #ifdef EDM_ML_DEBUG
442  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from PMT parametrization in LV " << lv->GetName() << " for Track "
443  << aStep->GetTrack()->GetTrackID() << " ("
444  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
445 #endif
446  return destep;
447 
448  } else if (isItStraightBundle(lv)) {
449  if (useFibreBundle && showerBundle) {
450  getHitFibreBundle(aStep, false);
451  }
452 #ifdef EDM_ML_DEBUG
453  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() << " for track "
454  << aStep->GetTrack()->GetTrackID() << " ("
455  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
456 #endif
457  return destep;
458 
459  } else if (isItConicalBundle(lv)) {
460  if (useFibreBundle && showerBundle) {
461  getHitFibreBundle(aStep, true);
462  }
463 #ifdef EDM_ML_DEBUG
464  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() << " for track "
465  << aStep->GetTrack()->GetTrackID() << " ("
466  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
467 #endif
468  return destep;
469  }
470 
471  // normal hit
472  destep = aStep->GetTotalEnergyDeposit();
473 
474  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
475  uint32_t detid = setDetUnitId(aStep);
476  int det(0), ieta(0), phi(0), z(0), lay, depth(-1);
477  if (testNumber) {
478  HcalTestNumbering::unpackHcalIndex(detid, det, z, depth, ieta, phi, lay);
479  if (z == 0) {
480  z = -1;
481  }
482  } else {
483  HcalDetId hcid(detid);
484  det = hcid.subdetId();
485  ieta = hcid.ietaAbs();
486  phi = hcid.iphi();
487  z = hcid.zside();
488  }
489  lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
490 #ifdef EDM_ML_DEBUG
491  edm::LogVerbatim("HcalSim") << "HCalSD: det: " << det << " ieta: " << ieta << " iphi: " << phi << " zside " << z
492  << " lay: " << lay - 2;
493 #endif
494  if (depth_ == 0 && (det == 1 || det == 2) && ((!testNumber) || neutralDensity))
496  if (useLayerWt) {
497  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
498  weight_ = layerWeight(det + 2, hitPoint, depth_, lay);
499  }
500 
501  if (m_HBDarkening && det == 1) {
502  double dweight = m_HBDarkening->degradation(deliveredLumi, ieta, lay);
503  weight_ *= dweight;
504 #ifdef EDM_ML_DEBUG
505  edm::LogVerbatim("HcalSim") << "HCalSD: HB Lumi: " << deliveredLumi << " coefficient = " << dweight
506  << " Weight= " << weight_;
507 #endif
508  }
509 
510  if (m_HEDarkening && det == 2) {
511  double dweight = m_HEDarkening->degradation(deliveredLumi, ieta, lay);
512  weight_ *= dweight;
513 #ifdef EDM_ML_DEBUG
514  edm::LogVerbatim("HcalSim") << "HCalSD: HB Lumi: " << deliveredLumi << " coefficient = " << dweight
515  << " Weight= " << weight_;
516 #endif
517  }
518 
519  if (suppressHeavy) {
520  TrackInformation* trkInfo = (TrackInformation*)(theTrack->GetUserInformation());
521  if (trkInfo) {
522  int pdg = theTrack->GetDefinition()->GetPDGEncoding();
523  if (!(trkInfo->isPrimary())) { // Only secondary particles
524  double ke = theTrack->GetKineticEnergy();
525  if (pdg / 1000000000 == 1 && (pdg / 10000) % 100 > 0 && (pdg / 10) % 100 > 0 && ke < kmaxIon)
526  weight_ = 0;
527  if ((pdg == 2212) && (ke < kmaxProton))
528  weight_ = 0;
529  if ((pdg == 2112) && (ke < kmaxNeutron))
530  weight_ = 0;
531  }
532  }
533  }
534  if (useBirk) {
535  const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
536  if (isItScintillator(mat))
537  weight_ *= getAttenuation(aStep, birk1, birk2, birk3);
538  }
539  double wt1 = getResponseWt(theTrack);
540  double wt2 = theTrack->GetWeight();
541  double edep = weight_ * wt1 * destep;
542  if (wt2 > 0.0) {
543  edep *= wt2;
544  }
545 #ifdef EDM_ML_DEBUG
546  edm::LogVerbatim("HcalSim") << "HCalSD: edep= " << edep << " Det: " << det + 2 << " depth= " << depth_
547  << " weight= " << weight_ << " wt1= " << wt1 << " wt2= " << wt2;
548 #endif
549  return edep;
550 }

References birk1, birk2, birk3, HBHEDarkening::degradation(), deliveredLumi, LEDCalibrationChannels::depth, depth_, CaloSD::getAttenuation(), getHitFibreBundle(), getHitPMT(), HcalDDDSimConstants::getLayer0Wt(), CaloSD::getResponseWt(), hcalConstants_, hitForFibre(), LEDCalibrationChannels::ieta, HcalDetId::ietaAbs(), HcalDetId::iphi(), isHF, isItConicalBundle(), isItFibre(), isItPMT(), isItScintillator(), isItStraightBundle(), G4TrackToParticleID::isMuon(), TrackInformation::isPrimary(), ke, CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, layerWeight(), m_HBDarkening, m_HEDarkening, neutralDensity, phi, setDetUnitId(), showerBundle, showerPMT, DetId::subdetId(), CaloSD::suppressHeavy, testNumber, HcalTestNumbering::unpackHcalIndex(), useBirk, useFibreBundle, useLayerWt, usePMTHit, useShowerLibrary, weight_, z, and HcalDetId::zside().

◆ getFromHFLibrary()

void HCalSD::getFromHFLibrary ( const G4Step *  step,
bool &  isKilled 
)
private

Definition at line 706 of file HCalSD.cc.

706  {
707  std::vector<HFShowerLibrary::Hit> hits = showerLibrary->getHits(aStep, isKilled, weight_, false);
708  if (!isKilled || hits.empty()) {
709  return;
710  }
711 
712  int primaryID = setTrackID(aStep);
713 
714  // Reset entry point for new primary
715  resetForNewPrimary(aStep);
716 
717  auto const theTrack = aStep->GetTrack();
718  int det = 5;
719 
721  edepositEM = 1. * GeV;
722  edepositHAD = 0.;
723  } else {
724  edepositEM = 0.;
725  edepositHAD = 1. * GeV;
726  }
727 #ifdef EDM_ML_DEBUG
728  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary " << hits.size() << " hits for " << GetName() << " of "
729  << primaryID << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
730  << aStep->GetPreStepPoint()->GetKineticEnergy() / GeV << " GeV";
731 #endif
732  for (unsigned int i = 0; i < hits.size(); ++i) {
733  G4ThreeVector hitPoint = hits[i].position;
734  if (isItinFidVolume(hitPoint)) {
735  int depth = hits[i].depth;
736  double time = hits[i].time;
737  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
738  currentID.setID(unitID, time, primaryID, 0);
739 #ifdef plotDebug
740  plotProfile(aStep, hitPoint, 1.0 * GeV, time, depth);
741  bool emType = G4TrackToParticleID::isGammaElectronPositron(theTrack->GetDefinition()->GetPDGEncoding());
742  plotHF(hitPoint, emType);
743 #endif
744  processHit(aStep);
745  }
746  }
747 }

References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfClusterShapes_cfi::hits, mps_fire::i, G4TrackToParticleID::isGammaElectronPositron(), isItinFidVolume(), plotHF(), plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), showerLibrary, ntuplemaker::time, and weight_.

Referenced by getFromLibrary().

◆ getFromLibrary()

bool HCalSD::getFromLibrary ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 363 of file HCalSD.cc.

363  {
364  auto const track = aStep->GetTrack();
365  depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
366  weight_ = 1.0;
367  bool kill(false);
368  isHF = isItHF(aStep);
369  if (isHF) {
370  if (m_HFDarkening) {
371  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
372  const double invcm = 1. / CLHEP::cm;
373  double r = hitPoint.perp() * invcm;
374  double z = std::abs(hitPoint.z()) * invcm;
375  double dose_acquired = 0.;
377  unsigned int hfZLayer = (unsigned int)((z - HFDarkening::lowZLimit) / 5);
378  if (hfZLayer >= HFDarkening::upperZLimit)
379  hfZLayer = (HFDarkening::upperZLimit - 1);
380  float normalized_lumi = m_HFDarkening->int_lumi(deliveredLumi);
381  for (int i = hfZLayer; i != HFDarkening::numberOfZLayers; ++i) {
382  dose_acquired = m_HFDarkening->dose(i, r);
383  weight_ *= m_HFDarkening->degradation(normalized_lumi * dose_acquired);
384  }
385  }
386 #ifdef EDM_ML_DEBUG
387  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary: HFLumiDarkening at "
388  << "r= " << r << ", z= " << z << " Dose= " << dose_acquired << " weight= " << weight_;
389 #endif
390  }
391 
392  if (useParam) {
393  getFromParam(aStep, kill);
394 #ifdef EDM_ML_DEBUG
395  G4String nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
396  edm::LogVerbatim("HcalSim") << "HCalSD: " << getNumberOfHits() << " hits from parametrization in " << nameVolume
397  << " for Track " << track->GetTrackID() << " ("
398  << track->GetDefinition()->GetParticleName() << ")";
399 #endif
402 #ifdef EDM_ML_DEBUG
403  auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
404  edm::LogVerbatim("HcalSim") << "HCalSD: Starts shower library from " << nameVolume << " for Track "
405  << track->GetTrackID() << " (" << track->GetDefinition()->GetParticleName() << ")";
406 
407 #endif
408  getFromHFLibrary(aStep, kill);
409  }
410  }
411  }
412 #ifdef EDM_ML_DEBUG
413  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary ID= " << track->GetTrackID() << " ("
414  << track->GetDefinition()->GetParticleName() << ") kill= " << kill
415  << " weight= " << weight_ << " depth= " << depth_ << " isHF: " << isHF;
416 #endif
417  return kill;
418 }

References funct::abs(), deliveredLumi, depth_, getFromHFLibrary(), getFromParam(), CaloSD::getNumberOfHits(), mps_fire::i, createfilelist::int, G4TrackToParticleID::isGammaElectronPositron(), isHF, isItHF(), G4TrackToParticleID::isMuon(), G4TrackToParticleID::isStableHadronIon(), HFDarkening::lowZLimit, m_HFDarkening, HFDarkening::numberOfZLayers, alignCSCRings::r, HLT_FULL_cff::track, HFDarkening::upperZLimit, useParam, useShowerLibrary, weight_, and z.

◆ getFromParam()

void HCalSD::getFromParam ( const G4Step *  step,
bool &  isKilled 
)
private

Definition at line 791 of file HCalSD.cc.

791  {
792  std::vector<HFShowerParam::Hit> hits = showerParam->getHits(aStep, weight_, isKilled);
793  if (!isKilled || hits.empty()) {
794  return;
795  }
796 
797  int primaryID = setTrackID(aStep);
798  int det = 5;
799 
800 #ifdef EDM_ML_DEBUG
801  edm::LogVerbatim("HcalSim") << "HCalSD::getFromParam " << hits.size() << " hits for " << GetName() << " of "
802  << primaryID << " with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
803  << " of " << aStep->GetPreStepPoint()->GetKineticEnergy() / GeV
804  << " GeV in detector type " << det;
805 #endif
806  for (unsigned int i = 0; i < hits.size(); ++i) {
807  G4ThreeVector hitPoint = hits[i].position;
808  int depth = hits[i].depth;
809  double time = hits[i].time;
810  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
811  currentID.setID(unitID, time, primaryID, 0);
812  edepositEM = hits[i].edep * GeV;
813  edepositHAD = 0.;
814 #ifdef plotDebug
815  plotProfile(aStep, hitPoint, edepositEM, time, depth);
816 #endif
817  processHit(aStep);
818  }
819 }

References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfClusterShapes_cfi::hits, mps_fire::i, plotProfile(), CaloSD::processHit(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), showerParam, ntuplemaker::time, and weight_.

Referenced by getFromLibrary().

◆ getHitFibreBundle()

void HCalSD::getHitFibreBundle ( const G4Step *  step,
bool  type 
)
private

Definition at line 880 of file HCalSD.cc.

880  {
881  auto const preStepPoint = aStep->GetPreStepPoint();
882  auto const theTrack = aStep->GetTrack();
883  double edep = showerBundle->getHits(aStep, type);
884 
885  if (edep >= 0.0) {
886  edep *= GeV;
887  double etrack = preStepPoint->GetKineticEnergy();
888  int primaryID = 0;
889  if (etrack >= energyCut) {
890  primaryID = theTrack->GetTrackID();
891  } else {
892  primaryID = theTrack->GetParentID();
893  if (primaryID == 0)
894  primaryID = theTrack->GetTrackID();
895  }
896  // Reset entry point for new primary
897  resetForNewPrimary(aStep);
898  //
899  int det = static_cast<int>(HcalForward);
900  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
901  double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
902  double phi = rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
903  double etaR = showerBundle->getRadius();
904  int depth = 1;
905  if (etaR < 0.) {
906  depth = 2;
907  etaR = -etaR;
908  }
909  if (hitPoint.z() < 0.)
910  etaR = -etaR;
911 #ifdef EDM_ML_DEBUG
912  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR " << etaR << " phi " << phi / deg
913  << " depth " << depth;
914 #endif
915  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
916  uint32_t unitID = 0;
917  if (numberingFromDDD) {
918  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD->unitID(det, etaR, phi, depth, 1);
919  unitID = setDetUnitId(tmp);
920  }
921  if (type)
922  currentID.setID(unitID, time, primaryID, 3);
923  else
924  currentID.setID(unitID, time, primaryID, 2);
925 
926  edepositHAD = aStep->GetTotalEnergyDeposit();
927  edepositEM = -edepositHAD + edep;
928 #ifdef plotDebug
929  plotProfile(aStep, hitPoint, edep, time, depth);
930 #endif
931 #ifdef EDM_ML_DEBUG
932  double beta = preStepPoint->GetBeta();
933  edm::LogVerbatim("HcalSim") << "HCalSD::getHitFibreBundle 1 hit for " << GetName() << " of " << primaryID
934  << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
935  << preStepPoint->GetKineticEnergy() / GeV << " GeV with velocity " << beta << " UnitID "
936  << std::hex << unitID << std::dec;
937 #endif
938  processHit(aStep);
939  } // non-zero energy deposit
940 }

References zMuMuMuonUserData::beta, CaloSD::currentID, TauDecayModes::dec, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, GeV, HcalForward, numberingFromDDD, phi, plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), findQualityFiles::rr, setDetUnitId(), CaloHitID::setID(), showerBundle, ntuplemaker::time, and createJobs::tmp.

Referenced by getEnergyDeposit().

◆ getHitPMT()

void HCalSD::getHitPMT ( const G4Step *  step)
private

Definition at line 821 of file HCalSD.cc.

821  {
822  auto const preStepPoint = aStep->GetPreStepPoint();
823  auto const theTrack = aStep->GetTrack();
824  double edep = showerPMT->getHits(aStep);
825 
826  if (edep >= 0.) {
827  edep *= GeV;
828  double etrack = preStepPoint->GetKineticEnergy();
829  int primaryID = 0;
830  if (etrack >= energyCut) {
831  primaryID = theTrack->GetTrackID();
832  } else {
833  primaryID = theTrack->GetParentID();
834  if (primaryID == 0)
835  primaryID = theTrack->GetTrackID();
836  }
837  // Reset entry point for new primary
838  resetForNewPrimary(aStep);
839  //
840  int det = static_cast<int>(HcalForward);
841  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
842  double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
843  double phi = (rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
844  double etaR = showerPMT->getRadius();
845  int depth = 1;
846  if (etaR < 0) {
847  depth = 2;
848  etaR = -etaR;
849  }
850  if (hitPoint.z() < 0)
851  etaR = -etaR;
852 #ifdef EDM_ML_DEBUG
853  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR " << etaR << " phi " << phi / deg
854  << " depth " << depth;
855 #endif
856  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
857  uint32_t unitID = 0;
858  if (numberingFromDDD) {
859  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD->unitID(det, etaR, phi, depth, 1);
860  unitID = setDetUnitId(tmp);
861  }
862  currentID.setID(unitID, time, primaryID, 1);
863 
864  edepositHAD = aStep->GetTotalEnergyDeposit();
865  edepositEM = -edepositHAD + edep;
866 #ifdef plotDebug
867  plotProfile(aStep, hitPoint, edep, time, depth);
868 #endif
869 #ifdef EDM_ML_DEBUG
870  double beta = preStepPoint->GetBeta();
871  edm::LogVerbatim("HcalSim") << "HCalSD::getHitPMT 1 hit for " << GetName() << " of " << primaryID << " with "
872  << theTrack->GetDefinition()->GetParticleName() << " of "
873  << preStepPoint->GetKineticEnergy() / GeV << " GeV with velocity " << beta << " UnitID "
874  << std::hex << unitID << std::dec;
875 #endif
876  processHit(aStep);
877  }
878 }

References zMuMuMuonUserData::beta, CaloSD::currentID, TauDecayModes::dec, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, GeV, HcalForward, numberingFromDDD, phi, plotProfile(), CaloSD::processHit(), CaloSD::resetForNewPrimary(), findQualityFiles::rr, setDetUnitId(), CaloHitID::setID(), showerPMT, ntuplemaker::time, and createJobs::tmp.

Referenced by getEnergyDeposit().

◆ hitForFibre()

void HCalSD::hitForFibre ( const G4Step *  step)
private

Definition at line 749 of file HCalSD.cc.

749  { // if not ParamShower
750 
751  std::vector<HFShower::Hit> hits = hfshower->getHits(aStep, weight_);
752  if (hits.empty()) {
753  return;
754  }
755 
756  auto const theTrack = aStep->GetTrack();
757  int primaryID = setTrackID(aStep);
758  int det = 5;
759 
761  edepositEM = 1. * GeV;
762  edepositHAD = 0.;
763  } else {
764  edepositEM = 0.;
765  edepositHAD = 1. * GeV;
766  }
767 
768 #ifdef EDM_ML_DEBUG
769  edm::LogVerbatim("HcalSim") << "HCalSD::hitForFibre " << hits.size() << " hits for " << GetName() << " of "
770  << primaryID << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
771  << aStep->GetPreStepPoint()->GetKineticEnergy() / GeV << " GeV in detector type " << det;
772 #endif
773 
774  for (unsigned int i = 0; i < hits.size(); ++i) {
775  G4ThreeVector hitPoint = hits[i].position;
776  if (isItinFidVolume(hitPoint)) {
777  int depth = hits[i].depth;
778  double time = hits[i].time;
779  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
780  currentID.setID(unitID, time, primaryID, 0);
781 #ifdef plotDebug
782  plotProfile(aStep, hitPoint, edepositEM, time, depth);
783  bool emType = (edepositEM > 0.) ? true : false;
784  plotHF(hitPoint, emType);
785 #endif
786  processHit(aStep);
787  }
788  }
789 }

References CaloSD::currentID, LEDCalibrationChannels::depth, CaloSD::edepositEM, CaloSD::edepositHAD, GeV, hfshower, hfClusterShapes_cfi::hits, mps_fire::i, G4TrackToParticleID::isGammaElectronPositron(), isItinFidVolume(), plotHF(), plotProfile(), CaloSD::processHit(), setDetUnitId(), CaloHitID::setID(), CaloSD::setTrackID(), ntuplemaker::time, funct::true, and weight_.

Referenced by getEnergyDeposit().

◆ initRun()

void HCalSD::initRun ( )
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 573 of file HCalSD.cc.

573 {}

◆ isItConicalBundle()

bool HCalSD::isItConicalBundle ( const G4LogicalVolume *  lv)
private

Definition at line 674 of file HCalSD.cc.

674  {
675  for (auto lvol : fibre2LV)
676  if (lv == lvol) {
677  return true;
678  }
679  return false;
680 }

References fibre2LV.

Referenced by getEnergyDeposit().

◆ isItFibre() [1/2]

bool HCalSD::isItFibre ( const G4LogicalVolume *  lv)
private

Definition at line 642 of file HCalSD.cc.

642  {
643  for (auto lvol : fibreLV)
644  if (lv == lvol) {
645  return true;
646  }
647  return false;
648 }

References fibreLV.

Referenced by getEnergyDeposit().

◆ isItFibre() [2/2]

bool HCalSD::isItFibre ( const G4String &  name)
private

Definition at line 650 of file HCalSD.cc.

650  {
651  for (const auto& nam : fibreNames)
652  if (name == static_cast<G4String>(nam)) {
653  return true;
654  }
655  return false;
656 }

References fibreNames, and Skims_PA_cff::name.

◆ isItHF() [1/2]

bool HCalSD::isItHF ( const G4Step *  aStep)
private

Definition at line 621 of file HCalSD.cc.

621  {
622  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
623  int levels = (touch->GetHistoryDepth()) + 1;
624  for (unsigned int it = 0; it < hfNames.size(); ++it) {
625  if (levels >= hfLevels[it]) {
626  const G4LogicalVolume* lv = touch->GetVolume(levels - hfLevels[it])->GetLogicalVolume();
627  if (lv == hfLV[it])
628  return true;
629  }
630  }
631  return false;
632 }

References hfLevels, hfLV, hfNames, and jets_cff::levels.

Referenced by getFromLibrary().

◆ isItHF() [2/2]

bool HCalSD::isItHF ( const G4String &  name)
private

Definition at line 634 of file HCalSD.cc.

634  {
635  for (const auto& nam : hfNames)
636  if (name == static_cast<G4String>(nam)) {
637  return true;
638  }
639  return false;
640 }

References hfNames, and Skims_PA_cff::name.

◆ isItinFidVolume()

bool HCalSD::isItinFidVolume ( const G4ThreeVector &  hitPoint)
private

Definition at line 690 of file HCalSD.cc.

690  {
691  bool flag = true;
692  if (applyFidCut) {
693  int npmt = HFFibreFiducial::PMTNumber(hitPoint);
694 #ifdef EDM_ML_DEBUG
695  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt << " for hit point " << hitPoint;
696 #endif
697  if (npmt <= 0)
698  flag = false;
699  }
700 #ifdef EDM_ML_DEBUG
701  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint << " return flag " << flag;
702 #endif
703  return flag;
704 }

References applyFidCut, RemoveAddSevLevel::flag, and HFFibreFiducial::PMTNumber().

Referenced by getFromHFLibrary(), and hitForFibre().

◆ isItPMT()

bool HCalSD::isItPMT ( const G4LogicalVolume *  lv)
private

Definition at line 658 of file HCalSD.cc.

658  {
659  for (auto lvol : pmtLV)
660  if (lv == lvol) {
661  return true;
662  }
663  return false;
664 }

References pmtLV.

Referenced by getEnergyDeposit().

◆ isItScintillator()

bool HCalSD::isItScintillator ( const G4Material *  mat)
private

Definition at line 682 of file HCalSD.cc.

682  {
683  for (auto amat : materials)
684  if (amat == mat) {
685  return true;
686  }
687  return false;
688 }

References materials.

Referenced by getEnergyDeposit().

◆ isItStraightBundle()

bool HCalSD::isItStraightBundle ( const G4LogicalVolume *  lv)
private

Definition at line 666 of file HCalSD.cc.

666  {
667  for (auto lvol : fibre1LV)
668  if (lv == lvol) {
669  return true;
670  }
671  return false;
672 }

References fibre1LV.

Referenced by getEnergyDeposit().

◆ layerWeight()

double HCalSD::layerWeight ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay 
)
private

Definition at line 966 of file HCalSD.cc.

966  {
967  double wt = 1.;
968  if (numberingFromDDD) {
969  //get the ID's as eta, phi, depth, ... indices
971  numberingFromDDD->unitID(det, math::XYZVectorD(pos.x(), pos.y(), pos.z()), depth, lay);
972  modifyDepth(tmp);
973  uint32_t id = HcalTestNumbering::packHcalIndex(tmp.subdet, tmp.zside, 1, tmp.etaR, tmp.phis, tmp.lay);
974  std::map<uint32_t, double>::const_iterator ite = layerWeights.find(id);
975  if (ite != layerWeights.end())
976  wt = ite->second;
977 #ifdef EDM_ML_DEBUG
978  edm::LogVerbatim("HcalSim") << "HCalSD::layerWeight: ID " << std::hex << id << std::dec << " (" << tmp.subdet << "/"
979  << tmp.zside << "/1/" << tmp.etaR << "/" << tmp.phis << "/" << tmp.lay << ") Weight "
980  << wt;
981 #endif
982  }
983  return wt;
984 }

References TauDecayModes::dec, LEDCalibrationChannels::depth, EDM_ML_DEBUG, layerWeights, modifyDepth(), numberingFromDDD, HcalTestNumbering::packHcalIndex(), and createJobs::tmp.

Referenced by getEnergyDeposit().

◆ modifyDepth()

void HCalSD::modifyDepth ( HcalNumberingFromDDD::HcalID id)
private

Definition at line 1057 of file HCalSD.cc.

1057  {
1058  if (id.subdet == 4) {
1059  int ieta = (id.zside == 0) ? -id.etaR : id.etaR;
1060  if (hcalConstants_->maxHFDepth(ieta, id.phis) > 2) {
1061  if (id.depth <= 2) {
1062  if (G4UniformRand() > 0.5)
1063  id.depth += 2;
1064  }
1065  }
1066  } else if ((id.subdet == 1 || id.subdet == 2) && testNumber) {
1067  id.depth = (depth_ == 0) ? 1 : 2;
1068  }
1069 }

References LEDCalibrationChannels::depth, depth_, hcalConstants_, LEDCalibrationChannels::ieta, HcalDDDSimConstants::maxHFDepth(), and testNumber.

Referenced by layerWeight(), and setDetUnitId().

◆ plotHF()

void HCalSD::plotHF ( const G4ThreeVector &  pos,
bool  emType 
)
private

Definition at line 1046 of file HCalSD.cc.

1046  {
1047  double zv = std::abs(hitPoint.z()) - gpar[4];
1048  if (emType) {
1049  if (hzvem != nullptr)
1050  hzvem->Fill(zv);
1051  } else {
1052  if (hzvhad != nullptr)
1053  hzvhad->Fill(zv);
1054  }
1055 }

References funct::abs(), gpar, hzvem, and hzvhad.

Referenced by getFromHFLibrary(), and hitForFibre().

◆ plotProfile()

void HCalSD::plotProfile ( const G4Step *  step,
const G4ThreeVector &  pos,
double  edep,
double  time,
int  id 
)
private

Definition at line 986 of file HCalSD.cc.

986  {
987  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
988  static const G4String modName[8] = {"HEModule", "HVQF", "HBModule", "MBAT", "MBBT", "MBBTC", "MBBT_R1P", "MBBT_R1M"};
989  G4ThreeVector local;
990  bool found = false;
991  double depth = -2000;
992  int idx = 4;
993  for (int n = 0; n < touch->GetHistoryDepth(); ++n) {
994  G4String name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(n)->GetName())));
995 #ifdef EDM_ML_DEBUG
996  edm::LogVerbatim("HcalSim") << "plotProfile Depth " << n << " Name " << name;
997 #endif
998  for (unsigned int ii = 0; ii < 8; ++ii) {
999  if (name == modName[ii]) {
1000  found = true;
1001  int dn = touch->GetHistoryDepth() - n;
1002  local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1003  if (ii == 0) {
1004  depth = local.z() - 4006.5;
1005  idx = 1;
1006  } else if (ii == 1) {
1007  depth = local.z() + 825.0;
1008  idx = 3;
1009  } else if (ii == 2) {
1010  depth = local.x() - 1775.;
1011  idx = 0;
1012  } else {
1013  depth = local.y() + 15.;
1014  idx = 2;
1015  }
1016  break;
1017  }
1018  }
1019  if (found)
1020  break;
1021  }
1022  if (!found)
1023  depth = std::abs(global.z()) - 11500;
1024 #ifdef EDM_ML_DEBUG
1025  edm::LogVerbatim("HcalSim") << "plotProfile Found " << found << " Global " << global << " Local " << local
1026  << " depth " << depth << " ID " << id << " EDEP " << edep << " Time " << time;
1027 #endif
1028  if (hit_[idx] != nullptr)
1029  hit_[idx]->Fill(edep);
1030  if (time_[idx] != nullptr)
1031  time_[idx]->Fill(time, edep);
1032  if (dist_[idx] != nullptr)
1033  dist_[idx]->Fill(depth, edep);
1034  int jd = 2 * idx + id - 7;
1035  if (jd >= 0 && jd < 4) {
1036  jd += 5;
1037  if (hit_[jd] != nullptr)
1038  hit_[jd]->Fill(edep);
1039  if (time_[jd] != nullptr)
1040  time_[jd]->Fill(time, edep);
1041  if (dist_[jd] != nullptr)
1042  dist_[jd]->Fill(depth, edep);
1043  }
1044 }

References funct::abs(), LEDCalibrationChannels::depth, dist_, newFWLiteAna::found, hit_, heavyIonCSV_trainingSettings::idx, cuy::ii, DTRecHitClients_cfi::local, dqmiodumpmetadata::n, Skims_PA_cff::name, ntuplemaker::time, and time_.

Referenced by getFromHFLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), and hitForFibre().

◆ readWeightFromFile()

void HCalSD::readWeightFromFile ( const std::string &  fName)
private

Definition at line 942 of file HCalSD.cc.

942  {
943  std::ifstream infile;
944  int entry = 0;
945  infile.open(fName.c_str(), std::ios::in);
946  if (infile) {
947  int det, zside, etaR, phi, lay;
948  double wt;
949  while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
950  uint32_t id = HcalTestNumbering::packHcalIndex(det, zside, 1, etaR, phi, lay);
951  layerWeights.insert(std::pair<uint32_t, double>(id, wt));
952  ++entry;
953 #ifdef EDM_ML_DEBUG
954  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile:Entry " << entry << " ID " << std::hex << id
955  << std::dec << " (" << det << "/" << zside << "/1/" << etaR << "/" << phi << "/"
956  << lay << ") Weight " << wt;
957 #endif
958  }
959  infile.close();
960  }
961  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile: reads " << entry << " weights from " << fName;
962  if (entry <= 0)
963  useLayerWt = false;
964 }

References TauDecayModes::dec, mps_splice::entry, MainPageGenerator::fName, recoMuon::in, timingPdfMaker::infile, layerWeights, HcalTestNumbering::packHcalIndex(), phi, useLayerWt, and ecaldqm::zside().

Referenced by HCalSD().

◆ setDetUnitId() [1/3]

uint32_t HCalSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements CaloSD.

Definition at line 552 of file HCalSD.cc.

552  {
553  auto const prePoint = aStep->GetPreStepPoint();
554  auto const touch = prePoint->GetTouchable();
555  const G4ThreeVector& hitPoint = prePoint->GetPosition();
556 
557  int depth = (touch->GetReplicaNumber(0)) % 10 + 1;
558  int lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
559  int det = (touch->GetReplicaNumber(1)) / 1000;
560 
561  return setDetUnitId(det, hitPoint, depth, lay);
562 }

References LEDCalibrationChannels::depth.

Referenced by getEnergyDeposit(), getFromHFLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), hitForFibre(), and setDetUnitId().

◆ setDetUnitId() [2/3]

uint32_t HCalSD::setDetUnitId ( HcalNumberingFromDDD::HcalID tmp)
private

Definition at line 608 of file HCalSD.cc.

608  {
609  modifyDepth(tmp);
610  uint32_t id = (numberingScheme.get()) ? numberingScheme->getUnitID(tmp) : 0;
611  if ((!testNumber) && m_HcalTestNS.get()) {
612  bool ok = m_HcalTestNS->compare(tmp, id);
613  if (!ok)
614  edm::LogWarning("HcalSim") << "Det ID from HCalSD " << HcalDetId(id) << " " << std::hex << id << std::dec
615  << " does not match one from relabller for " << tmp.subdet << ":" << tmp.etaR << ":"
616  << tmp.phi << ":" << tmp.phis << ":" << tmp.depth << ":" << tmp.lay << std::endl;
617  }
618  return id;
619 }

References TauDecayModes::dec, triggerObjects_cff::id, m_HcalTestNS, modifyDepth(), numberingScheme, convertSQLiteXML::ok, testNumber, and createJobs::tmp.

◆ setDetUnitId() [3/3]

uint32_t HCalSD::setDetUnitId ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay = 1 
)
private

Definition at line 597 of file HCalSD.cc.

597  {
598  uint32_t id = 0;
599  if (numberingFromDDD.get()) {
600  //get the ID's as eta, phi, depth, ... indices
602  numberingFromDDD->unitID(det, math::XYZVectorD(pos.x(), pos.y(), pos.z()), depth, lay);
603  id = setDetUnitId(tmp);
604  }
605  return id;
606 }

References LEDCalibrationChannels::depth, triggerObjects_cff::id, numberingFromDDD, setDetUnitId(), and createJobs::tmp.

◆ setNumberingScheme()

void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 564 of file HCalSD.cc.

564  {
565  if (scheme != nullptr) {
566  edm::LogVerbatim("HcalSim") << "HCalSD: updates numbering scheme for " << GetName();
567  numberingScheme.reset(scheme);
568  }
569 }

References numberingScheme, and generator_cfi::scheme.

Referenced by HCalSD(), HcalTestAnalysis::update(), SimG4HcalValidation::update(), and HcalTB04Analysis::update().

◆ update() [1/6]

void CaloSD::update
overrideprotected

Definition at line 575 of file CaloSD.cc.

575  {
576  endEvent();
577  slave.get()->ReserveMemory(theHC->entries());
578 
579  int count(0);
580  int wrong(0);
581  double eEM(0.0);
582  double eHAD(0.0);
583  double eEM2(0.0);
584  double eHAD2(0.0);
585  double tt(0.0);
586  double zloc(0.0);
587  double zglob(0.0);
588  double ee(0.0);
589  int hc_entries = theHC->entries();
590  for (int i = 0; i < hc_entries; ++i) {
591  if (!saveHit((*theHC)[i])) {
592  ++wrong;
593  }
594  ++count;
595  double x = (*theHC)[i]->getEM();
596  eEM += x;
597  eEM2 += x * x;
598  x = (*theHC)[i]->getHadr();
599  eHAD += x;
600  eHAD2 += x * x;
601  tt += (*theHC)[i]->getTimeSlice();
602  ee += (*theHC)[i]->getIncidentEnergy();
603  zglob += std::abs((*theHC)[i]->getEntry().z());
604  zloc += std::abs((*theHC)[i]->getEntryLocal().z());
605  }
606 
607  double norm = (count > 0) ? 1.0 / count : 0.0;
608  eEM *= norm;
609  eEM2 *= norm;
610  eHAD *= norm;
611  eHAD2 *= norm;
612  eEM2 = std::sqrt(eEM2 - eEM * eEM);
613  eHAD2 = std::sqrt(eHAD2 - eHAD * eHAD);
614  tt *= norm;
615  ee *= norm;
616  zglob *= norm;
617  zloc *= norm;
618 
619 #ifdef EDM_ML_DEBUG
620  edm::LogVerbatim("CaloSim") << "CaloSD: " << GetName() << " store " << count << " hits; " << wrong
621  << " track IDs not given properly and " << totalHits - count
622  << " hits not passing cuts\n EmeanEM= " << eEM << " ErmsEM= " << eEM2
623  << "\n EmeanHAD= " << eHAD << " ErmsHAD= " << eHAD2 << " TimeMean= " << tt
624  << " E0mean= " << ee << " Zglob= " << zglob << " Zloc= " << zloc << " ";
625 #endif
626  tkMap.erase(tkMap.begin(), tkMap.end());
627  std::vector<std::unique_ptr<CaloG4Hit>>().swap(reusehit);
628  if (useMap)
629  hitMap.erase(hitMap.begin(), hitMap.end());
630 }

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), and MatrixUtil.Steps::overwrite().

◆ update() [2/6]

void CaloSD::update
overrideprotected

Definition at line 541 of file CaloSD.cc.

541  {
542 #ifdef EDM_ML_DEBUG
543  edm::LogVerbatim("CaloSim") << "CaloSD: Dispatched BeginOfEvent for " << GetName() << " !";
544 #endif
545  clearHits();
546  initEvent(g4Event);
547 }

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), and MatrixUtil.Steps::overwrite().

◆ update() [3/6]

void HCalSD::update ( const BeginOfJob )
overrideprotectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 571 of file HCalSD.cc.

571 {}

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ update() [4/6]

void CaloSD::update
overrideprotected

◆ update() [5/6]

void CaloSD::update
overrideprotected

Definition at line 766 of file CaloSD.cc.

766  {
767  int primary = -1;
768  TrackInformation* trkInfo = cmsTrackInformation((*trk)());
769  if (trkInfo->isPrimary())
770  primary = (*trk)()->GetTrackID();
771 
772 #ifdef EDM_ML_DEBUG
773  edm::LogVerbatim("CaloSim") << "New track: isPrimary " << trkInfo->isPrimary() << " primary ID = " << primary
774  << " primary ancestor ID " << primAncestor;
775 #endif
776 
777  // update the information if a different primary track ID
778 
779  if (primary > 0 && primary != primAncestor) {
780  primAncestor = primary;
781 
782  // clean the hits information
783 
784  if (theHC->entries() > 0)
786  }
787 }

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), and MatrixUtil.Steps::overwrite().

◆ update() [6/6]

void CaloSD::update
overrideprotected

Definition at line 549 of file CaloSD.cc.

549  {
550  int id = (*trk)()->GetTrackID();
551  TrackInformation* trkI = cmsTrackInformation((*trk)());
552  int lastTrackID = -1;
553  if (trkI)
554  lastTrackID = trkI->getIDonCaloSurface();
555  if (id == lastTrackID) {
556  const TrackContainer* trksForThisEvent = m_trackManager->trackContainer();
557  if (trksForThisEvent != nullptr) {
558  int it = (int)(trksForThisEvent->size()) - 1;
559  if (it >= 0) {
560  TrackWithHistory* trkH = (*trksForThisEvent)[it];
561  if (trkH->trackID() == (unsigned int)(id))
562  tkMap[id] = trkH;
563 #ifdef EDM_ML_DEBUG
564  edm::LogVerbatim("CaloSim") << "CaloSD: get track " << it << " from Container of size "
565  << trksForThisEvent->size() << " with ID " << trkH->trackID();
566  } else {
567  edm::LogVerbatim("CaloSim") << "CaloSD: get track " << it << " from Container of size "
568  << trksForThisEvent->size() << " with no ID";
569 #endif
570  }
571  }
572  }
573 }

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), and MatrixUtil.Steps::overwrite().

Member Data Documentation

◆ agingFlagHB

bool HCalSD::agingFlagHB
private

Definition at line 97 of file HCalSD.h.

Referenced by HCalSD().

◆ agingFlagHE

bool HCalSD::agingFlagHE
private

Definition at line 97 of file HCalSD.h.

Referenced by HCalSD().

◆ applyFidCut

bool HCalSD::applyFidCut
private

Definition at line 101 of file HCalSD.h.

Referenced by HCalSD(), and isItinFidVolume().

◆ betaThr

double HCalSD::betaThr
private

Definition at line 100 of file HCalSD.h.

Referenced by HCalSD().

◆ birk1

double HCalSD::birk1
private

Definition at line 100 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ birk2

double HCalSD::birk2
private

Definition at line 100 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ birk3

double HCalSD::birk3
private

Definition at line 100 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ deliveredLumi

double HCalSD::deliveredLumi
private

Definition at line 103 of file HCalSD.h.

Referenced by getEnergyDeposit(), getFromLibrary(), and HCalSD().

◆ depth_

int HCalSD::depth_
private

Definition at line 105 of file HCalSD.h.

Referenced by getEnergyDeposit(), getFromLibrary(), and modifyDepth().

◆ dist_

TH1F * HCalSD::dist_[9]
private

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

◆ eminHitHB

double HCalSD::eminHitHB
private

Definition at line 102 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

◆ eminHitHE

double HCalSD::eminHitHE
private

Definition at line 102 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

◆ eminHitHF

double HCalSD::eminHitHF
private

Definition at line 102 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

◆ eminHitHO

double HCalSD::eminHitHO
private

Definition at line 102 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

◆ fibre1LV

std::vector<const G4LogicalVolume*> HCalSD::fibre1LV
private

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItStraightBundle().

◆ fibre2LV

std::vector<const G4LogicalVolume*> HCalSD::fibre2LV
private

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItConicalBundle().

◆ fibreLV

std::vector<const G4LogicalVolume*> HCalSD::fibreLV
private

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

◆ fibreNames

std::vector<std::string> HCalSD::fibreNames
private

Definition at line 109 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

◆ gpar

std::vector<double> HCalSD::gpar
private

Definition at line 106 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

◆ hcalConstants_

const HcalDDDSimConstants* HCalSD::hcalConstants_
private

Definition at line 89 of file HCalSD.h.

Referenced by getEnergyDeposit(), HCalSD(), and modifyDepth().

◆ hcalSimConstants_

const HcalSimulationConstants* HCalSD::hcalSimConstants_
private

Definition at line 90 of file HCalSD.h.

Referenced by HCalSD().

◆ hfLevels

std::vector<int> HCalSD::hfLevels
private

Definition at line 107 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

◆ hfLV

std::vector<const G4LogicalVolume*> HCalSD::hfLV
private

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

◆ hfNames

std::vector<std::string> HCalSD::hfNames
private

Definition at line 108 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

◆ hfshower

std::unique_ptr<HFShower> HCalSD::hfshower
private

Definition at line 84 of file HCalSD.h.

Referenced by HCalSD(), and hitForFibre().

◆ hit_

TH1F* HCalSD::hit_[9]
private

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

◆ hzvem

TH1F * HCalSD::hzvem
private

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

◆ hzvhad

TH1F * HCalSD::hzvhad
private

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

◆ isHF

bool HCalSD::isHF
private

Definition at line 96 of file HCalSD.h.

Referenced by getEnergyDeposit(), and getFromLibrary().

◆ layerWeights

std::map<uint32_t, double> HCalSD::layerWeights
private

Definition at line 113 of file HCalSD.h.

Referenced by layerWeight(), and readWeightFromFile().

◆ m_HBDarkening

const HBHEDarkening* HCalSD::m_HBDarkening
private

Definition at line 91 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ m_HcalTestNS

std::unique_ptr<HcalTestNS> HCalSD::m_HcalTestNS
private

Definition at line 94 of file HCalSD.h.

Referenced by HCalSD(), and setDetUnitId().

◆ m_HEDarkening

const HBHEDarkening* HCalSD::m_HEDarkening
private

Definition at line 92 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ m_HFDarkening

std::unique_ptr<HFDarkening> HCalSD::m_HFDarkening
private

Definition at line 93 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

◆ materials

std::vector<const G4Material*> HCalSD::materials
private

Definition at line 111 of file HCalSD.h.

Referenced by HCalSD(), and isItScintillator().

◆ matNames

std::vector<std::string> HCalSD::matNames
private

Definition at line 110 of file HCalSD.h.

Referenced by HCalSD().

◆ neutralDensity

bool HCalSD::neutralDensity
private

Definition at line 99 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ numberingFromDDD

std::unique_ptr<HcalNumberingFromDDD> HCalSD::numberingFromDDD
private

Definition at line 81 of file HCalSD.h.

Referenced by getHitFibreBundle(), getHitPMT(), HCalSD(), layerWeight(), and setDetUnitId().

◆ numberingScheme

std::unique_ptr<HcalNumberingScheme> HCalSD::numberingScheme
private

Definition at line 82 of file HCalSD.h.

Referenced by HCalSD(), setDetUnitId(), and setNumberingScheme().

◆ pmtLV

std::vector<const G4LogicalVolume*> HCalSD::pmtLV
private

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItPMT().

◆ showerBundle

std::unique_ptr<HFShowerFibreBundle> HCalSD::showerBundle
private

Definition at line 87 of file HCalSD.h.

Referenced by getEnergyDeposit(), getHitFibreBundle(), and HCalSD().

◆ showerLibrary

std::unique_ptr<HFShowerLibrary> HCalSD::showerLibrary
private

Definition at line 83 of file HCalSD.h.

Referenced by getFromHFLibrary(), and HCalSD().

◆ showerParam

std::unique_ptr<HFShowerParam> HCalSD::showerParam
private

Definition at line 85 of file HCalSD.h.

Referenced by getFromParam(), and HCalSD().

◆ showerPMT

std::unique_ptr<HFShowerPMT> HCalSD::showerPMT
private

Definition at line 86 of file HCalSD.h.

Referenced by getEnergyDeposit(), getHitPMT(), and HCalSD().

◆ testNS_

bool HCalSD::testNS_
private

Definition at line 99 of file HCalSD.h.

Referenced by HCalSD().

◆ testNumber

bool HCalSD::testNumber
private

Definition at line 99 of file HCalSD.h.

Referenced by getEnergyDeposit(), HCalSD(), modifyDepth(), and setDetUnitId().

◆ time_

TH1F * HCalSD::time_[9]
private

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

◆ useBirk

bool HCalSD::useBirk
private

Definition at line 98 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ useFibreBundle

bool HCalSD::useFibreBundle
private

Definition at line 98 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ useHF

bool HCalSD::useHF
private

Definition at line 101 of file HCalSD.h.

Referenced by HCalSD().

◆ useLayerWt

bool HCalSD::useLayerWt
private

Definition at line 98 of file HCalSD.h.

Referenced by getEnergyDeposit(), HCalSD(), and readWeightFromFile().

◆ useParam

bool HCalSD::useParam
private

Definition at line 101 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

◆ usePMTHit

bool HCalSD::usePMTHit
private

Definition at line 98 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

◆ useShowerLibrary

bool HCalSD::useShowerLibrary
private

Definition at line 101 of file HCalSD.h.

Referenced by getEnergyDeposit(), getFromLibrary(), and HCalSD().

◆ weight_

double HCalSD::weight_
private
CaloSD::tkMap
std::map< int, TrackWithHistory * > tkMap
Definition: CaloSD.h:180
HBHEDarkeningRecord
Definition: HBHEDarkeningRecord.h:4
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HCalSD::fibreLV
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:112
HCalSD::isItStraightBundle
bool isItStraightBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:666
CaloSD::edepositHAD
float edepositHAD
Definition: CaloSD.h:133
HCalSD::testNS_
bool testNS_
Definition: HCalSD.h:99
HCalSD::hfLevels
std::vector< int > hfLevels
Definition: HCalSD.h:107
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
CaloSD::tmaxHit
double tmaxHit
Definition: CaloSD.h:137
mps_fire.i
i
Definition: mps_fire.py:428
HCalSD::getFromHFLibrary
void getFromHFLibrary(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:706
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
TrackInformation::getIDonCaloSurface
int getIDonCaloSurface() const
Definition: TrackInformation.h:39
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CaloSD::kmaxProton
double kmaxProton
Definition: CaloSD.h:142
CaloSD::saveHit
bool saveHit(CaloG4Hit *)
Definition: CaloSD.cc:730
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
HcalSimulationParameters::hfPMTNames_
std::vector< std::string > hfPMTNames_
Definition: HcalSimulationParameters.h:24
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
CaloG4Hit::getUnitID
uint32_t getUnitID() const
Definition: CaloG4Hit.h:65
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
HCalSD::agingFlagHE
bool agingFlagHE
Definition: HCalSD.h:97
HCalSD::m_HBDarkening
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:91
HCalSD::getFromParam
void getFromParam(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:791
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
mps_splice.entry
entry
Definition: mps_splice.py:68
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalNumberingFromDDD
Definition: HcalNumberingFromDDD.h:16
HCalSD::pmtLV
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:112
HcalSimulationParameters::hfLevels_
std::vector< int > hfLevels_
Definition: HcalSimulationParameters.h:21
edm::swap
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
TrackWithHistory
Definition: TrackWithHistory.h:16
pos
Definition: PixelAliasList.h:18
HCalSD::neutralDensity
bool neutralDensity
Definition: HCalSD.h:99
HCalSD::getHitFibreBundle
void getHitFibreBundle(const G4Step *step, bool type)
Definition: HCalSD.cc:880
HCalSD::hit_
TH1F * hit_[9]
Definition: HCalSD.h:114
CaloSD::getAttenuation
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:517
HcalDDDSimConstants::getGparHF
const std::vector< double > & getGparHF() const
Definition: HcalDDDSimConstants.h:45
CaloSD::edepositEM
float edepositEM
Definition: CaloSD.h:133
MeV
const double MeV
HcalSimulationParameters::hfFibreStraightNames_
std::vector< std::string > hfFibreStraightNames_
Definition: HcalSimulationParameters.h:25
HCalSD::isItPMT
bool isItPMT(const G4LogicalVolume *)
Definition: HCalSD.cc:658
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
TFileDirectory
Definition: TFileDirectory.h:24
G4TrackToParticleID::isMuon
static bool isMuon(int pdgCode)
Definition: G4TrackToParticleID.cc:27
HcalBarrel
Definition: HcalAssistant.h:33
HCalSD::useBirk
bool useBirk
Definition: HCalSD.h:98
HCalSD::isItinFidVolume
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:690
HCalSD::isHF
bool isHF
Definition: HCalSD.h:96
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
HCalSD::depth_
int depth_
Definition: HCalSD.h:105
HcalSimulationParameters::hfFibreNames_
std::vector< std::string > hfFibreNames_
Definition: HcalSimulationParameters.h:23
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
CaloSD::kmaxIon
double kmaxIon
Definition: CaloSD.h:142
HFFibreFiducial::PMTNumber
int PMTNumber(const G4ThreeVector &pe_effect)
Definition: HFFibreFiducial.cc:9
HCalSD::applyFidCut
bool applyFidCut
Definition: HCalSD.h:101
G4TrackToParticleID::isGammaElectronPositron
static bool isGammaElectronPositron(int pdgCode)
Definition: G4TrackToParticleID.cc:17
MainPageGenerator.fName
fName
Definition: MainPageGenerator.py:301
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
CaloSD::setTrackID
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:674
HCalSD::getHitPMT
void getHitPMT(const G4Step *step)
Definition: HCalSD.cc:821
HcalSimulationConstants::hcalsimpar
const HcalSimulationParameters * hcalsimpar() const
Definition: HcalSimulationConstants.h:20
CaloSD::getResponseWt
double getResponseWt(const G4Track *)
Definition: CaloSD.cc:709
HCalSD::layerWeight
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:966
DetId
Definition: DetId.h:17
HCalSD::m_HcalTestNS
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:94
CaloSD::useMap
bool useMap
Definition: CaloSD.h:164
HCalSD::layerWeights
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:113
HcalTestNumbering::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition: HcalTestNumbering.cc:18
CaloHitID::setID
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
TrackInformation::isPrimary
bool isPrimary() const
Definition: TrackInformation.h:23
HCalSD::hfNames
std::vector< std::string > hfNames
Definition: HCalSD.h:108
HCalSD::fibre1LV
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:112
HCalSD::eminHitHO
double eminHitHO
Definition: HCalSD.h:102
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
tfile
Definition: tfile.py:1
CaloG4Hit::getEnergyDeposit
double getEnergyDeposit() const
Definition: CaloG4Hit.h:77
DDAxes::z
HCalSD::hzvem
TH1F * hzvem
Definition: HCalSD.h:114
HFDarkening::numberOfZLayers
static const unsigned int numberOfZLayers
Definition: HFDarkening.h:24
edm::ESHandle
Definition: DTSurvey.h:22
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
HcalOuter
Definition: HcalAssistant.h:35
HCalSD::initRun
void initRun() override
Definition: HCalSD.cc:573
CaloSD::processHit
void processHit(const G4Step *step)
Definition: CaloSD.h:107
HCalSD::birk1
double birk1
Definition: HCalSD.h:100
EDM_ML_DEBUG
#define EDM_ML_DEBUG
Definition: HcalHBHEMuonSimAnalyzer.cc:41
CaloSD::clearHits
void clearHits() override
Definition: CaloSD.cc:632
CaloSD::currentID
CaloHitID currentID
Definition: CaloSD.h:135
HcalDDDSimConstants::maxHFDepth
int maxHFDepth(const int &ieta, const int &iphi) const
Definition: HcalDDDSimConstants.cc:655
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HCalSD::modifyDepth
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1057
CaloSD::energyCut
double energyCut
Definition: CaloSD.h:137
HCalSD::useHF
bool useHF
Definition: HCalSD.h:101
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
math::XYZVectorD
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
HCalSD::readWeightFromFile
void readWeightFromFile(const std::string &)
Definition: HCalSD.cc:942
HCalSD::hfLV
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:112
HCalSD::eminHitHF
double eminHitHF
Definition: HCalSD.h:102
HCalSD::useParam
bool useParam
Definition: HCalSD.h:101
funct::true
true
Definition: Factorize.h:173
HCalSD::eminHitHE
double eminHitHE
Definition: HCalSD.h:102
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
edm::ParameterSet
Definition: ParameterSet.h:47
HcalDDDSimConstants::getLayer0Wt
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
Definition: HcalDDDSimConstants.cc:361
HcalSimulationParameters::hfFibreConicalNames_
std::vector< std::string > hfFibreConicalNames_
Definition: HcalSimulationParameters.h:26
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition: HcalTestNumbering.cc:7
HCalSD::isItConicalBundle
bool isItConicalBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:674
CaloSD::hitMap
std::map< CaloHitID, CaloG4Hit * > hitMap
Definition: CaloSD.h:179
HCalSD::numberingFromDDD
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:81
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
CaloSD::theHC
CaloG4HitCollection * theHC
Definition: CaloSD.h:159
HCalSD::time_
TH1F * time_[9]
Definition: HCalSD.h:114
CaloSD::totalHits
int totalHits
Definition: CaloSD.h:170
ke
int ke
Definition: CascadeWrapper.h:13
HCalSD::hcalSimConstants_
const HcalSimulationConstants * hcalSimConstants_
Definition: HCalSD.h:90
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
HCalSD::showerBundle
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:87
GeV
const double GeV
Definition: MathUtil.h:16
CaloSD::kmaxNeutron
double kmaxNeutron
Definition: CaloSD.h:142
HCalSD::hitForFibre
void hitForFibre(const G4Step *step)
Definition: HCalSD.cc:749
HcalSimulationParameters::hcalMaterialNames_
std::vector< std::string > hcalMaterialNames_
Definition: HcalSimulationParameters.h:27
recoMuon::in
Definition: RecoMuonEnumerators.h:6
HCalSD::isItHF
bool isItHF(const G4Step *)
Definition: HCalSD.cc:621
HCalSD::hcalConstants_
const HcalDDDSimConstants * hcalConstants_
Definition: HCalSD.h:89
HCalSD::agingFlagHB
bool agingFlagHB
Definition: HCalSD.h:97
CaloSD::slave
std::unique_ptr< CaloSlaveSD > slave
Definition: CaloSD.h:156
TrackInformation
Definition: TrackInformation.h:8
HCalSD::showerLibrary
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:83
HFDarkening::lowZLimit
static const unsigned int lowZLimit
Definition: HFDarkening.h:27
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HCalSD::isItScintillator
bool isItScintillator(const G4Material *)
Definition: HCalSD.cc:682
CaloSD::CaloSD
CaloSD(const std::string &aSDname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
Definition: CaloSD.cc:33
value
Definition: value.py:1
CaloSD::resetForNewPrimary
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:504
HCalSD::fibreNames
std::vector< std::string > fibreNames
Definition: HCalSD.h:109
HCalSD::hfshower
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:84
CaloSD::reusehit
std::vector< std::unique_ptr< CaloG4Hit > > reusehit
Definition: CaloSD.h:181
HCalSD::dist_
TH1F * dist_[9]
Definition: HCalSD.h:114
HCalSD::gpar
std::vector< double > gpar
Definition: HCalSD.h:106
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
HCalSD::useFibreBundle
bool useFibreBundle
Definition: HCalSD.h:98
HCalSD::m_HFDarkening
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:93
get
#define get
HCalSD::fibre2LV
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:112
HCalSD::betaThr
double betaThr
Definition: HCalSD.h:100
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
generator_cfi.scheme
scheme
Definition: generator_cfi.py:22
alignCSCRings.r
r
Definition: alignCSCRings.py:93
compare.tfile
tfile
Definition: compare.py:325
CaloSD::m_trackManager
const SimTrackManager * m_trackManager
Definition: CaloSD.h:154
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
HCalSD::setNumberingScheme
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:564
HCalSD::plotHF
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1046
HCalSD::usePMTHit
bool usePMTHit
Definition: HCalSD.h:98
TrackWithHistory::trackID
unsigned int trackID() const
Definition: TrackWithHistory.h:28
HCalSD::eminHitHB
double eminHitHB
Definition: HCalSD.h:102
TrackContainer
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
SensitiveDetector::cmsTrackInformation
TrackInformation * cmsTrackInformation(const G4Track *aTrack)
Definition: SensitiveDetector.cc:96
HCalSD::plotProfile
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:986
HCalSD::materials
std::vector< const G4Material * > materials
Definition: HCalSD.h:111
CaloSD::getNumberOfHits
int getNumberOfHits()
Definition: CaloSD.cc:425
G4TrackToParticleID::isStableHadronIon
static bool isStableHadronIon(const G4Track *)
Definition: G4TrackToParticleID.cc:40
HBHEDarkening::degradation
float degradation(float intlumi, int ieta, int lay) const
Definition: HBHEDarkening.cc:98
HcalEndcap
Definition: HcalAssistant.h:34
CaloSD::cleanHitCollection
void cleanHitCollection()
Definition: CaloSD.cc:789
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HCalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:552
CaloSD::setParameterized
void setParameterized(bool val)
Definition: CaloSD.h:104
HCalSD::showerPMT
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:86
HCalSD::useShowerLibrary
bool useShowerLibrary
Definition: HCalSD.h:101
relativeConstraints.value
value
Definition: relativeConstraints.py:53
CaloSD::primAncestor
int primAncestor
Definition: CaloSD.h:168
Exception
Definition: hltDiff.cc:246
HCalSD::birk2
double birk2
Definition: HCalSD.h:100
SensitiveDetectorCatalog::logicalNames
const std::vector< std::string_view > logicalNames(const std::string &readoutName) const
Definition: SensitiveDetectorCatalog.cc:31
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HCalSD::isItFibre
bool isItFibre(const G4LogicalVolume *)
Definition: HCalSD.cc:642
pdg
Definition: pdg_functions.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HFDarkening::upperZLimit
static const unsigned int upperZLimit
Definition: HFDarkening.h:28
timingPdfMaker.infile
infile
Definition: timingPdfMaker.py:350
HcalDDDSimConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDSimConstants.h:53
HCalSD::matNames
std::vector< std::string > matNames
Definition: HCalSD.h:110
HCalSD::testNumber
bool testNumber
Definition: HCalSD.h:99
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::roottree::getEntry
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:496
HcalSimulationParameters::hfNames_
std::vector< std::string > hfNames_
Definition: HcalSimulationParameters.h:22
HCalSD::hzvhad
TH1F * hzvhad
Definition: HCalSD.h:114
CaloSD::initEvent
virtual void initEvent(const BeginOfEvent *)
Definition: CaloSD.cc:651
HCalSD::fillLogVolumeVector
void fillLogVolumeVector(const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
Definition: HCalSD.cc:338
ntuplemaker.time
time
Definition: ntuplemaker.py:310
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
HcalDumpGeometry
Definition: HcalDumpGeometry.h:20
HCalSD::m_HEDarkening
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:92
CaloSD::suppressHeavy
bool suppressHeavy
Definition: CaloSD.h:141
edm::Log
Definition: MessageLogger.h:70
HcalSimNumberingRecord
Definition: HcalSimNumberingRecord.h:25
HCalSD::showerParam
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:85
HCalSD::weight_
double weight_
Definition: HCalSD.h:104
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
cuy.ii
ii
Definition: cuy.py:590
HCalSD::useLayerWt
bool useLayerWt
Definition: HCalSD.h:98
jets_cff.levels
levels
Definition: jets_cff.py:21
SimTrackManager::trackContainer
const TrackContainer * trackContainer() const
Definition: SimTrackManager.h:52
CaloSD::endEvent
virtual void endEvent()
Definition: CaloSD.cc:653
HCalSD::deliveredLumi
double deliveredLumi
Definition: HCalSD.h:103
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
HCalSD::birk3
double birk3
Definition: HCalSD.h:100
HCalSD::numberingScheme
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:82