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 *)
 
double getAttenuation (const G4Step *aStep, double birk1, double birk2, double birk3) const
 
virtual uint16_t getDepth (const G4Step *)
 
int getNumberOfHits ()
 
double getResponseWt (const G4Track *)
 
virtual int getTrackID (const G4Track *)
 
bool hitExists (const G4Step *)
 
void 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
 
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, LogDebug, 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  LogDebug("HcalSim") << "***************************************************"
102  << "\n"
103  << "* Constructing a HCalSD with name " << name << "\n"
104  << "\n"
105  << "***************************************************";
106 #endif
107  edm::LogInfo("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::LogInfo("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::LogInfo("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::LogInfo("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 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void readWeightFromFile(const std::string &)
Definition: HCalSD.cc:960
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:116
bool useParam
Definition: HCalSD.h:107
double eminHitHE
Definition: HCalSD.h:108
TH1F * time_[9]
Definition: HCalSD.h:118
double kmaxNeutron
Definition: CaloSD.h:137
const N & name() const
Definition: DDBase.h:78
bool useLayerWt
Definition: HCalSD.h:104
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:92
double weight_
Definition: HCalSD.h:110
bool useFibreBundle
Definition: HCalSD.h:104
double betaThr
Definition: HCalSD.h:106
double deliveredLumi
Definition: HCalSD.h:109
double eminHitHB
Definition: HCalSD.h:108
bool useShowerLibrary
Definition: HCalSD.h:107
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:615
double birk2
Definition: HCalSD.h:106
bool usePMTHit
Definition: HCalSD.h:104
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:116
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:519
bool agingFlagHE
Definition: HCalSD.h:103
double birk1
Definition: HCalSD.h:106
double kmaxProton
Definition: CaloSD.h:137
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:93
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:118
double eminHitHF
Definition: HCalSD.h:108
const double MeV
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:88
TH1F * hit_[9]
Definition: HCalSD.h:118
bool agingFlagHB
Definition: HCalSD.h:103
bool testNumber
Definition: HCalSD.h:105
double kmaxIon
Definition: CaloSD.h:137
bool suppressHeavy
Definition: CaloSD.h:136
const std::vector< std::string > & getNames() const
bool useBirk
Definition: HCalSD.h:104
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:99
double birk3
Definition: HCalSD.h:106
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:98
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
bool isAvailable() const
Definition: Service.h:46
bool applyFidCut
Definition: HCalSD.h:107
TH1F * dist_[9]
Definition: HCalSD.h:118
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:100
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
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:113
bool testNS_
Definition: HCalSD.h:105
double eminHitHO
Definition: HCalSD.h:108
TH1F * hzvem
Definition: HCalSD.h:118
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:116
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
bool neutralDensity
Definition: HCalSD.h:105
bool isHF
Definition: HCalSD.h:102
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:94
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:90
int depth_
Definition: HCalSD.h:111
bool isItHF(const G4Step *)
Definition: HCalSD.cc:660
std::vector< G4String > fibreNames
Definition: HCalSD.h:114
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:89
std::vector< G4String > hfNames
Definition: HCalSD.h:114
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:91
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:116
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:116
std::vector< const G4Material * > materials
Definition: HCalSD.h:115
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:97
const std::string & name() const
Returns the name.
Definition: DDName.cc:88
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< G4String > matNames
Definition: HCalSD.h:114
bool useHF
Definition: HCalSD.h:107
bool isItFibre(const G4LogicalVolume *)
Definition: HCalSD.cc:677
void setParameterized(bool val)
Definition: CaloSD.h:97
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:96
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::LogInfo("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 571 of file HCalSD.cc.

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

571  {
572  double threshold=0;
573  DetId theId(aHit->getUnitID());
574  switch (theId.subdetId()) {
575  case HcalBarrel:
576  threshold = eminHitHB; break;
577  case HcalEndcap:
578  threshold = eminHitHE; break;
579  case HcalOuter:
580  threshold = eminHitHO; break;
581  case HcalForward:
582  threshold = eminHitHF; break;
583  default:
584  break;
585  }
586  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
587 }
double eminHitHE
Definition: HCalSD.h:108
double eminHitHB
Definition: HCalSD.h:108
double eminHitHF
Definition: HCalSD.h:108
double eminHitHO
Definition: HCalSD.h:108
double tmaxHit
Definition: CaloSD.h:132
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 615 of file HCalSD.cc.

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

Referenced by HCalSD().

616  {
617 #ifdef EDM_ML_DEBUG
618  LogDebug("HcalSim") << "HCalSD:getDDDArray called for " << str;
619 #endif
620  DDValue value(str);
621  if (DDfetch(&sv,value)) {
622 #ifdef EDM_ML_DEBUG
623  LogDebug("HcalSim") << value;
624 #endif
625  const std::vector<double> & fvec = value.doubles();
626  int nval = fvec.size();
627  if (nval < 1) {
628  edm::LogError("HcalSim") << "HCalSD : # of " << str << " bins " << nval
629  << " < 2 ==> illegal";
630  throw cms::Exception("Unknown", "HCalSD") << "nval < 2 for array " << str << "\n";
631  }
632 
633  return fvec;
634  } else {
635  edm::LogError("HcalSim") << "HCalSD : cannot get array " << str;
636  throw cms::Exception("Unknown", "HCalSD") << "cannot get array " << str << "\n";
637  }
638 }
#define LogDebug(id)
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 382 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().

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

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

724  {
725 
726  std::vector<HFShowerLibrary::Hit> hits = showerLibrary.get()->getHits(aStep, isKilled, weight_, false);
727  if(!isKilled || hits.empty()) { return; }
728 
729  int primaryID = setTrackID(aStep);
730 
731  // Reset entry point for new primary
732  resetForNewPrimary(aStep);
733 
734  auto const theTrack = aStep->GetTrack();
735  int det = 5;
736 
738  edepositEM = 1.*GeV;
739  edepositHAD = 0.;
740  } else {
741  edepositEM = 0.;
742  edepositHAD = 1.*GeV;
743  }
744 #ifdef EDM_ML_DEBUG
745  edm::LogInfo("HcalSim") << "HCalSD::getFromLibrary " <<hits.size()
746  << " hits for " << GetName() << " of " << primaryID
747  << " with " << theTrack->GetDefinition()->GetParticleName()
748  << " of " << aStep->GetPreStepPoint()->GetKineticEnergy()/GeV << " GeV";
749 #endif
750  for (unsigned int i=0; i<hits.size(); ++i) {
751  G4ThreeVector hitPoint = hits[i].position;
752  if (isItinFidVolume (hitPoint)) {
753  int depth = hits[i].depth;
754  double time = hits[i].time;
755  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
756  currentID.setID(unitID, time, primaryID, 0);
757 #ifdef plotDebug
758  plotProfile(aStep, hitPoint, 1.0*GeV, time, depth);
759  bool emType = G4TrackToParticleID::isGammaElectronPositron(parCode);
760  plotHF(hitPoint,emType);
761 #endif
762  processHit(aStep);
763  }
764  }
765 }
float edepositEM
Definition: CaloSD.h:128
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:110
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1008
void processHit(const G4Step *step)
Definition: CaloSD.h:100
float edepositHAD
Definition: CaloSD.h:128
void resetForNewPrimary(const G4Step *)
Definition: CaloSD.cc:447
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1055
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:506
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:130
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:707
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:90
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:615
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(), LogDebug, 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::LogInfo("HcalSim") << "HCalSD::getFromLibrary: HFLumiDarkening at r= "
341  << r << ", z= " << z << " Dose= " << dose_acquired
342  << " weight= " << weight_;
343 #endif
344  }
345 
346  if (useParam) {
347  getFromParam(aStep, kill);
348 #ifdef EDM_ML_DEBUG
349  G4String nameVolume = lv->GetName();
350  LogDebug("HcalSim") << "HCalSD: " << getNumberOfHits()
351  << " hits from parametrization in " << nameVolume
352  << " for Track " << track->GetTrackID()
353  <<" (" << track->GetDefinition()->GetParticleName()
354  <<")";
355 #endif
359 #ifdef EDM_ML_DEBUG
360  auto nameVolume =
361  aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName();
362  edm::LogInfo("HcalSim") << "HCalSD: Starts shower library from "
363  << nameVolume << " for Track "
364  << track->GetTrackID() << " ("
365  << track->GetDefinition()->GetParticleName() << ")";
366 
367 #endif
368  getFromHFLibrary(aStep, kill);
369  }
370  }
371  }
372 #ifdef EDM_ML_DEBUG
373  edm::LogInfo("HcalSim") << "HCalSD::getFromLibrary ID= "
374  << track->GetTrackID() << " ("
375  << track->GetDefinition()->GetParticleName()
376  << ") kill= " << kill << " weight= " << weight_
377  << " depth= " << depth_ << " isHF: " << isHF;
378 #endif
379  return kill;
380 }
#define LogDebug(id)
bool useParam
Definition: HCalSD.h:107
static bool isMuon(int pdgCode)
double weight_
Definition: HCalSD.h:110
double deliveredLumi
Definition: HCalSD.h:109
bool useShowerLibrary
Definition: HCalSD.h:107
static const unsigned int numberOfZLayers
Definition: HFDarkening.h:26
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:99
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:809
void getFromHFLibrary(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:724
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:102
int depth_
Definition: HCalSD.h:111
bool isItHF(const G4Step *)
Definition: HCalSD.cc:660
static bool isGammaElectronPositron(int pdgCode)
void HCalSD::getFromParam ( const G4Step *  step,
bool &  isKilled 
)
private

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

809  {
810 
811  std::vector<HFShowerParam::Hit> hits = showerParam.get()->getHits(aStep, weight_, isKilled);
812  if(!isKilled || hits.empty()) { return; }
813 
814  int primaryID = setTrackID(aStep);
815  int det = 5;
816 
817 #ifdef EDM_ML_DEBUG
818  edm::LogInfo("HcalSim") << "HCalSD::getFromParam " << hits.size() << " hits for "
819  << GetName() << " of " << primaryID << " with "
820  << aStep->GetTrack()->GetDefinition()->GetParticleName()
821  << " of " << preStepPoint->GetKineticEnergy()/GeV
822  << " GeV in detector type " << det;
823 #endif
824  for (unsigned int i=0; i<hits.size(); ++i) {
825  G4ThreeVector hitPoint = hits[i].position;
826  int depth = hits[i].depth;
827  double time = hits[i].time;
828  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
829  currentID.setID(unitID, time, primaryID, 0);
830  edepositEM = hits[i].edep*GeV;
831  edepositHAD = 0.;
832 #ifdef plotDebug
833  plotProfile(aStep, hitPoint, edepositEM, time, depth);
834 #endif
835  processHit(aStep);
836  }
837 }
float edepositEM
Definition: CaloSD.h:128
const double GeV
Definition: MathUtil.h:16
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:92
double weight_
Definition: HCalSD.h:110
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1008
void processHit(const G4Step *step)
Definition: CaloSD.h:100
float edepositHAD
Definition: CaloSD.h:128
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:506
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:130
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:615
void HCalSD::getHitFibreBundle ( const G4Step *  step,
bool  type 
)
private

Definition at line 900 of file HCalSD.cc.

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

Referenced by getEnergyDeposit().

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

Definition at line 839 of file HCalSD.cc.

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

Referenced by getEnergyDeposit().

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

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

640  {
641 
642  std::vector<G4String> tmp;
643  bool dodet = fv.firstChild();
644  while (dodet) {
645  const DDLogicalPart & log = fv.logicalPart();
646  bool ok = true;
647 
648  for (unsigned int i=0; i<tmp.size(); ++i) {
649  if (!strcmp(tmp[i].c_str(), log.name().name().c_str())) {
650  ok = false;
651  break;
652  }
653  }
654  if (ok) tmp.push_back(log.name().name());
655  dodet = fv.next();
656  }
657  return tmp;
658 }
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:78
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:92
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:88
void HCalSD::hitForFibre ( const G4Step *  step)
private

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

767  { // if not ParamShower
768 
769  std::vector<HFShower::Hit> hits = hfshower.get()->getHits(aStep, weight_);
770  if(hits.empty()) { return; }
771 
772  auto const theTrack = aStep->GetTrack();
773  int primaryID = setTrackID(aStep);
774  int det = 5;
775 
777  edepositEM = 1.*GeV;
778  edepositHAD = 0.;
779  } else {
780  edepositEM = 0.;
781  edepositHAD = 1.*GeV;
782  }
783 
784 #ifdef EDM_ML_DEBUG
785  edm::LogInfo("HcalSim") << "HCalSD::hitForFibre " << hits.size()
786  << " hits for " << GetName() << " of " << primaryID
787  << " with " << theTrack->GetDefinition()->GetParticleName()
788  << " of " << preStepPoint->GetKineticEnergy()/GeV
789  << " GeV in detector type " << det;
790 #endif
791 
792  for (unsigned int i=0; i<hits.size(); ++i) {
793  G4ThreeVector hitPoint = hits[i].position;
794  if (isItinFidVolume (hitPoint)) {
795  int depth = hits[i].depth;
796  double time = hits[i].time;
797  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
798  currentID.setID(unitID, time, primaryID, 0);
799 #ifdef plotDebug
800  plotProfile(aStep, hitPoint, edepositEM, time, depth);
801  bool emType = (edepositEM > 0.) ? true : false;
802  plotHF(hitPoint,emType);
803 #endif
804  processHit(aStep);
805  }
806  }
807 }
float edepositEM
Definition: CaloSD.h:128
const double GeV
Definition: MathUtil.h:16
double weight_
Definition: HCalSD.h:110
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1008
void processHit(const G4Step *step)
Definition: CaloSD.h:100
float edepositHAD
Definition: CaloSD.h:128
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1055
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:506
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
CaloHitID currentID
Definition: CaloSD.h:130
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:707
virtual int setTrackID(const G4Step *)
Definition: CaloSD.cc:615
static bool isGammaElectronPositron(int pdgCode)
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:91
void HCalSD::initRun ( )
overrideprotectedvirtual

