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