Validation
EcalClusters
interface
EnergyScaleAnalyzer.h
Go to the documentation of this file.
1
#ifndef RecoEcal_EgammaClusterProducers_EnergyScaleAnalyzer_h
2
#define RecoEcal_EgammaClusterProducers_EnergyScaleAnalyzer_h
3
11
//
12
//
13
14
// system include files
15
#include <memory>
16
17
// user include files
18
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
19
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
20
21
#include "
FWCore/Framework/interface/ESHandle.h
"
22
#include "
FWCore/Framework/interface/Event.h
"
23
#include "
FWCore/Framework/interface/EventSetup.h
"
24
#include "
FWCore/Framework/interface/MakerMacros.h
"
25
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
26
27
#include "
DataFormats/EcalDetId/interface/EBDetId.h
"
28
#include "
DataFormats/EcalRecHit/interface/EcalRecHit.h
"
29
#include "
DataFormats/EcalRecHit/interface/EcalRecHitCollections.h
"
30
#include "
DataFormats/EgammaReco/interface/BasicCluster.h
"
31
#include "
DataFormats/EgammaReco/interface/BasicClusterFwd.h
"
32
#include "
DataFormats/EgammaReco/interface/PreshowerCluster.h
"
33
#include "
DataFormats/EgammaReco/interface/SuperCluster.h
"
34
#include "
DataFormats/EgammaReco/interface/SuperClusterFwd.h
"
35
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
36
37
#include "TH1.h"
38
#include "TH2.h"
39
#include "TNtuple.h"
40
#include "TTree.h"
41
#include <string>
42
class
TFile;
43
44
//
45
// class declaration
46
//
47
48
class
EnergyScaleAnalyzer
:
public
edm::EDAnalyzer
{
49
public
:
50
explicit
EnergyScaleAnalyzer
(
const
edm::ParameterSet
&);
51
~EnergyScaleAnalyzer
()
override
;
52
53
void
analyze
(
const
edm::Event
&,
const
edm::EventSetup
&)
override
;
54
void
beginJob
()
override
;
55
void
endJob
()
override
;
56
57
private
:
58
std::string
outputFile_
;
// output file
59
60
edm::EDGetTokenT<edm::HepMCProduct>
hepMCLabel_
;
61
edm::EDGetTokenT<reco::SuperClusterCollection>
hybridSuperClusters_token
;
62
edm::EDGetTokenT<reco::SuperClusterCollection>
dynamicHybridSuperClusters_token
;
63
edm::EDGetTokenT<reco::SuperClusterCollection>
correctedHybridSuperClusters_token
;
64
edm::EDGetTokenT<reco::SuperClusterCollection>
correctedDynamicHybridSuperClusters_token
;
65
edm::EDGetTokenT<reco::SuperClusterCollection>
correctedFixedMatrixSuperClustersWithPreshower_token
;
66
edm::EDGetTokenT<reco::SuperClusterCollection>
fixedMatrixSuperClustersWithPreshower_token
;
67
68
// root file to store histograms
69
TFile *
rootFile_
;
70
71
// Tree
72
TTree *
mytree_
;
73
struct
tree_structure_
{
74
// MC information
75
int
mc_npar
;
76
int
parID
;
77
float
mc_sep
;
78
float
mc_e
;
79
float
mc_et
;
80
float
mc_phi
;
81
float
mc_eta
;
82
float
mc_theta
;
83
84
// MC-EM matching info
85
float
em_dR
;
86
87
// EM SC info (uncorrected)
88
int
em_isInCrack
;
89
int
em_scType
;
90
float
em_e
;
91
float
em_et
;
92
float
em_phi
;
93
float
em_eta
;
94
float
em_theta
;
95
int
em_nCell
;
96
int
em_nBC
;
97
98
// physics variables
99
float
em_pet
;
100
float
em_pe
;
101
float
em_peta
;
102
float
em_ptheta
;
103
104
// corrected collectin
105
float
emCorr_e
;
106
float
emCorr_et
;
107
float
emCorr_eta
;
108
float
emCorr_phi
;
109
float
emCorr_theta
;
110
float
emCorr_pet
;
111
float
emCorr_peta
;
112
float
emCorr_ptheta
;
113
114
// EM widths, pw -- phiWidth, ew -- etaWidth
115
float
em_pw
;
116
float
em_ew
;
117
// ratios of widths pw/ew
118
float
em_br
;
119
};
120
tree_structure_
tree_
;
121
122
//
123
float
xVtx_
;
124
float
yVtx_
;
125
float
zVtx_
;
126
//
127
float
xClust_zero_
;
128
float
yClust_zero_
;
129
float
zClust_zero_
;
130
//
131
float
xClust_vtx_
;
132
float
yClust_vtx_
;
133
float
zClust_vtx_
;
134
//
135
float
rClust_vtx_
;
136
//
137
float
energyMax_
;
138
float
eTMax_
;
139
float
eTMaxVtx_
;
140
float
etaMax_
;
141
float
etaMaxVtx_
;
142
float
phiMax_
;
143
float
phiMaxVtx_
;
144
float
thetaMax_
;
145
float
thetaMaxVtx_
;
146
//
147
148
int
evtN
;
149
150
// Function
151
void
fillTree
(
const
reco::SuperClusterCollection
*scColl,
152
const
reco::SuperClusterCollection
*corrSCColl,
153
HepMC::GenParticle
*
mc
,
154
tree_structure_
&
tree_
,
155
float
xV,
156
float
yV,
157
float
zV,
158
int
scType);
159
};
160
#endif
EnergyScaleAnalyzer::tree_structure_::em_nBC
int em_nBC
Definition:
EnergyScaleAnalyzer.h:96
EnergyScaleAnalyzer::EnergyScaleAnalyzer
EnergyScaleAnalyzer(const edm::ParameterSet &)
Definition:
EnergyScaleAnalyzer.cc:74
EnergyScaleAnalyzer::eTMax_
float eTMax_
Definition:
EnergyScaleAnalyzer.h:138
EnergyScaleAnalyzer::tree_structure_::em_eta
float em_eta
Definition:
EnergyScaleAnalyzer.h:93
EnergyScaleAnalyzer::tree_structure_::parID
int parID
Definition:
EnergyScaleAnalyzer.h:76
EnergyScaleAnalyzer::correctedFixedMatrixSuperClustersWithPreshower_token
edm::EDGetTokenT< reco::SuperClusterCollection > correctedFixedMatrixSuperClustersWithPreshower_token
Definition:
EnergyScaleAnalyzer.h:65
EnergyScaleAnalyzer::tree_structure_::em_et
float em_et
Definition:
EnergyScaleAnalyzer.h:91
EnergyScaleAnalyzer::tree_structure_::em_peta
float em_peta
Definition:
EnergyScaleAnalyzer.h:101
EnergyScaleAnalyzer::thetaMax_
float thetaMax_
Definition:
EnergyScaleAnalyzer.h:144
ESHandle.h
CaloTowersParam_cfi.mc
mc
Definition:
CaloTowersParam_cfi.py:8
EnergyScaleAnalyzer::rootFile_
TFile * rootFile_
Definition:
EnergyScaleAnalyzer.h:69
BasicCluster.h
edm::EDGetTokenT< edm::HepMCProduct >
EnergyScaleAnalyzer::tree_structure_::em_dR
float em_dR
Definition:
EnergyScaleAnalyzer.h:85
EnergyScaleAnalyzer::zVtx_
float zVtx_
Definition:
EnergyScaleAnalyzer.h:125
EnergyScaleAnalyzer::energyMax_
float energyMax_
Definition:
EnergyScaleAnalyzer.h:137
EBDetId.h
EnergyScaleAnalyzer::outputFile_
std::string outputFile_
Definition:
EnergyScaleAnalyzer.h:58
EnergyScaleAnalyzer::tree_structure_::em_theta
float em_theta
Definition:
EnergyScaleAnalyzer.h:94
PreshowerCluster.h
EnergyScaleAnalyzer::tree_structure_::emCorr_peta
float emCorr_peta
Definition:
EnergyScaleAnalyzer.h:111
EnergyScaleAnalyzer::correctedDynamicHybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > correctedDynamicHybridSuperClusters_token
Definition:
EnergyScaleAnalyzer.h:64
EDAnalyzer.h
EnergyScaleAnalyzer::tree_structure_::mc_npar
int mc_npar
Definition:
EnergyScaleAnalyzer.h:75
EnergyScaleAnalyzer::thetaMaxVtx_
float thetaMaxVtx_
Definition:
EnergyScaleAnalyzer.h:145
EnergyScaleAnalyzer::xClust_vtx_
float xClust_vtx_
Definition:
EnergyScaleAnalyzer.h:131
EcalRecHitCollections.h
BasicClusterFwd.h
edm::EDAnalyzer
Definition:
EDAnalyzer.h:29
EnergyScaleAnalyzer::tree_structure_::emCorr_theta
float emCorr_theta
Definition:
EnergyScaleAnalyzer.h:109
reco::SuperClusterCollection
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Definition:
SuperClusterFwd.h:9
MakerMacros.h
EnergyScaleAnalyzer::tree_structure_::em_br
float em_br
Definition:
EnergyScaleAnalyzer.h:118
EnergyScaleAnalyzer::tree_structure_::emCorr_ptheta
float emCorr_ptheta
Definition:
EnergyScaleAnalyzer.h:112
EnergyScaleAnalyzer::tree_structure_::em_ptheta
float em_ptheta
Definition:
EnergyScaleAnalyzer.h:102
EnergyScaleAnalyzer::rClust_vtx_
float rClust_vtx_
Definition:
EnergyScaleAnalyzer.h:135
EnergyScaleAnalyzer::tree_structure_::emCorr_e
float emCorr_e
Definition:
EnergyScaleAnalyzer.h:105
EnergyScaleAnalyzer::tree_structure_
Definition:
EnergyScaleAnalyzer.h:73
EnergyScaleAnalyzer::tree_structure_::mc_eta
float mc_eta
Definition:
EnergyScaleAnalyzer.h:81
EnergyScaleAnalyzer::tree_structure_::em_scType
int em_scType
Definition:
EnergyScaleAnalyzer.h:89
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EnergyScaleAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
EnergyScaleAnalyzer.cc:135
EnergyScaleAnalyzer::hybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > hybridSuperClusters_token
Definition:
EnergyScaleAnalyzer.h:61
EnergyScaleAnalyzer
Definition:
EnergyScaleAnalyzer.h:48
EnergyScaleAnalyzer::tree_structure_::em_pw
float em_pw
Definition:
EnergyScaleAnalyzer.h:115
edm::ParameterSet
Definition:
ParameterSet.h:36
EnergyScaleAnalyzer::yClust_vtx_
float yClust_vtx_
Definition:
EnergyScaleAnalyzer.h:132
EnergyScaleAnalyzer::correctedHybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > correctedHybridSuperClusters_token
Definition:
EnergyScaleAnalyzer.h:63
Event.h
EnergyScaleAnalyzer::endJob
void endJob() override
Definition:
EnergyScaleAnalyzer.cc:472
EnergyScaleAnalyzer::tree_structure_::mc_theta
float mc_theta
Definition:
EnergyScaleAnalyzer.h:82
EnergyScaleAnalyzer::xClust_zero_
float xClust_zero_
Definition:
EnergyScaleAnalyzer.h:127
EnergyScaleAnalyzer::evtN
int evtN
Definition:
EnergyScaleAnalyzer.h:148
EnergyScaleAnalyzer::tree_structure_::em_nCell
int em_nCell
Definition:
EnergyScaleAnalyzer.h:95
EnergyScaleAnalyzer::tree_structure_::em_pet
float em_pet
Definition:
EnergyScaleAnalyzer.h:99
EnergyScaleAnalyzer::tree_structure_::mc_sep
float mc_sep
Definition:
EnergyScaleAnalyzer.h:77
EnergyScaleAnalyzer::zClust_zero_
float zClust_zero_
Definition:
EnergyScaleAnalyzer.h:129
EnergyScaleAnalyzer::fillTree
void fillTree(const reco::SuperClusterCollection *scColl, const reco::SuperClusterCollection *corrSCColl, HepMC::GenParticle *mc, tree_structure_ &tree_, float xV, float yV, float zV, int scType)
Definition:
EnergyScaleAnalyzer.cc:342
edm::EventSetup
Definition:
EventSetup.h:57
EnergyScaleAnalyzer::fixedMatrixSuperClustersWithPreshower_token
edm::EDGetTokenT< reco::SuperClusterCollection > fixedMatrixSuperClustersWithPreshower_token
Definition:
EnergyScaleAnalyzer.h:66
EnergyScaleAnalyzer::phiMaxVtx_
float phiMaxVtx_
Definition:
EnergyScaleAnalyzer.h:143
EnergyScaleAnalyzer::dynamicHybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > dynamicHybridSuperClusters_token
Definition:
EnergyScaleAnalyzer.h:62
EnergyScaleAnalyzer::zClust_vtx_
float zClust_vtx_
Definition:
EnergyScaleAnalyzer.h:133
EcalRecHit.h
EnergyScaleAnalyzer::xVtx_
float xVtx_
Definition:
EnergyScaleAnalyzer.h:123
EnergyScaleAnalyzer::~EnergyScaleAnalyzer
~EnergyScaleAnalyzer() override
Definition:
EnergyScaleAnalyzer.cc:102
EnergyScaleAnalyzer::yClust_zero_
float yClust_zero_
Definition:
EnergyScaleAnalyzer.h:128
EnergyScaleAnalyzer::etaMax_
float etaMax_
Definition:
EnergyScaleAnalyzer.h:140
EnergyScaleAnalyzer::hepMCLabel_
edm::EDGetTokenT< edm::HepMCProduct > hepMCLabel_
Definition:
EnergyScaleAnalyzer.h:60
EnergyScaleAnalyzer::tree_structure_::emCorr_pet
float emCorr_pet
Definition:
EnergyScaleAnalyzer.h:110
GenParticle.GenParticle
GenParticle
Definition:
GenParticle.py:18
SuperClusterFwd.h
Frameworkfwd.h
SuperCluster.h
EnergyScaleAnalyzer::yVtx_
float yVtx_
Definition:
EnergyScaleAnalyzer.h:124
EnergyScaleAnalyzer::tree_structure_::mc_e
float mc_e
Definition:
EnergyScaleAnalyzer.h:78
EventSetup.h
EnergyScaleAnalyzer::mytree_
TTree * mytree_
Definition:
EnergyScaleAnalyzer.h:72
EnergyScaleAnalyzer::beginJob
void beginJob() override
Definition:
EnergyScaleAnalyzer.cc:109
EnergyScaleAnalyzer::tree_structure_::em_isInCrack
int em_isInCrack
Definition:
EnergyScaleAnalyzer.h:88
EnergyScaleAnalyzer::etaMaxVtx_
float etaMaxVtx_
Definition:
EnergyScaleAnalyzer.h:141
EnergyScaleAnalyzer::tree_structure_::em_phi
float em_phi
Definition:
EnergyScaleAnalyzer.h:92
EnergyScaleAnalyzer::phiMax_
float phiMax_
Definition:
EnergyScaleAnalyzer.h:142
EnergyScaleAnalyzer::tree_structure_::emCorr_phi
float emCorr_phi
Definition:
EnergyScaleAnalyzer.h:108
EnergyScaleAnalyzer::tree_structure_::em_pe
float em_pe
Definition:
EnergyScaleAnalyzer.h:100
EnergyScaleAnalyzer::eTMaxVtx_
float eTMaxVtx_
Definition:
EnergyScaleAnalyzer.h:139
ParameterSet.h
EnergyScaleAnalyzer::tree_structure_::emCorr_eta
float emCorr_eta
Definition:
EnergyScaleAnalyzer.h:107
HepMCProduct.h
EnergyScaleAnalyzer::tree_structure_::mc_phi
float mc_phi
Definition:
EnergyScaleAnalyzer.h:80
EnergyScaleAnalyzer::tree_structure_::mc_et
float mc_et
Definition:
EnergyScaleAnalyzer.h:79
edm::Event
Definition:
Event.h:73
EnergyScaleAnalyzer::tree_structure_::emCorr_et
float emCorr_et
Definition:
EnergyScaleAnalyzer.h:106
EnergyScaleAnalyzer::tree_structure_::em_ew
float em_ew
Definition:
EnergyScaleAnalyzer.h:116
EnergyScaleAnalyzer::tree_
tree_structure_ tree_
Definition:
EnergyScaleAnalyzer.h:120
EnergyScaleAnalyzer::tree_structure_::em_e
float em_e
Definition:
EnergyScaleAnalyzer.h:90
Generated for CMSSW Reference Manual by
1.8.16