CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
HCalSD Class Reference

#include <HCalSD.h>

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

Public Member Functions

virtual double getEnergyDeposit (G4Step *)
 
 HCalSD (G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
 
virtual bool ProcessHits (G4Step *, G4TouchableHistory *)
 
virtual uint32_t setDetUnitId (G4Step *step)
 
void setNumberingScheme (HcalNumberingScheme *)
 
virtual ~HCalSD ()
 
- Public Member Functions inherited from CaloSD
 CaloSD (G4String aSDname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, int tSlice=1, bool ignoreTkID=false)
 
virtual void clear ()
 
virtual void DrawAll ()
 
virtual void EndOfEvent (G4HCofThisEvent *eventHC)
 
void fillHits (edm::PCaloHitContainer &, std::string n)
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual void PrintAll ()
 
virtual bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *)
 
virtual ~CaloSD ()
 
- Public Member Functions inherited from SensitiveCaloDetector
 SensitiveCaloDetector (std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p)
 
- Public Member Functions inherited from SensitiveDetector
virtual void AssignSD (std::string &vname)
 
Local3DPoint ConvertToLocal3DPoint (G4ThreeVector point)
 
Local3DPoint FinalStepPosition (G4Step *s, coordinates)
 
virtual std::vector< std::string > getNames ()
 
Local3DPoint InitialStepPosition (G4Step *s, coordinates)
 
std::string nameOfSD ()
 
void NaNTrap (G4Step *step)
 
void Register ()
 
 SensitiveDetector (std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &, edm::ParameterSet const &p)
 
virtual ~SensitiveDetector ()
 
- 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 ()
 

Protected Member Functions

virtual bool filterHit (CaloG4Hit *, double)
 
virtual void initRun ()
 
- Protected Member Functions inherited from CaloSD
G4bool checkHit ()
 
virtual void clearHits ()
 
CaloG4HitcreateNewHit ()
 
double getAttenuation (G4Step *aStep, double birk1, double birk2, double birk3)
 
virtual uint16_t getDepth (G4Step *)
 
int getNumberOfHits ()
 
double getResponseWt (G4Track *)
 
virtual G4bool getStepInfo (G4Step *aStep)
 
virtual int getTrackID (G4Track *)
 
G4bool hitExists ()
 
void resetForNewPrimary (G4ThreeVector, double)
 
G4ThreeVector setToGlobal (G4ThreeVector, const G4VTouchable *)
 
G4ThreeVector setToLocal (G4ThreeVector, const G4VTouchable *)
 
virtual void update (const BeginOfRun *)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const BeginOfEvent *)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const BeginOfTrack *trk)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const EndOfTrack *trk)
 This routine will be called when the appropriate signal arrives. More...
 
virtual void update (const ::EndOfEvent *)
 
void updateHit (CaloG4Hit *)
 
- 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

std::vector< double > getDDDArray (const std::string &, const DDsvalues_type &)
 
void getFromLibrary (G4Step *step, double weight)
 
void getFromParam (G4Step *step, double weight)
 
void getHitFibreBundle (G4Step *step, bool type)
 
void getHitPMT (G4Step *step)
 
std::vector< G4String > getNames (DDFilteredView &)
 
void hitForFibre (G4Step *step, double weight)
 
bool isItConicalBundle (G4LogicalVolume *)
 
bool isItFibre (G4LogicalVolume *)
 
bool isItFibre (G4String)
 
bool isItHF (G4Step *)
 
bool isItHF (G4String)
 
bool isItinFidVolume (G4ThreeVector &)
 
bool isItPMT (G4LogicalVolume *)
 
bool isItScintillator (G4Material *)
 
bool isItStraightBundle (G4LogicalVolume *)
 
double layerWeight (int, G4ThreeVector, int, int)
 
void plotHF (G4ThreeVector &pos, bool emType)
 
void plotProfile (G4Step *step, G4ThreeVector pos, double edep, double time, int id)
 
void readWeightFromFile (std::string)
 
uint32_t setDetUnitId (int, G4ThreeVector, int, int)
 
int setTrackID (G4Step *step)
 

Private Attributes

bool applyFidCut
 
double betaThr
 
double birk1
 
double birk2
 
double birk3
 
double deliveredLumi
 
TH1F * dist_ [9]
 
double eminHitHB
 
double eminHitHE
 
double eminHitHF
 
double eminHitHO
 
std::vector< G4LogicalVolume * > fibre1LV
 
std::vector< G4LogicalVolume * > fibre2LV
 
std::vector< G4LogicalVolume * > fibreLV
 
std::vector< G4String > fibreNames
 
std::vector< double > gpar
 
std::vector< int > hfLevels
 
std::vector< G4LogicalVolume * > hfLV
 
std::vector< G4String > hfNames
 
HFShowerhfshower
 
TH1F * hit_ [9]
 
TH1F * hzvem
 
TH1F * hzvhad
 
std::vector< double > layer0wt
 
std::map< uint32_t, double > layerWeights
 
HEDarkeningm_HEDarkening
 
HFDarkeningm_HFDarkening
 
std::vector< G4Material * > materials
 
std::vector< G4String > matNames
 
G4int mumPDG
 
G4int mupPDG
 
HcalNumberingFromDDDnumberingFromDDD
 
HcalNumberingSchemenumberingScheme
 
std::vector< G4LogicalVolume * > pmtLV
 
HFShowerFibreBundleshowerBundle
 
HFShowerLibraryshowerLibrary
 
HFShowerParamshowerParam
 
HFShowerPMTshowerPMT
 
bool testNumber
 
TH1F * time_ [9]
 
bool useBirk
 
bool useFibreBundle
 
bool useHF
 
bool useLayerWt
 
bool useParam
 
bool usePMTHit
 
bool useShowerLibrary
 

Additional Inherited Members

- Public Types inherited from SensitiveDetector
enum  coordinates { WorldCoordinates, LocalCoordinates }
 
- Protected Attributes inherited from CaloSD
int checkHits
 
double correctT
 
bool corrTOFBeam
 
CaloG4HitcurrentHit
 
CaloHitID currentID
 
float edepositEM
 
float edepositHAD
 
double eminHit
 
double eminHitD
 
G4int emPDG
 
double energyCut
 
G4ThreeVector entranceLocal
 
G4ThreeVector entrancePoint
 
G4int epPDG
 
bool forceSave
 
G4int gammaPDG
 
float incidentEnergy
 
double kmaxIon
 
double kmaxNeutron
 
double kmaxProton
 
const SimTrackManagerm_trackManager
 
G4ThreeVector posGlobal
 
G4StepPoint * preStepPoint
 
CaloHitID previousID
 
int primIDSaved
 
bool runInit
 
bool suppressHeavy
 
G4Track * theTrack
 
double tmaxHit
 
bool useMap
 

Detailed Description

Definition at line 33 of file HCalSD.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file HCalSD.cc.

