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