CMS 3D CMS Logo

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

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(), 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 340 of file HCalSD.cc.

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

References mps_fire::i.

Referenced by HCalSD().

◆ filterHit()

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

Reimplemented from CaloSD.

Definition at line 584 of file HCalSD.cc.

584  {
585  double threshold = 0;
586  DetId theId(aHit->getUnitID());
587  switch (theId.subdetId()) {
588  case HcalBarrel:
590  break;
591  case HcalEndcap:
593  break;
594  case HcalOuter:
596  break;
597  case HcalForward:
599  break;
600  default:
601  break;
602  }
603  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
604 }

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

◆ getEnergyDeposit()

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

Reimplemented from CaloSD.

Definition at line 429 of file HCalSD.cc.

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

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 715 of file HCalSD.cc.

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

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, protons_cff::time, and weight_.

Referenced by getFromLibrary().

◆ getFromLibrary()

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

Reimplemented from CaloSD.

Definition at line 365 of file HCalSD.cc.

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

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 800 of file HCalSD.cc.

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

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, protons_cff::time, and weight_.

Referenced by getFromLibrary().

◆ getHitFibreBundle()

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

Definition at line 889 of file HCalSD.cc.

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

References HLT_FULL_cff::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, protons_cff::time, and createJobs::tmp.

Referenced by getEnergyDeposit().

◆ getHitPMT()

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

Definition at line 830 of file HCalSD.cc.

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

References HLT_FULL_cff::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, protons_cff::time, and createJobs::tmp.

Referenced by getEnergyDeposit().

◆ hitForFibre()

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

Definition at line 758 of file HCalSD.cc.

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

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(), protons_cff::time, funct::true, and weight_.

Referenced by getEnergyDeposit().

◆ initRun()

void HCalSD::initRun ( )
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 582 of file HCalSD.cc.

582 {}

◆ isItConicalBundle()

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

Definition at line 683 of file HCalSD.cc.

683  {
684  for (auto lvol : fibre2LV)
685  if (lv == lvol) {
686  return true;
687  }
688  return false;
689 }

References fibre2LV.

Referenced by getEnergyDeposit().

◆ isItFibre() [1/2]

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

Definition at line 651 of file HCalSD.cc.

651  {
652  for (auto lvol : fibreLV)
653  if (lv == lvol) {
654  return true;
655  }
656  return false;
657 }

References fibreLV.

Referenced by getEnergyDeposit().

◆ isItFibre() [2/2]

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

Definition at line 659 of file HCalSD.cc.

659  {
660  for (const auto& nam : fibreNames)
661  if (name == static_cast<G4String>(nam)) {
662  return true;
663  }
664  return false;
665 }

References fibreNames, and Skims_PA_cff::name.

◆ isItHF() [1/2]

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

Definition at line 630 of file HCalSD.cc.

630  {
631  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
632  int levels = (touch->GetHistoryDepth()) + 1;
633  for (unsigned int it = 0; it < hfNames.size(); ++it) {
634  if (levels >= hfLevels[it]) {
635  const G4LogicalVolume* lv = touch->GetVolume(levels - hfLevels[it])->GetLogicalVolume();
636  if (lv == hfLV[it])
637  return true;
638  }
639  }
640  return false;
641 }

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

Referenced by getFromLibrary().

◆ isItHF() [2/2]

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

Definition at line 643 of file HCalSD.cc.

643  {
644  for (const auto& nam : hfNames)
645  if (name == static_cast<G4String>(nam)) {
646  return true;
647  }
648  return false;
649 }

References hfNames, and Skims_PA_cff::name.

◆ isItinFidVolume()

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

Definition at line 699 of file HCalSD.cc.

699  {
700  bool flag = true;
701  if (applyFidCut) {
702  int npmt = HFFibreFiducial::PMTNumber(hitPoint);
703 #ifdef EDM_ML_DEBUG
704  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt << " for hit point " << hitPoint;
705 #endif
706  if (npmt <= 0)
707  flag = false;
708  }
709 #ifdef EDM_ML_DEBUG
710  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint << " return flag " << flag;
711 #endif
712  return flag;
713 }

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

Referenced by getFromHFLibrary(), and hitForFibre().

◆ isItPMT()

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

Definition at line 667 of file HCalSD.cc.

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

References pmtLV.

Referenced by getEnergyDeposit().

◆ isItScintillator()

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

