CMS 3D CMS Logo

HCalSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_HCalSD_h
2 #define SimG4CMS_HCalSD_h
3 // File: HCalSD.h
5 // Description: Stores hits of Hadron calorimeter in appropriate container
6 // Use in your sensitive detector builder:
7 // HCalSD* hcalSD = new HCalSD(SDname, new CaloNumberingScheme());
9 
26 
27 #include "G4String.hh"
28 #include <map>
29 #include <string>
30 
31 class DDFilteredView;
32 class G4LogicalVolume;
33 class G4Material;
34 class G4Step;
35 class HcalTestNS;
36 class TH1F;
37 
38 class HCalSD : public CaloSD, public Observer<const BeginOfJob*> {
39 public:
40  HCalSD(const std::string&,
41  const HcalDDDSimConstants*,
42  const HcalDDDRecConstants*,
44  const HBHEDarkening*,
45  const HBHEDarkening*,
47  edm::ParameterSet const&,
48  const SimTrackManager*);
49  ~HCalSD() override = default;
50  uint32_t setDetUnitId(const G4Step* step) override;
52 
53 protected:
54  double getEnergyDeposit(const G4Step*) override;
55  bool getFromLibrary(const G4Step*) override;
56  using CaloSD::update;
57  void update(const BeginOfJob*) override;
58  void initRun() override;
59  bool filterHit(CaloG4Hit*, double) override;
60 
61 private:
62  void fillLogVolumeVector(const std::string&, const std::vector<std::string>&, std::vector<const G4LogicalVolume*>&);
63  uint32_t setDetUnitId(int, const G4ThreeVector&, int, int);
65  bool isItHF(const G4Step*);
66  bool isItHF(const G4String&);
67  bool isItFibre(const G4LogicalVolume*);
68  bool isItFibre(const G4String&);
69  bool isItPMT(const G4LogicalVolume*);
70  bool isItStraightBundle(const G4LogicalVolume*);
71  bool isItConicalBundle(const G4LogicalVolume*);
72  bool isItScintillator(const G4Material*);
73  bool isItinFidVolume(const G4ThreeVector&);
74  void getFromHFLibrary(const G4Step* step, bool& isKilled);
75  void hitForFibre(const G4Step* step);
76  void getFromParam(const G4Step* step, bool& isKilled);
77  void getHitPMT(const G4Step* step);
78  void getHitFibreBundle(const G4Step* step, bool type);
79  void readWeightFromFile(const std::string&);
80  double layerWeight(int, const G4ThreeVector&, int, int);
81  void plotProfile(const G4Step* step, const G4ThreeVector& pos, double edep, double time, int id);
82  void plotHF(const G4ThreeVector& pos, bool emType);
84 
85  std::unique_ptr<HcalNumberingFromDDD> numberingFromDDD;
86  std::unique_ptr<HcalNumberingScheme> numberingScheme;
87  std::unique_ptr<HFShowerLibrary> showerLibrary;
88  std::unique_ptr<HFShower> hfshower;
89  std::unique_ptr<HFShowerParam> showerParam;
90  std::unique_ptr<HFShowerPMT> showerPMT;
91  std::unique_ptr<HFShowerFibreBundle> showerBundle;
92 
97  std::unique_ptr<HFDarkening> m_HFDarkening;
98  std::unique_ptr<HcalTestNS> m_HcalTestNS;
99 
100  bool isHF;
108  double weight_;
109  int depth_;
110  std::vector<double> gpar;
111  std::vector<int> hfLevels;
112  std::vector<std::string> hfNames;
113  std::vector<std::string> fibreNames;
114  std::vector<std::string> matNames;
115  std::vector<const G4Material*> materials;
116  std::vector<const G4LogicalVolume*> hfLV, fibreLV, pmtLV, fibre1LV, fibre2LV;
117  std::map<uint32_t, double> layerWeights;
118  TH1F *hit_[9], *time_[9], *dist_[9], *hzvem, *hzvhad;
119 };
120 
121 #endif // HCalSD_h
HCalSD::fibreLV
std::vector< const G4LogicalVolume * > fibreLV
Definition: HCalSD.h:116
HCalSD::isItStraightBundle
bool isItStraightBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:647
SimTrackManager
Definition: SimTrackManager.h:35
HCalSD::testNS_
bool testNS_
Definition: HCalSD.h:103
HCalSD::hfLevels
std::vector< int > hfLevels
Definition: HCalSD.h:111
HCalSD::getFromHFLibrary
void getFromHFLibrary(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:687
Observer
Definition: Observer.h:23
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
BeginOfJob.h
step
step
Definition: StallMonitor.cc:94
HBHEDarkening.h
HCalSD
Definition: HCalSD.h:38
HCalSD::agingFlagHE
bool agingFlagHE
Definition: HCalSD.h:101
HCalSD::m_HBDarkening
const HBHEDarkening * m_HBDarkening
Definition: HCalSD.h:95
HFShowerPMT.h
HCalSD::getFromParam
void getFromParam(const G4Step *step, bool &isKilled)
Definition: HCalSD.cc:772
HcalTestNS
Definition: HcalTestNS.h:7
HCalSD::pmtLV
std::vector< const G4LogicalVolume * > pmtLV
Definition: HCalSD.h:116
pos
Definition: PixelAliasList.h:18
HCalSD::neutralDensity
bool neutralDensity
Definition: HCalSD.h:103
CaloSD::update
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
Definition: CaloSD.cc:705
HFShowerParam.h
HCalSD::getHitFibreBundle
void getHitFibreBundle(const G4Step *step, bool type)
Definition: HCalSD.cc:861
HCalSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: HCalSD.cc:399
HCalSD::hit_
TH1F * hit_[9]
Definition: HCalSD.h:118
protons_cff.time
time
Definition: protons_cff.py:35
HcalTestNS.h
HCalSD::isItPMT
bool isItPMT(const G4LogicalVolume *)
Definition: HCalSD.cc:639
HCalSD::~HCalSD
~HCalSD() override=default
HCalSD::useBirk
bool useBirk
Definition: HCalSD.h:102
HCalSD::isItinFidVolume
bool isItinFidVolume(const G4ThreeVector &)
Definition: HCalSD.cc:671
HCalSD::isHF
bool isHF
Definition: HCalSD.h:100
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
HcalNumberingFromDDD.h
HCalSD::depth_
int depth_
Definition: HCalSD.h:109
HCalSD::applyFidCut
bool applyFidCut
Definition: HCalSD.h:105
HCalSD::getHitPMT
void getHitPMT(const G4Step *step)
Definition: HCalSD.cc:802
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
HCalSD::layerWeight
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:947
HcalParametersRcd.h
HCalSD::m_HcalTestNS
std::unique_ptr< HcalTestNS > m_HcalTestNS
Definition: HCalSD.h:98
HCalSD::layerWeights
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:117
HCalSD::hfNames
std::vector< std::string > hfNames
Definition: HCalSD.h:112
HCalSD::fibre1LV
std::vector< const G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:116
HCalSD::eminHitHO
double eminHitHO
Definition: HCalSD.h:106
HcalSimulationConstants
Definition: HcalSimulationConstants.h:15
HCalSD::hzvem
TH1F * hzvem
Definition: HCalSD.h:118
HcalNumberingScheme.h
HCalSD::update
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
Definition: HCalSD.cc:552
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
HCalSD::initRun
void initRun() override
Definition: HCalSD.cc:554
HCalSD::birk1
double birk1
Definition: HCalSD.h:104
BeginOfJob
Definition: BeginOfJob.h:8
HCalSD::filterHit
bool filterHit(CaloG4Hit *, double) override
Definition: HCalSD.cc:556
HCalSD::modifyDepth
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1040
HCalSD::useHF
bool useHF
Definition: HCalSD.h:105
HFShower.h
HCalSD::readWeightFromFile
void readWeightFromFile(const std::string &)
Definition: HCalSD.cc:923
HCalSD::hfLV
std::vector< const G4LogicalVolume * > hfLV
Definition: HCalSD.h:116
HCalSD::eminHitHF
double eminHitHF
Definition: HCalSD.h:106
HCalSD::useParam
bool useParam
Definition: HCalSD.h:105
HCalSD::eminHitHE
double eminHitHE
Definition: HCalSD.h:106
edm::ParameterSet
Definition: ParameterSet.h:47
HCalSD::isItConicalBundle
bool isItConicalBundle(const G4LogicalVolume *)
Definition: HCalSD.cc:655
CaloSD.h
HCalSD::HCalSD
HCalSD(const std::string &, const HcalDDDSimConstants *, const HcalDDDRecConstants *, const HcalSimulationConstants *, const HBHEDarkening *, const HBHEDarkening *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: HCalSD.cc:42
HCalSD::numberingFromDDD
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
Definition: HCalSD.h:85
HFShowerLibrary.h
HCalSD::time_
TH1F * time_[9]
Definition: HCalSD.h:118
HCalSD::hcalSimConstants_
const HcalSimulationConstants * hcalSimConstants_
Definition: HCalSD.h:94
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
HCalSD::showerBundle
std::unique_ptr< HFShowerFibreBundle > showerBundle
Definition: HCalSD.h:91
HCalSD::hitForFibre
void hitForFibre(const G4Step *step)
Definition: HCalSD.cc:730
HCalSD::isItHF
bool isItHF(const G4Step *)
Definition: HCalSD.cc:602
HCalSD::hcalConstants_
const HcalDDDSimConstants * hcalConstants_
Definition: HCalSD.h:93
HCalSD::agingFlagHB
bool agingFlagHB
Definition: HCalSD.h:101
HBHEDarkening
Definition: HBHEDarkening.h:17
HCalSD::showerLibrary
std::unique_ptr< HFShowerLibrary > showerLibrary
Definition: HCalSD.h:87
HCalSD::isItScintillator
bool isItScintillator(const G4Material *)
Definition: HCalSD.cc:663
HCalSD::fibreNames
std::vector< std::string > fibreNames
Definition: HCalSD.h:113
HFShowerFibreBundle.h
HCalSD::hfshower
std::unique_ptr< HFShower > hfshower
Definition: HCalSD.h:88
CaloG4Hit
Definition: CaloG4Hit.h:32
HCalSD::dist_
TH1F * dist_[9]
Definition: HCalSD.h:118
HCalSD::gpar
std::vector< double > gpar
Definition: HCalSD.h:110
HCalSD::useFibreBundle
bool useFibreBundle
Definition: HCalSD.h:102
HCalSD::m_HFDarkening
std::unique_ptr< HFDarkening > m_HFDarkening
Definition: HCalSD.h:97
HCalSD::fibre2LV
std::vector< const G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:116
HCalSD::betaThr
double betaThr
Definition: HCalSD.h:104
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HFDarkening.h
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
HCalSD::setNumberingScheme
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:545
HCalSD::plotHF
void plotHF(const G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1029
HCalSD::usePMTHit
bool usePMTHit
Definition: HCalSD.h:102
HCalSD::eminHitHB
double eminHitHB
Definition: HCalSD.h:106
HCalSD::plotProfile
void plotProfile(const G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:967
HCalSD::materials
std::vector< const G4Material * > materials
Definition: HCalSD.h:115
HCalSD::getFromLibrary
bool getFromLibrary(const G4Step *) override
Definition: HCalSD.cc:335
HCalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *step) override
Definition: HCalSD.cc:533
HCalSD::showerPMT
std::unique_ptr< HFShowerPMT > showerPMT
Definition: HCalSD.h:90
HCalSD::useShowerLibrary
bool useShowerLibrary
Definition: HCalSD.h:105
HCalSD::birk2
double birk2
Definition: HCalSD.h:104
HcalDDDRecConstants.h
HcalSimulationConstants.h
HCalSD::isItFibre
bool isItFibre(const G4LogicalVolume *)
Definition: HCalSD.cc:623
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
DDFilteredView
Definition: DDFilteredView.h:20
HCalSD::matNames
std::vector< std::string > matNames
Definition: HCalSD.h:114
HCalSD::testNumber
bool testNumber
Definition: HCalSD.h:103
HCalSD::hzvhad
TH1F * hzvhad
Definition: HCalSD.h:118
HCalSD::fillLogVolumeVector
void fillLogVolumeVector(const std::string &, const std::vector< std::string > &, std::vector< const G4LogicalVolume * > &)
Definition: HCalSD.cc:310
HCalSD::m_HEDarkening
const HBHEDarkening * m_HEDarkening
Definition: HCalSD.h:96
HCalSD::showerParam
std::unique_ptr< HFShowerParam > showerParam
Definition: HCalSD.h:89
HCalSD::weight_
double weight_
Definition: HCalSD.h:108
HCalSD::useLayerWt
bool useLayerWt
Definition: HCalSD.h:102
CaloSD
Definition: CaloSD.h:39
HCalSD::deliveredLumi
double deliveredLumi
Definition: HCalSD.h:107
HcalDDDSimConstants.h
HCalSD::birk3
double birk3
Definition: HCalSD.h:104
HCalSD::numberingScheme
std::unique_ptr< HcalNumberingScheme > numberingScheme
Definition: HCalSD.h:86