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 
23 
24 #include "G4String.hh"
25 #include <map>
26 #include <string>
27 #include <TH1F.h>
28 
29 class DDCompactView;
30 class DDFilteredView;
31 class G4LogicalVolume;
32 class G4Material;
33 class G4Step;
34 
35 class HCalSD : public CaloSD, public Observer<const BeginOfJob *> {
36 
37 public:
38 
39  HCalSD(G4String , const DDCompactView &, const SensitiveDetectorCatalog &,
40  edm::ParameterSet const &, const SimTrackManager*);
41  virtual ~HCalSD();
42  virtual bool ProcessHits(G4Step * , G4TouchableHistory * );
43  virtual double getEnergyDeposit(G4Step* );
44  virtual uint32_t setDetUnitId(G4Step* step);
46 
47 protected:
48 
49  virtual void update(const BeginOfJob *);
50  virtual void initRun();
51  virtual bool filterHit(CaloG4Hit*, double);
52 
53 private:
54 
55  uint32_t setDetUnitId(int, const G4ThreeVector&, int, int);
57  std::vector<double> getDDDArray(const std::string&,
58  const DDsvalues_type&);
59  std::vector<G4String> getNames(DDFilteredView&);
60  bool isItHF(G4Step *);
61  bool isItHF(G4String);
62  bool isItFibre(G4LogicalVolume*);
63  bool isItFibre(G4String);
64  bool isItPMT(G4LogicalVolume*);
65  bool isItStraightBundle(G4LogicalVolume*);
66  bool isItConicalBundle(G4LogicalVolume*);
67  bool isItScintillator(G4Material*);
68  bool isItinFidVolume (G4ThreeVector&);
69  void getFromLibrary(G4Step * step, double weight);
70  void hitForFibre(G4Step * step, double weight);
71  void getFromParam(G4Step * step, double weight);
72  void getHitPMT(G4Step * step);
73  void getHitFibreBundle(G4Step * step, bool type);
74  int setTrackID(G4Step * step);
76  double layerWeight(int, const G4ThreeVector&, int, int);
77  void plotProfile(G4Step* step, const G4ThreeVector& pos,
78  double edep, double time, int id);
79  void plotHF(G4ThreeVector& pos, bool emType);
81 
94  double birk1, birk2, birk3, betaThr;
97  double deliveredLumi;
98  G4int mumPDG, mupPDG, depth_;
99  std::vector<double> gpar;
100  std::vector<int> hfLevels;
101  std::vector<G4String> hfNames, fibreNames, matNames;
102  std::vector<G4Material*> materials;
103  std::vector<G4LogicalVolume*> hfLV, fibreLV, pmtLV, fibre1LV, fibre2LV;
104  std::map<uint32_t,double> layerWeights;
105  TH1F *hit_[9], *time_[9], *dist_[9], *hzvem, *hzvhad;
106 
107 };
108 
109 #endif // HCalSD_h
HCalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: HCalSD.cc:42
type
Definition: HCALResponse.h:21
bool useParam
Definition: HCalSD.h:95
double eminHitHE
Definition: HCalSD.h:96
HFShowerParam * showerParam
Definition: HCalSD.h:87
TH1F * time_[9]
Definition: HCalSD.h:105
void hitForFibre(G4Step *step, double weight)
Definition: HCalSD.cc:832
void getFromParam(G4Step *step, double weight)
Definition: HCalSD.cc:884
G4int depth_
Definition: HCalSD.h:98
bool useLayerWt
Definition: HCalSD.h:92
Definition: CaloSD.h:42
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
Definition: HCalSD.cc:579
bool isItStraightBundle(G4LogicalVolume *)
Definition: HCalSD.cc:734
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: HCalSD.cc:374
std::vector< double > gpar
Definition: HCalSD.h:99
bool useFibreBundle
Definition: HCalSD.h:92
bool isItinFidVolume(G4ThreeVector &)
Definition: HCalSD.cc:752
double betaThr
Definition: HCalSD.h:94
double deliveredLumi
Definition: HCalSD.h:97
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:89
std::vector< G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:103
std::vector< G4LogicalVolume * > fibreLV
Definition: HCalSD.h:103
double eminHitHB
Definition: HCalSD.h:96
bool useShowerLibrary
Definition: HCalSD.h:95
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:653
Definition: weight.py:1
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:558
double birk2
Definition: HCalSD.h:94
int setTrackID(G4Step *step)
Definition: HCalSD.cc:1053
void getFromLibrary(G4Step *step, double weight)
Definition: HCalSD.cc:769
bool usePMTHit
Definition: HCalSD.h:92
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1177
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:571
type of data representation of DDCompactView
Definition: DDCompactView.h:90
double birk1
Definition: HCalSD.h:94
bool isItHF(G4Step *)
Definition: HCalSD.cc:698
TH1F * hzvhad
Definition: HCalSD.h:105
double eminHitHF
Definition: HCalSD.h:96
bool isItConicalBundle(G4LogicalVolume *)
Definition: HCalSD.cc:740
Definition: HCalSD.h:35
TH1F * hit_[9]
Definition: HCalSD.h:105
virtual void initRun()
Definition: HCalSD.cc:603
bool testNumber
Definition: HCalSD.h:93
std::vector< G4LogicalVolume * > pmtLV
Definition: HCalSD.h:103
std::vector< G4LogicalVolume * > hfLV
Definition: HCalSD.h:103
bool isItScintillator(G4Material *)
Definition: HCalSD.cc:746
HFShower * hfshower
Definition: HCalSD.h:86
bool useBirk
Definition: HCalSD.h:92
double birk3
Definition: HCalSD.h:94
virtual double getEnergyDeposit(G4Step *)
Definition: HCalSD.cc:479
void plotHF(G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1168
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
bool applyFidCut
Definition: HCalSD.h:95
TH1F * dist_[9]
Definition: HCalSD.h:105
virtual ~HCalSD()
Definition: HCalSD.cc:361
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:84
void getHitPMT(G4Step *step)
Definition: HCalSD.cc:923
HFDarkening * m_HFDarkening
Definition: HCalSD.h:91
std::vector< int > hfLevels
Definition: HCalSD.h:100
virtual std::vector< std::string > getNames()
void plotProfile(G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1121
HEDarkening * m_HEDarkening
Definition: HCalSD.h:90
bool isItPMT(G4LogicalVolume *)
Definition: HCalSD.cc:728
G4int mupPDG
Definition: HCalSD.h:98
double eminHitHO
Definition: HCalSD.h:96
TH1F * hzvem
Definition: HCalSD.h:105
void readWeightFromFile(std::string)
Definition: HCalSD.cc:1073
bool neutralDensity
Definition: HCalSD.h:93
void getHitFibreBundle(G4Step *step, bool type)
Definition: HCalSD.cc:990
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:83
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:1099
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< G4String > fibreNames
Definition: HCalSD.h:101
std::vector< G4Material * > materials
Definition: HCalSD.h:102
virtual bool filterHit(CaloG4Hit *, double)
Definition: HCalSD.cc:619
std::vector< G4String > hfNames
Definition: HCalSD.h:101
G4int mumPDG
Definition: HCalSD.h:98
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:104
step
HFShowerPMT * showerPMT
Definition: HCalSD.h:88
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:85
std::vector< G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:103
std::vector< G4String > matNames
Definition: HCalSD.h:101
bool isItFibre(G4LogicalVolume *)
Definition: HCalSD.cc:716
bool useHF
Definition: HCalSD.h:95
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:82