test
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 
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);
56  std::vector<double> getDDDArray(const std::string&,
57  const DDsvalues_type&);
58  std::vector<G4String> getNames(DDFilteredView&);
59  bool isItHF(G4Step *);
60  bool isItHF(G4String);
61  bool isItFibre(G4LogicalVolume*);
62  bool isItFibre(G4String);
63  bool isItPMT(G4LogicalVolume*);
64  bool isItStraightBundle(G4LogicalVolume*);
65  bool isItConicalBundle(G4LogicalVolume*);
66  bool isItScintillator(G4Material*);
67  bool isItinFidVolume (G4ThreeVector&);
68  void getFromLibrary(G4Step * step, double weight);
69  void hitForFibre(G4Step * step, double weight);
70  void getFromParam(G4Step * step, double weight);
71  void getHitPMT(G4Step * step);
72  void getHitFibreBundle(G4Step * step, bool type);
73  int setTrackID(G4Step * step);
75  double layerWeight(int, const G4ThreeVector&, int, int);
76  void plotProfile(G4Step* step, const G4ThreeVector& pos,
77  double edep, double time, int id);
78  void plotHF(G4ThreeVector& pos, bool emType);
80 
92  double birk1, birk2, birk3, betaThr;
95  double deliveredLumi;
96  G4int mumPDG, mupPDG;
97  std::vector<double> layer0wt, gpar;
98  std::vector<int> hfLevels;
99  std::vector<G4String> hfNames, fibreNames, matNames;
100  std::vector<G4Material*> materials;
101  std::vector<G4LogicalVolume*> hfLV, fibreLV, pmtLV, fibre1LV, fibre2LV;
102  std::map<uint32_t,double> layerWeights;
103  TH1F *hit_[9], *time_[9], *dist_[9], *hzvem, *hzvhad;
104 
105 };
106 
107 #endif // HCalSD_h
HCalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: HCalSD.cc:42
type
Definition: HCALResponse.h:21
std::vector< double > layer0wt
Definition: HCalSD.h:97
bool useParam
Definition: HCalSD.h:93
double eminHitHE
Definition: HCalSD.h:94
HFShowerParam * showerParam
Definition: HCalSD.h:86
TH1F * time_[9]
Definition: HCalSD.h:103
void hitForFibre(G4Step *step, double weight)
Definition: HCalSD.cc:850
void getFromParam(G4Step *step, double weight)
Definition: HCalSD.cc:902
bool useLayerWt
Definition: HCalSD.h:91
Definition: CaloSD.h:42
virtual void update(const BeginOfJob *)
This routine will be called when the appropriate signal arrives.
Definition: HCalSD.cc:593
bool isItStraightBundle(G4LogicalVolume *)
Definition: HCalSD.cc:752
virtual bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: HCalSD.cc:372
std::vector< double > gpar
Definition: HCalSD.h:97
bool useFibreBundle
Definition: HCalSD.h:91
bool isItinFidVolume(G4ThreeVector &)
Definition: HCalSD.cc:770
double betaThr
Definition: HCalSD.h:92
double deliveredLumi
Definition: HCalSD.h:95
HFShowerFibreBundle * showerBundle
Definition: HCalSD.h:88
std::vector< G4LogicalVolume * > fibre1LV
Definition: HCalSD.h:101
std::vector< G4LogicalVolume * > fibreLV
Definition: HCalSD.h:101
double eminHitHB
Definition: HCalSD.h:94
bool useShowerLibrary
Definition: HCalSD.h:93
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: HCalSD.cc:671
virtual uint32_t setDetUnitId(G4Step *step)
Definition: HCalSD.cc:572
double birk2
Definition: HCalSD.h:92
int setTrackID(G4Step *step)
Definition: HCalSD.cc:1073
void getFromLibrary(G4Step *step, double weight)
Definition: HCalSD.cc:787
bool usePMTHit
Definition: HCalSD.h:91
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
Definition: HCalSD.cc:1197
void setNumberingScheme(HcalNumberingScheme *)
Definition: HCalSD.cc:585
type of data representation of DDCompactView
Definition: DDCompactView.h:77
double birk1
Definition: HCalSD.h:92
bool isItHF(G4Step *)
Definition: HCalSD.cc:716
TH1F * hzvhad
Definition: HCalSD.h:103
double eminHitHF
Definition: HCalSD.h:94
bool isItConicalBundle(G4LogicalVolume *)
Definition: HCalSD.cc:758
Definition: HCalSD.h:35
TH1F * hit_[9]
Definition: HCalSD.h:103
virtual void initRun()
Definition: HCalSD.cc:624
bool testNumber
Definition: HCalSD.h:91
std::vector< G4LogicalVolume * > pmtLV
Definition: HCalSD.h:101
std::vector< G4LogicalVolume * > hfLV
Definition: HCalSD.h:101
bool isItScintillator(G4Material *)
Definition: HCalSD.cc:764
HFShower * hfshower
Definition: HCalSD.h:85
bool useBirk
Definition: HCalSD.h:91
double birk3
Definition: HCalSD.h:92
virtual double getEnergyDeposit(G4Step *)
Definition: HCalSD.cc:476
void plotHF(G4ThreeVector &pos, bool emType)
Definition: HCalSD.cc:1188
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:93
TH1F * dist_[9]
Definition: HCalSD.h:103
virtual ~HCalSD()
Definition: HCalSD.cc:359
HcalNumberingScheme * numberingScheme
Definition: HCalSD.h:83
void getHitPMT(G4Step *step)
Definition: HCalSD.cc:941
HFDarkening * m_HFDarkening
Definition: HCalSD.h:90
std::vector< int > hfLevels
Definition: HCalSD.h:98
virtual std::vector< std::string > getNames()
void plotProfile(G4Step *step, const G4ThreeVector &pos, double edep, double time, int id)
Definition: HCalSD.cc:1141
HEDarkening * m_HEDarkening
Definition: HCalSD.h:89
bool isItPMT(G4LogicalVolume *)
Definition: HCalSD.cc:746
G4int mupPDG
Definition: HCalSD.h:96
double eminHitHO
Definition: HCalSD.h:94
TH1F * hzvem
Definition: HCalSD.h:103
void readWeightFromFile(std::string)
Definition: HCalSD.cc:1093
void getHitFibreBundle(G4Step *step, bool type)
Definition: HCalSD.cc:1009
HcalNumberingFromDDD * numberingFromDDD
Definition: HCalSD.h:82
double layerWeight(int, const G4ThreeVector &, int, int)
Definition: HCalSD.cc:1119
std::vector< G4String > fibreNames
Definition: HCalSD.h:99
std::vector< G4Material * > materials
Definition: HCalSD.h:100
virtual bool filterHit(CaloG4Hit *, double)
Definition: HCalSD.cc:640
std::vector< G4String > hfNames
Definition: HCalSD.h:99
G4int mumPDG
Definition: HCalSD.h:96
std::map< uint32_t, double > layerWeights
Definition: HCalSD.h:102
HFShowerPMT * showerPMT
Definition: HCalSD.h:87
HFShowerLibrary * showerLibrary
Definition: HCalSD.h:84
std::vector< G4LogicalVolume * > fibre2LV
Definition: HCalSD.h:101
std::vector< G4String > matNames
Definition: HCalSD.h:99
bool isItFibre(G4LogicalVolume *)
Definition: HCalSD.cc:734
bool useHF
Definition: HCalSD.h:93
HcalDDDSimConstants * hcalConstants
Definition: HCalSD.h:81