CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimG4HcalValidation.h
Go to the documentation of this file.
1 // File: SimG4HcalValidation.h
3 // Analysis and validation of simhits of HCal inside the CMSSW framework
5 #ifndef Validation_HcalHits_SimG4HcalValidation_H
6 #define Validation_HcalHits_SimG4HcalValidation_H
7 
10 
15 
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 
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 ~SimG4HcalValidation();
40 
41  void produce(edm::Event&, const edm::EventSetup&);
42 
43 private:
44  SimG4HcalValidation(const SimG4HcalValidation&); // stop default
46 
47  void init();
48 
49  // observer classes
50  void update(const BeginOfJob * job);
51  void update(const BeginOfRun * run);
52  void update(const BeginOfEvent * evt);
53  void update(const G4Step * step);
54  void update(const EndOfEvent * evt);
55 
56  // jetfinding and analysis-related stuff
57  void fill(const EndOfEvent * ev);
62  void clear();
63  void collectEnergyRdir(const double, const double);
64  double getHcalScale(std::string, int) const;
65 
66 
67 private:
68  //Keep parameters to instantiate Jet finder later
70 
71  //Keep reference to instantiate HcalNumberingFromDDD later
73 
74  //Keep parameters to instantiate HcalTestNumberingScheme later
76 
77  // Hit cache for cluster analysis
78  std::vector<CaloHit> hitcache; // e, eta, phi, time, layer, calo type
79 
80  // scale factors :
81  std::vector<float> scaleHB;
82  std::vector<float> scaleHE;
83  std::vector<float> scaleHF;
84 
85  // to read from parameter set
86  std::vector<std::string> names;
90  int infolevel;
92 
93  // eta and phi size of windows around eta0, phi0
94  std::vector<double> dEta;
95  std::vector<double> dPhi;
96 
97  // some private members for ananlysis
98  unsigned int count;
100  double edepd[5], edepl[20];
101  double een, hen, hoen; // Energy sum in ECAL, HCAL, HO
103 };
104 
105 #endif
HcalNumberingFromDDD * numberingFromDDD
double getHcalScale(std::string, int) const
void fill(const EndOfEvent *ev)
void update(const BeginOfJob *job)
This routine will be called when the appropriate signal arrives.
std::vector< float > scaleHF
void collectEnergyRdir(const double, const double)
const SimG4HcalValidation & operator=(const SimG4HcalValidation &)
std::vector< std::string > names
std::vector< CaloHit > hitcache
std::vector< double > dEta
void jetAnalysis(PHcalValidInfoJets &)
void nxNAnalysis(PHcalValidInfoNxN &)
SimG4HcalHitJetFinder * jetf
std::vector< double > dPhi
void fetchHits(PHcalValidInfoLayer &)
std::vector< float > scaleHB
std::vector< float > scaleHE
SimG4HcalValidation(const edm::ParameterSet &p)
HcalTestNumberingScheme * org
void layerAnalysis(PHcalValidInfoLayer &)
void produce(edm::Event &, const edm::EventSetup &)