Reimplemented from CaloSD.

Definition at line 563 of file HCalSD.cc.

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

563  {
564  if (showerLibrary.get()) showerLibrary.get()->initRun(nullptr, hcalConstants);
565  if (showerParam.get()) showerParam.get()->initRun(hcalConstants);
566  if (hfshower.get()) hfshower.get()->initRun(hcalConstants);
567  if (showerPMT.get()) showerPMT.get()->initRun(hcalConstants);
568  if (showerBundle.get()) showerBundle.get()->initRun(hcalConstants);
569 }
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:92
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:93
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:94
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:90
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:91
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:96
bool HCalSD::isItConicalBundle ( const G4LogicalVolume *  lv)
private

Definition at line 697 of file HCalSD.cc.

References fibre2LV.

Referenced by getEnergyDeposit().

697  {
698  for (auto lvol : fibre2LV) if (lv == lvol) { return true; }
699  return false;
700 }
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:116
bool HCalSD::isItFibre ( const G4LogicalVolume *  lv)
private

Definition at line 677 of file HCalSD.cc.

References fibreLV.

Referenced by getEnergyDeposit(), and HCalSD().

677  {
678  for (auto lvol : fibreLV) if (lv == lvol) { return true; }
679  return false;
680 }
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:116
bool HCalSD::isItFibre ( const G4String &  name)
private