References DDFilteredView::addFilter(), applyFidCut, betaThr, birk1, birk2, birk3, deliveredLumi, dist_, eminHitHB, eminHitHE, eminHitHF, eminHitHO, DDSpecificsFilter::equals, fibre1LV, fibre2LV, fibreLV, fibreNames, mergeVDriftHistosByStation::file, DDFilteredView::firstChild(), g, getDDDArray(), SensitiveDetector::getNames(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gpar, hfLevels, hfLV, hfNames, hfshower, hit_, hzvem, hzvhad, i, edm::Service< T >::isAvailable(), isItFibre(), isItHF(), CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, reco_calib_source_client_cfg::labels, layer0wt, testEve_cfg::level, create_public_lumi_plots::log, LogDebug, DDFilteredView::logicalPart(), m_HEDarkening, m_HFDarkening, TFileDirectory::make(), DDLogicalPart::material(), materials, matNames, DDFilteredView::mergedSpecifics(), TFileDirectory::mkdir(), mumPDG, mupPDG, DDName::name(), SensitiveDetector::name, DDBase< N, C >::name(), DDFilteredView::next(), numberingFromDDD, pmtLV, readWeightFromFile(), DDSpecificsFilter::setCriteria(), setNumberingScheme(), showerBundle, showerLibrary, showerParam, showerPMT, AlCaHLTBitMon_QueryRunRegistry::string, CaloSD::suppressHeavy, groupFilesInBlocks::temp, testNumber, time_, indexGen::title, useBirk, useFibreBundle, useHF, useLayerWt, useParam, usePMTHit, useShowerLibrary, and relativeConstraints::value.

37  :
38  CaloSD(name, cpv, clg, p, manager,
39  p.getParameter<edm::ParameterSet>("HCalSD").getParameter<int>("TimeSliceUnit"),
40  p.getParameter<edm::ParameterSet>("HCalSD").getParameter<bool>("IgnoreTrackID")),
43  m_HFDarkening(0) {
44 
45  //static SimpleConfigurable<bool> on1(false, "HCalSD:UseBirkLaw");
46  //static SimpleConfigurable<double> bk1(0.013, "HCalSD:BirkC1");
47  //static SimpleConfigurable<double> bk2(0.0568,"HCalSD:BirkC2");
48  //static SimpleConfigurable<double> bk3(1.75, "HCalSD:BirkC3");
49  // Values from NIM 80 (1970) 239-244: as implemented in Geant3
50  //static SimpleConfigurable<bool> on2(true,"HCalSD:UseShowerLibrary");
51  edm::ParameterSet m_HC = p.getParameter<edm::ParameterSet>("HCalSD");
52  useBirk = m_HC.getParameter<bool>("UseBirkLaw");
53  birk1 = m_HC.getParameter<double>("BirkC1")*(g/(MeV*cm2));
54  birk2 = m_HC.getParameter<double>("BirkC2");
55  birk3 = m_HC.getParameter<double>("BirkC3");
56  useShowerLibrary = m_HC.getParameter<bool>("UseShowerLibrary");
57  useParam = m_HC.getParameter<bool>("UseParametrize");
58  testNumber = m_HC.getParameter<bool>("TestNumberingScheme");
59  usePMTHit = m_HC.getParameter<bool>("UsePMTHits");
60  betaThr = m_HC.getParameter<double>("BetaThreshold");
61  eminHitHB = m_HC.getParameter<double>("EminHitHB")*MeV;
62  eminHitHE = m_HC.getParameter<double>("EminHitHE")*MeV;
63  eminHitHO = m_HC.getParameter<double>("EminHitHO")*MeV;
64  eminHitHF = m_HC.getParameter<double>("EminHitHF")*MeV;
65  useFibreBundle = m_HC.getParameter<bool>("UseFibreBundleHits");
66  deliveredLumi = m_HC.getParameter<double>("DelivLuminosity");
67  bool ageingFlagHE= m_HC.getParameter<bool>("HEDarkening");
68  bool ageingFlagHF= m_HC.getParameter<bool>("HFDarkening");
69  useHF = m_HC.getUntrackedParameter<bool>("UseHF",true);
70  bool forTBH2 = m_HC.getUntrackedParameter<bool>("ForTBH2",false);
71  useLayerWt = m_HC.getUntrackedParameter<bool>("UseLayerWt",false);
72  std::string file = m_HC.getUntrackedParameter<std::string>("WtFile","None");
73  edm::ParameterSet m_HF = p.getParameter<edm::ParameterSet>("HFShower");
74  applyFidCut = m_HF.getParameter<bool>("ApplyFiducialCut");
75 
76 #ifdef DebugLog
77  LogDebug("HcalSim") << "***************************************************"
78  << "\n"
79  << "* *"
80  << "\n"
81  << "* Constructing a HCalSD with name " << name << "\n"
82  << "* *"
83  << "\n"
84  << "***************************************************";
85 #endif
86  edm::LogInfo("HcalSim") << "HCalSD:: Use of HF code is set to " << useHF
87  << "\nUse of shower parametrization set to "
88  << useParam << "\nUse of shower library is set to "
89  << useShowerLibrary << "\nUse PMT Hit is set to "
90  << usePMTHit << " with beta Threshold "<< betaThr
91  << "\nUSe of FibreBundle Hit set to "<<useFibreBundle
92  << "\n Use of Birks law is set to "
93  << useBirk << " with three constants kB = "
94  << birk1 << ", C1 = " << birk2 << ", C2 = " << birk3;
95  edm::LogInfo("HcalSim") << "HCalSD:: Suppression Flag " << suppressHeavy
96  << " protons below " << kmaxProton << " MeV,"
97  << " neutrons below " << kmaxNeutron << " MeV and"
98  << " ions below " << kmaxIon << " MeV\n"
99  << " Threshold for storing hits in HB: "
100  << eminHitHB << " HE: " << eminHitHE << " HO: "
101  << eminHitHO << " HF: " << eminHitHF << "\n"
102  << "Delivered luminosity for Darkening "
103  << deliveredLumi << " Flag (HE) " << ageingFlagHE
104  << " Flag (HF) " << ageingFlagHF << "\n"
105  << "Application of Fiducial Cut " << applyFidCut;
106 
107  numberingFromDDD = new HcalNumberingFromDDD(name, cpv);
108  HcalNumberingScheme* scheme;
109  if (testNumber || forTBH2)
110  scheme = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(forTBH2));
111  else
112  scheme = new HcalNumberingScheme();
113  setNumberingScheme(scheme);
114 
115  const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
116  std::vector<G4LogicalVolume *>::const_iterator lvcite;
117  G4LogicalVolume* lv;
118  std::string attribute, value;
119  if (useHF) {
120  if (useParam) {
121  showerParam = new HFShowerParam(name, cpv, p);
122  } else {
123  if (useShowerLibrary) showerLibrary = new HFShowerLibrary(name, cpv, p);
124  hfshower = new HFShower(name, cpv, p, 0);
125  }
126 
127  // HF volume names
128  attribute = "Volume";
129  value = "HF";
130  DDSpecificsFilter filter0;
131  DDValue ddv0(attribute, value, 0);
132  filter0.setCriteria(ddv0, DDSpecificsFilter::equals);
133  DDFilteredView fv0(cpv);
134  fv0.addFilter(filter0);
135  hfNames = getNames(fv0);
136  fv0.firstChild();
137  DDsvalues_type sv0(fv0.mergedSpecifics());
138  std::vector<double> temp = getDDDArray("Levels",sv0);
139  edm::LogInfo("HcalSim") << "HCalSD: Names to be tested for " << attribute
140  << " = " << value << " has " << hfNames.size()
141  << " elements";
142  for (unsigned int i=0; i < hfNames.size(); ++i) {
143  G4String namv = hfNames[i];
144  lv = 0;
145  for(lvcite=lvs->begin(); lvcite!=lvs->end(); lvcite++)
146  if((*lvcite)->GetName()==namv) {
147  lv = (*lvcite);
148  break;
149  }
150  hfLV.push_back(lv);
151  int level = static_cast<int>(temp[i]);
152  hfLevels.push_back(level);
153  edm::LogInfo("HcalSim") << "HCalSD: HF[" << i << "] = " << hfNames[i]
154  << " LV " << hfLV[i] << " at level "
155  << hfLevels[i];
156  }
157 
158  // HF Fibre volume names
159  value = "HFFibre";
160  DDSpecificsFilter filter1;
161  DDValue ddv1(attribute,value,0);
162  filter1.setCriteria(ddv1, DDSpecificsFilter::equals);
163  DDFilteredView fv1(cpv);
164  fv1.addFilter(filter1);
165  fibreNames = getNames(fv1);
166  edm::LogInfo("HcalSim") << "HCalSD: Names to be tested for " << attribute
167  << " = " << value << ":";
168  for (unsigned int i=0; i<fibreNames.size(); ++i) {
169  G4String namv = fibreNames[i];
170  lv = 0;
171  for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite) {
172  if ((*lvcite)->GetName() == namv) {
173  lv = (*lvcite);
174  break;
175  }
176  }
177  fibreLV.push_back(lv);
178  edm::LogInfo("HcalSim") << "HCalSD: (" << i << ") " << fibreNames[i]
179  << " LV " << fibreLV[i];
180  }
181 
182  // HF PMT volume names
183  value = "HFPMT";
184  DDSpecificsFilter filter3;
185  DDValue ddv3(attribute,value,0);
187  DDFilteredView fv3(cpv);
188  fv3.addFilter(filter3);
189  std::vector<G4String> pmtNames = getNames(fv3);
190  edm::LogInfo("HcalSim") << "HCalSD: Names to be tested for " << attribute
191  << " = " << value << " have " << pmtNames.size()
192  << " entries";
193  for (unsigned int i=0; i<pmtNames.size(); ++i) {
194  G4String namv = pmtNames[i];
195  lv = 0;
196  for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
197  if ((*lvcite)->GetName() == namv) {
198  lv = (*lvcite);
199  break;
200  }
201  pmtLV.push_back(lv);
202  edm::LogInfo("HcalSim") << "HCalSD: (" << i << ") " << pmtNames[i]
203  << " LV " << pmtLV[i];
204  }
205  if (pmtNames.size() > 0) showerPMT = new HFShowerPMT (name, cpv, p);
206 
207  // HF Fibre bundles
208  value = "HFFibreBundleStraight";
209  DDSpecificsFilter filter4;
210  DDValue ddv4(attribute,value,0);
212  DDFilteredView fv4(cpv);
213  fv4.addFilter(filter4);
214  std::vector<G4String> fibreNames = getNames(fv4);
215  edm::LogInfo("HcalSim") << "HCalSD: Names to be tested for " << attribute
216  << " = " << value << " have " << fibreNames.size()
217  << " entries";
218  for (unsigned int i=0; i<fibreNames.size(); ++i) {
219  G4String namv = fibreNames[i];
220  lv = 0;
221  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
222  if ((*lvcite)->GetName() == namv) {
223  lv = (*lvcite);
224  break;
225  }
226  fibre1LV.push_back(lv);
227  edm::LogInfo("HcalSim") << "HCalSD: (" << i << ") " << fibreNames[i]
228  << " LV " << fibre1LV[i];
229  }
230 
231  // Geometry parameters for HF
232  value = "HFFibreBundleConical";
233  DDSpecificsFilter filter5;
234  DDValue ddv5(attribute,value,0);
236  DDFilteredView fv5(cpv);
237  fv5.addFilter(filter5);
238  fibreNames = getNames(fv5);
239  edm::LogInfo("HcalSim") << "HCalSD: Names to be tested for " << attribute
240  << " = " << value << " have " << fibreNames.size()
241  << " entries";
242  for (unsigned int i=0; i<fibreNames.size(); ++i) {
243  G4String namv = fibreNames[i];
244  lv = 0;
245  for (lvcite = lvs->begin(); lvcite != lvs->end(); ++lvcite)
246  if ((*lvcite)->GetName() == namv) {
247  lv = (*lvcite);
248  break;
249  }
250  fibre2LV.push_back(lv);
251  edm::LogInfo("HcalSim") << "HCalSD: (" << i << ") " << fibreNames[i]
252  << " LV " << fibre2LV[i];
253  }
254  if (fibre1LV.size() > 0 || fibre2LV.size() > 0)
255  showerBundle = new HFShowerFibreBundle (name, cpv, p);
256 
257  attribute = "ReadOutName";
258  value = name;
259  DDSpecificsFilter filter6;
260  DDValue ddv6(attribute,value,0);
262  DDFilteredView fv6(cpv);
263  fv6.addFilter(filter6);
264  if (fv6.firstChild()) {
265  DDsvalues_type sv(fv6.mergedSpecifics());
266  //Special Geometry parameters
267  gpar = getDDDArray("gparHF",sv);
268  edm::LogInfo("HFShower") << "HFShowerParam: " << gpar.size()
269  << " gpar (cm)";
270  for (unsigned int ig=0; ig<gpar.size(); ig++)
271  edm::LogInfo("HFShower") << "HFShowerParam: gpar[" << ig << "] = "
272  << gpar[ig]/cm << " cm";
273  } else {
274  edm::LogWarning("HFShower") << "HFShowerParam: cannot get filtered "
275  << " view for " << attribute << " matching "
276  << name;
277  }
278  }
279 
280  //Material list for HB/HE/HO sensitive detectors
281  attribute = "ReadOutName";
282  DDSpecificsFilter filter2;
283  DDValue ddv2(attribute,name,0);
285  DDFilteredView fv2(cpv);
286  fv2.addFilter(filter2);
287  bool dodet = fv2.firstChild();
288 
289  DDsvalues_type sv(fv2.mergedSpecifics());
290  //Layer0 Weight
291  layer0wt = getDDDArray("Layer0Wt",sv);
292  edm::LogInfo("HcalSim") << "HCalSD: " << layer0wt.size() << " Layer0Wt";
293  for (unsigned int it=0; it<layer0wt.size(); ++it)
294  edm::LogInfo("HcalSim") << "HCalSD: [" << it << "] " << layer0wt[it];
295 
296  const G4MaterialTable * matTab = G4Material::GetMaterialTable();
297  std::vector<G4Material*>::const_iterator matite;
298  while (dodet) {
299  const DDLogicalPart & log = fv2.logicalPart();
300  G4String namx = log.name().name();
301  if (!isItHF(namx) && !isItFibre(namx)) {
302  bool notIn = true;
303  for (unsigned int i=0; i<matNames.size(); ++i) {
304  if (!strcmp(matNames[i].c_str(),log.material().name().name().c_str())){
305  notIn = false;
306  break;
307  }
308  }
309  if (notIn) {
310  namx = log.material().name().name();
311  matNames.push_back(namx);
312  G4Material* mat;
313  for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
314  if ((*matite)->GetName() == namx) {
315  mat = (*matite);
316  break;
317  }
318  }
319  materials.push_back(mat);
320  }
321  }
322  dodet = fv2.next();
323  }
324 
325  edm::LogInfo("HcalSim") << "HCalSD: Material names for " << attribute
326  << " = " << name << ":";
327  for (unsigned int i=0; i<matNames.size(); ++i)
328  edm::LogInfo("HcalSim") << "HCalSD: (" << i << ") " << matNames[i]
329  << " pointer " << materials[i];
330 
331  mumPDG = mupPDG = 0;
332 
333  if (useLayerWt) readWeightFromFile(file);
334 
335  for (int i=0; i<9; ++i) hit_[i] = time_[i]= dist_[i] = 0;
336  hzvem = hzvhad = 0;
337 
338  if (ageingFlagHE) m_HEDarkening = new HEDarkening();
339  if (ageingFlagHF) m_HFDarkening = new HFDarkening();
340 #ifdef plotDebug
342 
343  if ( tfile.isAvailable() ) {
344  static std::string labels[9] = {"HB", "HE", "HO", "HF Absorber", "HF PMT",
345  "HF Absorber Long", "HF Absorber Short",
346  "HF PMT Long", "HF PMT Short"};
347  TFileDirectory hcDir = tfile->mkdir("ProfileFromHCalSD");
348  char name[20], title[60];
349  for (int i=0; i<9; ++i) {
350  sprintf (title, "Hit energy in %s", labels[i].c_str());
351  sprintf (name, "HCalSDHit%d", i);
352  hit_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
353  sprintf (title, "Energy (MeV)");
354  hit_[i]->GetXaxis()->SetTitle(title);
355  hit_[i]->GetYaxis()->SetTitle("Hits");
356  sprintf (title, "Time of the hit in %s", labels[i].c_str());
357  sprintf (name, "HCalSDTime%d", i);
358  time_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
359  sprintf (title, "Time (ns)");
360  time_[i]->GetXaxis()->SetTitle(title);
361  time_[i]->GetYaxis()->SetTitle("Hits");
362  sprintf (title, "Longitudinal profile in %s", labels[i].c_str());
363  sprintf (name, "HCalSDDist%d", i);
364  dist_[i] = hcDir.make<TH1F>(name, title, 2000, 0., 2000.);
365  sprintf (title, "Distance (mm)");
366  dist_[i]->GetXaxis()->SetTitle(title);
367  dist_[i]->GetYaxis()->SetTitle("Hits");
368  }
369  if (useHF && (!useParam)) {
370  hzvem = hcDir.make<TH1F>("hzvem", "Longitudinal Profile (EM Part)",330,0.0,1650.0);
371  hzvem->GetXaxis()->SetTitle("Longitudinal Profile (EM Part)");
372  hzvhad = hcDir.make<TH1F>("hzvhad","Longitudinal Profile (Had Part)",330,0.0,1650.0);
373  hzvhad->GetXaxis()->SetTitle("Longitudinal Profile (Hadronic Part)");
374  }
375  }
376 #endif
377 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::vector< double > layer0wt
Definition: HCalSD.h:92
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
bool useParam
Definition: HCalSD.h:88
double eminHitHE
Definition: HCalSD.h:89
HFShowerParam * showerParam
Definition: HCalSD.h:81
TH1F * time_[9]
Definition: HCalSD.h:98
double kmaxNeutron
Definition: CaloSD.h:134
const N & name() const
Definition: DDBase.h:82
bool useLayerWt
Definition: HCalSD.h:86
std::vector< double > gpar
Definition: HCalSD.h:92
bool useFibreBundle
Definition: HCalSD.h:86
double betaThr
Definition: HCalSD.h:87
double deliveredLumi
Definition: HCalSD.h:90
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:83
std::vector< G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:96
std::vector< G4LogicalVolume * > fibreLV
Definition: HCalSD.h:96
double eminHitHB
Definition: HCalSD.h:89
bool useShowerLibrary
Definition: HCalSD.h:88
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:651
double birk2
Definition: HCalSD.h:87
bool usePMTHit
Definition: HCalSD.h:86
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:599
double birk1
Definition: HCalSD.h:87
double kmaxProton
Definition: CaloSD.h:134
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
bool isItHF(G4Step *)
Definition: HCalSD.cc:696
TH1F * hzvhad
Definition: HCalSD.h:98
double eminHitHF
Definition: HCalSD.h:89
CaloSD(G4String aSDname, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *, int tSlice=1, bool ignoreTkID=false)
Definition: CaloSD.cc:21
TH1F * hit_[9]
Definition: HCalSD.h:98
bool testNumber
Definition: HCalSD.h:86
std::vector< G4LogicalVolume * > pmtLV
Definition: HCalSD.h:96
std::vector< G4LogicalVolume * > hfLV
Definition: HCalSD.h:96
double kmaxIon
Definition: CaloSD.h:134
bool suppressHeavy
Definition: CaloSD.h:132
HFShower * hfshower
Definition: HCalSD.h:80
bool useBirk
Definition: HCalSD.h:86
double birk3
Definition: HCalSD.h:87
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:19
bool isAvailable() const
Definition: Service.h:47
bool applyFidCut
Definition: HCalSD.h:88
TH1F * dist_[9]
Definition: HCalSD.h:98
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
HFDarkening * m_HFDarkening
Definition: HCalSD.h:85
std::vector< int > hfLevels
Definition: HCalSD.h:93
virtual std::vector< std::string > getNames()
HEDarkening * m_HEDarkening
Definition: HCalSD.h:84
G4int mupPDG
Definition: HCalSD.h:91
double eminHitHO
Definition: HCalSD.h:89
TH1F * hzvem
Definition: HCalSD.h:98
void readWeightFromFile(std::string)
Definition: HCalSD.cc:1071
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
std::vector< G4String > fibreNames
Definition: HCalSD.h:94
std::vector< G4Material * > materials
Definition: HCalSD.h:95
T * make() const
make new ROOT object
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:285
std::vector< G4String > hfNames
Definition: HCalSD.h:94
G4int mumPDG
Definition: HCalSD.h:91
tuple level
Definition: testEve_cfg.py:34
HFShowerPMT * showerPMT
Definition: HCalSD.h:82
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:79
std::vector< G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:96
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< G4String > matNames
Definition: HCalSD.h:94
bool isItFibre(G4LogicalVolume *)
Definition: HCalSD.cc:714
bool useHF
Definition: HCalSD.h:88
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:37
HCalSD::~HCalSD ( )
virtual

