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 DDCompactView &, 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 DDCompactView &cpv, 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
 
void PrintAll () override
 
G4bool ProcessHits (G4Step *step, G4TouchableHistory *) override
 
bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *) override
 
void reset () override
 
 ~CaloSD () override
 
- Public Member Functions inherited from SensitiveCaloDetector
 SensitiveCaloDetector (const std::string &iname, const DDCompactView &cpv, 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 DDCompactView &cpv, 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 BeginOfJob *) override
 This routine will be called when the appropriate signal arrives. More...
 
- Protected Member Functions inherited from CaloSD
bool checkHit ()
 
CaloG4HitcreateNewHit (const G4Step *)
 
virtual void endEvent ()
 
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 *)
 
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 BeginOfRun *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfEvent *) 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 update (const ::EndOfEvent *) override
 
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::string &, const DDCompactView &, std::vector< const G4LogicalVolume * > &, std::vector< G4String > &)
 
std::vector< double > getDDDArray (const std::string &, const DDsvalues_type &)
 
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)
 
std::vector< G4String > getNames (DDFilteredView &)
 
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 (int, const G4ThreeVector &, int, int)
 
uint32_t setDetUnitId (HcalNumberingFromDDD::HcalID &tmp)
 

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< G4String > fibreNames
 
std::vector< double > gpar
 
const HcalDDDSimConstantshcalConstants
 
std::vector< int > hfLevels
 
std::vector< const G4LogicalVolume * > hfLV
 
std::vector< G4String > 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< G4String > 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 37 of file HCalSD.h.

Constructor & Destructor Documentation

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

Definition at line 48 of file HCalSD.cc.