Definition at line 682 of file HCalSD.cc.

References fibreNames.

682  {
683  for (auto nam : fibreNames) if (name == nam) { return true; }
684  return false;
685 }
std::vector< G4String > fibreNames
Definition: HCalSD.h:114
bool HCalSD::isItHF ( const G4Step *  aStep)
private

Definition at line 660 of file HCalSD.cc.

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

Referenced by getFromLibrary(), and HCalSD().

660  {
661  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
662  int levels = (touch->GetHistoryDepth()) + 1;
663  for (unsigned int it=0; it < hfNames.size(); ++it) {
664  if (levels >= hfLevels[it]) {
665  const G4LogicalVolume* lv = touch->GetVolume(levels-hfLevels[it])->GetLogicalVolume();
666  if (lv == hfLV[it]) return true;
667  }
668  }
669  return false;
670 }
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:116
std::vector< int > hfLevels
Definition: HCalSD.h:113
std::vector< G4String > hfNames
Definition: HCalSD.h:114
bool HCalSD::isItHF ( const G4String &  name)
private

Definition at line 672 of file HCalSD.cc.

References hfNames.

672  {
673  for (auto nam : hfNames) if (name == nam) { return true; }
674  return false;
675 }
std::vector< G4String > hfNames
Definition: HCalSD.h:114
bool HCalSD::isItinFidVolume ( const G4ThreeVector &  hitPoint)
private

