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 
17 
18 #include <iostream>
19 #include <memory>
20 #include <vector>
21 #include <string>
22 
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 
41 public:
43  virtual ~HcalTestAnalysis();
44 
45 private:
46  // observer classes
47  void update(const BeginOfJob * run);
48  void update(const BeginOfRun * run);
49  void update(const BeginOfEvent * evt);
50  void update(const EndOfEvent * evt);
51  void update(const G4Step * step);
52 
53  // analysis-related stuff
54  std::vector<int> layerGrouping(int);
55  std::vector<int> towersToAdd(int centre, int nadd);
56  void fill(const EndOfEvent * ev);
57  void qieAnalysis(CLHEP::HepRandomEngine*);
58  void layerAnalysis();
59  double timeOfFlight(int det, int layer, double eta);
60 
61 private:
62 
63  //Keep parameters to instantiate HcalTestHistoClass later
65 
66  // Qie Analysis
68  int addTower;
69 
70  // Private Tuples
71  std::auto_ptr<HcalTestHistoManager> tuplesManager;
73 
74  // Numbering scheme
77 
78  // Hits for qie analysis
79  std::vector<CaloHit> caloHitCache;
80  std::vector<int> group_, tower_;
81  int nGroup, nTower;
82 
83  // to read from ParameterSet
84  std::vector<std::string> names;
85  double eta0, phi0;
87 
88  // some private members for ananlysis
89  unsigned int count;
91  double edepl[20];
92  double mudist[20]; // Distance of muon from central part
93 };
94 
95 #endif
HcalNumberingFromDDD * numberingFromDDD
virtual ~HcalTestAnalysis()
std::vector< int > layerGrouping(int)
unsigned int count
std::auto_ptr< HcalTestHistoManager > tuplesManager
std::vector< std::string > names
T eta() const
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_