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
 
 ~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
 
 SensitiveDetector (const std::string &iname, const DDCompactView &cpv, const SensitiveDetectorCatalog &, edm::ParameterSet const &p)
 
 ~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.

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

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

Referenced by HCalSD().

288  {
289 
290  const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
291  const G4LogicalVolume* lv;
292 
294  DDFilteredView fv(cpv,filter);
295  lvnames = getNames(fv);
296 
297  unsigned int nvol = lvnames.size();
298  std::stringstream ss;
299  ss << "HCalSD: " << nvol << " names to be tested for " << attribute << " <" << value << ">:";
300  for (unsigned int i=0; i<nvol; ++i) {
301  G4String namv = lvnames[i];
302  lv = nullptr;
303  for (auto lvol : *lvs) {
304  if (lvol->GetName() == namv) {
305  lv = lvol;
306  break;
307  }
308  }
309  lvvec.push_back(lv);
310  if(i/10*10 == i) { ss << "\n"; }
311  ss << " " << namv;
312  }
313  edm::LogVerbatim("HcalSim") << ss.str();
314 }
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 582 of file HCalSD.cc.

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

582  {
583  double threshold=0;
584  DetId theId(aHit->getUnitID());
585  switch (theId.subdetId()) {
586  case HcalBarrel:
587  threshold = eminHitHB; break;
588  case HcalEndcap:
589  threshold = eminHitHE; break;
590  case HcalOuter:
591  threshold = eminHitHO; break;
592  case HcalForward:
593  threshold = eminHitHF; break;
594  default:
595  break;
596  }
597  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
598 }
double eminHitHE
Definition: HCalSD.h:110
double eminHitHB
Definition: HCalSD.h:110
double eminHitHF
Definition: HCalSD.h:110
double eminHitHO
Definition: HCalSD.h:110
double tmaxHit
Definition: CaloSD.h:134
Definition: DetId.h:18
uint32_t getUnitID() const
Definition: CaloG4Hit.h:69
double getEnergyDeposit() const
Definition: CaloG4Hit.h:81
std::vector< double > HCalSD::getDDDArray ( const std::string &  str,
const DDsvalues_type sv 
)
private

Definition at line 626 of file HCalSD.cc.

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

Referenced by HCalSD().

627  {
628 #ifdef EDM_ML_DEBUG
629  edm::LogVerbatim("HcalSim") << "HCalSD:getDDDArray called for " << str;
630 #endif
631  DDValue value(str);
632  if (DDfetch(&sv,value)) {
633 #ifdef EDM_ML_DEBUG
634  edm::LogVerbatim("HcalSim") << value;
635 #endif
636  const std::vector<double> & fvec = value.doubles();
637  int nval = fvec.size();
638  if (nval < 1) {
639  edm::LogError("HcalSim") << "HCalSD : # of " << str << " bins " << nval
640  << " < 2 ==> illegal";
641  throw cms::Exception("Unknown", "HCalSD") << "nval < 2 for array " << str << "\n";
642  }
643 
644  return fvec;
645  } else {
646  edm::LogError("HcalSim") << "HCalSD : cannot get array " << str;
647  throw cms::Exception("Unknown", "HCalSD") << "cannot get array " << str << "\n";
648  }
649 }
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 384 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().

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

Definition at line 735 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().