Definition at line 707 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

707  {
708  bool flag = true;
709  if (applyFidCut) {
710  int npmt = HFFibreFiducial::PMTNumber(hitPoint);
711 #ifdef EDM_ML_DEBUG
712  edm::LogInfo("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt
713  << " for hit point " << hitPoint;
714 #endif
715  if (npmt <= 0) flag = false;
716  }
717 #ifdef EDM_ML_DEBUG
718  edm::LogInfo("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint
719  << " return flag " << flag;
720 #endif
721  return flag;
722 }
static int PMTNumber(const G4ThreeVector &pe_effect)
bool applyFidCut
Definition: HCalSD.h:107
bool HCalSD::isItPMT ( const G4LogicalVolume *  lv)
private

Definition at line 687 of file HCalSD.cc.

References pmtLV.

Referenced by getEnergyDeposit().

687  {
688  for (auto lvol : pmtLV) if (lv == lvol) { return true; }
689  return false;
690 }
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:116
bool HCalSD::isItScintillator ( const G4Material *  mat)
private

Definition at line 702 of file HCalSD.cc.

References materials.

Referenced by getEnergyDeposit().

702  {
703  for (auto amat : materials) if (amat == mat) { return true; }
704  return false;
705 }
std::vector< const G4Material * > materials
Definition: HCalSD.h:115
bool HCalSD::isItStraightBundle ( const G4LogicalVolume *  lv)
private

Definition at line 692 of file HCalSD.cc.

References fibre1LV.

Referenced by getEnergyDeposit().

692  {
693  for (auto lvol : fibre1LV) if (lv == lvol) { return true; }
694  return false;
695 }
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:116
double HCalSD::layerWeight ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay 
)
private

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

986  {
987 
988  double wt = 1.;
989  if (numberingFromDDD) {
990  //get the ID's as eta, phi, depth, ... indices
992  depth, lay);
993  modifyDepth(tmp);
994  uint32_t id = HcalTestNumbering::packHcalIndex(tmp.subdet, tmp.zside, 1,
995  tmp.etaR, tmp.phis,tmp.lay);
996  std::map<uint32_t,double>::const_iterator ite = layerWeights.find(id);
997  if (ite != layerWeights.end()) wt = ite->second;
998 #ifdef EDM_ML_DEBUG
999  edm::LogInfo("HcalSim") << "HCalSD::layerWeight: ID " << std::hex << id
1000  << std::dec << " (" << tmp.subdet << "/"
1001  << tmp.zside << "/1/" << tmp.etaR << "/"
1002  << tmp.phis << "/" << tmp.lay << ") Weight " <<wt;
1003 #endif
1004  }
1005  return wt;
1006 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1064
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:88
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define EDM_ML_DEBUG
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:117
void HCalSD::modifyDepth ( HcalNumberingFromDDD::HcalID id)
private

Definition at line 1064 of file HCalSD.cc.

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

Referenced by layerWeight(), and setDetUnitId().

1064  {
1065  if (id.subdet == 4) {
1066  int ieta = (id.zside == 0) ? -id.etaR : id.etaR;
1067  if (hcalConstants->maxHFDepth(ieta,id.phis) > 2) {
1068  if (id.depth <= 2) {
1069  if (G4UniformRand() > 0.5) id.depth += 2;
1070  }
1071  }
1072  } else if ((id.subdet == 1 || id.subdet ==2) && testNumber) {
1073  id.depth = (depth_ == 0) ? 1 : 2;
1074  }
1075 }
bool testNumber
Definition: HCalSD.h:105
int depth_
Definition: HCalSD.h:111
int maxHFDepth(const int &ieta, const int &iphi) const
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:96
void HCalSD::plotHF ( const G4ThreeVector &  pos,
bool  emType 
)
private

Definition at line 1055 of file HCalSD.cc.

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

Referenced by getFromHFLibrary(), and hitForFibre().

1055  {
1056  double zv = std::abs(hitPoint.z()) - gpar[4];
1057  if (emType) {
1058  if (hzvem != nullptr) hzvem->Fill(zv);
1059  } else {
1060  if (hzvhad != nullptr) hzvhad->Fill(zv);
1061  }
1062 }
std::vector< double > gpar
Definition: HCalSD.h:112
TH1F * hzvhad
Definition: HCalSD.h:118
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1F * hzvem
Definition: HCalSD.h:118
void HCalSD::plotProfile ( const G4Step *  step,
const G4ThreeVector &  pos,
double  edep,
double  time,
int  id 
)
private

Definition at line 1008 of file HCalSD.cc.

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

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

1009  {
1010 
1011  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1012  static const G4String modName[8] = {"HEModule", "HVQF" , "HBModule", "MBAT",
1013  "MBBT" , "MBBTC", "MBBT_R1P", "MBBT_R1M"};
1014  G4ThreeVector local;
1015  bool found=false;
1016  double depth=-2000;
1017  int idx = 4;
1018  for (int n=0; n<touch->GetHistoryDepth(); ++n) {
1019  G4String name = touch->GetVolume(n)->GetName();
1020 #ifdef EDM_ML_DEBUG
1021  LogDebug("HcalSim") << "plotProfile Depth " << n << " Name " << name;
1022 #endif
1023  for (unsigned int ii=0; ii<8; ++ii) {
1024  if (name == modName[ii]) {
1025  found = true;
1026  int dn = touch->GetHistoryDepth() - n;
1027  local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1028  if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1029  else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1030  else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1031  else {depth = local.y() + 15.; idx = 2;}
1032  break;
1033  }
1034  }
1035  if (found) break;
1036  }
1037  if (!found) depth = std::abs(global.z()) - 11500;
1038 #ifdef EDM_ML_DEBUG
1039  LogDebug("HcalSim") << "plotProfile Found " << found << " Global " << global
1040  << " Local " << local << " depth " << depth << " ID "
1041  << id << " EDEP " << edep << " Time " << time;
1042 #endif
1043  if (hit_[idx] != nullptr) hit_[idx]->Fill(edep);
1044  if (time_[idx] != nullptr) time_[idx]->Fill(time,edep);
1045  if (dist_[idx] != nullptr) dist_[idx]->Fill(depth,edep);
1046  int jd = 2*idx + id - 7;
1047  if (jd >= 0 && jd < 4) {
1048  jd += 5;
1049  if (hit_[jd] != nullptr) hit_[jd]->Fill(edep);
1050  if (time_[jd] != nullptr) time_[jd]->Fill(time,edep);
1051  if (dist_[jd] != nullptr) dist_[jd]->Fill(depth,edep);
1052  }
1053 }
#define LogDebug(id)
TH1F * time_[9]
Definition: HCalSD.h:118
TH1F * hit_[9]
Definition: HCalSD.h:118
TH1F * dist_[9]
Definition: HCalSD.h:118
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ii
Definition: cuy.py:589
void HCalSD::readWeightFromFile ( const std::string &  fName)
private

Definition at line 960 of file HCalSD.cc.

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

Referenced by HCalSD().

960  {
961 
962  std::ifstream infile;
963  int entry=0;
964  infile.open(fName.c_str(), std::ios::in);
965  if (infile) {
966  int det, zside, etaR, phi, lay;
967  double wt;
968  while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
969  uint32_t id = HcalTestNumbering::packHcalIndex(det,zside,1,etaR,phi,lay);
970  layerWeights.insert(std::pair<uint32_t,double>(id,wt));
971  ++entry;
972 #ifdef EDM_ML_DEBUG
973  edm::LogInfo("HcalSim") << "HCalSD::readWeightFromFile:Entry " << entry
974  << " ID " << std::hex << id << std::dec << " ("
975  << det << "/" << zside << "/1/" << etaR << "/"
976  << phi << "/" << lay << ") Weight " << wt;
977 #endif
978  }
979  infile.close();
980  }
981  edm::LogInfo("HcalSim") << "HCalSD::readWeightFromFile: reads " << entry
982  << " weights from " << fName;
983  if (entry <= 0) useLayerWt = false;
984 }
bool useLayerWt
Definition: HCalSD.h:104
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:117
uint32_t HCalSD::setDetUnitId ( const G4Step *  step)
overridevirtual