Definition at line 691 of file HCalSD.cc.

691  {
692  for (auto amat : materials)
693  if (amat == mat) {
694  return true;
695  }
696  return false;
697 }

References materials.

Referenced by getEnergyDeposit().

◆ isItStraightBundle()

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

Definition at line 675 of file HCalSD.cc.

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

References fibre1LV.

Referenced by getEnergyDeposit().

◆ layerWeight()

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

Definition at line 975 of file HCalSD.cc.

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

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 1068 of file HCalSD.cc.

1068  {
1069  if (id.subdet == 4) {
1070  int ieta = (id.zside == 0) ? -id.etaR : id.etaR;
1071  if (hcalConstants_->maxHFDepth(ieta, id.phis) > 2) {
1072  if (id.depth <= 2) {
1073  if (G4UniformRand() > 0.5)
1074  id.depth += 2;
1075  }
1076  }
1077  } else if ((id.subdet == 1 || id.subdet == 2) && testNumber) {
1078  id.depth = (depth_ == 0) ? 1 : 2;
1079  }
1080 }

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 1057 of file HCalSD.cc.

1057  {
1058  double zv = std::abs(hitPoint.z()) - gpar[4];
1059  if (emType) {
1060  if (hzvem != nullptr)
1061  hzvem->Fill(zv);
1062  } else {
1063  if (hzvhad != nullptr)
1064  hzvhad->Fill(zv);
1065  }
1066 }

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

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 995 of file HCalSD.cc.

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

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

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

◆ readWeightFromFile()

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

Definition at line 951 of file HCalSD.cc.

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

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 561 of file HCalSD.cc.

561  {
562  auto const prePoint = aStep->GetPreStepPoint();
563  auto const touch = prePoint->GetTouchable();
564  const G4ThreeVector& hitPoint = prePoint->GetPosition();
565 
566  int depth = (touch->GetReplicaNumber(0)) % 10 + 1;
567  int lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
568  int det = (touch->GetReplicaNumber(1)) / 1000;
569 
570  return setDetUnitId(det, hitPoint, depth, lay);
571 }

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 617 of file HCalSD.cc.

617  {
618  modifyDepth(tmp);
619  uint32_t id = (numberingScheme.get()) ? numberingScheme->getUnitID(tmp) : 0;
620  if ((!testNumber) && m_HcalTestNS.get()) {
621  bool ok = m_HcalTestNS->compare(tmp, id);
622  if (!ok)
623  edm::LogWarning("HcalSim") << "Det ID from HCalSD " << HcalDetId(id) << " " << std::hex << id << std::dec
624  << " does not match one from relabller for " << tmp.subdet << ":" << tmp.etaR << ":"
625  << tmp.phi << ":" << tmp.phis << ":" << tmp.depth << ":" << tmp.lay << std::endl;
626  }
627  return id;
628 }

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 606 of file HCalSD.cc.

606  {
607  uint32_t id = 0;
608  if (numberingFromDDD.get()) {
609  //get the ID's as eta, phi, depth, ... indices
611  numberingFromDDD->unitID(det, math::XYZVectorD(pos.x(), pos.y(), pos.z()), depth, lay);
612  id = setDetUnitId(tmp);
613  }
614  return id;
615 }

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

◆ setNumberingScheme()

void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 573 of file HCalSD.cc.

573  {
574  if (scheme != nullptr) {
575  edm::LogVerbatim("HcalSim") << "HCalSD: updates numbering scheme for " << GetName();
576  numberingScheme.reset(scheme);
577  }
578 }

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 743 of file CaloSD.cc.

