CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~HcalTestAnalysis();
45 
46 private:
47  // observer classes
48  void update(const BeginOfJob * run);
49  void update(const BeginOfRun * run);
50  void update(const BeginOfEvent * evt);
51  void update(const EndOfEvent * evt);
52  void update(const G4Step * step);
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
69  int addTower;
70 
71  // Private Tuples
72  std::auto_ptr<HcalTestHistoManager> tuplesManager;
74 
75  // Numbering scheme
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;
93  double edepl[20];
94  double mudist[20]; // Distance of muon from central part
95 };
96 
97 #endif
HcalNumberingFromDDD * numberingFromDDD
virtual ~HcalTestAnalysis()
std::vector< int > layerGrouping(int)
unsigned int count
std::auto_ptr< HcalTestHistoManager > tuplesManager
HcalDDDSimConstants * hcons
bool ev
std::vector< std::string > names
HcalTestNumberingScheme * org
std::vector< int > towersToAdd(int centre, int nadd)
void update(const BeginOfJob *run)
This routine will be called when the appropriate signal arrives.
double timeOfFlight(int det, int layer, double eta)
void fill(const EndOfEvent *ev)
std::vector< int > tower_
HcalTestAnalysis(const edm::ParameterSet &p)
HcalTestHistoClass * tuples
std::string fileName
std::vector< CaloHit > caloHitCache
void qieAnalysis(CLHEP::HepRandomEngine *)
std::vector< int > group_