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