735  {
736 
737  std::vector<HFShowerLibrary::Hit> hits = showerLibrary.get()->getHits(aStep, isKilled, weight_, false);
738  if(!isKilled || hits.empty()) { return; }
739 
740  int primaryID = setTrackID(aStep);
741 
742  // Reset entry point for new primary
743  resetForNewPrimary(aStep);
744 
745  auto const theTrack = aStep->GetTrack();
746  int det = 5;
747 
749  edepositEM = 1.*GeV;
750  edepositHAD = 0.;
751  } else {
752  edepositEM = 0.;
753  edepositHAD = 1.*GeV;
754  }
755 #ifdef EDM_ML_DEBUG
756  edm::LogVerbatim("HcalSim") << "HCalSD::getFromLibrary " <<hits.size()
757  << " hits for " << GetName() << " of " << primaryID
758  << " with " << theTrack->GetDefinition()->GetParticleName()
759  << " of " << aStep->GetPreStepPoint()->GetKineticEnergy()/GeV << " GeV";
760 #endif
761  for (unsigned int i=0; i<hits.size(); ++i) {
762  G4ThreeVector hitPoint = hits[i].position;
763  if (isItinFidVolume (hitPoint)) {
764  int depth = hits[i].depth;
765  double time = hits[i].time;
766  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
767  currentID.setID(unitID, time, primaryID, 0);
768 #ifdef plotDebug
769  plotProfile(aStep, hitPoint, 1.0*GeV, time, depth);
770  bool emType = G4TrackToParticleID::isGammaElectronPositron(parCode);
771  plotHF(hitPoint,emType);
772 #endif
773  processHit(aStep);
774  }
775  }
776 }
float edepositEM
Definition: CaloSD.h:130
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:112
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1020
void processHit(const G4Step *step)
Definition: CaloSD.h:102
float edepositHAD
Definition: CaloSD.h:130
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:447
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1069
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:132
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:718
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:92
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:621
static bool isGammaElectronPositron(int pdgCode)
bool HCalSD::getFromLibrary ( const G4Step *  aStep)
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 316 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.

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

Definition at line 820 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().

820  {
821 
822  std::vector<HFShowerParam::Hit> hits = showerParam.get()->getHits(aStep, weight_, isKilled);
823  if(!isKilled || hits.empty()) { return; }
824 
825  int primaryID = setTrackID(aStep);
826  int det = 5;
827 
828 #ifdef EDM_ML_DEBUG
829  edm::LogVerbatim("HcalSim") << "HCalSD::getFromParam " << hits.size() << " hits for "
830  << GetName() << " of " << primaryID << " with "
831  << aStep->GetTrack()->GetDefinition()->GetParticleName()
832  << " of " << preStepPoint->GetKineticEnergy()/GeV
833  << " GeV in detector type " << det;
834 #endif
835  for (unsigned int i=0; i<hits.size(); ++i) {
836  G4ThreeVector hitPoint = hits[i].position;
837  int depth = hits[i].depth;
838  double time = hits[i].time;
839  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
840  currentID.setID(unitID, time, primaryID, 0);
841  edepositEM = hits[i].edep*GeV;
842  edepositHAD = 0.;
843 #ifdef plotDebug
844  plotProfile(aStep, hitPoint, edepositEM, time, depth);
845 #endif
846  processHit(aStep);
847  }
848 }
float edepositEM
Definition: CaloSD.h:130
const double GeV
Definition: MathUtil.h:16
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:94
double weight_
Definition: HCalSD.h:112
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1020
void processHit(const G4Step *step)
Definition: CaloSD.h:102
float edepositHAD
Definition: CaloSD.h:130
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:132
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:621
void HCalSD::getHitFibreBundle ( const G4Step *  step,
bool  type 
)
private

Definition at line 911 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().

911  {
912  auto const preStepPoint = aStep->GetPreStepPoint();
913  auto const theTrack = aStep->GetTrack();
914  double edep = showerBundle.get()->getHits(aStep, type);
915 
916  if (edep >= 0.0) {
917  edep *= GeV;
918  double etrack = preStepPoint->GetKineticEnergy();
919  int primaryID = 0;
920  if (etrack >= energyCut) {
921  primaryID = theTrack->GetTrackID();
922  } else {
923  primaryID = theTrack->GetParentID();
924  if (primaryID == 0) primaryID = theTrack->GetTrackID();
925  }
926  // Reset entry point for new primary
927  resetForNewPrimary(aStep);
928  //
929  int det = static_cast<int>(HcalForward);
930  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
931  double rr = hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y();
932  double phi = rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x());
933  double etaR = showerBundle->getRadius();
934  int depth = 1;
935  if (etaR < 0.) {
936  depth = 2;
937  etaR =-etaR;
938  }
939  if (hitPoint.z() < 0.) etaR =-etaR;
940 #ifdef EDM_ML_DEBUG
941  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det
942  << " etaR " << etaR << " phi " << phi/deg
943  << " depth " << depth;
944 #endif
945  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
946  uint32_t unitID = 0;
947  if (numberingFromDDD) {
948  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det,etaR,phi,depth,1);
949  unitID = setDetUnitId(tmp);
950  }
951  if (type) currentID.setID(unitID, time, primaryID, 3);
952  else currentID.setID(unitID, time, primaryID, 2);
953 
954  edepositHAD = aStep->GetTotalEnergyDeposit();
955  edepositEM =-edepositHAD + edep;
956 #ifdef plotDebug
957  plotProfile(aStep, hitPoint, edep, time, depth);
958 #endif
959 #ifdef EDM_ML_DEBUG
960  double beta = preStepPoint->GetBeta();
961  edm::LogVerbatim("HcalSim") << "HCalSD::getHitFibreBundle 1 hit for "
962  << GetName() << " of " << primaryID << " with "
963  << theTrack->GetDefinition()->GetParticleName()
964  << " of " << preStepPoint->GetKineticEnergy()/GeV
965  << " GeV with velocity " << beta << " UnitID "
966  << std::hex << unitID << std::dec;
967 #endif
968  processHit(aStep);
969  } // non-zero energy deposit
970 }
float edepositEM
Definition: CaloSD.h:130
double energyCut
Definition: CaloSD.h:134
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:1020
void processHit(const G4Step *step)
Definition: CaloSD.h:102
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:90
float edepositHAD
Definition: CaloSD.h:130
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:447
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:132
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:96
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void HCalSD::getHitPMT ( const G4Step *  step)
private