Implements CaloSD.

Definition at line 506 of file HCalSD.cc.

References egammaForCoreTracking_cff::depth.

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

506  {
507 
508  auto const prePoint = aStep->GetPreStepPoint();
509  auto const touch = prePoint->GetTouchable();
510  const G4ThreeVector& hitPoint = prePoint->GetPosition();
511 
512  int depth = (touch->GetReplicaNumber(0))%10 + 1;
513  int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
514  int det = (touch->GetReplicaNumber(1))/1000;
515 
516  return setDetUnitId (det, hitPoint, depth, lay);
517 }
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:506
uint32_t HCalSD::setDetUnitId ( int  det,
const G4ThreeVector &  pos,
int  depth,
int  lay = 1 
)
private

Definition at line 589 of file HCalSD.cc.

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

589  {
590  uint32_t id = 0;
591  if (numberingFromDDD.get()) {
592  //get the ID's as eta, phi, depth, ... indices
593  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD.get()->unitID(det, pos, depth, lay);
594  id = setDetUnitId(tmp);
595  }
596  return id;
597 }
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:88
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:506
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
uint32_t HCalSD::setDetUnitId ( HcalNumberingFromDDD::HcalID tmp)
private

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

599  {
600  modifyDepth(tmp);
601  uint32_t id = (numberingScheme.get()) ? numberingScheme.get()->getUnitID(tmp) : 0;
602  if ((!testNumber) && m_HcalTestNS.get()) {
603  bool ok = m_HcalTestNS.get()->compare(tmp,id);
604  if (!ok)
605  edm::LogWarning("HcalSim") << "Det ID from HCalSD " << HcalDetId(id)
606  << " " << std::hex << id << std::dec
607  << " does not match one from relabller for "
608  << tmp.subdet << ":" << tmp.etaR << ":"
609  << tmp.phi << ":" << tmp.phis << ":"
610  << tmp.depth << ":" << tmp.lay << std::endl;
611  }
612  return id;
613 }
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1064
bool testNumber
Definition: HCalSD.h:105
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:100
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:89
void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 519 of file HCalSD.cc.

