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 
25 class G4Step;
26 class BeginOfJob;
27 class BeginOfRun;
28 class BeginOfEvent;
29 class EndOfEvent;
30 
31 namespace CLHEP {
32  class HepRandomEngine;
33 }
34 
36  public Observer<const BeginOfJob *>,
37  public Observer<const BeginOfRun *>,
38  public Observer<const BeginOfEvent *>,
39  public Observer<const EndOfEvent *>,
40  public Observer<const G4Step *> {
41 
42 public:
44  ~HcalTestAnalysis() override;
45 
46 private:
47  // observer classes
48  void update(const BeginOfJob * run) override;
49  void update(const BeginOfRun * run) override;
50  void update(const BeginOfEvent * evt) override;
51  void update(const EndOfEvent * evt) override;
52  void update(const G4Step * step) override;
53 
54  // analysis-related stuff
55  std::vector<int> layerGrouping(int);
56  std::vector<int> towersToAdd(int centre, int nadd);
57  void fill(const EndOfEvent * ev);
58  void qieAnalysis(CLHEP::HepRandomEngine*);
59  void layerAnalysis();
60  double timeOfFlight(int det, int layer, double eta);
61 
62 private:
63 
64  //Keep parameters to instantiate HcalTestHistoClass later
66 
67  // Qie Analysis
68  std::unique_ptr<HcalQie> myqie_;
69  int addTower_;
70 
71  // Private Tuples
72  std::unique_ptr<HcalTestHistoManager> tuplesManager_;
74 
75  // Numbering scheme
76  std::unique_ptr<HcalNumberingFromDDD> numberingFromDDD_;
79 
80  // Hits for qie analysis
81  std::vector<CaloHit> caloHitCache_;
82  std::vector<int> group_, tower_;
83  int nGroup_, nTower_;
84 
85  // to read from ParameterSet
86  std::vector<std::string> names_;
87  double eta0_, phi0_;
89 
90  // some private members for ananlysis
91  unsigned int count_;
92  double edepEB_, edepEE_, edepHB_, edepHE_;
93  double edepHO_, edepl_[20];
94  double mudist_[20]; // Distance of muon from central part
95 };
96 
97 #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
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
Definition: CaloSimInfo.cc:17
std::unique_ptr< HcalTestHistoManager > tuplesManager_