Definition at line 850 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().

850  {
851 
852  auto const preStepPoint = aStep->GetPreStepPoint();
853  auto const theTrack = aStep->GetTrack();
854  double edep = showerPMT->getHits(aStep);
855 
856  if (edep >= 0.) {
857  edep *= GeV;
858  double etrack = preStepPoint->GetKineticEnergy();
859  int primaryID = 0;
860  if (etrack >= energyCut) {
861  primaryID = theTrack->GetTrackID();
862  } else {
863  primaryID = theTrack->GetParentID();
864  if (primaryID == 0) primaryID = theTrack->GetTrackID();
865  }
866  // Reset entry point for new primary
867  resetForNewPrimary(aStep);
868  //
869  int det = static_cast<int>(HcalForward);
870  const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
871  double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
872  double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
873  double etaR = showerPMT->getRadius();
874  int depth = 1;
875  if (etaR < 0) {
876  depth = 2;
877  etaR =-etaR;
878  }
879  if (hitPoint.z() < 0) etaR =-etaR;
880 #ifdef EDM_ML_DEBUG
881  edm::LogVerbatim("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR "
882  << etaR << " phi " << phi/deg << " depth " <<depth;
883 #endif
884  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
885  uint32_t unitID = 0;
886  if (numberingFromDDD) {
887  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det,etaR,phi,
888  depth,1);
889  unitID = setDetUnitId(tmp);
890  }
891  currentID.setID(unitID, time, primaryID, 1);
892 
893  edepositHAD = aStep->GetTotalEnergyDeposit();
894  edepositEM =-edepositHAD + edep;
895 #ifdef plotDebug
896  plotProfile(aStep, hitPoint, edep, time, depth);
897 #endif
898 #ifdef EDM_ML_DEBUG
899  double beta = preStepPoint->GetBeta();
900  edm::LogVerbatim("HcalSim") << "HCalSD::getHitPMT 1 hit for " << GetName()
901  << " of " << primaryID << " with "
902  << theTrack->GetDefinition()->GetParticleName()
903  << " of " << preStepPoint->GetKineticEnergy()/GeV
904  << " GeV with velocity " << beta << " UnitID "
905  << std::hex << unitID << std::dec;
906 #endif
907  processHit(aStep);
908  }
909 }
float edepositEM
Definition: CaloSD.h:130
double energyCut
Definition: CaloSD.h:134
const double GeV
Definition: MathUtil.h:16
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1020
void processHit(const G4Step *step)
Definition: CaloSD.h:102
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:95
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:90
float edepositHAD
Definition: CaloSD.h:130
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:447
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:132
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< G4String > HCalSD::getNames ( DDFilteredView fv)
private

Definition at line 651 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.

651  {
652 
653  std::vector<G4String> tmp;
654  bool dodet = fv.firstChild();
655  while (dodet) {
656  const DDLogicalPart & log = fv.logicalPart();
657  bool ok = true;
658 
659  for (unsigned int i=0; i<tmp.size(); ++i) {
660  if (!strcmp(tmp[i].c_str(), log.name().name().c_str())) {
661  ok = false;
662  break;
663  }
664  }
665  if (ok) tmp.push_back(log.name().name());
666  dodet = fv.next();
667  }
668  return tmp;
669 }
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 778 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().