References numberingScheme.

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

519  {
520  if (scheme != nullptr) {
521  edm::LogInfo("HcalSim") << "HCalSD: updates numbering scheme for " << GetName();
522  numberingScheme.reset(scheme);
523  }
524 }
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:89
void HCalSD::update ( const BeginOfJob )
overrideprotectedvirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

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

526  {
527 
528  const edm::EventSetup* es = (*job)();
530  es->get<HcalSimNumberingRecord>().get(hdc);
531  if (hdc.isValid()) {
532  hcalConstants = (HcalDDDSimConstants*)(&(*hdc));
533  } else {
534  edm::LogError("HcalSim") << "HCalSD : Cannot find HcalDDDSimConstant";
535  throw cms::Exception("Unknown", "HCalSD") << "Cannot find HcalDDDSimConstant" << "\n";
536  }
537 
539 
540  //Special Geometry parameters
542  std::stringstream sss;
543  for (unsigned int ig=0; ig<gpar.size(); ig++) {
544  sss << "\n gpar[" << ig << "] = " << gpar[ig]/cm << " cm";
545  }
546  edm::LogInfo("HcalSim") << "Maximum depth for HF " << hcalConstants->getMaxDepth(2)
547  << gpar.size()<< " gpar (cm)" << sss.str();
548  //Test Hcal Numbering Scheme
549  if (testNS_) m_HcalTestNS.reset(new HcalTestNS(es));
550 
551  if (agingFlagHB) {
553  es->get<HBHEDarkeningRecord>().get("HB",hdark);
554  m_HBDarkening = &*hdark;
555  }
556  if (agingFlagHE) {
558  es->get<HBHEDarkeningRecord>().get("HE",hdark);
559  m_HEDarkening = &*hdark;
560  }
561 }
std::vector< double > gpar
Definition: HCalSD.h:112
bool agingFlagHE
Definition: HCalSD.h:103
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:88
int getMaxDepth(const int &type) const
bool agingFlagHB
Definition: HCalSD.h:103
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:98
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:100
bool testNS_
Definition: HCalSD.h:105
const std::vector< double > & getGparHF() const
T get() const
Definition: EventSetup.h:63
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:97
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:96