References agingFlagHB, agingFlagHE, applyFidCut, betaThr, birk1, birk2, birk3, deliveredLumi, dist_, eminHitHB, eminHitHE, eminHitHF, eminHitHO, fibre1LV, fibre2LV, fibreLV, fibreNames, FrontierConditions_GlobalTag_cff::file, fillLogVolumeVector(), DDFilteredView::firstChild(), g, getDDDArray(), SensitiveDetector::getNames(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalUnsuppressedDigis_cfi::HFDarkening, hfLevels, hfLV, hfNames, hfshower, g4SimHits_cfi::HFShower, g4SimHits_cfi::HFShowerLibrary, hit_, hzvem, hzvhad, mps_fire::i, edm::Service< T >::isAvailable(), isItFibre(), isItHF(), CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, tablePrinter::labels, hcalDigis_cfi::level, cmsBatch::log, DDFilteredView::logicalPart(), m_HcalTestNS, m_HFDarkening, TFileDirectory::make(), DDLogicalPart::material(), materials, matNames, DDFilteredView::mergedSpecifics(), MeV, TFileService::mkdir(), DDName::name(), dataset::name, DDBase< N, C >::name(), neutralDensity, DDFilteredView::next(), numberingFromDDD, numberingScheme, pmtLV, readWeightFromFile(), setNumberingScheme(), CaloSD::setParameterized(), showerBundle, showerLibrary, showerParam, showerPMT, AlCaHLTBitMon_QueryRunRegistry::string, CaloSD::suppressHeavy, pfDeepBoostedJetPreprocessParams_cfi::sv, groupFilesInBlocks::temp, testNS_, testNumber, compare::tfile, time_, fftjetcommon_cfi::title, useBirk, useFibreBundle, useHF, useLayerWt, useParam, usePMTHit, useShowerLibrary, and relativeConstraints::value.

53  : CaloSD(name,
54  cpv,
55  clg,
56  p,
57  manager,
58  (float)(p.getParameter<edm::ParameterSet>("HCalSD").getParameter<double>("TimeSliceUnit")),
59  p.getParameter<edm::ParameterSet>("HCalSD").getParameter<bool>("IgnoreTrackID")),
60  hcalConstants(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  birk1 = m_HC.getParameter<double>("BirkC1") * (g / (MeV * cm2));
84  birk2 = m_HC.getParameter<double>("BirkC2");
85  birk3 = m_HC.getParameter<double>("BirkC3");
86  useShowerLibrary = m_HC.getParameter<bool>("UseShowerLibrary");
87  useParam = m_HC.getParameter<bool>("UseParametrize");
88  testNumber = m_HC.getParameter<bool>("TestNumberingScheme");
89  neutralDensity = m_HC.getParameter<bool>("doNeutralDensityFilter");
90  usePMTHit = m_HC.getParameter<bool>("UsePMTHits");
91  betaThr = m_HC.getParameter<double>("BetaThreshold");
92  eminHitHB = m_HC.getParameter<double>("EminHitHB") * MeV;
93  eminHitHE = m_HC.getParameter<double>("EminHitHE") * MeV;
94  eminHitHO = m_HC.getParameter<double>("EminHitHO") * MeV;
95  eminHitHF = m_HC.getParameter<double>("EminHitHF") * MeV;
96  useFibreBundle = m_HC.getParameter<bool>("UseFibreBundleHits");
97  deliveredLumi = m_HC.getParameter<double>("DelivLuminosity");
98  agingFlagHB = m_HC.getParameter<bool>("HBDarkening");
99  agingFlagHE = m_HC.getParameter<bool>("HEDarkening");
100  bool agingFlagHF = m_HC.getParameter<bool>("HFDarkening");
101  useHF = m_HC.getUntrackedParameter<bool>("UseHF", true);
102  bool forTBH2 = m_HC.getUntrackedParameter<bool>("ForTBH2", false);
103  useLayerWt = m_HC.getUntrackedParameter<bool>("UseLayerWt", false);
104  std::string file = m_HC.getUntrackedParameter<std::string>("WtFile", "None");
105  testNS_ = m_HC.getUntrackedParameter<bool>("TestNS", false);
106  edm::ParameterSet m_HF = p.getParameter<edm::ParameterSet>("HFShower");
107  applyFidCut = m_HF.getParameter<bool>("ApplyFiducialCut");
108 
109 #ifdef EDM_ML_DEBUG
110  edm::LogVerbatim("HcalSim") << "***************************************************"
111  << "\n"
112  << "* Constructing a HCalSD with name " << name << "\n"
113  << "\n"
114  << "***************************************************";
115 #endif
116  edm::LogVerbatim("HcalSim") << "HCalSD:: Use of HF code is set to " << useHF
117  << "\nUse of shower parametrization set to " << useParam
118  << "\nUse of shower library is set to " << useShowerLibrary << "\nUse PMT Hit is set to "
119  << usePMTHit << " with beta Threshold " << betaThr << "\nUSe of FibreBundle Hit set to "
120  << useFibreBundle << "\n Use of Birks law is set to " << useBirk
121  << " with three constants kB = " << birk1 << ", C1 = " << birk2 << ", C2 = " << birk3;
122  edm::LogVerbatim("HcalSim") << "HCalSD:: Suppression Flag " << suppressHeavy << " protons below " << kmaxProton
123  << " MeV,"
124  << " neutrons below " << kmaxNeutron << " MeV and"
125  << " ions below " << kmaxIon << " MeV\n"
126  << " Threshold for storing hits in HB: " << eminHitHB << " HE: " << eminHitHE
127  << " HO: " << eminHitHO << " HF: " << eminHitHF << "\n"
128  << "Delivered luminosity for Darkening " << deliveredLumi << " Flag (HE) " << agingFlagHE
129  << " Flag (HB) " << agingFlagHB << " Flag (HF) " << agingFlagHF << "\n"
130  << "Application of Fiducial Cut " << applyFidCut
131  << "Flag for test number|neutral density filter " << testNumber << " " << neutralDensity;
132 
133  HcalNumberingScheme* scheme;
134  if (testNumber || forTBH2) {
135  scheme = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(forTBH2));
136  } else {
137  scheme = new HcalNumberingScheme();
138  }
139  setNumberingScheme(scheme);
140 
141  // always call getFromLibrary() method to identify HF region
142  setParameterized(true);
143 
144  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
145  // std::vector<G4LogicalVolume *>::const_iterator lvcite;
146  const G4LogicalVolume* lv;
147  std::string attribute, value;
148 
149  if (useHF) {
150  if (useParam) {
151  showerParam.reset(new HFShowerParam(name, cpv, p));
152  } else {
153  if (useShowerLibrary) {
154  showerLibrary.reset(new HFShowerLibrary(name, cpv, p));
155  }
156  hfshower.reset(new HFShower(name, cpv, p, 0));
157  }
158 
159  // HF volume names
160  attribute = "Volume";
161  value = "HF";
162  DDSpecificsMatchesValueFilter filter0{DDValue(attribute, value, 0)};
163  DDFilteredView fv0(cpv, filter0);
164  hfNames = getNames(fv0);
165  fv0.firstChild();
166  DDsvalues_type sv0(fv0.mergedSpecifics());
167  std::vector<double> temp = getDDDArray("Levels", sv0);
168 
169  unsigned int nhf = hfNames.size();
170  std::stringstream ss;
171  ss << "HCalSD: Names to be tested for " << attribute << " = " << value << " has " << nhf << " elements";
172  for (unsigned int i = 0; i < nhf; ++i) {
173  G4String namv = hfNames[i];
174  lv = nullptr;
175  for (auto lvol : *lvs) {
176  if (lvol->GetName() == namv) {
177  lv = lvol;
178  break;
179  }
180  }
181  hfLV.push_back(lv);
182  int level = static_cast<int>(temp[i]);
183  hfLevels.push_back(level);
184  ss << "\n HF[" << i << "] = " << namv << " LV " << hfLV[i] << " at level " << hfLevels[i];
185  }
186  edm::LogVerbatim("HcalSim") << ss.str();
187 
188  // HF Fibre volume names
189  fillLogVolumeVector(attribute, "HFFibre", cpv, fibreLV, fibreNames);
190  std::vector<G4String> tempNames;
191  fillLogVolumeVector(attribute, "HFPMT", cpv, pmtLV, tempNames);
192  fillLogVolumeVector(attribute, "HFFibreBundleStraight", cpv, fibre1LV, tempNames);
193  fillLogVolumeVector(attribute, "HFFibreBundleConical", cpv, fibre2LV, tempNames);
194  }
195 
196  //Material list for HB/HE/HO sensitive detectors
197  const G4MaterialTable* matTab = G4Material::GetMaterialTable();
198  std::vector<G4Material*>::const_iterator matite;
199  attribute = "OnlyForHcalSimNumbering";
200  DDSpecificsHasNamedValueFilter filter2{attribute};
201  DDFilteredView fv2(cpv, filter2);
202  bool dodet = fv2.firstChild();
203  DDsvalues_type sv(fv2.mergedSpecifics());
204 
205  while (dodet) {
206  const DDLogicalPart& log = fv2.logicalPart();
207  G4String namx = log.name().name();
208  if (!isItHF(namx) && !isItFibre(namx)) {
209  bool notIn = true;
210  for (unsigned int i = 0; i < matNames.size(); ++i) {
211  if (!strcmp(matNames[i].c_str(), log.material().name().name().c_str())) {
212  notIn = false;
213  break;
214  }
215  }
216  if (notIn) {
217  namx = log.material().name().name();
218  matNames.push_back(namx);
219  const G4Material* mat = nullptr;
220  for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
221  if ((*matite)->GetName() == namx) {
222  mat = (*matite);
223  break;
224  }
225  }
226  materials.push_back(mat);
227  }
228  }
229  dodet = fv2.next();
230  }
231 
232  std::stringstream sss;
233  for (unsigned int i = 0; i < matNames.size(); ++i) {
234  if (i / 10 * 10 == i) {
235  sss << "\n";
236  }
237  sss << " " << matNames[i];
238  }
239  edm::LogVerbatim("HcalSim") << "HCalSD: Material names for " << attribute << " = " << name << ":" << sss.str();
240 
241  if (useLayerWt) {
242  readWeightFromFile(file);
243  }
244 
245  for (int i = 0; i < 9; ++i) {
246  hit_[i] = time_[i] = dist_[i] = nullptr;
247  }
248  hzvem = hzvhad = nullptr;
249 
250  if (agingFlagHF) {
251  m_HFDarkening.reset(new HFDarkening(m_HC.getParameter<edm::ParameterSet>("HFDarkeningParameterBlock")));
252  }
253 #ifdef plotDebug
255 
256  if (tfile.isAvailable()) {
257  static const char* const labels[] = {"HB",
258  "HE",
259  "HO",
260  "HF Absorber",
261  "HF PMT",
262  "HF Absorber Long",
263  "HF Absorber Short",
264  "HF PMT Long",
265  "HF PMT Short"};
266  TFileDirectory hcDir = tfile->mkdir("ProfileFromHCalSD");
267  char name[20], title[60];
268  for (int i = 0; i < 9; ++i) {
269  sprintf(title, "Hit energy in %s", labels[i]);
270  sprintf(name, "HCalSDHit%d", i);
271  hit_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
272  sprintf(title, "Energy (MeV)");
273  hit_[i]->GetXaxis()->SetTitle(title);
274  hit_[i]->GetYaxis()->SetTitle("Hits");
275  sprintf(title, "Time of the hit in %s", labels[i]);
276  sprintf(name, "HCalSDTime%d", i);
277  time_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
278  sprintf(title, "Time (ns)");
279  time_[i]->GetXaxis()->SetTitle(title);
280  time_[i]->GetYaxis()->SetTitle("Hits");
281  sprintf(title, "Longitudinal profile in %s", labels[i]);
282  sprintf(name, "HCalSDDist%d", i);
283  dist_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
284  sprintf(title, "Distance (mm)");
285  dist_[i]->GetXaxis()->SetTitle(title);
286  dist_[i]->GetYaxis()->SetTitle("Hits");
287  }
288  if (useHF && (!useParam)) {
289  hzvem = hcDir.make<TH1F>("hzvem", "Longitudinal Profile (EM Part)", 330, 0.0, 1650.0);
290  hzvem->GetXaxis()->SetTitle("Longitudinal Profile (EM Part)");
291  hzvhad = hcDir.make<TH1F>("hzvhad", "Longitudinal Profile (Had Part)", 330, 0.0, 1650.0);
292  hzvhad->GetXaxis()->SetTitle("Longitudinal Profile (Hadronic Part)");
293  }
294  }
295 #endif
296 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void readWeightFromFile(const std::string &)
Definition: HCalSD.cc:999
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:115
bool useParam
Definition: HCalSD.h:106
double eminHitHE
Definition: HCalSD.h:107
TH1F * time_[9]
Definition: HCalSD.h:117
double kmaxNeutron
Definition: CaloSD.h:138
const N & name() const
Definition: DDBase.h:74
bool useLayerWt
Definition: HCalSD.h:103
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:95
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:91
double weight_
Definition: HCalSD.h:109
bool useFibreBundle
Definition: HCalSD.h:103
double betaThr
Definition: HCalSD.h:105
double deliveredLumi
Definition: HCalSD.h:108
double eminHitHB
Definition: HCalSD.h:107
bool useShowerLibrary
Definition: HCalSD.h:106
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:636
double birk2
Definition: HCalSD.h:105
bool usePMTHit
Definition: HCalSD.h:103
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:115
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:532
bool agingFlagHE
Definition: HCalSD.h:102
double birk1
Definition: HCalSD.h:105
double kmaxProton
Definition: CaloSD.h:138
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:92
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
TH1F * hzvhad
Definition: HCalSD.h:117
double eminHitHF
Definition: HCalSD.h:107
const double MeV
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
TH1F * hit_[9]
Definition: HCalSD.h:117
bool agingFlagHB
Definition: HCalSD.h:102
bool testNumber
Definition: HCalSD.h:104
double kmaxIon
Definition: CaloSD.h:138
bool suppressHeavy
Definition: CaloSD.h:137
const std::vector< std::string > & getNames() const
bool useBirk
Definition: HCalSD.h:103
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:98
double birk3
Definition: HCalSD.h:105
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:97
bool isAvailable() const
Definition: Service.h:40
bool applyFidCut
Definition: HCalSD.h:106
TH1F * dist_[9]
Definition: HCalSD.h:117
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:99
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
T * make(const Args &...args) const
make new ROOT object
CaloSD(const std::string &aSDname, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, float timeSlice=1., bool ignoreTkID=false)
Definition: CaloSD.cc:27
std::vector< int > hfLevels
Definition: HCalSD.h:112
bool testNS_
Definition: HCalSD.h:104
double eminHitHO
Definition: HCalSD.h:107
TH1F * hzvem
Definition: HCalSD.h:117
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:115
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
bool neutralDensity
Definition: HCalSD.h:104
bool isHF
Definition: HCalSD.h:101
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:93
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:89
int depth_
Definition: HCalSD.h:110
bool isItHF(const G4Step *)
Definition: HCalSD.cc:679
std::vector< G4String > fibreNames
Definition: HCalSD.h:113
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:88
std::vector< G4String > hfNames
Definition: HCalSD.h:113
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:90
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:115
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:115
std::vector< const G4Material * > materials
Definition: HCalSD.h:114
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:96
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< G4String > matNames
Definition: HCalSD.h:113
bool useHF
Definition: HCalSD.h:106
bool isItFibre(const G4LogicalVolume *)
Definition: HCalSD.cc:700
void setParameterized(bool val)
Definition: CaloSD.h:100
void fillLogVolumeVector(const std::string &, const std::string &, const DDCompactView &, std::vector< const G4LogicalVolume * > &, std::vector< G4String > &)
Definition: HCalSD.cc:298
HCalSD::~HCalSD ( )
overridedefault

