CMS 3D CMS Logo

HcalTestAnalysis.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_HcalTestAnalysis_H
2 #define SimG4CMS_HcalTestAnalysis_H
3 // File: HcalTestAnalysis.h
5 // Analysis of simhits inside the OSCAR framework
7 
10 
18 
19 #include <iostream>
20 #include <memory>
21 #include <vector>
22 #include <string>
23 
24 class G4Step;
25 class BeginOfJob;
26 class BeginOfRun;
27 class BeginOfEvent;
28 class EndOfEvent;
29 
30 namespace CLHEP {
31  class HepRandomEngine;
32 }
33 
35  public Observer<const BeginOfJob *>,
36  public Observer<const BeginOfRun *>,
37  public Observer<const BeginOfEvent *>,
38  public Observer<const EndOfEvent *>,
39  public Observer<const G4Step *> {
40 public:
42  ~HcalTestAnalysis() override;
43 
44 private:
45  // observer classes
46  void update(const BeginOfJob *run) override;
47  void update(const BeginOfRun *run) override;
48  void update(const BeginOfEvent *evt) override;
49  void update(const EndOfEvent *evt) override;
50  void update(const G4Step *step) override;
51 
52  // analysis-related stuff
53  std::vector<int> layerGrouping(int);
54  std::vector<int> towersToAdd(int centre, int nadd);
55  void fill(const EndOfEvent *ev);
56  void qieAnalysis(CLHEP::HepRandomEngine *);
57  void layerAnalysis();
58  double timeOfFlight(int det, int layer, double eta);
59 
60 private:
61  //Keep parameters to instantiate HcalTestHistoClass later
63 
64  // Qie Analysis
65  std::unique_ptr<HcalQie> myqie_;
66  int addTower_;
67 
68  // Private Tuples
69  std::unique_ptr<HcalTestHistoManager> tuplesManager_;
71 
72  // Numbering scheme
73  std::unique_ptr<HcalNumberingFromDDD> numberingFromDDD_;
76 
77  // Hits for qie analysis
78  std::vector<CaloHit> caloHitCache_;
79  std::vector<int> group_, tower_;
80  int nGroup_, nTower_;
81 
82  // to read from ParameterSet
83  std::vector<std::string> names_;
84  double eta0_, phi0_;
86 
87  // some private members for ananlysis
88  unsigned int count_;
89  double edepEB_, edepEE_, edepHB_, edepHE_;
90  double edepHO_, edepl_[20];
91  double mudist_[20]; // Distance of muon from central part
92 };
93 
94 #endif
HcalTestNumberingScheme * org_
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD_
std::vector< std::string > names_
bool ev
HcalTestHistoClass * tuples_
std::vector< int > tower_
const HcalDDDSimConstants * hcons_
unsigned int count_
std::unique_ptr< HcalQie > myqie_
std::vector< CaloHit > caloHitCache_
#define update(a, b)
std::string fileName_
step
Definition: StallMonitor.cc:94
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
Definition: CaloSimInfo.cc:17
std::unique_ptr< HcalTestHistoManager > tuplesManager_