Member Data Documentation

bool HCalSD::agingFlagHB
private

Definition at line 103 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::agingFlagHE
private

Definition at line 103 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::applyFidCut
private

Definition at line 107 of file HCalSD.h.

Referenced by HCalSD(), and isItinFidVolume().

double HCalSD::betaThr
private

Definition at line 106 of file HCalSD.h.

Referenced by HCalSD().

double HCalSD::birk1
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk2
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk3
private

Definition at line 106 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::deliveredLumi
private

Definition at line 109 of file HCalSD.h.

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

int HCalSD::depth_
private

Definition at line 111 of file HCalSD.h.

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

TH1F * HCalSD::dist_[9]
private

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

double HCalSD::eminHitHB
private

Definition at line 108 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHE
private

Definition at line 108 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHF
private

Definition at line 108 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHO
private

Definition at line 108 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItStraightBundle().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItConicalBundle().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 112 of file HCalSD.h.

Referenced by plotHF(), and update().

HcalDDDSimConstants* HCalSD::hcalConstants
private

Definition at line 96 of file HCalSD.h.

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

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

Definition at line 113 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 91 of file HCalSD.h.

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

TH1F* HCalSD::hit_[9]
private

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

TH1F * HCalSD::hzvem
private

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

TH1F * HCalSD::hzvhad
private

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