743  {
744  endEvent();
745  slave.get()->ReserveMemory(theHC->entries());
746 
747  int count(0);
748  int wrong(0);
749  double eEM(0.0);
750  double eHAD(0.0);
751  double eEM2(0.0);
752  double eHAD2(0.0);
753  double tt(0.0);
754  double zloc(0.0);
755  double zglob(0.0);
756  double ee(0.0);
757  int hc_entries = theHC->entries();
758  for (int i = 0; i < hc_entries; ++i) {
759  if (!saveHit((*theHC)[i])) {
760  ++wrong;
761  }
762  ++count;
763  double x = (*theHC)[i]->getEM();
764  eEM += x;
765  eEM2 += x * x;
766  x = (*theHC)[i]->getHadr();
767  eHAD += x;
768  eHAD2 += x * x;
769  tt += (*theHC)[i]->getTimeSlice();
770  ee += (*theHC)[i]->getIncidentEnergy();
771  zglob += std::abs((*theHC)[i]->getEntry().z());
772  zloc += std::abs((*theHC)[i]->getEntryLocal().z());
773  }
774 
775  double norm = (count > 0) ? 1.0 / count : 0.0;
776  eEM *= norm;
777  eEM2 *= norm;
778  eHAD *= norm;
779  eHAD2 *= norm;
780  eEM2 = std::sqrt(eEM2 - eEM * eEM);
781  eHAD2 = std::sqrt(eHAD2 - eHAD * eHAD);
782  tt *= norm;
783  ee *= norm;
784  zglob *= norm;
785  zloc *= norm;
786 
787 #ifdef EDM_ML_DEBUG
788  edm::LogVerbatim("CaloSim") << "CaloSD: " << GetName() << " store " << count << " hits; " << wrong
789  << " track IDs not given properly and " << totalHits - count
790  << " hits not passing cuts\n EmeanEM= " << eEM << " ErmsEM= " << eEM2
791  << "\n EmeanHAD= " << eHAD << " ErmsHAD= " << eHAD2 << " TimeMean= " << tt
792  << " E0mean= " << ee << " Zglob= " << zglob << " Zloc= " << zloc << " ";
793 #endif
794  tkMap.erase(tkMap.begin(), tkMap.end());
795  std::vector<std::unique_ptr<CaloG4Hit>>().swap(reusehit);
796  if (useMap)
797  hitMap.erase(hitMap.begin(), hitMap.end());
798 }

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

◆ update() [2/6]

void CaloSD::update
overrideprotected

Definition at line 709 of file CaloSD.cc.

709  {
710 #ifdef EDM_ML_DEBUG
711  edm::LogVerbatim("CaloSim") << "CaloSD: Dispatched BeginOfEvent for " << GetName() << " !";
712 #endif
713  clearHits();
714  initEvent(g4Event);
715 }

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 580 of file HCalSD.cc.

580 {}

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 965 of file CaloSD.cc.

965  {
966  int primary = -1;
967  TrackInformation* trkInfo = cmsTrackInformation((*trk)());
968  if (trkInfo->isPrimary())
969  primary = (*trk)()->GetTrackID();
970 
971 #ifdef EDM_ML_DEBUG
972  edm::LogVerbatim("CaloSim") << "New track: isPrimary " << trkInfo->isPrimary() << " primary ID = " << primary
973  << " primary ancestor ID " << primAncestor;
974 #endif
975 
976  // update the information if a different primary track ID
977 
978  if (primary > 0 && primary != primAncestor) {
979  primAncestor = primary;
980 
981  // clean the hits information
982 
983  if (theHC->entries() > 0)
985  }
986 }

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

◆ update() [6/6]

void CaloSD::update
overrideprotected

Definition at line 717 of file CaloSD.cc.