Member Function Documentation

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

Definition at line 298 of file HCalSD.cc.

References ALCARECOTkAlBeamHalo_cff::filter, SensitiveDetector::getNames(), and mps_fire::i.

Referenced by HCalSD().

302  {
303  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
304  const G4LogicalVolume* lv;
305 
307  DDFilteredView fv(cpv, filter);
308  lvnames = getNames(fv);
309 
310  unsigned int nvol = lvnames.size();
311  std::stringstream ss;
312  ss << "HCalSD: " << nvol << " names to be tested for " << attribute << " <" << value << ">:";
313  for (unsigned int i = 0; i < nvol; ++i) {
314  G4String namv = lvnames[i];
315  lv = nullptr;
316  for (auto lvol : *lvs) {
317  if (lvol->GetName() == namv) {
318  lv = lvol;
319  break;
320  }
321  }
322  lvvec.push_back(lv);
323  if (i / 10 * 10 == i) {
324  ss << "\n";
325  }
326  ss << " " << namv;
327  }
328  edm::LogVerbatim("HcalSim") << ss.str();
329 }
const std::vector< std::string > & getNames() const
Definition: value.py:1
bool HCalSD::filterHit ( CaloG4Hit aHit,
double  time 
)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 590 of file HCalSD.cc.

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

590  {
591  double threshold = 0;
592  DetId theId(aHit->getUnitID());
593  switch (theId.subdetId()) {
594  case HcalBarrel:
595  threshold = eminHitHB;
596  break;
597  case HcalEndcap:
598  threshold = eminHitHE;
599  break;
600  case HcalOuter:
601  threshold = eminHitHO;
602  break;
603  case HcalForward:
604  threshold = eminHitHF;
605  break;
606  default:
607  break;
608  }
609  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
610 }
double eminHitHE
Definition: HCalSD.h:107
double eminHitHB
Definition: HCalSD.h:107
double eminHitHF
Definition: HCalSD.h:107
double eminHitHO
Definition: HCalSD.h:107
double tmaxHit
Definition: CaloSD.h:133
Definition: DetId.h:18
uint32_t getUnitID() const
Definition: CaloG4Hit.h:65
double getEnergyDeposit() const
Definition: CaloG4Hit.h:77
std::vector< double > HCalSD::getDDDArray ( const std::string &  str,
const DDsvalues_type sv 
)
private

Definition at line 636 of file HCalSD.cc.

References DDfetch(), DDValue::doubles(), Exception, str, and relativeConstraints::value.

Referenced by HCalSD().

636  {
637 #ifdef EDM_ML_DEBUG
638  edm::LogVerbatim("HcalSim") << "HCalSD:getDDDArray called for " << str;
639 #endif
640  DDValue value(str);
641  if (DDfetch(&sv, value)) {
642 #ifdef EDM_ML_DEBUG
643  edm::LogVerbatim("HcalSim") << value;
644 #endif
645  const std::vector<double>& fvec = value.doubles();
646  int nval = fvec.size();
647  if (nval < 1) {
648  edm::LogError("HcalSim") << "HCalSD : # of " << str << " bins " << nval << " < 2 ==> illegal";
649  throw cms::Exception("Unknown", "HCalSD") << "nval < 2 for array " << str << "\n";
650  }
651 
652  return fvec;
653  } else {
654  edm::LogError("HcalSim") << "HCalSD : cannot get array " << str;
655  throw cms::Exception("Unknown", "HCalSD") << "cannot get array " << str << "\n";
656  }
657 }
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:81
Definition: value.py:1
#define str(s)
double HCalSD::getEnergyDeposit ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 388 of file HCalSD.cc.

References birk1, birk2, birk3, HBHEDarkening::degradation(), deliveredLumi, egammaForCoreTracking_cff::depth, depth_, CaloSD::getAttenuation(), getHitFibreBundle(), getHitPMT(), HcalDDDSimConstants::getLayer0Wt(), CaloSD::getResponseWt(), hcalConstants, hitForFibre(), 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().