Definition at line 379 of file HCalSD.cc.

References hfshower, m_HEDarkening, m_HFDarkening, numberingFromDDD, numberingScheme, showerBundle, showerLibrary, showerParam, and showerPMT.

379  {
380 
382  if (numberingScheme) delete numberingScheme;
383  if (showerLibrary) delete showerLibrary;
384  if (hfshower) delete hfshower;
385  if (showerParam) delete showerParam;
386  if (showerPMT) delete showerPMT;
387  if (showerBundle) delete showerBundle;
388  if (m_HEDarkening) delete m_HEDarkening;
389  if (m_HFDarkening) delete m_HFDarkening;
390 }
HFShowerParam * showerParam
Definition: HCalSD.h:81
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:83
HFShower * hfshower
Definition: HCalSD.h:80
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
HFDarkening * m_HFDarkening
Definition: HCalSD.h:85
HEDarkening * m_HEDarkening
Definition: HCalSD.h:84
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
HFShowerPMT * showerPMT
Definition: HCalSD.h:82
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:79

Member Function Documentation

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

Reimplemented from CaloSD.

Definition at line 621 of file HCalSD.cc.

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

621  {
622  double threshold=0;
623  DetId theId(aHit->getUnitID());
624  switch (theId.subdetId()) {
625  case HcalBarrel:
626  threshold = eminHitHB; break;
627  case HcalEndcap:
628  threshold = eminHitHE; break;
629  case HcalOuter:
630  threshold = eminHitHO; break;
631  case HcalForward:
632  threshold = eminHitHF; break;
633  default:
634  break;
635  }
636  return ((time <= tmaxHit) && (aHit->getEnergyDeposit() > threshold));
637 }
double eminHitHE
Definition: HCalSD.h:89
double eminHitHB
Definition: HCalSD.h:89
double eminHitHF
Definition: HCalSD.h:89
double eminHitHO
Definition: HCalSD.h:89
double tmaxHit
Definition: CaloSD.h:123
Definition: DetId.h:20
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 651 of file HCalSD.cc.

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

Referenced by HCalSD().

652  {
653 #ifdef DebugLog
654  LogDebug("HcalSim") << "HCalSD:getDDDArray called for " << str;
655 #endif
656  DDValue value(str);
657  if (DDfetch(&sv,value)) {
658 #ifdef DebugLog
659  LogDebug("HcalSim") << value;
660 #endif
661  const std::vector<double> & fvec = value.doubles();
662  int nval = fvec.size();
663  if (nval < 1) {
664  edm::LogError("HcalSim") << "HCalSD : # of " << str << " bins " << nval
665  << " < 2 ==> illegal";
666  throw cms::Exception("Unknown", "HCalSD") << "nval < 2 for array " << str << "\n";
667  }
668 
669  return fvec;
670  } else {
671  edm::LogError("HcalSim") << "HCalSD : cannot get array " << str;
672  throw cms::Exception("Unknown", "HCalSD") << "cannot get array " << str << "\n";
673  }
674 }
#define LogDebug(id)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:102
double HCalSD::getEnergyDeposit ( G4Step *  aStep)
virtual

Reimplemented from CaloSD.

Definition at line 496 of file HCalSD.cc.

References birk1, birk2, birk3, HEDarkening::degradation(), deliveredLumi, cond::rpcobgas::detid, eta(), CaloSD::getAttenuation(), CaloSD::getResponseWt(), HcalDetId::ietaAbs(), isItScintillator(), TrackInformation::isPrimary(), ke, CaloSD::kmaxIon, CaloSD::kmaxNeutron, CaloSD::kmaxProton, layer0wt, layerWeight(), m_HEDarkening, phi, setDetUnitId(), CaloSD::suppressHeavy, testNumber, CaloSD::theTrack, HcalTestNumbering::unpackHcalIndex(), useBirk, useLayerWt, histoStyle::weight, and detailsBasic3DVector::z.