778  { // if not ParamShower
779 
780  std::vector<HFShower::Hit> hits = hfshower.get()->getHits(aStep, weight_);
781  if(hits.empty()) { return; }
782 
783  auto const theTrack = aStep->GetTrack();
784  int primaryID = setTrackID(aStep);
785  int det = 5;
786 
788  edepositEM = 1.*GeV;
789  edepositHAD = 0.;
790  } else {
791  edepositEM = 0.;
792  edepositHAD = 1.*GeV;
793  }
794 
795 #ifdef EDM_ML_DEBUG
796  edm::LogVerbatim("HcalSim") << "HCalSD::hitForFibre " << hits.size()
797  << " hits for " << GetName() << " of " << primaryID
798  << " with " << theTrack->GetDefinition()->GetParticleName()
799  << " of " << preStepPoint->GetKineticEnergy()/GeV
800  << " GeV in detector type " << det;
801 #endif
802 
803  for (unsigned int i=0; i<hits.size(); ++i) {
804  G4ThreeVector hitPoint = hits[i].position;
805  if (isItinFidVolume (hitPoint)) {
806  int depth = hits[i].depth;
807  double time = hits[i].time;
808  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
809  currentID.setID(unitID, time, primaryID, 0);
810 #ifdef plotDebug
811  plotProfile(aStep, hitPoint, edepositEM, time, depth);
812  bool emType = (edepositEM > 0.) ? true : false;
813  plotHF(hitPoint,emType);
814 #endif
815  processHit(aStep);
816  }
817  }
818 }
float edepositEM
Definition: CaloSD.h:130
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:112
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1020
void processHit(const G4Step *step)
Definition: CaloSD.h:102
float edepositHAD
Definition: CaloSD.h:130
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1069
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:132
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:718
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:621
static bool isGammaElectronPositron(int pdgCode)
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:93
void HCalSD::initRun ( )
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 574 of file HCalSD.cc.

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

574  {
575  if (showerLibrary.get()) showerLibrary.get()->initRun(nullptr, hcalConstants);
576  if (showerParam.get()) showerParam.get()->initRun(hcalConstants);
577  if (hfshower.get()) hfshower.get()->initRun(hcalConstants);
578  if (showerPMT.get()) showerPMT.get()->initRun(hcalConstants);
579  if (showerBundle.get()) showerBundle.get()->initRun(hcalConstants);
580 }
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:98
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:94
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:95
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:96
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:92
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:93
bool HCalSD::isItConicalBundle ( const G4LogicalVolume *  lv)
private

Definition at line 708 of file HCalSD.cc.

References fibre2LV.

Referenced by getEnergyDeposit().

708  {
709  for (auto lvol : fibre2LV) if (lv == lvol) { return true; }
710  return false;
711 }
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:118
bool HCalSD::isItFibre ( const G4LogicalVolume *  lv)
private

Definition at line 688 of file HCalSD.cc.

References fibreLV.

Referenced by getEnergyDeposit(), and HCalSD().

688  {
689  for (auto lvol : fibreLV) if (lv == lvol) { return true; }
690  return false;
691 }
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:118
bool HCalSD::isItFibre ( const G4String &  name)
private

Definition at line 693 of file HCalSD.cc.

References fibreNames.

693  {
694  for (auto nam : fibreNames) if (name == nam) { return true; }
695  return false;
696 }
std::vector< G4String > fibreNames
Definition: HCalSD.h:116
bool HCalSD::isItHF ( const G4Step *  aStep)
private

Definition at line 671 of file HCalSD.cc.

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

Referenced by getFromLibrary(), and HCalSD().

671  {
672  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
673  int levels = (touch->GetHistoryDepth()) + 1;
674  for (unsigned int it=0; it < hfNames.size(); ++it) {
675  if (levels >= hfLevels[it]) {
676  const G4LogicalVolume* lv = touch->GetVolume(levels-hfLevels[it])->GetLogicalVolume();
677  if (lv == hfLV[it]) return true;
678  }
679  }
680  return false;
681 }
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:118
std::vector< int > hfLevels
Definition: HCalSD.h:115
std::vector< G4String > hfNames
Definition: HCalSD.h:116
bool HCalSD::isItHF ( const G4String &  name)
private