388  {
389  double destep(0.0);
390  auto const lv = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
391  auto const theTrack = aStep->GetTrack();
392 
393  if (isHF) {
394  if (useShowerLibrary && G4TrackToParticleID::isMuon(theTrack) && isItFibre(lv)) {
395 #ifdef EDM_ML_DEBUG
396  edm::LogVerbatim("HcalSim") << "HCalSD: Hit at Fibre in LV " << lv->GetName() << " for track "
397  << aStep->GetTrack()->GetTrackID() << " ("
398  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
399 #endif
400  hitForFibre(aStep);
401  }
402  return destep;
403  }
404 
405  if (isItPMT(lv)) {
406  if (usePMTHit && showerPMT) {
407  getHitPMT(aStep);
408  }
409 #ifdef EDM_ML_DEBUG
410  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from PMT parametrization in LV " << lv->GetName() << " for Track "
411  << aStep->GetTrack()->GetTrackID() << " ("
412  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
413 #endif
414  return destep;
415 
416  } else if (isItStraightBundle(lv)) {
417  if (useFibreBundle && showerBundle) {
418  getHitFibreBundle(aStep, false);
419  }
420 #ifdef EDM_ML_DEBUG
421  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from straight FibreBundle in LV: " << lv->GetName() << " for track "
422  << aStep->GetTrack()->GetTrackID() << " ("
423  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
424 #endif
425  return destep;
426 
427  } else if (isItConicalBundle(lv)) {
428  if (useFibreBundle && showerBundle) {
429  getHitFibreBundle(aStep, true);
430  }
431 #ifdef EDM_ML_DEBUG
432  edm::LogVerbatim("HcalSim") << "HCalSD: Hit from conical FibreBundle PV: " << lv->GetName() << " for track "
433  << aStep->GetTrack()->GetTrackID() << " ("
434  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
435 #endif
436  return destep;
437  }
438 
439  // normal hit
440  destep = aStep->GetTotalEnergyDeposit();
441 
442  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
443  uint32_t detid = setDetUnitId(aStep);
444  int det(0), ieta(0), phi(0), z(0), lay, depth(-1);
445  if (testNumber) {
446  HcalTestNumbering::unpackHcalIndex(detid, det, z, depth, ieta, phi, lay);
447  if (z == 0) {
448  z = -1;
449  }
450  } else {
451  HcalDetId hcid(detid);
452  det = hcid.subdetId();
453  ieta = hcid.ietaAbs();
454  phi = hcid.iphi();
455  z = hcid.zside();
456  }
457  lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
458 #ifdef EDM_ML_DEBUG
459  edm::LogVerbatim("HcalSim") << "HCalSD: det: " << det << " ieta: " << ieta << " iphi: " << phi << " zside " << z
460  << " lay: " << lay - 2;
461 #endif
462  if (depth_ == 0 && (det == 1 || det == 2) && ((!testNumber) || neutralDensity))
464  if (useLayerWt) {
465  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
466  weight_ = layerWeight(det + 2, hitPoint, depth_, lay);
467  }
468 
469  if (m_HBDarkening && det == 1) {
470  double dweight = m_HBDarkening->degradation(deliveredLumi, ieta, lay);
471  weight_ *= dweight;
472 #ifdef EDM_ML_DEBUG
473  edm::LogVerbatim("HcalSim") << "HCalSD: HB Lumi: " << deliveredLumi << " coefficient = " << dweight
474  << " Weight= " << weight_;
475 #endif
476  }
477 
478  if (m_HEDarkening && det == 2) {
479  double dweight = m_HEDarkening->degradation(deliveredLumi, ieta, lay);
480  weight_ *= dweight;
481 #ifdef EDM_ML_DEBUG
482  edm::LogVerbatim("HcalSim") << "HCalSD: HB Lumi: " << deliveredLumi << " coefficient = " << dweight
483  << " Weight= " << weight_;
484 #endif
485  }
486 
487  if (suppressHeavy) {
488  TrackInformation* trkInfo = (TrackInformation*)(theTrack->GetUserInformation());
489  if (trkInfo) {
490  int pdg = theTrack->GetDefinition()->GetPDGEncoding();
491  if (!(trkInfo->isPrimary())) { // Only secondary particles
492  double ke = theTrack->GetKineticEnergy();
493  if (pdg / 1000000000 == 1 && (pdg / 10000) % 100 > 0 && (pdg / 10) % 100 > 0 && ke < kmaxIon)
494  weight_ = 0;
495  if ((pdg == 2212) && (ke < kmaxProton))
496  weight_ = 0;
497  if ((pdg == 2112) && (ke < kmaxNeutron))
498  weight_ = 0;
499  }
500  }
501  }
502  if (useBirk) {
503  const G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
504  if (isItScintillator(mat))
505  weight_ *= getAttenuation(aStep, birk1, birk2, birk3);
506  }
507  double wt1 = getResponseWt(theTrack);
508  double wt2 = theTrack->GetWeight();
509  double edep = weight_ * wt1 * destep;
510  if (wt2 > 0.0) {
511  edep *= wt2;
512  }
513 #ifdef EDM_ML_DEBUG
514  edm::LogVerbatim("HcalSim") << "HCalSD: edep= " << edep << " Det: " << det + 2 << " depth= " << depth_
515  << " weight= " << weight_ << " wt1= " << wt1 << " wt2= " << wt2;
516 #endif
517  return edep;
518 }
double kmaxNeutron
Definition: CaloSD.h:138
void hitForFibre(const G4Step *step)
Definition: HCalSD.cc:807
static bool isMuon(int pdgCode)
bool useLayerWt
Definition: HCalSD.h:103
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:95
double weight_
Definition: HCalSD.h:109
bool useFibreBundle
Definition: HCalSD.h:103
double deliveredLumi
Definition: HCalSD.h:108
bool useShowerLibrary
Definition: HCalSD.h:106
double birk2
Definition: HCalSD.h:105
bool usePMTHit
Definition: HCalSD.h:103
double birk1
Definition: HCalSD.h:105
double kmaxProton
Definition: CaloSD.h:138
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:92
bool isItConicalBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:732
bool testNumber
Definition: HCalSD.h:104
double kmaxIon
Definition: CaloSD.h:138
bool suppressHeavy
Definition: CaloSD.h:137
bool useBirk
Definition: HCalSD.h:103
double birk3
Definition: HCalSD.h:105
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:97
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
double getLayer0Wt(const int &det, const int &phi, const int &zside) const
bool isItStraightBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:724
bool neutralDensity
Definition: HCalSD.h:104
bool isHF
Definition: HCalSD.h:101
void getHitFibreBundle(const G4Step *step, bool type)
Definition: HCalSD.cc:937
int ke
bool isPrimary() const
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:93
bool isItPMT(const G4LogicalVolume *)
Definition: HCalSD.cc:716
void getHitPMT(const G4Step *step)
Definition: HCalSD.cc:878
double getAttenuation(const G4Step *aStep, double birk1, double birk2, double birk3) const
Definition: CaloSD.cc:438
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:1023
int depth_
Definition: HCalSD.h:110
bool isItScintillator(const G4Material *)
Definition: HCalSD.cc:740
double getResponseWt(const G4Track *)
Definition: CaloSD.cc:623
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:96
float degradation(float intlumi, int ieta, int lay) const
bool isItFibre(const G4LogicalVolume *)
Definition: HCalSD.cc:700
void HCalSD::getFromHFLibrary ( const G4Step *  step,
bool &  isKilled 
)
private

Definition at line 764 of file HCalSD.cc.

References CaloSD::currentID, egammaForCoreTracking_cff::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().

764  {
765  std::vector<HFShowerLibrary::Hit> hits = showerLibrary.get()->getHits(aStep, isKilled, weight_, false);
766  if (!isKilled || hits.empty()) {
767  return;
768  }
769 
770  int primaryID = setTrackID(aStep);
771 
772  // Reset entry point for new primary
773  resetForNewPrimary(aStep);
774 
775  auto const theTrack = aStep->GetTrack();
776  int det = 5;
777 
779  edepositEM = 1. * GeV;
780  edepositHAD = 0.;
781  } else {
782  edepositEM = 0.;
783  edepositHAD = 1. * GeV;
784  }
785 #ifdef EDM_ML_DEBUG
786  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary " << hits.size() << " hits for " << GetName() << " of "
787  << primaryID << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
788  << aStep->GetPreStepPoint()->GetKineticEnergy() / GeV << " GeV";
789 #endif
790  for (unsigned int i = 0; i < hits.size(); ++i) {
791  G4ThreeVector hitPoint = hits[i].position;
792  if (isItinFidVolume(hitPoint)) {
793  int depth = hits[i].depth;
794  double time = hits[i].time;
795  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
796  currentID.setID(unitID, time, primaryID, 0);
797 #ifdef plotDebug
798  plotProfile(aStep, hitPoint, 1.0 * GeV, time, depth);
799  bool emType = G4TrackToParticleID::isGammaElectronPositron(parCode);
800  plotHF(hitPoint, emType);
801 #endif
802  processHit(aStep);
803  }
804  }
805 }
float edepositEM
Definition: CaloSD.h:129
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:109
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1043
void processHit(const G4Step *step)
Definition: CaloSD.h:103
float edepositHAD
Definition: CaloSD.h:129
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:425
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1103
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
CaloHitID currentID
Definition: CaloSD.h:131
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:748
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:89
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:592
static bool isGammaElectronPositron(int pdgCode)
bool HCalSD::getFromLibrary ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 331 of file HCalSD.cc.

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, HiIsolationCommonParameters_cff::track, HFDarkening::upperZLimit, useParam, useShowerLibrary, weight_, and z.

