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_;
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_;
90  double edepHO_, edepl_[20];
91  double mudist_[20]; // Distance of muon from central part
92 };
93 
94 #endif
HcalTestAnalysis::HcalTestAnalysis
HcalTestAnalysis(const edm::ParameterSet &p)
Definition: HcalTestAnalysis.cc:32
HcalTestAnalysis::edepl_
double edepl_[20]
Definition: HcalTestAnalysis.h:90
HcalTestAnalysis::timeOfFlight
double timeOfFlight(int det, int layer, double eta)
Definition: HcalTestAnalysis.cc:583
HcalTestAnalysis::count_
unsigned int count_
Definition: HcalTestAnalysis.h:88
HcalTestAnalysis::myqie_
std::unique_ptr< HcalQie > myqie_
Definition: HcalTestAnalysis.h:65
Observer
Definition: Observer.h:23
HcalTestAnalysis::tower_
std::vector< int > tower_
Definition: HcalTestAnalysis.h:79
step
step
Definition: StallMonitor.cc:94
HcalTestAnalysis::~HcalTestAnalysis
~HcalTestAnalysis() override
Definition: HcalTestAnalysis.cc:63
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalQie.h
HcalTestHistoClass.h
HcalTestAnalysis
Definition: HcalTestAnalysis.h:34
HcalNumberingFromDDD.h
HcalTestAnalysis::edepEE_
double edepEE_
Definition: HcalTestAnalysis.h:89
HcalTestAnalysis::layerAnalysis
void layerAnalysis()
Definition: HcalTestAnalysis.cc:569
Observer.h
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
SimWatcher.h
HcalTestAnalysis::edepHO_
double edepHO_
Definition: HcalTestAnalysis.h:90
PVValHelper::eta
Definition: PVValidationHelpers.h:69
HcalTestAnalysis::caloHitCache_
std::vector< CaloHit > caloHitCache_
Definition: HcalTestAnalysis.h:78
HcalTestAnalysis::edepHB_
double edepHB_
Definition: HcalTestAnalysis.h:89
BeginOfJob
Definition: BeginOfJob.h:8
HcalTestAnalysis::fileName_
std::string fileName_
Definition: HcalTestAnalysis.h:62
HcalTestAnalysis::centralTower_
int centralTower_
Definition: HcalTestAnalysis.h:85
EndOfEvent
Definition: EndOfEvent.h:6
HcalTestAnalysis::group_
std::vector< int > group_
Definition: HcalTestAnalysis.h:79
HcalTestHistoClass
Definition: HcalTestHistoClass.h:15
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTestAnalysis::tuplesManager_
std::unique_ptr< HcalTestHistoManager > tuplesManager_
Definition: HcalTestAnalysis.h:69
HcalTestAnalysis::qieAnalysis
void qieAnalysis(CLHEP::HepRandomEngine *)
Definition: HcalTestAnalysis.cc:447
edm::ParameterSet
Definition: ParameterSet.h:47
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
HcalTestAnalysis::org_
HcalTestNumberingScheme * org_
Definition: HcalTestAnalysis.h:75
HcalTestAnalysis::layerGrouping
std::vector< int > layerGrouping(int)
Definition: HcalTestAnalysis.cc:68
HcalTestAnalysis::eta0_
double eta0_
Definition: HcalTestAnalysis.h:84
HcalTestAnalysis::numberingFromDDD_
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD_
Definition: HcalTestAnalysis.h:73
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
HcalTestHistoManager.h
SimWatcher
Definition: SimWatcher.h:33
HcalTestAnalysis::addTower_
int addTower_
Definition: HcalTestAnalysis.h:66
HcalTestAnalysis::mudist_
double mudist_[20]
Definition: HcalTestAnalysis.h:91
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HcalTestAnalysis::edepEB_
double edepEB_
Definition: HcalTestAnalysis.h:89
HcalTestAnalysis::names_
std::vector< std::string > names_
Definition: HcalTestAnalysis.h:83
HcalTestAnalysis::update
void update(const BeginOfJob *run) override
This routine will be called when the appropriate signal arrives.
Definition: HcalTestAnalysis.cc:138
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
HcalTestAnalysis::phi0_
double phi0_
Definition: HcalTestAnalysis.h:84
HcalTestAnalysis::hcons_
const HcalDDDSimConstants * hcons_
Definition: HcalTestAnalysis.h:74
HcalTestAnalysis::nTower_
int nTower_
Definition: HcalTestAnalysis.h:80
HcalTestNumberingScheme.h
CaloHit.h
HcalTestAnalysis::towersToAdd
std::vector< int > towersToAdd(int centre, int nadd)
Definition: HcalTestAnalysis.cc:98
HcalTestAnalysis::nGroup_
int nGroup_
Definition: HcalTestAnalysis.h:80
HcalTestAnalysis::tuples_
HcalTestHistoClass * tuples_
Definition: HcalTestAnalysis.h:70
HcalDDDSimConstants.h
HcalTestAnalysis::fill
void fill(const EndOfEvent *ev)
Definition: HcalTestAnalysis.cc:315
HcalTestAnalysis::edepHE_
double edepHE_
Definition: HcalTestAnalysis.h:89