496  {
497  double destep = aStep->GetTotalEnergyDeposit();
498  double weight = 1;
499  G4Track* theTrack = aStep->GetTrack();
500 
501  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
502  int depth = (touch->GetReplicaNumber(0))%10;
503  int det = ((touch->GetReplicaNumber(1))/1000)-3;
504  if (depth==0 && (det==0 || det==1)) weight = layer0wt[det];
505  if (useLayerWt) {
506  int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
507  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
508  weight = layerWeight(det+3, hitPoint, depth, lay);
509  }
510 
511  if (m_HEDarkening !=0 && det == 1) {
512  int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
513  int ieta;
514  uint32_t detid = setDetUnitId(aStep);
515  if(testNumber) {
516  int det, z, depth, eta, phi, lay;
517  HcalTestNumbering::unpackHcalIndex(detid,det,z,depth,eta,phi,lay);
518  ieta = eta;
519  }
520  else ieta = HcalDetId(detid).ietaAbs();
521 #ifdef DebugLog
522  edm::LogInfo("HcalSimDark") << "HCalSD:HE_Darkening >>> ieta: "<< ieta //<< " vs. ietaAbs(): " << HcalDetId(detid).ietaAbs()
523  << " lay: " << lay-2;
524 #endif
525  float dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
526  weight *= dweight;
527 #ifdef DebugLog
528  edm::LogInfo("HcalSimDark") << "HCalSD: >>> Lumi: " << deliveredLumi
529  << " coefficient = " << dweight;
530 #endif
531  }
532 
533  if (suppressHeavy) {
534  TrackInformation * trkInfo = (TrackInformation *)(theTrack->GetUserInformation());
535  if (trkInfo) {
536  int pdg = theTrack->GetDefinition()->GetPDGEncoding();
537  if (!(trkInfo->isPrimary())) { // Only secondary particles
538  double ke = theTrack->GetKineticEnergy()/MeV;
539  if ( pdg/1000000000 == 1 && (pdg/10000)%100 > 0 &&
540  (pdg/10)%100 > 0 && ke <kmaxIon ) weight = 0;
541  if ((pdg == 2212) && (ke < kmaxProton)) weight = 0;
542  if ((pdg == 2112) && (ke < kmaxNeutron)) weight = 0;
543 #ifdef DebugLog
544  if (weight == 0)
545  edm::LogInfo("HcalSim") << "HCalSD:Ignore Track "
546  << theTrack->GetTrackID() << " Type "
547  << theTrack->GetDefinition()->GetParticleName()
548  << " Kinetic Energy " << ke << " MeV";
549 #endif
550  }
551  }
552  }
553 #ifdef DebugLog
554  double weight0 = weight;
555 #endif
556  if (useBirk) {
557  G4Material* mat = aStep->GetPreStepPoint()->GetMaterial();
558  if (isItScintillator(mat)) weight *= getAttenuation(aStep, birk1, birk2, birk3);
559  }
560  double wt1 = getResponseWt(theTrack);
561  double wt2 = theTrack->GetWeight();
562  /*
563  if(wt2 != 1.0) {
564  std::cout << "HCalSD: Detector " << det+3 << " Depth " << depth
565  << " weight= " << weight << " wt1= " << wt1
566  << " wt2= " << wt2 << std::endl;
567  std::cout << theTrack->GetDefinition()->GetParticleName()
568  << " " << theTrack->GetKineticEnergy()
569  << " Id=" << theTrack->GetTrackID()
570  << " IdP=" << theTrack->GetParentID();
571  const G4VProcess* pr = theTrack->GetCreatorProcess();
572  if(pr) std::cout << " from " << pr->GetProcessName();
573  std::cout << std::endl;
574  }
575  */
576 #ifdef DebugLog
577  edm::LogInfo("HcalSim") << "HCalSD: Detector " << det+3 << " Depth " << depth
578  << " weight " << weight0 << " " << weight << " " << wt1
579  << " " << wt2;
580 #endif
581  double edep = weight*wt1*destep;
582  if(wt2 > 0.0) { edep *= wt2; }
583  return edep;
584 }
std::vector< double > layer0wt
Definition: HCalSD.h:92
double kmaxNeutron
Definition: CaloSD.h:134
bool useLayerWt
Definition: HCalSD.h:86
double deliveredLumi
Definition: HCalSD.h:90
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:586
double birk2
Definition: HCalSD.h:87
T eta() const
double birk1
Definition: HCalSD.h:87
double kmaxProton
Definition: CaloSD.h:134
float float float z
bool testNumber
Definition: HCalSD.h:86
double kmaxIon
Definition: CaloSD.h:134
bool suppressHeavy
Definition: CaloSD.h:132
bool isItScintillator(G4Material *)
Definition: HCalSD.cc:744
bool useBirk
Definition: HCalSD.h:86
double birk3
Definition: HCalSD.h:87
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
double getAttenuation(G4Step *aStep, double birk1, double birk2, double birk3)
Definition: CaloSD.cc:462
HEDarkening * m_HEDarkening
Definition: HCalSD.h:84
G4Track * theTrack
Definition: CaloSD.h:118
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:36
int ke
bool isPrimary() const
double getResponseWt(G4Track *)
Definition: CaloSD.cc:604
double layerWeight(int, G4ThreeVector, int, int)
Definition: HCalSD.cc:1097
int weight
Definition: histoStyle.py:50
float degradation(float intlumi, int ieta, int lay)
Definition: HEDarkening.cc:49
Definition: DDAxes.h:10
void HCalSD::getFromLibrary ( G4Step *  step,
double  weight 
)
private

Definition at line 767 of file HCalSD.cc.

References CaloSD::checkHit(), CaloSD::createNewHit(), CaloSD::currentHit, CaloSD::currentID, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::emPDG, CaloSD::epPDG, CaloSD::gammaPDG, HFShowerLibrary::getHits(), GetVolume(), i, isItinFidVolume(), convertSQLiteXML::ok, plotHF(), plotProfile(), CaloSD::posGlobal, CaloSD::preStepPoint, CaloSD::previousID, CaloSD::resetForNewPrimary(), setDetUnitId(), CaloHitID::setID(), setTrackID(), showerLibrary, CaloSD::theTrack, cond::rpcobgas::time, and CaloSD::updateHit().

Referenced by ProcessHits().

