CMS 3D CMS Logo

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 <string>
22 #include <vector>
23 
24 class G4Step;
25 class BeginOfJob;
26 class BeginOfRun;
27 class BeginOfEvent;
28 class EndOfEvent;
29 
30 namespace edm {
31  class ParameterSet;
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  ~SimG4HcalValidation() override;
43 
44  void produce(edm::Event &, const edm::EventSetup &) override;
45 
46 private:
47  SimG4HcalValidation(const SimG4HcalValidation &) = delete; // stop default
48  const SimG4HcalValidation &operator=(const SimG4HcalValidation &) = delete;
49 
50  void init();
51 
52  // observer classes
53  void update(const BeginOfJob *job) override;
54  void update(const BeginOfRun *run) override;
55  void update(const BeginOfEvent *evt) override;
56  void update(const G4Step *step) override;
57  void update(const EndOfEvent *evt) override;
58 
59  // jetfinding and analysis-related stuff
60  void fill(const EndOfEvent *ev);
65  void clear();
66  void collectEnergyRdir(const double, const double);
67  double getHcalScale(std::string, int) const;
68 
69 private:
70  // Keep parameters to instantiate Jet finder later
72 
73  // Keep reference to instantiate HcalNumberingFromDDD later
75 
76  // Keep parameters to instantiate HcalTestNumberingScheme later
78 
79  // Hit cache for cluster analysis
80  std::vector<CaloHit> hitcache; // e, eta, phi, time, layer, calo type
81 
82  // scale factors :
83  std::vector<float> scaleHB;
84  std::vector<float> scaleHE;
85  std::vector<float> scaleHF;
86 
87  // to read from parameter set
88  std::vector<std::string> names;
92  int infolevel;
94 
95  // eta and phi size of windows around eta0, phi0
96  std::vector<double> dEta;
97  std::vector<double> dPhi;
98 
99  // some private members for ananlysis
100  unsigned int count;
102  double edepd[5], edepl[20];
103  double een, hen, hoen; // Energy sum in ECAL, HCAL, HO
105 };
106 
107 #endif
SimG4HcalValidation::scaleHF
std::vector< float > scaleHF
Definition: SimG4HcalValidation.h:85
SimG4HcalValidation::ehitThreshold
double ehitThreshold
Definition: SimG4HcalValidation.h:89
SimG4HcalValidation::edepl
double edepl[20]
Definition: SimG4HcalValidation.h:102
Observer
Definition: Observer.h:23
step
step
Definition: StallMonitor.cc:94
SimG4HcalValidation::timeLowlim
float timeLowlim
Definition: SimG4HcalValidation.h:90
SimG4HcalValidation::edepHB
double edepHB
Definition: SimG4HcalValidation.h:101
SimG4HcalHitJetFinder
Definition: SimG4HcalHitJetFinder.h:13
PHcalValidInfoLayer
Definition: PValidationFormats.h:1328
SimG4HcalValidation::scaleHB
std::vector< float > scaleHB
Definition: SimG4HcalValidation.h:83
edm
HLT enums.
Definition: AlignableModifier.h:19
SimProducer.h
SimG4HcalValidation::dEta
std::vector< double > dEta
Definition: SimG4HcalValidation.h:96
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalNumberingFromDDD
Definition: HcalNumberingFromDDD.h:16
SimG4HcalValidation::een
double een
Definition: SimG4HcalValidation.h:103
SimG4HcalValidation::edepEB
double edepEB
Definition: SimG4HcalValidation.h:101
SimG4HcalValidation::labelJets
std::string labelJets
Definition: SimG4HcalValidation.h:93
SimG4HcalValidation::labelNxN
std::string labelNxN
Definition: SimG4HcalValidation.h:93
SimG4HcalHitJetFinder.h
SimG4HcalValidation::hitcache
std::vector< CaloHit > hitcache
Definition: SimG4HcalValidation.h:80
PHcalValidInfoNxN
Definition: PValidationFormats.h:1393
HcalNumberingFromDDD.h
SimG4HcalValidation::hcalOnly
bool hcalOnly
Definition: SimG4HcalValidation.h:91
Observer.h
SimG4HcalValidation::SimG4HcalValidation
SimG4HcalValidation(const edm::ParameterSet &p)
Definition: SimG4HcalValidation.cc:36
SimG4HcalValidation::scaleHE
std::vector< float > scaleHE
Definition: SimG4HcalValidation.h:84
SimG4HcalValidation::enHcal
double enHcal
Definition: SimG4HcalValidation.h:104
SimG4HcalValidation::org
HcalTestNumberingScheme * org
Definition: SimG4HcalValidation.h:77
SimG4HcalValidation
Definition: SimG4HcalValidation.h:34
SimG4HcalValidation::jetThreshold
float jetThreshold
Definition: SimG4HcalValidation.h:90
SimG4HcalValidation::eta0
float eta0
Definition: SimG4HcalValidation.h:90
SimG4HcalValidation::collectEnergyRdir
void collectEnergyRdir(const double, const double)
Definition: SimG4HcalValidation.cc:680
BeginOfJob
Definition: BeginOfJob.h:8
SimG4HcalValidation::jetAnalysis
void jetAnalysis(PHcalValidInfoJets &)
Definition: SimG4HcalValidation.cc:488
EndOfEvent
Definition: EndOfEvent.h:6
SimG4HcalValidation::layerAnalysis
void layerAnalysis(PHcalValidInfoLayer &)
Definition: SimG4HcalValidation.cc:398
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SimG4HcalValidation::clear
void clear()
Definition: SimG4HcalValidation.cc:677
SimG4HcalValidation::edepHO
double edepHO
Definition: SimG4HcalValidation.h:101
SimG4HcalValidation::hen
double hen
Definition: SimG4HcalValidation.h:103
SimG4HcalValidation::dPhi
std::vector< double > dPhi
Definition: SimG4HcalValidation.h:97
edm::ParameterSet
Definition: ParameterSet.h:36
SimG4HcalValidation::edepEE
double edepEE
Definition: SimG4HcalValidation.h:101
SimG4HcalValidation::init
void init()
Definition: SimG4HcalValidation.cc:108
SimG4HcalValidation::nxNAnalysis
void nxNAnalysis(PHcalValidInfoNxN &)
Definition: SimG4HcalValidation.cc:426
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
ParameterSet
Definition: Functions.h:16
SimProducer
Definition: SimProducer.h:64
SimG4HcalValidation::hoen
double hoen
Definition: SimG4HcalValidation.h:103
SimG4HcalValidation::fill
void fill(const EndOfEvent *ev)
Definition: SimG4HcalValidation.cc:265
PHcalValidInfoJets
Definition: PValidationFormats.h:1255
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
edm::EventSetup
Definition: EventSetup.h:57
SimG4HcalValidation::update
void update(const BeginOfJob *job) override
This routine will be called when the appropriate signal arrives.
Definition: SimG4HcalValidation.cc:140
SimG4HcalValidation::count
unsigned int count
Definition: SimG4HcalValidation.h:100
SimG4HcalValidation::coneSize
double coneSize
Definition: SimG4HcalValidation.h:89
SimG4HcalValidation::names
std::vector< std::string > names
Definition: SimG4HcalValidation.h:88
SimG4HcalValidation::labelLayer
std::string labelLayer
Definition: SimG4HcalValidation.h:93
SimG4HcalValidation::vhithc
double vhithc
Definition: SimG4HcalValidation.h:104
SimG4HcalValidation::applySampling
bool applySampling
Definition: SimG4HcalValidation.h:91
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SimG4HcalValidation::edepHE
double edepHE
Definition: SimG4HcalValidation.h:101
SimG4HcalValidation::timeUplim
float timeUplim
Definition: SimG4HcalValidation.h:90
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
SimG4HcalValidation::operator=
const SimG4HcalValidation & operator=(const SimG4HcalValidation &)=delete
SimG4HcalValidation::~SimG4HcalValidation
~SimG4HcalValidation() override
Definition: SimG4HcalValidation.cc:73
SimG4HcalValidation::phi0
float phi0
Definition: SimG4HcalValidation.h:90
SimG4HcalValidation::getHcalScale
double getHcalScale(std::string, int) const
Definition: SimG4HcalValidation.cc:711
SimG4HcalValidation::vhitec
double vhitec
Definition: SimG4HcalValidation.h:104
SimG4HcalValidation::hhitThreshold
double hhitThreshold
Definition: SimG4HcalValidation.h:89
SimG4HcalValidation::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: SimG4HcalValidation.cc:89
SimG4HcalValidation::enEcal
double enEcal
Definition: SimG4HcalValidation.h:104
SimG4HcalValidation::edepd
double edepd[5]
Definition: SimG4HcalValidation.h:102
SimG4HcalValidation::numberingFromDDD
HcalNumberingFromDDD * numberingFromDDD
Definition: SimG4HcalValidation.h:74
edm::Event
Definition: Event.h:73
HcalTestNumberingScheme.h
CaloHit.h
SimG4HcalValidation::jetf
SimG4HcalHitJetFinder * jetf
Definition: SimG4HcalValidation.h:71
PValidationFormats.h
SimG4HcalValidation::infolevel
int infolevel
Definition: SimG4HcalValidation.h:92
SimG4HcalValidation::fetchHits
void fetchHits(PHcalValidInfoLayer &)
Definition: SimG4HcalValidation.cc:610
SimG4HcalHitCluster.h