Definition at line 683 of file HCalSD.cc.

References hfNames.

683  {
684  for (auto nam : hfNames) if (name == nam) { return true; }
685  return false;
686 }
std::vector< G4String > hfNames
Definition: HCalSD.h:116
bool HCalSD::isItinFidVolume ( const G4ThreeVector &  hitPoint)
private

Definition at line 718 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

718  {
719  bool flag = true;
720  if (applyFidCut) {
721  int npmt = HFFibreFiducial::PMTNumber(hitPoint);
722 #ifdef EDM_ML_DEBUG
723  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt
724  << " for hit point " << hitPoint;
725 #endif
726  if (npmt <= 0) flag = false;
727  }
728 #ifdef EDM_ML_DEBUG
729  edm::LogVerbatim("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint
730  << " return flag " << flag;
731 #endif
732  return flag;
733 }
bool applyFidCut
Definition: HCalSD.h:109
int PMTNumber(const G4ThreeVector &pe_effect)
bool HCalSD::isItPMT ( const G4LogicalVolume *  lv)
private

Definition at line 698 of file HCalSD.cc.

References pmtLV.

Referenced by getEnergyDeposit().

698  {
699  for (auto lvol : pmtLV) if (lv == lvol) { return true; }
700  return false;
701 }
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:118
bool HCalSD::isItScintillator ( const G4Material *  mat)
private

Definition at line 713 of file HCalSD.cc.

References materials.

Referenced by getEnergyDeposit().

713  {
714  for (auto amat : materials) if (amat == mat) { return true; }
715  return false;
716 }
std::vector< const G4Material * > materials
Definition: HCalSD.h:117
bool HCalSD::isItStraightBundle ( const G4LogicalVolume *  lv)
private

Definition at line 703 of file HCalSD.cc.

References fibre1LV.

Referenced by getEnergyDeposit().

703  {
704  for (auto lvol : fibre1LV) if (lv == lvol) { return true; }
705  return false;
706 }
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:118
double HCalSD::layerWeight ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay 
)
private

Definition at line 998 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().

998  {
999 
1000  double wt = 1.;
1001  if (numberingFromDDD) {
1002  //get the ID's as eta, phi, depth, ... indices
1003  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det, pos,
1004  depth, lay);
1005  modifyDepth(tmp);
1006  uint32_t id = HcalTestNumbering::packHcalIndex(tmp.subdet, tmp.zside, 1,
1007  tmp.etaR, tmp.phis,tmp.lay);
1008  std::map<uint32_t,double>::const_iterator ite = layerWeights.find(id);
1009  if (ite != layerWeights.end()) wt = ite->second;
1010 #ifdef EDM_ML_DEBUG
1011  edm::LogVerbatim("HcalSim") << "HCalSD::layerWeight: ID " << std::hex << id
1012  << std::dec << " (" << tmp.subdet << "/"
1013  << tmp.zside << "/1/" << tmp.etaR << "/"
1014  << tmp.phis << "/" << tmp.lay << ") Weight " <<wt;
1015 #endif
1016  }
1017  return wt;
1018 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1078
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:90
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define EDM_ML_DEBUG
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:119
void HCalSD::modifyDepth ( HcalNumberingFromDDD::HcalID id)
private

Definition at line 1078 of file HCalSD.cc.

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

Referenced by layerWeight(), and setDetUnitId().

1078  {
1079  if (id.subdet == 4) {
1080  int ieta = (id.zside == 0) ? -id.etaR : id.etaR;
1081  if (hcalConstants->maxHFDepth(ieta,id.phis) > 2) {
1082  if (id.depth <= 2) {
1083  if (G4UniformRand() > 0.5) id.depth += 2;
1084  }
1085  }
1086  } else if ((id.subdet == 1 || id.subdet ==2) && testNumber) {
1087  id.depth = (depth_ == 0) ? 1 : 2;
1088  }
1089 }
const HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:98
bool testNumber
Definition: HCalSD.h:107
int depth_
Definition: HCalSD.h:113
int maxHFDepth(const int &ieta, const int &iphi) const
void HCalSD::plotHF ( const G4ThreeVector &  pos,
bool  emType 
)
private

Definition at line 1069 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