767  {
768  preStepPoint = aStep->GetPreStepPoint();
769  theTrack = aStep->GetTrack();
770  int det = 5;
771  bool ok;
772 
773  std::vector<HFShowerLibrary::Hit> hits = showerLibrary->getHits(aStep, ok, weight, false);
774 
775  double etrack = preStepPoint->GetKineticEnergy();
776  int primaryID = setTrackID(aStep);
777 
778  // Reset entry point for new primary
779  posGlobal = preStepPoint->GetPosition();
780  resetForNewPrimary(posGlobal, etrack);
781 
782  G4int particleCode = theTrack->GetDefinition()->GetPDGEncoding();
783  if (particleCode==emPDG || particleCode==epPDG || particleCode==gammaPDG) {
784  edepositEM = 1.*GeV;
785  edepositHAD = 0.;
786  } else {
787  edepositEM = 0.;
788  edepositHAD = 1.*GeV;
789  }
790 #ifdef DebugLog
791  edm::LogInfo("HcalSim") << "HCalSD::getFromLibrary " <<hits.size()
792  << " hits for " << GetName() << " of " << primaryID
793  << " with " << theTrack->GetDefinition()->GetParticleName()
794  << " of " << preStepPoint->GetKineticEnergy()/GeV << " GeV";
795 #endif
796  for (unsigned int i=0; i<hits.size(); ++i) {
797  G4ThreeVector hitPoint = hits[i].position;
798  if (isItinFidVolume (hitPoint)) {
799  int depth = hits[i].depth;
800  double time = hits[i].time;
801  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
802  currentID.setID(unitID, time, primaryID, 0);
803 #ifdef plotDebug
804  plotProfile(aStep, hitPoint, 1.0*GeV, time, depth);
805  bool emType = false;
806  if (particleCode==emPDG || particleCode==epPDG || particleCode==gammaPDG)
807  emType = true;
808  plotHF(hitPoint,emType);
809 #endif
810 
811  // check if it is in the same unit and timeslice as the previous one
812  if (currentID == previousID) {
814  } else {
815  if (!checkHit()) currentHit = createNewHit();
816  }
817  }
818  }
819 
820  //Now kill the current track
821  if (ok) {
822  theTrack->SetTrackStatus(fStopAndKill);
823  G4TrackVector tv = *(aStep->GetSecondary());
824  for (unsigned int kk=0; kk<tv.size(); ++kk)
825  if (tv[kk]->GetVolume() == preStepPoint->GetPhysicalVolume())
826  tv[kk]->SetTrackStatus(fStopAndKill);
827  }
828 }
float edepositEM
Definition: CaloSD.h:121
int i
Definition: DBlmapReader.cc:9
G4int emPDG
Definition: CaloSD.h:136
void updateHit(CaloG4Hit *)
Definition: CaloSD.cc:437
bool isItinFidVolume(G4ThreeVector &)
Definition: HCalSD.cc:750
std::vector< Hit > getHits(G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:586
int setTrackID(G4Step *step)
Definition: HCalSD.cc:1051
G4ThreeVector posGlobal
Definition: CaloSD.h:113
G4bool checkHit()
Definition: CaloSD.cc:328
float edepositHAD
Definition: CaloSD.h:121
G4int epPDG
Definition: CaloSD.h:136
void plotHF(G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1165
G4int gammaPDG
Definition: CaloSD.h:136
CaloHitID previousID
Definition: CaloSD.h:117
CaloG4Hit * currentHit
Definition: CaloSD.h:128
G4Track * theTrack
Definition: CaloSD.h:118
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
static const G4LogicalVolume * GetVolume(const std::string &name)
CaloHitID currentID
Definition: CaloSD.h:117
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
void resetForNewPrimary(G4ThreeVector, double)
Definition: CaloSD.cc:451
int weight
Definition: histoStyle.py:50
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:79
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
void HCalSD::getFromParam ( G4Step *  step,
double  weight 
)
private

Definition at line 882 of file HCalSD.cc.

References CaloSD::checkHit(), CaloSD::createNewHit(), CaloSD::currentHit, CaloSD::currentID, CaloSD::edepositEM, CaloSD::edepositHAD, HFShowerParam::getHits(), i, plotProfile(), CaloSD::posGlobal, CaloSD::preStepPoint, CaloSD::previousID, setDetUnitId(), CaloHitID::setID(), setTrackID(), showerParam, cond::rpcobgas::time, and CaloSD::updateHit().

Referenced by ProcessHits().

882  {
883  std::vector<HFShowerParam::Hit> hits = showerParam->getHits(aStep, weight);
884  int nHit = static_cast<int>(hits.size());
885 
886  if (nHit > 0) {
887  preStepPoint = aStep->GetPreStepPoint();
888  int primaryID = setTrackID(aStep);
889 
890  int det = 5;
891 #ifdef DebugLog
892  edm::LogInfo("HcalSim") << "HCalSD::getFromParam " << nHit << " hits for "
893  << GetName() << " of " << primaryID << " with "
894  << aStep->GetTrack()->GetDefinition()->GetParticleName()
895  << " of " << preStepPoint->GetKineticEnergy()/GeV
896  << " GeV in detector type " << det;
897 #endif
898  for (int i = 0; i<nHit; ++i) {
899  G4ThreeVector hitPoint = hits[i].position;
900  int depth = hits[i].depth;
901  double time = hits[i].time;
902  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
903  currentID.setID(unitID, time, primaryID, 0);
904  edepositEM = hits[i].edep*GeV;
905  edepositHAD = 0.;
906 #ifdef plotDebug
907  plotProfile(aStep, hitPoint, edepositEM, time, depth);
908 #endif
909 
910  // check if it is in the same unit and timeslice as the previous one
911  if (currentID == previousID) {
913  } else {
914  posGlobal = preStepPoint->GetPosition();
915  if (!checkHit()) currentHit = createNewHit();
916  }
917  }
918  }
919 }
float edepositEM
Definition: CaloSD.h:121
int i
Definition: DBlmapReader.cc:9
HFShowerParam * showerParam
Definition: HCalSD.h:81
void updateHit(CaloG4Hit *)
Definition: CaloSD.cc:437
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:586
int setTrackID(G4Step *step)
Definition: HCalSD.cc:1051
G4ThreeVector posGlobal
Definition: CaloSD.h:113
G4bool checkHit()
Definition: CaloSD.cc:328
float edepositHAD
Definition: CaloSD.h:121
CaloHitID previousID
Definition: CaloSD.h:117
CaloG4Hit * currentHit
Definition: CaloSD.h:128
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
CaloHitID currentID
Definition: CaloSD.h:117
std::vector< Hit > getHits(G4Step *aStep, double weight)
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
int weight
Definition: histoStyle.py:50
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
void HCalSD::getHitFibreBundle ( G4Step *  step,
bool  type 
)
private

Definition at line 988 of file HCalSD.cc.

References beta, CaloSD::checkHit(), CaloSD::createNewHit(), CaloSD::currentHit, CaloSD::currentID, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, HFShowerFibreBundle::getHits(), HFShowerFibreBundle::getRadius(), HcalNumberingScheme::getUnitID(), HcalForward, LogDebug, numberingFromDDD, numberingScheme, phi, plotProfile(), CaloSD::posGlobal, CaloSD::preStepPoint, CaloSD::previousID, CaloSD::resetForNewPrimary(), findQualityFiles::rr, CaloHitID::setID(), showerBundle, CaloSD::theTrack, cond::rpcobgas::time, tmp, HcalNumberingFromDDD::unitID(), and CaloSD::updateHit().

Referenced by ProcessHits().

988  {
989  preStepPoint = aStep->GetPreStepPoint();
990  theTrack = aStep->GetTrack();
991  double edep = showerBundle->getHits(aStep, type);
992 
993  if (edep >= 0) {
994  double etrack = preStepPoint->GetKineticEnergy();
995  int primaryID = 0;
996  if (etrack >= energyCut) {
997  primaryID = theTrack->GetTrackID();
998  } else {
999  primaryID = theTrack->GetParentID();
1000  if (primaryID == 0) primaryID = theTrack->GetTrackID();
1001  }
1002  // Reset entry point for new primary
1003  posGlobal = preStepPoint->GetPosition();
1004  resetForNewPrimary(posGlobal, etrack);
1005 
1006  //
1007  int det = static_cast<int>(HcalForward);
1008  G4ThreeVector hitPoint = preStepPoint->GetPosition();
1009  double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
1010  double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
1011  double etaR = showerBundle->getRadius();
1012  int depth = 1;
1013  if (etaR < 0) {
1014  depth = 2;
1015  etaR =-etaR;
1016  }
1017  if (hitPoint.z() < 0) etaR =-etaR;
1018 #ifdef DebugLog
1019  LogDebug("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR "
1020  << etaR << " phi " << phi/deg << " depth " <<depth;
1021 #endif
1022  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
1023  uint32_t unitID = 0;
1024  if (numberingFromDDD) {
1025  HcalNumberingFromDDD::HcalID tmp = numberingFromDDD->unitID(det,etaR,phi,depth,1);
1026  if (numberingScheme) unitID = numberingScheme->getUnitID(tmp);
1027  }
1028  if (type) currentID.setID(unitID, time, primaryID, 3);
1029  else currentID.setID(unitID, time, primaryID, 2);
1030 
1031  edepositHAD = aStep->GetTotalEnergyDeposit();
1032  edepositEM =-edepositHAD + (edep*GeV);
1033 #ifdef plotDebug
1034  plotProfile(aStep, hitPoint, edep*GeV, time, depth);
1035 #endif
1036 #ifdef DebugLog
1037  double beta = preStepPoint->GetBeta();
1038  LogDebug("HcalSim") << "HCalSD::getHitFibreBundle 1 hit for " << GetName()
1039  << " of " << primaryID << " with "
1040  << theTrack->GetDefinition()->GetParticleName()
1041  << " of " << preStepPoint->GetKineticEnergy()/GeV
1042  << " GeV with velocity " << beta << " UnitID "
1043  << std::hex << unitID << std::dec;
1044 #endif
1045  // check if it is in the same unit and timeslice as the previous one
1047  else if (!checkHit()) currentHit = createNewHit();
1048  } // non-zero energy deposit
1049 }
#define LogDebug(id)
float edepositEM
Definition: CaloSD.h:121
const double beta
double energyCut
Definition: CaloSD.h:123
type
Definition: HCALResponse.h:21
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID id)
void updateHit(CaloG4Hit *)
Definition: CaloSD.cc:437
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:83
double getHits(G4Step *aStep, bool type)
G4ThreeVector posGlobal
Definition: CaloSD.h:113
G4bool checkHit()
Definition: CaloSD.cc:328
float edepositHAD
Definition: CaloSD.h:121
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
CaloHitID previousID
Definition: CaloSD.h:117
CaloG4Hit * currentHit
Definition: CaloSD.h:128
G4Track * theTrack
Definition: CaloSD.h:118
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
CaloHitID currentID
Definition: CaloSD.h:117
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void resetForNewPrimary(G4ThreeVector, double)
Definition: CaloSD.cc:451
HcalID unitID(int det, const CLHEP::Hep3Vector &pos, int depth, int lay=-1) const
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
Definition: DDAxes.h:10
void HCalSD::getHitPMT ( G4Step *  step)
private

Definition at line 921 of file HCalSD.cc.

References beta, CaloSD::checkHit(), CaloSD::createNewHit(), CaloSD::currentHit, CaloSD::currentID, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::energyCut, HFShowerPMT::getHits(), HFShowerPMT::getRadius(), HcalNumberingScheme::getUnitID(), HcalForward, LogDebug, numberingFromDDD, numberingScheme, phi, plotProfile(), CaloSD::posGlobal, CaloSD::preStepPoint, CaloSD::previousID, CaloSD::resetForNewPrimary(), findQualityFiles::rr, CaloHitID::setID(), showerPMT, CaloSD::theTrack, cond::rpcobgas::time, tmp, HcalNumberingFromDDD::unitID(), and CaloSD::updateHit().

Referenced by ProcessHits().

921  {
922 
923  preStepPoint = aStep->GetPreStepPoint();
924  theTrack = aStep->GetTrack();
925  double edep = showerPMT->getHits(aStep);
926 
927  if (edep >= 0) {
928  double etrack = preStepPoint->GetKineticEnergy();
929  int primaryID = 0;
930  if (etrack >= energyCut) {
931  primaryID = theTrack->GetTrackID();
932  } else {
933  primaryID = theTrack->GetParentID();
934  if (primaryID == 0) primaryID = theTrack->GetTrackID();
935  }
936  // Reset entry point for new primary
937  posGlobal = preStepPoint->GetPosition();
938  resetForNewPrimary(posGlobal, etrack);
939 
940  //
941  int det = static_cast<int>(HcalForward);
942  G4ThreeVector hitPoint = preStepPoint->GetPosition();
943  double rr = (hitPoint.x()*hitPoint.x() + hitPoint.y()*hitPoint.y());
944  double phi = (rr == 0. ? 0. :atan2(hitPoint.y(),hitPoint.x()));
945  double etaR = showerPMT->getRadius();
946  int depth = 1;
947  if (etaR < 0) {
948  depth = 2;
949  etaR =-etaR;
950  }
951  if (hitPoint.z() < 0) etaR =-etaR;
952 #ifdef DebugLog
953  edm::LogInfo("HcalSim") << "HCalSD::Hit for Detector " << det << " etaR "
954  << etaR << " phi " << phi/deg << " depth " <<depth;
955 #endif
956  double time = (aStep->GetPostStepPoint()->GetGlobalTime());
957  uint32_t unitID = 0;
958  if (numberingFromDDD) {
960  depth,1);
961  if (numberingScheme) unitID = numberingScheme->getUnitID(tmp);
962  }
963  currentID.setID(unitID, time, primaryID, 1);
964 
965  edepositHAD = aStep->GetTotalEnergyDeposit();
966  edepositEM =-edepositHAD + (edep*GeV);
967 #ifdef plotDebug
968  plotProfile(aStep, hitPoint, edep*GeV, time, depth);
969 #endif
970 #ifdef DebugLog
971  double beta = preStepPoint->GetBeta();
972  LogDebug("HcalSim") << "HCalSD::getHitPMT 1 hit for " << GetName()
973  << " of " << primaryID << " with "
974  << theTrack->GetDefinition()->GetParticleName()
975  << " of " << preStepPoint->GetKineticEnergy()/GeV
976  << " GeV with velocity " << beta << " UnitID "
977  << std::hex << unitID << std::dec;
978 #endif
979  // check if it is in the same unit and timeslice as the previous one
980  if (currentID == previousID) {
982  } else {
983  if (!checkHit()) currentHit = createNewHit();
984  }
985  }
986 }
#define LogDebug(id)
float edepositEM
Definition: CaloSD.h:121
const double beta
double energyCut
Definition: CaloSD.h:123
double getRadius()
Definition: HFShowerPMT.cc:150
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID id)
void updateHit(CaloG4Hit *)
Definition: CaloSD.cc:437
G4ThreeVector posGlobal
Definition: CaloSD.h:113
G4bool checkHit()
Definition: CaloSD.cc:328
float edepositHAD
Definition: CaloSD.h:121
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
CaloHitID previousID
Definition: CaloSD.h:117
CaloG4Hit * currentHit
Definition: CaloSD.h:128
G4Track * theTrack
Definition: CaloSD.h:118
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
CaloHitID currentID
Definition: CaloSD.h:117
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
double getHits(G4Step *aStep)
Definition: HFShowerPMT.cc:104
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void resetForNewPrimary(G4ThreeVector, double)
Definition: CaloSD.cc:451
HFShowerPMT * showerPMT
Definition: HCalSD.h:82
HcalID unitID(int det, const CLHEP::Hep3Vector &pos, int depth, int lay=-1) const
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
Definition: DDAxes.h:10
std::vector< G4String > HCalSD::getNames ( DDFilteredView fv)
private

Definition at line 676 of file HCalSD.cc.

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

676  {
677 
678  std::vector<G4String> tmp;
679  bool dodet = fv.firstChild();
680  while (dodet) {
681  const DDLogicalPart & log = fv.logicalPart();
682  bool ok = true;
683 
684  for (unsigned int i=0; i<tmp.size(); ++i) {
685  if (!strcmp(tmp[i].c_str(), log.name().name().c_str())) {
686  ok = false;
687  break;
688  }
689  }
690  if (ok) tmp.push_back(log.name().name());
691  dodet = fv.next();
692  }
693  return tmp;
694 }
int i
Definition: DBlmapReader.cc:9
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:82
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:88
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:87
void HCalSD::hitForFibre ( G4Step *  step,
double  weight 
)
private

Definition at line 830 of file HCalSD.cc.

