CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
19 
20 #include "G4String.hh"
21 #include <map>
22 #include <string>
23 #include <TH1F.h>
24 
25 class DDCompactView;
26 class DDFilteredView;
27 class G4LogicalVolume;
28 class G4Material;
29 class G4Step;
30 
31 class HCalSD : public CaloSD {
32 
33 public:
34 
35  HCalSD(G4String , const DDCompactView &, SensitiveDetectorCatalog &,
36  edm::ParameterSet const &, const SimTrackManager*);
37  virtual ~HCalSD();
38  virtual bool ProcessHits(G4Step * , G4TouchableHistory * );
39  virtual double getEnergyDeposit(G4Step* );
40  virtual uint32_t setDetUnitId(G4Step* step);
42 
43 protected:
44 
45  virtual void initRun();
46  virtual bool filterHit(CaloG4Hit*, double);
47 
48 private:
49 
50  uint32_t setDetUnitId(int, G4ThreeVector, int, int);
51  std::vector<double> getDDDArray(const std::string&,
52  const DDsvalues_type&);
53  std::vector<G4String> getNames(DDFilteredView&);
54  bool isItHF(G4Step *);
55  bool isItHF(G4String);
56  bool isItFibre(G4LogicalVolume*);
57  bool isItFibre(G4String);
58  bool isItPMT(G4LogicalVolume*);
59  bool isItStraightBundle(G4LogicalVolume*);
60  bool isItConicalBundle(G4LogicalVolume*);
61  bool isItScintillator(G4Material*);
62  void getFromLibrary(G4Step * step);
63  void hitForFibre(G4Step * step);
64  void getFromParam(G4Step * step);
65  void getHitPMT(G4Step * step);
66  void getHitFibreBundle(G4Step * step, bool type);
67  int setTrackID(G4Step * step);
68  void readWeightFromFile(std::string);
69  double layerWeight(int, G4ThreeVector, int, int);
70  void plotProfile(G4Step* step, G4ThreeVector pos,
71  double edep, double time, int id);
72 
81  double birk1, birk2, birk3, betaThr;
84  G4int mumPDG, mupPDG;
85  std::vector<double> layer0wt;
86  std::vector<G4LogicalVolume*> hfLV;
87  std::vector<G4String> hfNames;
88  std::vector<int> hfLevels;
89  std::vector<G4LogicalVolume*> fibreLV;
90  std::vector<G4String> fibreNames;
91  std::vector<G4String> matNames;
92  std::vector<G4Material*> materials;
93  std::vector<G4LogicalVolume*> pmtLV, fibre1LV, fibre2LV;
94  std::map<uint32_t,double> layerWeights;
95  TH1F *hit_[9], *time_[9], *dist_[9];
96 
97 };
98 
99 #endif // HCalSD_h
type
Definition: HCALResponse.h:22
std::vector< double > layer0wt
Definition: HCalSD.h:85
bool useParam
Definition: HCalSD.h:82
double eminHitHE
Definition: HCalSD.h:83
HFShowerParam * showerParam
Definition: HCalSD.h:77
TH1F * time_[9]
Definition: HCalSD.h:95
void getFromLibrary(G4Step *step)
Definition: HCalSD.cc:635
bool useLayerWt
Definition: HCalSD.h:80
Definition: CaloSD.h:42
list step
Definition: launcher.py:15
bool isItStraightBundle(G4LogicalVolume *)
Definition: HCalSD.cc:617
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: HCalSD.cc:341
bool useFibreBundle
Definition: HCalSD.h:80
double betaThr
Definition: HCalSD.h:81
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:79
std::vector< G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:93
std::vector< G4LogicalVolume * > fibreLV
Definition: HCalSD.h:89
double eminHitHB
Definition: HCalSD.h:83
bool useShowerLibrary
Definition: HCalSD.h:82
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:536
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:471
double birk2
Definition: HCalSD.h:81
int setTrackID(G4Step *step)
Definition: HCalSD.cc:913
bool usePMTHit
Definition: HCalSD.h:82
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:484
type of data representation of DDCompactView
Definition: DDCompactView.h:77
double birk1
Definition: HCalSD.h:81
bool isItHF(G4Step *)
Definition: HCalSD.cc:581
double eminHitHF
Definition: HCalSD.h:83
bool isItConicalBundle(G4LogicalVolume *)
Definition: HCalSD.cc:623
Definition: HCalSD.h:31
TH1F * hit_[9]
Definition: HCalSD.h:95
virtual void initRun()
Definition: HCalSD.cc:492
std::vector< G4LogicalVolume * > pmtLV
Definition: HCalSD.h:93
std::vector< G4LogicalVolume * > hfLV
Definition: HCalSD.h:86
bool isItScintillator(G4Material *)
Definition: HCalSD.cc:629
HFShower * hfshower
Definition: HCalSD.h:76
bool useBirk
Definition: HCalSD.h:80
double birk3
Definition: HCalSD.h:81
virtual double getEnergyDeposit(G4Step *)
Definition: HCalSD.cc:422
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 applyFidCut
Definition: HCalSD.h:80
TH1F * dist_[9]
Definition: HCalSD.h:95
virtual ~HCalSD()
Definition: HCalSD.cc:330
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:74
void getHitPMT(G4Step *step)
Definition: HCalSD.cc:787
std::vector< int > hfLevels
Definition: HCalSD.h:88
virtual std::vector< std::string > getNames()
bool isItPMT(G4LogicalVolume *)
Definition: HCalSD.cc:611
G4int mupPDG
Definition: HCalSD.h:84
double eminHitHO
Definition: HCalSD.h:83
void readWeightFromFile(std::string)
Definition: HCalSD.cc:933
void plotProfile(G4Step *step, G4ThreeVector pos, double edep, double time, int id)
Definition: HCalSD.cc:980
void getHitFibreBundle(G4Step *step, bool type)
Definition: HCalSD.cc:852
void hitForFibre(G4Step *step)
Definition: HCalSD.cc:701
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:73
std::vector< G4String > fibreNames
Definition: HCalSD.h:90
std::vector< G4Material * > materials
Definition: HCalSD.h:92
virtual bool filterHit(CaloG4Hit *, double)
Definition: HCalSD.cc:506
double layerWeight(int, G4ThreeVector, int, int)
Definition: HCalSD.cc:959
std::vector< G4String > hfNames
Definition: HCalSD.h:87
G4int mumPDG
Definition: HCalSD.h:84
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:94
HFShowerPMT * showerPMT
Definition: HCalSD.h:78
HCalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: HCalSD.cc:32
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:75
std::vector< G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:93
void getFromParam(G4Step *step)
Definition: HCalSD.cc:748
std::vector< G4String > matNames
Definition: HCalSD.h:91
bool isItFibre(G4LogicalVolume *)
Definition: HCalSD.cc:599
bool useHF
Definition: HCalSD.h:82