717  {
718  int id = (*trk)()->GetTrackID();
719  TrackInformation* trkI = cmsTrackInformation((*trk)());
720  int lastTrackID = -1;
721  if (trkI)
722  lastTrackID = trkI->getIDonCaloSurface();
723  if (id == lastTrackID) {
724  const TrackContainer* trksForThisEvent = m_trackManager->trackContainer();
725  if (trksForThisEvent != nullptr) {
726  int it = (int)(trksForThisEvent->size()) - 1;
727  if (it >= 0) {
728  TrackWithHistory* trkH = (*trksForThisEvent)[it];
729  if (trkH->trackID() == (unsigned int)(id))
730  tkMap[id] = trkH;
731 #ifdef EDM_ML_DEBUG
732  edm::LogVerbatim("CaloSim") << "CaloSD: get track " << it << " from Container of size "
733  << trksForThisEvent->size() << " with ID " << trkH->trackID();
734  } else {
735  edm::LogVerbatim("CaloSim") << "CaloSD: get track " << it << " from Container of size "
736  << trksForThisEvent->size() << " with no ID";
737 #endif
738  }
739  }
740  }
741 }

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:185
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:675
CaloSD::edepositHAD
float edepositHAD
Definition: CaloSD.h:137
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:141
mps_fire.i
i
Definition: mps_fire.py:428
HCalSD::getFromHFLibrary
void getFromHFLibrary(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:715
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
TrackInformation::getIDonCaloSurface
int getIDonCaloSurface() const
Definition: TrackInformation.h:43
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:146
CaloSD::saveHit
bool saveHit(CaloG4Hit *)
Definition: CaloSD.cc:897
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
HLT_FULL_cff.beta
beta
Definition: HLT_FULL_cff.py:8686
CaloG4Hit::getUnitID
uint32_t getUnitID() const
Definition: CaloG4Hit.h:66
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:800
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:889
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:685
protons_cff.time
time
Definition: protons_cff.py:39
HcalDDDSimConstants::getGparHF
const std::vector< double > & getGparHF() const
Definition: HcalDDDSimConstants.h:45
CaloSD::edepositEM
float edepositEM
Definition: CaloSD.h:137
MeV
const double MeV
HcalSimulationParameters::hfFibreStraightNames_
std::vector< std::string > hfFibreStraightNames_
Definition: HcalSimulationParameters.h:25
HCalSD::isItPMT
bool isItPMT(const G4LogicalVolume *)
Definition: HCalSD.cc:667
gpuVertexFinder::zv
float *__restrict__ zv
Definition: gpuFitVertices.h:26
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:699
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:146
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:841
HCalSD::getHitPMT
void getHitPMT(const G4Step *step)
Definition: HCalSD.cc:830
HcalSimulationConstants::hcalsimpar
const HcalSimulationParameters * hcalsimpar() const
Definition: HcalSimulationConstants.h:20
CaloSD::getResponseWt
double getResponseWt(const G4Track *)
Definition: CaloSD.cc:876
HCalSD::layerWeight
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:975
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:168
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:41
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackInformation::isPrimary
bool isPrimary() const
Definition: TrackInformation.h:27
HCalSD::hfNames
std::vector< std::string > hfNames
Definition: HCalSD.h:108
HCalSD::fibre1LV
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:112
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
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:78
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:582
CaloSD::processHit
void processHit(const G4Step *step)
Definition: CaloSD.h:110
HCalSD::birk1
double birk1
Definition: HCalSD.h:100
CaloSD::clearHits
void clearHits() override
Definition: CaloSD.cc:800
CaloSD::currentID
CaloHitID currentID
Definition: CaloSD.h:139
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:1068
CaloSD::energyCut
double energyCut
Definition: CaloSD.h:141
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:951
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:683
CaloSD::hitMap
std::map< CaloHitID, CaloG4Hit * > hitMap
Definition: CaloSD.h:184
HCalSD::numberingFromDDD
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:81
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
CaloSD::theHC
CaloG4HitCollection * theHC
Definition: CaloSD.h:163
HCalSD::time_
TH1F * time_[9]
Definition: HCalSD.h:114
CaloSD::totalHits
int totalHits
Definition: CaloSD.h:174
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:146
HCalSD::hitForFibre
void hitForFibre(const G4Step *step)
Definition: HCalSD.cc:758
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:630
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:160
TrackInformation
Definition: TrackInformation.h:12
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:691
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:35
value
Definition: value.py:1
CaloSD::resetForNewPrimary
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:672
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:186
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:158
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
HCalSD::setNumberingScheme
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:573
HCalSD::plotHF
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1057
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:995
HCalSD::materials
std::vector< const G4Material * > materials
Definition: HCalSD.h:111
CaloSD::getNumberOfHits
int getNumberOfHits()
Definition: CaloSD.cc:445
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:988
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
HCalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:561
CaloSD::setParameterized
void setParameterized(bool val)
Definition: CaloSD.h:107
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
dd4hep
Definition: DDPlugins.h:8
CaloSD::primAncestor
int primAncestor
Definition: CaloSD.h:172
Exception
Definition: hltDiff.cc:245
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:651
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
EDM_ML_DEBUG
#define EDM_ML_DEBUG
Definition: AnalyzerMinbias.cc:56
HCalSD::hzvhad
TH1F * hzvhad
Definition: HCalSD.h:114
CaloSD::initEvent
virtual void initEvent(const BeginOfEvent *)
Definition: CaloSD.cc:819
HCalSD::fillLogVolumeVector
void fillLogVolumeVector(const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
Definition: HCalSD.cc:340
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
HcalDumpGeometry
Definition: HcalDumpGeometry.h:20
HCalSD::m_HEDarkening
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:92
CaloSD::suppressHeavy
bool suppressHeavy
Definition: CaloSD.h:145
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:821
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