References CaloSD::checkHit(), CaloSD::createNewHit(), CaloSD::currentHit, CaloSD::currentID, CaloSD::edepositEM, CaloSD::edepositHAD, CaloSD::emPDG, CaloSD::epPDG, CaloSD::gammaPDG, HFShower::getHits(), hfshower, i, isItinFidVolume(), plotHF(), plotProfile(), CaloSD::posGlobal, CaloSD::preStepPoint, CaloSD::previousID, setDetUnitId(), CaloHitID::setID(), setTrackID(), CaloSD::theTrack, cond::rpcobgas::time, and CaloSD::updateHit().

Referenced by ProcessHits().

830  { // if not ParamShower
831 
832  preStepPoint = aStep->GetPreStepPoint();
833  theTrack = aStep->GetTrack();
834  int primaryID = setTrackID(aStep);
835 
836  int det = 5;
837  std::vector<HFShower::Hit> hits = hfshower->getHits(aStep, weight);
838 
839  G4int particleCode = theTrack->GetDefinition()->GetPDGEncoding();
840  if (particleCode==emPDG || particleCode==epPDG || particleCode==gammaPDG) {
841  edepositEM = 1.*GeV;
842  edepositHAD = 0.;
843  } else {
844  edepositEM = 0.;
845  edepositHAD = 1.*GeV;
846  }
847 
848 #ifdef DebugLog
849  edm::LogInfo("HcalSim") << "HCalSD::hitForFibre " << hits.size()
850  << " hits for " << GetName() << " of " << primaryID
851  << " with " << theTrack->GetDefinition()->GetParticleName()
852  << " of " << preStepPoint->GetKineticEnergy()/GeV
853  << " GeV in detector type " << det;
854 #endif
855  if (hits.size() > 0) {
856  for (unsigned int i=0; i<hits.size(); ++i) {
857  G4ThreeVector hitPoint = hits[i].position;
858  if (isItinFidVolume (hitPoint)) {
859  int depth = hits[i].depth;
860  double time = hits[i].time;
861  unsigned int unitID = setDetUnitId(det, hitPoint, depth);
862  currentID.setID(unitID, time, primaryID, 0);
863 #ifdef plotDebug
864  plotProfile(aStep, hitPoint, edepositEM, time, depth);
865  bool emType = false;
866  if (particleCode==emPDG || particleCode==epPDG || particleCode==gammaPDG)
867  emType = true;
868  plotHF(hitPoint,emType);
869 #endif
870  // check if it is in the same unit and timeslice as the previous one
871  if (currentID == previousID) {
873  } else {
874  posGlobal = preStepPoint->GetPosition();
875  if (!checkHit()) currentHit = createNewHit();
876  }
877  }
878  }
879  }
880 }
float edepositEM
Definition: CaloSD.h:121
int i
Definition: DBlmapReader.cc:9
G4int emPDG
Definition: CaloSD.h:136
void updateHit(CaloG4Hit *)
Definition: CaloSD.cc:437
bool isItinFidVolume(G4ThreeVector &)
Definition: HCalSD.cc:750
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:586
int setTrackID(G4Step *step)
Definition: HCalSD.cc:1051
G4ThreeVector posGlobal
Definition: CaloSD.h:113
G4bool checkHit()
Definition: CaloSD.cc:328
HFShower * hfshower
Definition: HCalSD.h:80
float edepositHAD
Definition: CaloSD.h:121
G4int epPDG
Definition: CaloSD.h:136
void plotHF(G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1165
G4int gammaPDG
Definition: CaloSD.h:136
std::vector< Hit > getHits(G4Step *aStep, double weight)
Definition: HFShower.cc:70
CaloHitID previousID
Definition: CaloSD.h:117
CaloG4Hit * currentHit
Definition: CaloSD.h:128
G4Track * theTrack
Definition: CaloSD.h:118
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
CaloHitID currentID
Definition: CaloSD.h:117
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
int weight
Definition: histoStyle.py:50
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
void HCalSD::initRun ( )
protectedvirtual

Reimplemented from CaloSD.

Definition at line 607 of file HCalSD.cc.

References hfshower, HFShower::initRun(), HFShowerParam::initRun(), HFShowerLibrary::initRun(), LogDebug, mumPDG, mupPDG, showerLibrary, and showerParam.

607  {
608  G4ParticleTable * theParticleTable = G4ParticleTable::GetParticleTable();
609  G4String particleName;
610  mumPDG = theParticleTable->FindParticle(particleName="mu-")->GetPDGEncoding();
611  mupPDG = theParticleTable->FindParticle(particleName="mu+")->GetPDGEncoding();
612 #ifdef DebugLog
613  LogDebug("HcalSim") << "HCalSD: Particle code for mu- = " << mumPDG
614  << " for mu+ = " << mupPDG;
615 #endif
616  if (showerLibrary) showerLibrary->initRun(theParticleTable);
617  if (showerParam) showerParam->initRun(theParticleTable);
618  if (hfshower) hfshower->initRun(theParticleTable);
619 }
#define LogDebug(id)
HFShowerParam * showerParam
Definition: HCalSD.h:81
void initRun(G4ParticleTable *)
Definition: HFShower.cc:477
HFShower * hfshower
Definition: HCalSD.h:80
G4int mupPDG
Definition: HCalSD.h:91
void initRun(G4ParticleTable *theParticleTable)
void initRun(G4ParticleTable *)
G4int mumPDG
Definition: HCalSD.h:91
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:79
bool HCalSD::isItConicalBundle ( G4LogicalVolume *  lv)
private

Definition at line 738 of file HCalSD.cc.

References fibre2LV.

Referenced by ProcessHits().

738  {
739  std::vector<G4LogicalVolume*>::const_iterator ite = fibre2LV.begin();
740  for (; ite != fibre2LV.end(); ++ite) if (lv == *ite) return true;
741  return false;
742 }
std::vector< G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:96
bool HCalSD::isItFibre ( G4LogicalVolume *  lv)
private

Definition at line 714 of file HCalSD.cc.

References fibreLV.

Referenced by HCalSD(), and ProcessHits().

714  {
715  std::vector<G4LogicalVolume*>::const_iterator ite = fibreLV.begin();
716  for (; ite != fibreLV.end(); ++ite) if (lv == *ite) return true;
717  return false;
718 }
std::vector< G4LogicalVolume * > fibreLV
Definition: HCalSD.h:96
bool HCalSD::isItFibre ( G4String  name)
private

Definition at line 720 of file HCalSD.cc.

References fibreNames.

720  {
721  std::vector<G4String>::const_iterator it = fibreNames.begin();
722  for (; it != fibreNames.end(); ++it) if (name == *it) return true;
723  return false;
724 }
std::vector< G4String > fibreNames
Definition: HCalSD.h:94
bool HCalSD::isItHF ( G4Step *  aStep)
private

Definition at line 696 of file HCalSD.cc.

References hfLevels, hfLV, and hfNames.

Referenced by HCalSD(), and ProcessHits().

696  {
697  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
698  int levels = (touch->GetHistoryDepth()) + 1;
699  for (unsigned int it=0; it < hfNames.size(); ++it) {
700  if (levels >= hfLevels[it]) {
701  G4LogicalVolume* lv = touch->GetVolume(levels-hfLevels[it])->GetLogicalVolume();
702  if (lv == hfLV[it]) return true;
703  }
704  }
705  return false;
706 }
std::vector< G4LogicalVolume * > hfLV
Definition: HCalSD.h:96
std::vector< int > hfLevels
Definition: HCalSD.h:93
std::vector< G4String > hfNames
Definition: HCalSD.h:94
bool HCalSD::isItHF ( G4String  name)
private

Definition at line 708 of file HCalSD.cc.

References hfNames.

708  {
709  std::vector<G4String>::const_iterator it = hfNames.begin();
710  for (; it != hfNames.end(); ++it) if (name == *it) return true;
711  return false;
712 }
std::vector< G4String > hfNames
Definition: HCalSD.h:94
bool HCalSD::isItinFidVolume ( G4ThreeVector &  hitPoint)
private

Definition at line 750 of file HCalSD.cc.

References applyFidCut, and HFFibreFiducial::PMTNumber().

Referenced by getFromLibrary(), and hitForFibre().

750  {
751  bool flag = true;
752  if (applyFidCut) {
753  int npmt = HFFibreFiducial:: PMTNumber(hitPoint);
754 #ifdef DebugLog
755  edm::LogInfo("HcalSim") << "HCalSD::isItinFidVolume:#PMT= " << npmt
756  << " for hit point " << hitPoint;
757 #endif
758  if (npmt <= 0) flag = false;
759  }
760 #ifdef DebugLog
761  edm::LogInfo("HcalSim") << "HCalSD::isItinFidVolume: point " << hitPoint
762  << " return flag " << flag;
763 #endif
764  return flag;
765 }
long int flag
Definition: mlp_lapack.h:47
static int PMTNumber(G4ThreeVector pe_effect)
bool applyFidCut
Definition: HCalSD.h:88
bool HCalSD::isItPMT ( G4LogicalVolume *  lv)
private

Definition at line 726 of file HCalSD.cc.

References pmtLV.

Referenced by ProcessHits().

726  {
727  std::vector<G4LogicalVolume*>::const_iterator ite = pmtLV.begin();
728  for (; ite != pmtLV.end(); ++ite) if (lv == *ite) return true;
729  return false;
730 }
std::vector< G4LogicalVolume * > pmtLV
Definition: HCalSD.h:96
bool HCalSD::isItScintillator ( G4Material *  mat)
private

Definition at line 744 of file HCalSD.cc.

References materials.

Referenced by getEnergyDeposit().

744  {
745  std::vector<G4Material*>::const_iterator ite = materials.begin();
746  for (; ite != materials.end(); ++ite) if (mat == *ite) return true;
747  return false;
748 }
std::vector< G4Material * > materials
Definition: HCalSD.h:95
bool HCalSD::isItStraightBundle ( G4LogicalVolume *  lv)
private

Definition at line 732 of file HCalSD.cc.

References fibre1LV.

Referenced by ProcessHits().

732  {
733  std::vector<G4LogicalVolume*>::const_iterator ite = fibre1LV.begin();
734  for (; ite != fibre1LV.end(); ++ite) if (lv == *ite) return true;
735  return false;
736 }
std::vector< G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:96
double HCalSD::layerWeight ( int  det,
G4ThreeVector  pos,
int  depth,
int  lay 
)
private

Definition at line 1097 of file HCalSD.cc.

References HcalNumberingFromDDD::HcalID::etaR, HcalNumberingFromDDD::HcalID::lay, layerWeights, numberingFromDDD, HcalTestNumbering::packHcalIndex(), HcalNumberingFromDDD::HcalID::phis, HcalNumberingFromDDD::HcalID::subdet, tmp, HcalNumberingFromDDD::unitID(), and HcalNumberingFromDDD::HcalID::zside.

Referenced by getEnergyDeposit().

1097  {
1098 
1099  double wt = 1.;
1100  if (numberingFromDDD) {
1101  //get the ID's as eta, phi, depth, ... indices
1103  depth, lay);
1104  uint32_t id = HcalTestNumbering::packHcalIndex(tmp.subdet, tmp.zside, 1,
1105  tmp.etaR, tmp.phis,tmp.lay);
1106  std::map<uint32_t,double>::const_iterator ite = layerWeights.find(id);
1107  if (ite != layerWeights.end()) wt = ite->second;
1108 #ifdef DebugLog
1109  edm::LogInfo("HcalSim") << "HCalSD::layerWeight: ID " << std::hex << id
1110  << std::dec << " (" << tmp.subdet << "/"
1111  << tmp.zside << "/1/" << tmp.etaR << "/"
1112  << tmp.phis << "/" << tmp.lay << ") Weight " <<wt;
1113 #endif
1114  }
1115  return wt;
1116 }
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:97
HcalID unitID(int det, const CLHEP::Hep3Vector &pos, int depth, int lay=-1) const
void HCalSD::plotHF ( G4ThreeVector &  pos,
bool  emType 
)
private