bool HCalSD::isHF
private

Definition at line 102 of file HCalSD.h.

Referenced by getEnergyDeposit(), and getFromLibrary().

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

Definition at line 117 of file HCalSD.h.

Referenced by layerWeight(), and readWeightFromFile().

const HBHEDarkening* HCalSD::m_HBDarkening
private

Definition at line 97 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 100 of file HCalSD.h.

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

const HBHEDarkening* HCalSD::m_HEDarkening
private

Definition at line 98 of file HCalSD.h.

Referenced by getEnergyDeposit(), and update().

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

Definition at line 99 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

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

Definition at line 115 of file HCalSD.h.

Referenced by HCalSD(), and isItScintillator().

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

Definition at line 114 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::neutralDensity
private

Definition at line 105 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

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

Definition at line 88 of file HCalSD.h.

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

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

Definition at line 89 of file HCalSD.h.

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

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

Definition at line 116 of file HCalSD.h.

Referenced by HCalSD(), and isItPMT().

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

Definition at line 94 of file HCalSD.h.

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

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

Definition at line 90 of file HCalSD.h.

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

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

Definition at line 92 of file HCalSD.h.

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

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

Definition at line 93 of file HCalSD.h.

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

bool HCalSD::testNS_
private

Definition at line 105 of file HCalSD.h.

Referenced by HCalSD(), and update().

bool HCalSD::testNumber
private

Definition at line 105 of file HCalSD.h.

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

TH1F * HCalSD::time_[9]
private

Definition at line 118 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

bool HCalSD::useBirk
private

Definition at line 104 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useFibreBundle
private

Definition at line 104 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useHF
private

Definition at line 107 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::useLayerWt
private

Definition at line 104 of file HCalSD.h.

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

bool HCalSD::useParam
private

Definition at line 107 of file HCalSD.h.

Referenced by getFromLibrary(), and HCalSD().

bool HCalSD::usePMTHit
private

Definition at line 104 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useShowerLibrary
private

Definition at line 107 of file HCalSD.h.

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

double HCalSD::weight_
private