331  {
332  auto const track = aStep->GetTrack();
333  depth_ = (aStep->GetPreStepPoint()->GetTouchable()->GetReplicaNumber(0)) % 10;
334  weight_ = 1.0;
335  bool kill(false);
336  isHF = isItHF(aStep);
337  if (isHF) {
338  if (m_HFDarkening) {
339  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
340  const double invcm = 1. / CLHEP::cm;
341  double r = hitPoint.perp() * invcm;
342  double z = std::abs(hitPoint.z()) * invcm;
343  double dose_acquired = 0.;
345  unsigned int hfZLayer = (unsigned int)((z - HFDarkening::lowZLimit) / 5);
346  if (hfZLayer >= HFDarkening::upperZLimit)
347  hfZLayer = (HFDarkening::upperZLimit - 1);
348  float normalized_lumi = m_HFDarkening->int_lumi(deliveredLumi);
349  for (int i = hfZLayer; i != HFDarkening::numberOfZLayers; ++i) {
350  dose_acquired = m_HFDarkening->dose(i, r);
351  weight_ *= m_HFDarkening->degradation(normalized_lumi * dose_acquired);
352  }
353  }
354 #ifdef EDM_ML_DEBUG
355  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary: HFLumiDarkening at "
356  << "r= " << r << ", z= " << z << " Dose= " << dose_acquired << " weight= " << weight_;
357 #endif
358  }
359 
360  if (useParam) {
361  getFromParam(aStep, kill);
362 #ifdef EDM_ML_DEBUG
363  G4String nameVolume = lv->GetName();
364  edm::LogVerbatim("HcalSim") << "HCalSD: " << getNumberOfHits() << " hits from parametrization in " << nameVolume
365  << " for Track " << track->GetTrackID() << " ("
366  << track->GetDefinition()->GetParticleName() << ")";
367 #endif
370 #ifdef EDM_ML_DEBUG
371  auto nameVolume = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
372  edm::LogVerbatim("HcalSim") << "HCalSD: Starts shower library from " << nameVolume << " for Track "
373  << track->GetTrackID() << " (" << track->GetDefinition()->GetParticleName() << ")";
374 
375 #endif
376  getFromHFLibrary(aStep, kill);
377  }
378  }
379  }
380 #ifdef EDM_ML_DEBUG
381  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary ID= " << track->GetTrackID() << " ("
382  << track->GetDefinition()->GetParticleName() << ") kill= " << kill
383  << " weight= " << weight_ << " depth= " << depth_ << " isHF: " << isHF;
384 #endif
385  return kill;
386 }
bool useParam
Definition: HCalSD.h:106
static bool isMuon(int pdgCode)
double weight_
Definition: HCalSD.h:109
double deliveredLumi
Definition: HCalSD.h:108
bool useShowerLibrary
Definition: HCalSD.h:106
static const unsigned int numberOfZLayers
Definition: HFDarkening.h:24
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:98
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int getNumberOfHits()
Definition: CaloSD.cc:345
void getFromParam(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:849
void getFromHFLibrary(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:764
static bool isStableHadronIon(const G4Track *)
static const unsigned int lowZLimit
Definition: HFDarkening.h:27
static const unsigned int upperZLimit
Definition: HFDarkening.h:28
bool isHF
Definition: HCalSD.h:101
int depth_
Definition: HCalSD.h:110
bool isItHF(const G4Step *)
Definition: HCalSD.cc:679
static bool isGammaElectronPositron(int pdgCode)
void HCalSD::getFromParam ( const G4Step *  step,
bool &  isKilled 
)
private

Definition at line 849 of file HCalSD.cc.

References CaloSD::currentID, egammaForCoreTracking_cff::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().

849  {
850  std::vector<HFShowerParam::Hit> hits = showerParam.get()->getHits(aStep, weight_, isKilled);
851  if (!isKilled || hits.empty()) {
852  return;
853  }
854 
855  int primaryID = setTrackID(aStep);
856  int det = 5;
857 
858 #ifdef EDM_ML_DEBUG
859  edm::LogVerbatim("HcalSim") << "HCalSD::getFromParam " << hits.size() << " hits for " << GetName() << " of "
860  << primaryID << " with " << aStep->GetTrack()->GetDefinition()->GetParticleName()
861  << " of " << preStepPoint->GetKineticEnergy() / GeV << " GeV in detector type " << det;
862 #endif
863  for (unsigned int i = 0; i < hits.size(); ++i) {
864  G4ThreeVector hitPoint = hits[i].position;
865  int depth = hits[i].depth;
866  double time = hits[i].time;
867  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
868  currentID.setID(unitID, time, primaryID, 0);
869  edepositEM = hits[i].edep * GeV;
870  edepositHAD = 0.;
871 #ifdef plotDebug
872  plotProfile(aStep, hitPoint, edepositEM, time, depth);
873 #endif
874  processHit(aStep);
875  }
876 }
float edepositEM
Definition: CaloSD.h:129
const double GeV
Definition: MathUtil.h:16
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:91
double weight_
Definition: HCalSD.h:109
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1043
void processHit(const G4Step *step)
Definition: CaloSD.h:103
float edepositHAD
Definition: CaloSD.h:129
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
CaloHitID currentID
Definition: CaloSD.h:131
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:592
void HCalSD::getHitFibreBundle ( const G4Step *  step,
bool  type 
)
private

Definition at line 937 of file HCalSD.cc.

References pfBoostedDoubleSVAK8TagInfos_cfi::beta, CaloSD::currentID, TauDecayModes::dec, egammaForCoreTracking_cff::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 tmp.

Referenced by getEnergyDeposit().

937  {
938  auto const preStepPoint = aStep->GetPreStepPoint();
939  auto const theTrack = aStep->GetTrack();
940  double edep = showerBundle.get()->getHits(aStep, type);
941 
942  if (edep >= 0.0) {
943  edep *= GeV;
944  double etrack = preStepPoint->GetKineticEnergy();
945  int primaryID = 0;
946  if (etrack >= energyCut) {
947  primaryID = theTrack->GetTrackID();
948  } else {
949  primaryID = theTrack->GetParentID();
950  if (primaryID == 0)
951  primaryID = theTrack->GetTrackID();
952  }
953  // Reset entry point for new primary
954  resetForNewPrimary(aStep);
955  //
956  int det = static_cast<int>(HcalForward);
957  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
958  double rr = hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y();
959  double phi = rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x());
960  double etaR = showerBundle->getRadius();
961  int depth = 1;
962  if (etaR < 0.) {
963  depth = 2;
964  etaR = -etaR;
965  }
966  if (hitPoint.z() < 0.)
967  etaR = -etaR;
968 #ifdef EDM_ML_DEBUG
969  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR " << etaR << " phi " << phi / deg
970  << " depth " << depth;
971 #endif
972  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
973  uint32_t unitID = 0;
974  if (numberingFromDDD) {
975  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det, etaR, phi, depth, 1);
976  unitID = setDetUnitId(tmp);
977  }
978  if (type)
979  currentID.setID(unitID, time, primaryID, 3);
980  else
981  currentID.setID(unitID, time, primaryID, 2);
982 
983  edepositHAD = aStep->GetTotalEnergyDeposit();
984  edepositEM = -edepositHAD + edep;
985 #ifdef plotDebug
986  plotProfile(aStep, hitPoint, edep, time, depth);
987 #endif
988 #ifdef EDM_ML_DEBUG
989  double beta = preStepPoint->GetBeta();
990  edm::LogVerbatim("HcalSim") << "HCalSD::getHitFibreBundle 1 hit for " << GetName() << " of " << primaryID
991  << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
992  << preStepPoint->GetKineticEnergy() / GeV << " GeV with velocity " << beta << " UnitID "
993  << std::hex << unitID << std::dec;
994 #endif
995  processHit(aStep);
996  } // non-zero energy deposit
997 }
float edepositEM
Definition: CaloSD.h:129
double energyCut
Definition: CaloSD.h:133
type
Definition: HCALResponse.h:21
const double GeV
Definition: MathUtil.h:16
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1043
void processHit(const G4Step *step)
Definition: CaloSD.h:103
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
float edepositHAD
Definition: CaloSD.h:129
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:425
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
CaloHitID currentID
Definition: CaloSD.h:131
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:93
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void HCalSD::getHitPMT ( const G4Step *  step)
private

Definition at line 878 of file HCalSD.cc.

References pfBoostedDoubleSVAK8TagInfos_cfi::beta, CaloSD::currentID, TauDecayModes::dec, egammaForCoreTracking_cff::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 tmp.

Referenced by getEnergyDeposit().

878  {
879  auto const preStepPoint = aStep->GetPreStepPoint();
880  auto const theTrack = aStep->GetTrack();
881  double edep = showerPMT->getHits(aStep);
882 
883  if (edep >= 0.) {
884  edep *= GeV;
885  double etrack = preStepPoint->GetKineticEnergy();
886  int primaryID = 0;
887  if (etrack >= energyCut) {
888  primaryID = theTrack->GetTrackID();
889  } else {
890  primaryID = theTrack->GetParentID();
891  if (primaryID == 0)
892  primaryID = theTrack->GetTrackID();
893  }
894  // Reset entry point for new primary
895  resetForNewPrimary(aStep);
896  //
897  int det = static_cast<int>(HcalForward);
898  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
899  double rr = (hitPoint.x() * hitPoint.x() + hitPoint.y() * hitPoint.y());
900  double phi = (rr == 0. ? 0. : atan2(hitPoint.y(), hitPoint.x()));
901  double etaR = showerPMT->getRadius();
902  int depth = 1;
903  if (etaR < 0) {
904  depth = 2;
905  etaR = -etaR;
906  }
907  if (hitPoint.z() < 0)
908  etaR = -etaR;
909 #ifdef EDM_ML_DEBUG
910  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR " << etaR << " phi " << phi / deg
911  << " depth " << depth;
912 #endif
913  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
914  uint32_t unitID = 0;
915  if (numberingFromDDD) {
916  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det, etaR, phi, depth, 1);
917  unitID = setDetUnitId(tmp);
918  }
919  currentID.setID(unitID, time, primaryID, 1);
920 
921  edepositHAD = aStep->GetTotalEnergyDeposit();
922  edepositEM = -edepositHAD + edep;
923 #ifdef plotDebug
924  plotProfile(aStep, hitPoint, edep, time, depth);
925 #endif
926 #ifdef EDM_ML_DEBUG
927  double beta = preStepPoint->GetBeta();
928  edm::LogVerbatim("HcalSim") << "HCalSD::getHitPMT 1 hit for " << GetName() << " of " << primaryID << " with "
929  << theTrack->GetDefinition()->GetParticleName() << " of "
930  << preStepPoint->GetKineticEnergy() / GeV << " GeV with velocity " << beta << " UnitID "
931  << std::hex << unitID << std::dec;
932 #endif
933  processHit(aStep);
934  }
935 }
float edepositEM
Definition: CaloSD.h:129
double energyCut
Definition: CaloSD.h:133
const double GeV
Definition: MathUtil.h:16
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1043
void processHit(const G4Step *step)
Definition: CaloSD.h:103
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:92
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
float edepositHAD
Definition: CaloSD.h:129
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:425
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
CaloHitID currentID
Definition: CaloSD.h:131
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< G4String > HCalSD::getNames ( DDFilteredView fv)
private