1069  {
1070  double zv = std::abs(hitPoint.z()) - gpar[4];
1071  if (emType) {
1072  if (hzvem != nullptr) hzvem->Fill(zv);
1073  } else {
1074  if (hzvhad != nullptr) hzvhad->Fill(zv);
1075  }
1076 }
std::vector< double > gpar
Definition: HCalSD.h:114
TH1F * hzvhad
Definition: HCalSD.h:120
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * hzvem
Definition: HCalSD.h:120
void HCalSD::plotProfile ( const G4Step *  step,
const G4ThreeVector &  pos,
double  edep,
double  time,
int  id 
)
private

Definition at line 1020 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().

1021  {
1022 
1023  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1024  static const G4String modName[8] = {"HEModule", "HVQF" , "HBModule", "MBAT",
1025  "MBBT" , "MBBTC", "MBBT_R1P", "MBBT_R1M"};
1026  G4ThreeVector local;
1027  bool found=false;
1028  double depth=-2000;
1029  int idx = 4;
1030  for (int n=0; n<touch->GetHistoryDepth(); ++n) {
1031  G4String name = touch->GetVolume(n)->GetName();
1032 #ifdef EDM_ML_DEBUG
1033  edm::LogVerbatim("HcalSim") << "plotProfile Depth " << n << " Name "
1034  << name;
1035 #endif
1036  for (unsigned int ii=0; ii<8; ++ii) {
1037  if (name == modName[ii]) {
1038  found = true;
1039  int dn = touch->GetHistoryDepth() - n;
1040  local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1041  if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1042  else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1043  else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1044  else {depth = local.y() + 15.; idx = 2;}
1045  break;
1046  }
1047  }
1048  if (found) break;
1049  }
1050  if (!found) depth = std::abs(global.z()) - 11500;
1051 #ifdef EDM_ML_DEBUG
1052  edm::LogVerbatim("HcalSim") << "plotProfile Found " << found << " Global "
1053  << global << " Local " << local << " depth "
1054  << depth << " ID " << id << " EDEP " << edep
1055  << " Time " << time;
1056 #endif
1057  if (hit_[idx] != nullptr) hit_[idx]->Fill(edep);
1058  if (time_[idx] != nullptr) time_[idx]->Fill(time,edep);
1059  if (dist_[idx] != nullptr) dist_[idx]->Fill(depth,edep);
1060  int jd = 2*idx + id - 7;
1061  if (jd >= 0 && jd < 4) {
1062  jd += 5;
1063  if (hit_[jd] != nullptr) hit_[jd]->Fill(edep);
1064  if (time_[jd] != nullptr) time_[jd]->Fill(time,edep);
1065  if (dist_[jd] != nullptr) dist_[jd]->Fill(depth,edep);
1066  }
1067 }
TH1F * time_[9]
Definition: HCalSD.h:120
TH1F * hit_[9]
Definition: HCalSD.h:120
TH1F * dist_[9]
Definition: HCalSD.h:120
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 972 of file HCalSD.cc.

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

Referenced by HCalSD().

972  {
973 
974  std::ifstream infile;
975  int entry=0;
976  infile.open(fName.c_str(), std::ios::in);
977  if (infile) {
978  int det, zside, etaR, phi, lay;
979  double wt;
980  while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
981  uint32_t id = HcalTestNumbering::packHcalIndex(det,zside,1,etaR,phi,lay);
982  layerWeights.insert(std::pair<uint32_t,double>(id,wt));
983  ++entry;
984 #ifdef EDM_ML_DEBUG
985  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile:Entry " << entry
986  << " ID " << std::hex << id << std::dec << " ("
987  << det << "/" << zside << "/1/" << etaR << "/"
988  << phi << "/" << lay << ") Weight " << wt;
989 #endif
990  }
991  infile.close();
992  }
993  edm::LogVerbatim("HcalSim") << "HCalSD::readWeightFromFile: reads " << entry
994  << " weights from " << fName;
995  if (entry <= 0) useLayerWt = false;
996 }
bool useLayerWt
Definition: HCalSD.h:106
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:119
uint32_t HCalSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements CaloSD.

Definition at line 515 of file HCalSD.cc.

References egammaForCoreTracking_cff::depth.

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

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

Definition at line 600 of file HCalSD.cc.

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