Definition at line 1165 of file HCalSD.cc.

References abs, gpar, hzvem, and hzvhad.

Referenced by getFromLibrary(), and hitForFibre().

1165  {
1166  double zv = std::abs(hitPoint.z()) - gpar[4];
1167  if (emType) {
1168  if (hzvem != 0) hzvem->Fill(zv);
1169  } else {
1170  if (hzvhad != 0) hzvhad->Fill(zv);
1171  }
1172 }
std::vector< double > gpar
Definition: HCalSD.h:92
#define abs(x)
Definition: mlp_lapack.h:159
TH1F * hzvhad
Definition: HCalSD.h:98
TH1F * hzvem
Definition: HCalSD.h:98
void HCalSD::plotProfile ( G4Step *  step,
G4ThreeVector  pos,
double  edep,
double  time,
int  id 
)
private

Definition at line 1118 of file HCalSD.cc.

References abs, dist_, newFWLiteAna::found, hit_, customizeTrackingMonitorSeedNumber::idx, cuy::ii, LogDebug, n, SensitiveDetector::name, cond::rpcobgas::time, and time_.

Referenced by getFromLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), hitForFibre(), and ProcessHits().

1119  {
1120 
1121  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
1122  static G4String modName[8] = {"HEModule", "HVQF" , "HBModule", "MBAT",
1123  "MBBT" , "MBBTC", "MBBT_R1P", "MBBT_R1M"};
1124  G4ThreeVector local;
1125  bool found=false;
1126  double depth=-2000;
1127  int idx = 4;
1128  for (int n=0; n<touch->GetHistoryDepth(); ++n) {
1129  G4String name = touch->GetVolume(n)->GetName();
1130 #ifdef DebugLog
1131  LogDebug("HcalSim") << "plotProfile Depth " << n << " Name " << name;
1132 #endif
1133  for (unsigned int ii=0; ii<8; ++ii) {
1134  if (name == modName[ii]) {
1135  found = true;
1136  int dn = touch->GetHistoryDepth() - n;
1137  local = touch->GetHistory()->GetTransform(dn).TransformPoint(global);
1138  if (ii == 0) {depth = local.z() - 4006.5; idx = 1;}
1139  else if (ii == 1) {depth = local.z() + 825.0; idx = 3;}
1140  else if (ii == 2) {depth = local.x() - 1775.; idx = 0;}
1141  else {depth = local.y() + 15.; idx = 2;}
1142  break;
1143  }
1144  }
1145  if (found) break;
1146  }
1147  if (!found) depth = std::abs(global.z()) - 11500;
1148 #ifdef DebugLog
1149  LogDebug("HcalSim") << "plotProfile Found " << found << " Global " << global
1150  << " Local " << local << " depth " << depth << " ID "
1151  << id << " EDEP " << edep << " Time " << time;
1152 #endif
1153  if (hit_[idx] != 0) hit_[idx]->Fill(edep);
1154  if (time_[idx] != 0) time_[idx]->Fill(time,edep);
1155  if (dist_[idx] != 0) dist_[idx]->Fill(depth,edep);
1156  int jd = 2*idx + id - 7;
1157  if (jd >= 0 && jd < 4) {
1158  jd += 5;
1159  if (hit_[jd] != 0) hit_[jd]->Fill(edep);
1160  if (time_[jd] != 0) time_[jd]->Fill(time,edep);
1161  if (dist_[jd] != 0) dist_[jd]->Fill(depth,edep);
1162  }
1163 }
#define LogDebug(id)
TH1F * time_[9]
Definition: HCalSD.h:98
#define abs(x)
Definition: mlp_lapack.h:159
int ii
Definition: cuy.py:588
TH1F * hit_[9]
Definition: HCalSD.h:98
TH1F * dist_[9]
Definition: HCalSD.h:98
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
bool HCalSD::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *   
)
virtual

Reimplemented from CaloSD.

Definition at line 392 of file HCalSD.cc.

References abs, CaloSD::createNewHit(), CaloSD::currentHit, HFDarkening::degradation(), deliveredLumi, HFDarkening::dose(), CaloSD::edepositEM, CaloSD::edepositHAD, getFromLibrary(), getFromParam(), getHitFibreBundle(), getHitPMT(), CaloSD::getNumberOfHits(), CaloSD::getStepInfo(), CaloSD::hitExists(), hitForFibre(), i, HFDarkening::int_lumi(), isItConicalBundle(), isItFibre(), isItHF(), isItPMT(), isItStraightBundle(), LogDebug, m_HFDarkening, mumPDG, mupPDG, SensitiveDetector::NaNTrap(), NULL, plotProfile(), alignCSCRings::r, showerBundle, showerPMT, useFibreBundle, useParam, usePMTHit, useShowerLibrary, histoStyle::weight, and detailsBasic3DVector::z.

392  {
393 
394  NaNTrap( aStep ) ;
395 
396  if (aStep == NULL) {
397  return true;
398  } else {
399  G4LogicalVolume* lv =
400  aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
401  G4String nameVolume = lv->GetName();
402  if (isItHF(aStep)) {
403  G4int parCode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
404  double weight(1.0);
405  if (m_HFDarkening != 0) {
406  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
407  double r = hitPoint.perp()/CLHEP::cm;
408  double z = std::abs(hitPoint.z())/CLHEP::cm;
409  float dose_acquired = 0.;
410  if (z>=1100 && z <= 1300) {
411  int hfZLayer = (int)((z - 1100)/20);
412  if (hfZLayer > 9) hfZLayer = 9;
413  float normalized_lumi = m_HFDarkening->int_lumi(deliveredLumi);
414  for (int i = hfZLayer; i <= 9; ++i) {
415  dose_acquired = m_HFDarkening->dose(i,r);
416  weight *= m_HFDarkening->degradation(normalized_lumi*dose_acquired);
417  }
418  }
419 #ifdef DebugLog
420  LogDebug("HcalSim") << "HCalSD: HFLumiDarkening at r = " << r
421  << ", z = " << z << " Dose " << dose_acquired
422  << " weight " << weight;
423 #endif
424  }
425  if (useParam) {
426 #ifdef DebugLog
427  LogDebug("HcalSim") << "HCalSD: " << getNumberOfHits()
428  << " hits from parametrization in " << nameVolume
429  << " for Track " << aStep->GetTrack()->GetTrackID()
430  <<" (" << aStep->GetTrack()->GetDefinition()->GetParticleName()
431  <<")";
432 #endif
433  getFromParam(aStep, weight);
434 #ifdef DebugLog
435  LogDebug("HcalSim") << "HCalSD: " << getNumberOfHits()
436  << " hits afterParamS*";
437 #endif
438  } else {
439  bool notaMuon = true;
440  if (parCode == mupPDG || parCode == mumPDG ) notaMuon = false;
441  if (useShowerLibrary && notaMuon) {
442 #ifdef DebugLog
443  LogDebug("HcalSim") << "HCalSD: Starts shower library from "
444  << nameVolume << " for Track "
445  << aStep->GetTrack()->GetTrackID() << " ("
446  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
447 #endif
448  getFromLibrary(aStep, weight);
449  } else if (isItFibre(lv)) {
450 #ifdef DebugLog
451  LogDebug("HcalSim") << "HCalSD: Hit at Fibre in " << nameVolume
452  << " for Track "
453  << aStep->GetTrack()->GetTrackID() <<" ("
454  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
455 #endif
456  hitForFibre(aStep, weight);
457  }
458  }
459  } else if (isItPMT(lv)) {
460 #ifdef DebugLog
461  LogDebug("HcalSim") << "HCalSD: Hit from PMT parametrization from "
462  << nameVolume << " for Track "
463  << aStep->GetTrack()->GetTrackID() << " ("
464  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
465 #endif
466  if (usePMTHit && showerPMT) getHitPMT(aStep);
467  } else if (isItStraightBundle(lv) || isItConicalBundle(lv)) {
468 #ifdef DebugLog
469  LogDebug("HcalSim") << "HCalSD: Hit from FibreBundle from "
470  << nameVolume << " for Track "
471  << aStep->GetTrack()->GetTrackID() << " ("
472  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
473 #endif
476  } else {
477 #ifdef DebugLog
478  LogDebug("HcalSim") << "HCalSD: Hit from standard path from "
479  << nameVolume << " for Track "
480  << aStep->GetTrack()->GetTrackID() << " ("
481  << aStep->GetTrack()->GetDefinition()->GetParticleName() << ")";
482 #endif
483  if (getStepInfo(aStep)) {
484 #ifdef plotDebug
485  if (edepositEM+edepositHAD > 0)
486  plotProfile(aStep, aStep->GetPreStepPoint()->GetPosition(),
487  edepositEM+edepositHAD,aStep->GetPostStepPoint()->GetGlobalTime(),0);
488 #endif
489  if (hitExists() == false && edepositEM+edepositHAD>0.) currentHit = createNewHit();
490  }
491  }
492  return true;
493  }
494 }
#define LogDebug(id)
float edepositEM
Definition: CaloSD.h:121
int i
Definition: DBlmapReader.cc:9
bool useParam
Definition: HCalSD.h:88
float int_lumi(float intlumi)
Definition: HFDarkening.cc:147
void hitForFibre(G4Step *step, double weight)
Definition: HCalSD.cc:830
void getFromParam(G4Step *step, double weight)
Definition: HCalSD.cc:882
bool isItStraightBundle(G4LogicalVolume *)
Definition: HCalSD.cc:732
bool useFibreBundle
Definition: HCalSD.h:86
double deliveredLumi
Definition: HCalSD.h:90
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:83
bool useShowerLibrary
Definition: HCalSD.h:88
#define abs(x)
Definition: mlp_lapack.h:159
#define NULL
Definition: scimark2.h:8
void getFromLibrary(G4Step *step, double weight)
Definition: HCalSD.cc:767
bool usePMTHit
Definition: HCalSD.h:86
float float float z
bool isItHF(G4Step *)
Definition: HCalSD.cc:696
bool isItConicalBundle(G4LogicalVolume *)
Definition: HCalSD.cc:738
float edepositHAD
Definition: CaloSD.h:121
float degradation(float mrad)
Definition: HFDarkening.cc:143
void getHitPMT(G4Step *step)
Definition: HCalSD.cc:921
int getNumberOfHits()
Definition: CaloSD.cc:358
HFDarkening * m_HFDarkening
Definition: HCalSD.h:85
CaloG4Hit * currentHit
Definition: CaloSD.h:128
void NaNTrap(G4Step *step)
virtual G4bool getStepInfo(G4Step *aStep)
Definition: CaloSD.cc:247
bool isItPMT(G4LogicalVolume *)
Definition: HCalSD.cc:726
G4int mupPDG
Definition: HCalSD.h:91
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:1118
void getHitFibreBundle(G4Step *step, bool type)
Definition: HCalSD.cc:988
float dose(int layer, float radius)
Definition: HFDarkening.cc:92
G4bool hitExists()
Definition: CaloSD.cc:307
G4int mumPDG
Definition: HCalSD.h:91
HFShowerPMT * showerPMT
Definition: HCalSD.h:82
int weight
Definition: histoStyle.py:50
CaloG4Hit * createNewHit()
Definition: CaloSD.cc:360
bool isItFibre(G4LogicalVolume *)
Definition: HCalSD.cc:714
void HCalSD::readWeightFromFile ( std::string  fName)
private