Definition at line 659 of file HCalSD.cc.

References DDFilteredView::firstChild(), mps_fire::i, cmsBatch::log, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDFilteredView::next(), convertSQLiteXML::ok, and tmp.

659  {
660  std::vector<G4String> tmp;
661  bool dodet = fv.firstChild();
662  while (dodet) {
663  const DDLogicalPart& log = fv.logicalPart();
664  bool ok = true;
665 
666  for (unsigned int i = 0; i < tmp.size(); ++i) {
667  if (!strcmp(tmp[i].c_str(), log.name().name().c_str())) {
668  ok = false;
669  break;
670  }
671  }
672  if (ok)
673  tmp.push_back(log.name().name());
674  dodet = fv.next();
675  }
676  return tmp;
677 }
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:74
bool next()
set current node to the next node in the filtered tree
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool firstChild()
set the current node to the first child ...
const std::string & name() const
Returns the name.
Definition: DDName.cc:53
void HCalSD::hitForFibre ( const G4Step *  step)
private

Definition at line 807 of file HCalSD.cc.

References CaloSD::currentID, egammaForCoreTracking_cff::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, and weight_.

Referenced by getEnergyDeposit().

807  { // if not ParamShower
808 
809  std::vector<HFShower::Hit> hits = hfshower.get()->getHits(aStep, weight_);
810  if (hits.empty()) {
811  return;
812  }
813 
814  auto const theTrack = aStep->GetTrack();
815  int primaryID = setTrackID(aStep);
816  int det = 5;
817 
819  edepositEM = 1. * GeV;
820  edepositHAD = 0.;
821  } else {
822  edepositEM = 0.;
823  edepositHAD = 1. * GeV;
824  }
825 
826 #ifdef EDM_ML_DEBUG
827  edm::LogVerbatim("HcalSim") << "HCalSD::hitForFibre " << hits.size() << " hits for " << GetName() << " of "
828  << primaryID << " with " << theTrack->GetDefinition()->GetParticleName() << " of "
829  << preStepPoint->GetKineticEnergy() / GeV << " GeV in detector type " << det;
830 #endif
831 
832  for (unsigned int i = 0; i < hits.size(); ++i) {
833  G4ThreeVector hitPoint = hits[i].position;
834  if (isItinFidVolume(hitPoint)) {
835  int depth = hits[i].depth;
836  double time = hits[i].time;
837  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
838  currentID.setID(unitID, time, primaryID, 0);
839 #ifdef plotDebug
840  plotProfile(aStep, hitPoint, edepositEM, time, depth);
841  bool emType = (edepositEM > 0.) ? true : false;
842  plotHF(hitPoint, emType);
843 #endif
844  processHit(aStep);
845  }
846  }
847 }
float edepositEM
Definition: CaloSD.h:129
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:109
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1043
void processHit(const G4Step *step)
Definition: CaloSD.h:103
float edepositHAD
Definition: CaloSD.h:129
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1103
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
CaloHitID currentID
Definition: CaloSD.h:131
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:748
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:592
static bool isGammaElectronPositron(int pdgCode)
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:90
void HCalSD::initRun ( )
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 577 of file HCalSD.cc.

References hcalConstants, hfshower, showerBundle, showerLibrary, showerParam, and showerPMT.

577  {
578  if (showerLibrary.get())
579  showerLibrary.get()->initRun(nullptr, hcalConstants);
580  if (showerParam.get())
581  showerParam.get()->initRun(hcalConstants);
582  if (hfshower.get())
583  hfshower.get()->initRun(hcalConstants);
584  if (showerPMT.get())
585  showerPMT.get()->initRun(hcalConstants);
586  if (showerBundle.get())
587  showerBundle.get()->initRun(hcalConstants);
588 }
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:95
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:91
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:92
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:93
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:89
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:90
bool HCalSD::isItConicalBundle ( const G4LogicalVolume *  lv)
private

Definition at line 732 of file HCalSD.cc.

References fibre2LV.

Referenced by getEnergyDeposit().

732  {
733  for (auto lvol : fibre2LV)
734  if (lv == lvol) {
735  return true;
736  }
737  return false;
738 }
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:115
bool HCalSD::isItFibre ( const G4LogicalVolume *  lv)
private

Definition at line 700 of file HCalSD.cc.

References fibreLV.

Referenced by getEnergyDeposit(), and HCalSD().

700  {
701  for (auto lvol : fibreLV)
702  if (lv == lvol) {
703  return true;
704  }
705  return false;
706 }
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:115
bool HCalSD::isItFibre ( const G4String &  name)
private

Definition at line 708 of file HCalSD.cc.

References fibreNames.

708  {
709  for (auto nam : fibreNames)
710  if (name == nam) {
711  return true;
712  }
713  return false;
714 }
std::vector< G4String > fibreNames
Definition: HCalSD.h:113
bool HCalSD::isItHF ( const G4Step *  aStep)
private

Definition at line 679 of file HCalSD.cc.

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

Referenced by getFromLibrary(), and HCalSD().

679  {
680  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
681  int levels = (touch->GetHistoryDepth()) + 1;
682  for (unsigned int it = 0; it < hfNames.size(); ++it) {
683  if (levels >= hfLevels[it]) {
684  const G4LogicalVolume* lv = touch->GetVolume(levels - hfLevels[it])->GetLogicalVolume();
685  if (lv == hfLV[it])
686  return true;
687  }
688  }
689  return false;
690 }
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:115
std::vector< int > hfLevels
Definition: HCalSD.h:112
std::vector< G4String > hfNames
Definition: HCalSD.h:113
bool HCalSD::isItHF ( const G4String &  name)
private

Definition at line 692 of file HCalSD.cc.

References hfNames.

692  {
693  for (auto nam : hfNames)
694  if (name == nam) {
695  return true;
696  }
697  return false;
698 }
std::vector< G4String > hfNames
Definition: HCalSD.h:113
bool HCalSD::isItinFidVolume ( const G4ThreeVector &  hitPoint)
private

Definition at line 748 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

748  {
749  bool flag = true;
750  if (applyFidCut) {
751  int npmt = HFFibreFiducial::PMTNumber(hitPoint);
752 #ifdef EDM_ML_DEBUG
753  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt << " for hit point " << hitPoint;
754 #endif
755  if (npmt <= 0)
756  flag = false;
757  }
758 #ifdef EDM_ML_DEBUG
759  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint << " return flag " << flag;
760 #endif
761  return flag;
762 }
bool applyFidCut
Definition: HCalSD.h:106
int PMTNumber(const G4ThreeVector &pe_effect)
bool HCalSD::isItPMT ( const G4LogicalVolume *  lv)
private

Definition at line 716 of file HCalSD.cc.

References pmtLV.

Referenced by getEnergyDeposit().

716  {
717  for (auto lvol : pmtLV)
718  if (lv == lvol) {
719  return true;
720  }
721  return false;
722 }
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:115
bool HCalSD::isItScintillator ( const G4Material *  mat)
private

Definition at line 740 of file HCalSD.cc.

References materials.

Referenced by getEnergyDeposit().