600  {
601  uint32_t id = 0;
602  if (numberingFromDDD.get()) {
603  //get the ID's as eta, phi, depth, ... indices
604  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det, pos, depth, lay);
605  id = setDetUnitId(tmp);
606  }
607  return id;
608 }
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:90
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:515
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
uint32_t HCalSD::setDetUnitId ( HcalNumberingFromDDD::HcalID tmp)
private

Definition at line 610 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.

610  {
611  modifyDepth(tmp);
612  uint32_t id = (numberingScheme.get()) ? numberingScheme.get()->getUnitID(tmp) : 0;
613  if ((!testNumber) && m_HcalTestNS.get()) {
614  bool ok = m_HcalTestNS.get()->compare(tmp,id);
615  if (!ok)
616  edm::LogWarning("HcalSim") << "Det ID from HCalSD " << HcalDetId(id)
617  << " " << std::hex << id << std::dec
618  << " does not match one from relabller for "
619  << tmp.subdet << ":" << tmp.etaR << ":"
620  << tmp.phi << ":" << tmp.phis << ":"
621  << tmp.depth << ":" << tmp.lay << std::endl;
622  }
623  return id;
624 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1078
bool testNumber
Definition: HCalSD.h:107
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:102
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:91
void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 528 of file HCalSD.cc.

References numberingScheme.

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

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

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 536 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().

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

Member Data Documentation

bool HCalSD::agingFlagHB
private

Definition at line 105 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::agingFlagHE
private

Definition at line 105 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::applyFidCut
private

Definition at line 109 of file HCalSD.h.

Referenced by HCalSD(), and isItinFidVolume().

double HCalSD::betaThr
private

Definition at line 108 of file HCalSD.h.

Referenced by HCalSD().

double HCalSD::birk1
private

Definition at line 108 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk2
private

Definition at line 108 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk3
private

Definition at line 108 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::deliveredLumi
private

Definition at line 111 of file HCalSD.h.

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

int HCalSD::depth_
private

Definition at line 113 of file HCalSD.h.

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

TH1F * HCalSD::dist_[9]
private

Definition at line 120 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

double HCalSD::eminHitHB
private

Definition at line 110 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHE
private

Definition at line 110 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHF
private

Definition at line 110 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHO
private

Definition at line 110 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

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

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and isItStraightBundle().

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

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and isItConicalBundle().

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

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 114 of file HCalSD.h.

Referenced by plotHF(), and update().

const HcalDDDSimConstants* HCalSD::hcalConstants
private

Definition at line 98 of file HCalSD.h.

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

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 93 of file HCalSD.h.

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

TH1F* HCalSD::hit_[9]
private

Definition at line 120 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

TH1F * HCalSD::hzvem
private

Definition at line 120 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

TH1F * HCalSD::hzvhad
private

Definition at line 120 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

bool HCalSD::isHF
private

Definition at line 104 of file HCalSD.h.

Referenced by getEnergyDeposit(), and getFromLibrary().

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

Definition at line 119 of file HCalSD.h.

Referenced by layerWeight(), and readWeightFromFile().

const HBHEDarkening* HCalSD::m_HBDarkening
private

Definition at line 99 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 102 of file HCalSD.h.

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

const HBHEDarkening* HCalSD::m_HEDarkening
private

Definition at line 100 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 101 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

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

Definition at line 117 of file HCalSD.h.

Referenced by HCalSD(), and isItScintillator().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::neutralDensity
private

Definition at line 107 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

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

Definition at line 90 of file HCalSD.h.

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

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

Definition at line 91 of file HCalSD.h.

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

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

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and isItPMT().

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

Definition at line 96 of file HCalSD.h.

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

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

Definition at line 92 of file HCalSD.h.

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

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

Definition at line 94 of file HCalSD.h.

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

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

Definition at line 95 of file HCalSD.h.

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

bool HCalSD::testNS_
private

Definition at line 107 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::testNumber
private

Definition at line 107 of file HCalSD.h.

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

TH1F * HCalSD::time_[9]
private

Definition at line 120 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

bool HCalSD::useBirk
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useFibreBundle
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useHF
private

Definition at line 109 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::useLayerWt
private

Definition at line 106 of file HCalSD.h.

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

bool HCalSD::useParam
private

Definition at line 109 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

bool HCalSD::usePMTHit
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useShowerLibrary
private

Definition at line 109 of file HCalSD.h.

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

double HCalSD::weight_
private