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 
31  public Observer<const BeginOfJob *>,
32  public Observer<const BeginOfRun *>,
33  public Observer<const BeginOfEvent *>,
34  public Observer<const EndOfEvent *>,
35  public Observer<const G4Step *> {
36 
37 public:
39  virtual ~HcalTestAnalysis();
40 
41 private:
42  // observer classes
43  void update(const BeginOfJob * run);
44  void update(const BeginOfRun * run);
45  void update(const BeginOfEvent * evt);
46  void update(const EndOfEvent * evt);
47  void update(const G4Step * step);
48 
49  // analysis-related stuff
50  std::vector<int> layerGrouping(int);
51  std::vector<int> towersToAdd(int centre, int nadd);
52  void fill(const EndOfEvent * ev);
53  void qieAnalysis();
54  void layerAnalysis();
55  double timeOfFlight(int det, int layer, double eta);
56 
57 private:
58 
59  //Keep parameters to instantiate HcalTestHistoClass later
60  std::string fileName;
61 
62  // Qie Analysis
64  int addTower;
65 
66  // Private Tuples
67  std::auto_ptr<HcalTestHistoManager> tuplesManager;
69 
70  // Numbering scheme
73 
74  // Hits for qie analysis
75  std::vector<CaloHit> caloHitCache;
76  std::vector<int> group_, tower_;
77  int nGroup, nTower;
78 
79  // to read from ParameterSet
80  std::vector<std::string> names;
81  double eta0, phi0;
83 
84  // some private members for ananlysis
85  unsigned int count;
87  double edepl[20];
88  double mudist[20]; // Distance of muon from central part
89 };
90 
91 #endif
HcalNumberingFromDDD * numberingFromDDD
virtual ~HcalTestAnalysis()
std::vector< int > layerGrouping(int)
unsigned int count
std::auto_ptr< HcalTestHistoManager > tuplesManager
std::vector< std::string > names
HcalTestNumberingScheme * org
T eta() const
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
std::vector< int > group_