740  {
741  for (auto amat : materials)
742  if (amat == mat) {
743  return true;
744  }
745  return false;
746 }
std::vector< const G4Material * > materials
Definition: HCalSD.h:114
bool HCalSD::isItStraightBundle ( const G4LogicalVolume *  lv)
private

Definition at line 724 of file HCalSD.cc.

References fibre1LV.

Referenced by getEnergyDeposit().

724  {
725  for (auto lvol : fibre1LV)
726  if (lv == lvol) {
727  return true;
728  }
729  return false;
730 }
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:115
double HCalSD::layerWeight ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay 
)
private

Definition at line 1023 of file HCalSD.cc.

References TauDecayModes::dec, EDM_ML_DEBUG, HcalNumberingFromDDD::HcalID::etaR, HcalNumberingFromDDD::HcalID::lay, layerWeights, modifyDepth(), numberingFromDDD, HcalTestNumbering::packHcalIndex(), HcalNumberingFromDDD::HcalID::phis, HcalNumberingFromDDD::HcalID::subdet, tmp, and HcalNumberingFromDDD::HcalID::zside.

Referenced by getEnergyDeposit().

1023  {
1024  double wt = 1.;
1025  if (numberingFromDDD) {
1026  //get the ID's as eta, phi, depth, ... indices
1028  numberingFromDDD.get()->unitID(det, math::XYZVectorD(pos.x(), pos.y(), pos.z()), depth, lay);
1029  modifyDepth(tmp);
1030  uint32_t id = HcalTestNumbering::packHcalIndex(tmp.subdet, tmp.zside, 1, tmp.etaR, tmp.phis, tmp.lay);
1031  std::map<uint32_t, double>::const_iterator ite = layerWeights.find(id);
1032  if (ite != layerWeights.end())
1033  wt = ite->second;
1034 #ifdef EDM_ML_DEBUG
1035  edm::LogVerbatim("HcalSim") << "HCalSD::layerWeight: ID " << std::hex << id << std::dec << " (" << tmp.subdet << "/"
1036  << tmp.zside << "/1/" << tmp.etaR << "/" << tmp.phis << "/" << tmp.lay << ") Weight "
1037  << wt;
1038 #endif
1039  }
1040  return wt;
1041 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1114
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:116
#define EDM_ML_DEBUG
void HCalSD::modifyDepth ( HcalNumberingFromDDD::HcalID id)
private

Definition at line 1114 of file HCalSD.cc.

References egammaForCoreTracking_cff::depth, depth_, hcalConstants, HcalDDDSimConstants::maxHFDepth(), and testNumber.

Referenced by layerWeight(), and setDetUnitId().

1114  {
1115  if (id.subdet == 4) {
1116  int ieta = (id.zside == 0) ? -id.etaR : id.etaR;
1117  if (hcalConstants->maxHFDepth(ieta, id.phis) > 2) {
1118  if (id.depth <= 2) {
1119  if (G4UniformRand() > 0.5)
1120  id.depth += 2;
1121  }
1122  }
1123  } else if ((id.subdet == 1 || id.subdet == 2) && testNumber) {
1124  id.depth = (depth_ == 0) ? 1 : 2;
1125  }
1126 }
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:95
bool testNumber
Definition: HCalSD.h:104
int depth_
Definition: HCalSD.h:110
int maxHFDepth(const int &ieta, const int &iphi) const
void HCalSD::plotHF ( const G4ThreeVector &  pos,
bool  emType 
)
private

Definition at line 1103 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

1103  {
1104  double zv = std::abs(hitPoint.z()) - gpar[4];
1105  if (emType) {
1106  if (hzvem != nullptr)
1107  hzvem->Fill(zv);
1108  } else {
1109  if (hzvhad != nullptr)
1110  hzvhad->Fill(zv);
1111  }
1112 }
std::vector< double > gpar
Definition: HCalSD.h:111
TH1F * hzvhad
Definition: HCalSD.h:117
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * hzvem
Definition: HCalSD.h:117
void HCalSD::plotProfile ( const G4Step *  step,
const G4ThreeVector &  pos,
double  edep,
double  time,
int  id 
)
private

Definition at line 1043 of file HCalSD.cc.

References funct::abs(), egammaForCoreTracking_cff::depth, dist_, runEdmFileComparison::found, hit_, training_settings::idx, cuy::ii, DTRecHitClients_cfi::local, gen::n, dataset::name, ntuplemaker::time, and time_.

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

1043  {
1044  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1045  static const G4String modName[8] = {"HEModule", "HVQF", "HBModule", "MBAT", "MBBT", "MBBTC", "MBBT_R1P", "MBBT_R1M"};
1046  G4ThreeVector local;
1047  bool found = false;
1048  double depth = -2000;
1049  int idx = 4;
1050  for (int n = 0; n < touch->GetHistoryDepth(); ++n) {
1051  G4String name = touch->GetVolume(n)->GetName();
1052 #ifdef EDM_ML_DEBUG
1053  edm::LogVerbatim("HcalSim") << "plotProfile Depth " << n << " Name " << name;
1054 #endif
1055  for (unsigned int ii = 0; ii < 8; ++ii) {
1056  if (name == modName[ii]) {
1057  found = true;
1058  int dn = touch->GetHistoryDepth() - n;
1059  local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1060  if (ii == 0) {
1061  depth = local.z() - 4006.5;
1062  idx = 1;
1063  } else if (ii == 1) {
1064  depth = local.z() + 825.0;
1065  idx = 3;
1066  } else if (ii == 2) {
1067  depth = local.x() - 1775.;
1068  idx = 0;
1069  } else {
1070  depth = local.y() + 15.;
1071  idx = 2;
1072  }
1073  break;
1074  }
1075  }
1076  if (found)
1077  break;
1078  }
1079  if (!found)
1080  depth = std::abs(global.z()) - 11500;
1081 #ifdef EDM_ML_DEBUG
1082  edm::LogVerbatim("HcalSim") << "plotProfile Found " << found << " Global " << global << " Local " << local
1083  << " depth " << depth << " ID " << id << " EDEP " << edep << " Time " << time;
1084 #endif
1085  if (hit_[idx] != nullptr)
1086  hit_[idx]->Fill(edep);
1087  if (time_[idx] != nullptr)
1088  time_[idx]->Fill(time, edep);
1089  if (dist_[idx] != nullptr)
1090  dist_[idx]->Fill(depth, edep);
1091  int jd = 2 * idx + id - 7;
1092  if (jd >= 0 && jd < 4) {
1093  jd += 5;
1094  if (hit_[jd] != nullptr)
1095  hit_[jd]->Fill(edep);
1096  if (time_[jd] != nullptr)
1097  time_[jd]->Fill(time, edep);
1098  if (dist_[jd] != nullptr)
1099  dist_[jd]->Fill(depth, edep);
1100  }
1101 }
TH1F * time_[9]
Definition: HCalSD.h:117
TH1F * hit_[9]
Definition: HCalSD.h:117
TH1F * dist_[9]
Definition: HCalSD.h:117
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ii
Definition: cuy.py:590
void HCalSD::readWeightFromFile ( const std::string &  fName)
private

Definition at line 999 of file HCalSD.cc.

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

Referenced by HCalSD().

999  {
1000  std::ifstream infile;
1001  int entry = 0;
1002  infile.open(fName.c_str(), std::ios::in);
1003  if (infile) {
1004  int det, zside, etaR, phi, lay;
1005  double wt;
1006  while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1007  uint32_t id = HcalTestNumbering::packHcalIndex(det, zside, 1, etaR, phi, lay);
1008  layerWeights.insert(std::pair<uint32_t, double>(id, wt));
1009  ++entry;
1010 #ifdef EDM_ML_DEBUG
1011  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile:Entry " << entry << " ID " << std::hex << id
1012  << std::dec << " (" << det << "/" << zside << "/1/" << etaR << "/" << phi << "/"
1013  << lay << ") Weight " << wt;
1014 #endif
1015  }
1016  infile.close();
1017  }
1018  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile: reads " << entry << " weights from " << fName;
1019  if (entry <= 0)
1020  useLayerWt = false;
1021 }
bool useLayerWt
Definition: HCalSD.h:103
int zside(DetId const &)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:116
uint32_t HCalSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements CaloSD.

Definition at line 520 of file HCalSD.cc.