Definition at line 1071 of file HCalSD.cc.

References recoMuon::in, EdgesToViz::infile, layerWeights, HcalTestNumbering::packHcalIndex(), phi, and useLayerWt.

Referenced by HCalSD().

1071  {
1072 
1073  std::ifstream infile;
1074  int entry=0;
1075  infile.open(fName.c_str(), std::ios::in);
1076  if (infile) {
1077  int det, zside, etaR, phi, lay;
1078  double wt;
1079  while (infile >> det >> zside >> etaR >> phi >> lay >> wt) {
1080  uint32_t id = HcalTestNumbering::packHcalIndex(det,zside,1,etaR,phi,lay);
1081  layerWeights.insert(std::pair<uint32_t,double>(id,wt));
1082  ++entry;
1083 #ifdef DebugLog
1084  edm::LogInfo("HcalSim") << "HCalSD::readWeightFromFile:Entry " << entry
1085  << " ID " << std::hex << id << std::dec << " ("
1086  << det << "/" << zside << "/1/" << etaR << "/"
1087  << phi << "/" << lay << ") Weight " << wt;
1088 #endif
1089  }
1090  infile.close();
1091  }
1092  edm::LogInfo("HcalSim") << "HCalSD::readWeightFromFile: reads " << entry
1093  << " weights from " << fName;
1094  if (entry <= 0) useLayerWt = false;
1095 }
bool useLayerWt
Definition: HCalSD.h:86
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
list infile
Definition: EdgesToViz.py:90
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:97
Definition: DDAxes.h:10
uint32_t HCalSD::setDetUnitId ( G4Step *  step)
virtual

Implements CaloSD.

Definition at line 586 of file HCalSD.cc.

References CaloSD::preStepPoint.

Referenced by getEnergyDeposit(), getFromLibrary(), getFromParam(), and hitForFibre().

586  {
587 
588  G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
589  const G4VTouchable* touch = preStepPoint->GetTouchable();
590  G4ThreeVector hitPoint = preStepPoint->GetPosition();
591 
592  int depth = (touch->GetReplicaNumber(0))%10 + 1;
593  int lay = (touch->GetReplicaNumber(0)/10)%100 + 1;
594  int det = (touch->GetReplicaNumber(1))/1000;
595 
596  return setDetUnitId (det, hitPoint, depth, lay);
597 }
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:586
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
uint32_t HCalSD::setDetUnitId ( int  det,
G4ThreeVector  pos,
int  depth,
int  lay = 1 
)
private

Definition at line 640 of file HCalSD.cc.

References HcalNumberingScheme::getUnitID(), numberingFromDDD, numberingScheme, tmp, and HcalNumberingFromDDD::unitID().

640  {
641  uint32_t id = 0;
642  if (numberingFromDDD) {
643  //get the ID's as eta, phi, depth, ... indices
645  //get the ID
646  if (numberingScheme) id = numberingScheme->getUnitID(tmp);
647  }
648  return id;
649 }
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID id)
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:77
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
HcalID unitID(int det, const CLHEP::Hep3Vector &pos, int depth, int lay=-1) const
void HCalSD::setNumberingScheme ( HcalNumberingScheme scheme)

Definition at line 599 of file HCalSD.cc.

References numberingScheme.

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

599  {
600  if (scheme != 0) {
601  edm::LogInfo("HcalSim") << "HCalSD: updates numbering scheme for " << GetName();
602  if (numberingScheme) delete numberingScheme;
603  numberingScheme = scheme;
604  }
605 }
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:78
int HCalSD::setTrackID ( G4Step *  step)
private

Definition at line 1051 of file HCalSD.cc.

References TrackInformation::getIDonCaloSurface(), CaloSD::preStepPoint, CaloSD::previousID, CaloSD::resetForNewPrimary(), CaloSD::theTrack, and CaloHitID::trackID().

Referenced by getFromLibrary(), getFromParam(), and hitForFibre().

1051  {
1052  theTrack = aStep->GetTrack();
1053 
1054  double etrack = preStepPoint->GetKineticEnergy();
1055  TrackInformation * trkInfo = (TrackInformation *)(theTrack->GetUserInformation());
1056  int primaryID = trkInfo->getIDonCaloSurface();
1057  if (primaryID == 0) {
1058 #ifdef DebugLog
1059  edm::LogInfo("HcalSim") << "HCalSD: Problem with primaryID **** set by "
1060  << "force to TkID **** " <<theTrack->GetTrackID();
1061 #endif
1062  primaryID = theTrack->GetTrackID();
1063  }
1064 
1065  if (primaryID != previousID.trackID())
1066  resetForNewPrimary(preStepPoint->GetPosition(), etrack);
1067 
1068  return primaryID;
1069 }
int getIDonCaloSurface() const
int trackID() const
Definition: CaloHitID.h:25
CaloHitID previousID
Definition: CaloSD.h:117
G4Track * theTrack
Definition: CaloSD.h:118
G4StepPoint * preStepPoint
Definition: CaloSD.h:120
void resetForNewPrimary(G4ThreeVector, double)
Definition: CaloSD.cc:451

Member Data Documentation

bool HCalSD::applyFidCut
private

Definition at line 88 of file HCalSD.h.

Referenced by HCalSD(), and isItinFidVolume().

double HCalSD::betaThr
private

Definition at line 87 of file HCalSD.h.

Referenced by HCalSD().

double HCalSD::birk1
private

Definition at line 87 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk2
private

Definition at line 87 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::birk3
private

Definition at line 87 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

double HCalSD::deliveredLumi
private

Definition at line 90 of file HCalSD.h.

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

TH1F * HCalSD::dist_[9]
private

Definition at line 98 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

double HCalSD::eminHitHB
private

Definition at line 89 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHE
private

Definition at line 89 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHF
private

Definition at line 89 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

double HCalSD::eminHitHO
private

Definition at line 89 of file HCalSD.h.

Referenced by filterHit(), and HCalSD().

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

Definition at line 96 of file HCalSD.h.

Referenced by HCalSD(), and isItStraightBundle().

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

Definition at line 96 of file HCalSD.h.

Referenced by HCalSD(), and isItConicalBundle().

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

Definition at line 96 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 94 of file HCalSD.h.

Referenced by HCalSD(), and isItFibre().

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

Definition at line 92 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

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

Definition at line 93 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 96 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

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

Definition at line 94 of file HCalSD.h.

Referenced by HCalSD(), and isItHF().

HFShower* HCalSD::hfshower
private

Definition at line 80 of file HCalSD.h.

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

TH1F* HCalSD::hit_[9]
private

Definition at line 98 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

TH1F * HCalSD::hzvem
private

Definition at line 98 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

TH1F * HCalSD::hzvhad
private

Definition at line 98 of file HCalSD.h.

Referenced by HCalSD(), and plotHF().

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

Definition at line 92 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

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

Definition at line 97 of file HCalSD.h.

Referenced by layerWeight(), and readWeightFromFile().

HEDarkening* HCalSD::m_HEDarkening
private

Definition at line 84 of file HCalSD.h.

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

HFDarkening* HCalSD::m_HFDarkening
private

Definition at line 85 of file HCalSD.h.

Referenced by HCalSD(), ProcessHits(), and ~HCalSD().

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

Definition at line 95 of file HCalSD.h.

Referenced by HCalSD(), and isItScintillator().

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

Definition at line 94 of file HCalSD.h.

Referenced by HCalSD().

G4int HCalSD::mumPDG
private

Definition at line 91 of file HCalSD.h.

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

G4int HCalSD::mupPDG
private

Definition at line 91 of file HCalSD.h.

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

HcalNumberingFromDDD* HCalSD::numberingFromDDD
private

Definition at line 77 of file HCalSD.h.

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

HcalNumberingScheme* HCalSD::numberingScheme
private

Definition at line 78 of file HCalSD.h.

Referenced by getHitFibreBundle(), getHitPMT(), setDetUnitId(), setNumberingScheme(), and ~HCalSD().

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

Definition at line 96 of file HCalSD.h.

Referenced by HCalSD(), and isItPMT().

HFShowerFibreBundle* HCalSD::showerBundle
private

Definition at line 83 of file HCalSD.h.

Referenced by getHitFibreBundle(), HCalSD(), ProcessHits(), and ~HCalSD().

HFShowerLibrary* HCalSD::showerLibrary
private

Definition at line 79 of file HCalSD.h.

Referenced by getFromLibrary(), HCalSD(), initRun(), and ~HCalSD().

HFShowerParam* HCalSD::showerParam
private

Definition at line 81 of file HCalSD.h.

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

HFShowerPMT* HCalSD::showerPMT
private

Definition at line 82 of file HCalSD.h.

Referenced by getHitPMT(), HCalSD(), ProcessHits(), and ~HCalSD().

bool HCalSD::testNumber
private

Definition at line 86 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

TH1F * HCalSD::time_[9]
private

Definition at line 98 of file HCalSD.h.

Referenced by HCalSD(), and plotProfile().

bool HCalSD::useBirk
private

Definition at line 86 of file HCalSD.h.

Referenced by getEnergyDeposit(), and HCalSD().

bool HCalSD::useFibreBundle
private

Definition at line 86 of file HCalSD.h.

Referenced by HCalSD(), and ProcessHits().

bool HCalSD::useHF
private

Definition at line 88 of file HCalSD.h.

Referenced by HCalSD().

bool HCalSD::useLayerWt
private

Definition at line 86 of file HCalSD.h.

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

bool HCalSD::useParam
private

Definition at line 88 of file HCalSD.h.

Referenced by HCalSD(), and ProcessHits().

bool HCalSD::usePMTHit
private

Definition at line 86 of file HCalSD.h.

Referenced by HCalSD(), and ProcessHits().

bool HCalSD::useShowerLibrary
private

Definition at line 88 of file HCalSD.h.

Referenced by HCalSD(), and ProcessHits().