References egammaForCoreTracking_cff::depth.

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

520  {
521  auto const prePoint = aStep->GetPreStepPoint();
522  auto const touch = prePoint->GetTouchable();
523  const G4ThreeVector& hitPoint = prePoint->GetPosition();
524 
525  int depth = (touch->GetReplicaNumber(0)) % 10 + 1;
526  int lay = (touch->GetReplicaNumber(0) / 10) % 100 + 1;
527  int det = (touch->GetReplicaNumber(1)) / 1000;
528 
529  return setDetUnitId(det, hitPoint, depth, lay);
530 }
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
uint32_t HCalSD::setDetUnitId ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay = 1 
)
private

Definition at line 612 of file HCalSD.cc.

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

612  {
613  uint32_t id = 0;
614  if (numberingFromDDD.get()) {
615  //get the ID's as eta, phi, depth, ... indices
617  numberingFromDDD.get()->unitID(det, math::XYZVectorD(pos.x(), pos.y(), pos.z()), depth, lay);
618  id = setDetUnitId(tmp);
619  }
620  return id;
621 }
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:520
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
uint32_t HCalSD::setDetUnitId ( HcalNumberingFromDDD::HcalID tmp)
private

Definition at line 623 of file HCalSD.cc.

References TauDecayModes::dec, HcalNumberingFromDDD::HcalID::depth, HcalNumberingFromDDD::HcalID::etaR, triggerObjects_cff::id, HcalNumberingFromDDD::HcalID::lay, m_HcalTestNS, modifyDepth(), numberingScheme, convertSQLiteXML::ok, HcalNumberingFromDDD::HcalID::phi, HcalNumberingFromDDD::HcalID::phis, HcalNumberingFromDDD::HcalID::subdet, and testNumber.

623  {
624  modifyDepth(tmp);
625  uint32_t id = (numberingScheme.get()) ? numberingScheme.get()->getUnitID(tmp) : 0;
626  if ((!testNumber) && m_HcalTestNS.get()) {
627  bool ok = m_HcalTestNS.get()->compare(tmp, id);
628  if (!ok)
629  edm::LogWarning("HcalSim") << "Det ID from HCalSD " << HcalDetId(id) << " " << std::hex << id << std::dec
630  << " does not match one from relabller for " << tmp.subdet << ":" << tmp.etaR << ":"
631  << tmp.phi << ":" << tmp.phis << ":" << tmp.depth << ":" << tmp.lay << std::endl;
632  }
633  return id;
634 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1114
bool testNumber
Definition: HCalSD.h:104
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:99
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:88
void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 532 of file HCalSD.cc.

References numberingScheme.

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

532  {
533  if (scheme != nullptr) {
534  edm::LogVerbatim("HcalSim") << "HCalSD: updates numbering scheme for " << GetName();
535  numberingScheme.reset(scheme);
536  }
537 }
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:88
void HCalSD::update ( const BeginOfJob )
overrideprotectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 539 of file HCalSD.cc.

References agingFlagHB, agingFlagHE, Exception, edm::EventSetup::get(), HcalDDDSimConstants::getGparHF(), HcalDDDSimConstants::getMaxDepth(), gpar, hcalConstants, m_HBDarkening, m_HcalTestNS, m_HEDarkening, numberingFromDDD, and testNS_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

539  {
540  const edm::EventSetup* es = (*job)();
542  es->get<HcalSimNumberingRecord>().get(hdc);
543  if (hdc.isValid()) {
544  hcalConstants = hdc.product();
545  } else {
546  edm::LogError("HcalSim") << "HCalSD : Cannot find HcalDDDSimConstant";
547  throw cms::Exception("Unknown", "HCalSD") << "Cannot find HcalDDDSimConstant"
548  << "\n";
549  }
550 
552 
553  //Special Geometry parameters
555  std::stringstream sss;
556  for (unsigned int ig = 0; ig < gpar.size(); ig++) {
557  sss << "\n gpar[" << ig << "] = " << gpar[ig] / cm << " cm";
558  }
559  edm::LogVerbatim("HcalSim") << "Maximum depth for HF " << hcalConstants->getMaxDepth(2) << gpar.size() << " gpar (cm)"
560  << sss.str();
561  //Test Hcal Numbering Scheme
562  if (testNS_)
563  m_HcalTestNS.reset(new HcalTestNS(es));
564 
565  if (agingFlagHB) {
567  es->get<HBHEDarkeningRecord>().get("HB", hdark);
568  m_HBDarkening = &*hdark;
569  }
570  if (agingFlagHE) {
572  es->get<HBHEDarkeningRecord>().get("HE", hdark);
573  m_HEDarkening = &*hdark;
574  }
575 }
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:95
std::vector< double > gpar
Definition: HCalSD.h:111
bool agingFlagHE
Definition: HCalSD.h:102
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:87
int getMaxDepth(const int &type) const
bool agingFlagHB
Definition: HCalSD.h:102
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:97
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:99
bool testNS_
Definition: HCalSD.h:104
const std::vector< double > & getGparHF() const
T get() const
Definition: EventSetup.h:71
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:96

Member Data Documentation

bool HCalSD::agingFlagHB
private

Definition at line 102 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::agingFlagHE
private

Definition at line 102 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::applyFidCut
private

Definition at line 106 of file HCalSD.h.

Referenced by HCalSD(), and isItinFidVolume().

double HCalSD::betaThr
private

Definition at line 105 of file HCalSD.h.

Referenced by HCalSD().

double HCalSD::birk1
private

Definition at line 105 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk2
private

Definition at line 105 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk3
private

Definition at line 105 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::deliveredLumi
private

Definition at line 108 of file HCalSD.h.

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

int HCalSD::depth_
private

Definition at line 110 of file HCalSD.h.

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

TH1F * HCalSD::dist_[9]
private

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

double HCalSD::eminHitHB
private

Definition at line 107 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHE
private

Definition at line 107 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHF
private

Definition at line 107 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHO
private

Definition at line 107 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItStraightBundle().

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItConicalBundle().

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 113 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 111 of file HCalSD.h.

Referenced by plotHF(), and update().

const HcalDDDSimConstants* HCalSD::hcalConstants
private

Definition at line 95 of file HCalSD.h.

Referenced by getEnergyDeposit(), initRun(), modifyDepth(), and update().

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

Definition at line 112 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 113 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 90 of file HCalSD.h.

Referenced by HCalSD(), hitForFibre(), and initRun().

TH1F* HCalSD::hit_[9]
private

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

TH1F * HCalSD::hzvem
private

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

TH1F * HCalSD::hzvhad
private

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

bool HCalSD::isHF
private

Definition at line 101 of file HCalSD.h.

Referenced by getEnergyDeposit(), and getFromLibrary().

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

Definition at line 116 of file HCalSD.h.

Referenced by layerWeight(), and readWeightFromFile().

const HBHEDarkening* HCalSD::m_HBDarkening
private

Definition at line 96 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 99 of file HCalSD.h.

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

const HBHEDarkening* HCalSD::m_HEDarkening
private

Definition at line 97 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 98 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

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

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and isItScintillator().

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

Definition at line 113 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::neutralDensity
private

Definition at line 104 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

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

Definition at line 87 of file HCalSD.h.

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

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

Definition at line 88 of file HCalSD.h.

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

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItPMT().

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

Definition at line 93 of file HCalSD.h.

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

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

Definition at line 89 of file HCalSD.h.

Referenced by getFromHFLibrary(), HCalSD(), and initRun().

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

Definition at line 91 of file HCalSD.h.

Referenced by getFromParam(), HCalSD(), and initRun().

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

Definition at line 92 of file HCalSD.h.

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

bool HCalSD::testNS_
private

Definition at line 104 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::testNumber
private

Definition at line 104 of file HCalSD.h.

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

TH1F * HCalSD::time_[9]
private

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

bool HCalSD::useBirk
private

Definition at line 103 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useFibreBundle
private

Definition at line 103 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useHF
private

Definition at line 106 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::useLayerWt
private

Definition at line 103 of file HCalSD.h.

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

bool HCalSD::useParam
private

Definition at line 106 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

bool HCalSD::usePMTHit
private

Definition at line 103 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useShowerLibrary
private

Definition at line 106 of file HCalSD.h.

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

double HCalSD::weight_
private