CMS 3D CMS Logo

ElectronCalibration.h
Go to the documentation of this file.
1 #ifndef CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATION
2 #define CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATION
3 
4 // -*- C++ -*-
5 //
6 // Package: ElectronCalibration
7 // Class: ElectronCalibration
8 //
16 //
17 // Original Author: Lorenzo AGOSTINO, Radek Ofierzynski
18 // Created: Tue Jul 18 12:17:01 CEST 2006
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 
25 // user include files
28 
38 #include "TFile.h"
39 #include "TH1.h"
40 #include "TH2.h"
41 
42 // class decleration
43 //
44 
46 public:
47  explicit ElectronCalibration(const edm::ParameterSet&);
48  ~ElectronCalibration() override;
49 
50  void analyze(const edm::Event&, const edm::EventSetup&) override;
51  void beginJob() override;
52  void endJob() override;
53 
54 private:
56  EBDetId findMaxHit2(const std::vector<DetId>&, const EBRecHitCollection*);
57 
58  // ----------member data ---------------------------
66  double ElePt_;
67  int maxeta_;
68  int mineta_;
69  int maxphi_;
70  int minphi_;
71  double cut1_;
72  double cut2_;
73  double cut3_;
75  double cutEPCalo1_;
76  double cutEPCalo2_;
77  double cutEPin1_;
78  double cutEPin2_;
79  double cutCalo1_;
80  double cutCalo2_;
81  double cutESeed_;
83 
86 
88 
91  std::vector<float> EnergyVector;
92  std::vector<float> WeightVector;
93  std::vector<std::vector<float> > EventMatrix;
94  std::vector<int> MaxCCeta;
95  std::vector<int> MaxCCphi;
96  std::vector<float> EnergyVectorNoCuts;
97  std::vector<float> WeightVectorNoCuts;
98  std::vector<std::vector<float> > EventMatrixNoCuts;
99  std::vector<int> MaxCCetaNoCuts;
100  std::vector<int> MaxCCphiNoCuts;
102  std::vector<float> solution;
103  std::vector<float> solutionNoCuts;
104  std::vector<float> newCalibs;
105  std::vector<float> oldCalibs;
106 
107  int eventcrystal[171][360];
109 
110  TFile* f;
111 
112  TH1F* e25;
113  TH1F* e9;
114  TH1F* scE;
115  TH1F* trP;
116  TH1F* EoP;
117  TH1F* EoP_all;
118  TH1F* calibs;
119  TH1F* e9Overe25;
120  TH1F* e25OverScE;
121  TH2F* Map;
122  TH1F* E25oP;
123 
124  TH1F* PinOverPout;
126  TH1F* MisCalibs;
127  TH1F* RatioCalibs;
128  TH1F* DiffCalibs;
131 
132  TH1F* e25NoCuts;
133  TH1F* e9NoCuts;
134  TH1F* scENoCuts;
135  TH1F* trPNoCuts;
136  TH1F* EoPNoCuts;
140  TH2F* MapNoCuts;
141  TH1F* E25oPNoCuts;
142  TH2F* Map3Dcalib;
144  TH1F* calibinter;
149 
150  TH2F* GeneralMap;
151 
152  TH2F* MapCor1;
153  TH2F* MapCor2;
154  TH2F* MapCor3;
155  TH2F* MapCor4;
156  TH2F* MapCor5;
157  TH2F* MapCor6;
158  TH2F* MapCor7;
159  TH2F* MapCor8;
160  TH2F* MapCor9;
161  TH2F* MapCor10;
162  TH2F* MapCor11;
163  TH2F* MapCorCalib;
164 
177 
189 
190  TH1F* PinMinPout;
192 
193  TH1F* Error1;
194  TH1F* Error2;
195  TH1F* Error3;
199 
203 
204  TH1F* hadOverEm;
207 };
208 #endif
ElectronCalibration::mineta_
int mineta_
Definition: ElectronCalibration.h:68
ElectronCalibration::elecclass_
int elecclass_
Definition: ElectronCalibration.h:74
CalibrationCluster.h
ElectronCalibration::MapNoCuts
TH2F * MapNoCuts
Definition: ElectronCalibration.h:140
ElectronCalibration::WeightVectorNoCuts
std::vector< float > WeightVectorNoCuts
Definition: ElectronCalibration.h:97
ElectronCalibration::EventMatrixNoCuts
std::vector< std::vector< float > > EventMatrixNoCuts
Definition: ElectronCalibration.h:98
ElectronCalibration::electronLabel_
edm::InputTag electronLabel_
Definition: ElectronCalibration.h:61
ElectronCalibration::etaMax
int etaMax
Definition: ElectronCalibration.h:90
ElectronCalibration::MapCor2NoCuts
TH2F * MapCor2NoCuts
Definition: ElectronCalibration.h:166
ElectronCalibration::hadOverEmNoCuts
TH1F * hadOverEmNoCuts
Definition: ElectronCalibration.h:205
ElectronCalibration::eventcrystal
int eventcrystal[171][360]
Definition: ElectronCalibration.h:107
ElectronCalibration::calibAlgo_
std::string calibAlgo_
Definition: ElectronCalibration.h:63
ESHandle.h
ElectronCalibration::cut1_
double cut1_
Definition: ElectronCalibration.h:71
ElectronCalibration::MapCor6NoCuts
TH2F * MapCor6NoCuts
Definition: ElectronCalibration.h:170
ElectronCalibration::cutCalo1_
double cutCalo1_
Definition: ElectronCalibration.h:79
ElectronCalibration::cut2_
double cut2_
Definition: ElectronCalibration.h:72
ElectronCalibration::MapCor2
TH2F * MapCor2
Definition: ElectronCalibration.h:153
CalibrationCluster
Definition: CalibrationCluster.h:13
ElectronCalibration::MapCor1NoCuts
TH2F * MapCor1NoCuts
Definition: ElectronCalibration.h:165
ElectronCalibration::trackLabel_
edm::InputTag trackLabel_
Definition: ElectronCalibration.h:62
ElectronCalibration::WeightVector
std::vector< float > WeightVector
Definition: ElectronCalibration.h:92
ElectronCalibration::findMaxHit
EBDetId findMaxHit(edm::Handle< EBRecHitCollection > &)
Definition: ElectronCalibration.cc:412
ElectronCalibration::~ElectronCalibration
~ElectronCalibration() override
Definition: ElectronCalibration.cc:67
EBDetId
Definition: EBDetId.h:17
ElectronCalibration::MapCorCalibNoCuts
TH2F * MapCorCalibNoCuts
Definition: ElectronCalibration.h:176
ElectronCalibration::newCalibs
std::vector< float > newCalibs
Definition: ElectronCalibration.h:104
ElectronCalibration::eSeedOverPoutNoCuts
TH1F * eSeedOverPoutNoCuts
Definition: ElectronCalibration.h:148
ElectronCalibration::ClusterSize_
int ClusterSize_
Definition: ElectronCalibration.h:82
ElectronCalibration::MapCor3
TH2F * MapCor3
Definition: ElectronCalibration.h:154
ElectronCalibration::rootfile_
std::string rootfile_
Definition: ElectronCalibration.h:59
MinL3Algorithm
Definition: MinL3Algorithm.h:18
ElectronCalibration::RatioCalibsNoCuts
TH1F * RatioCalibsNoCuts
Definition: ElectronCalibration.h:129
ElectronCalibration::e9Overe25NoCuts
TH1F * e9Overe25NoCuts
Definition: ElectronCalibration.h:138
ElectronCalibration::MapCor4
TH2F * MapCor4
Definition: ElectronCalibration.h:155
ElectronCalibration::solutionNoCuts
std::vector< float > solutionNoCuts
Definition: ElectronCalibration.h:103
ElectronCalibration::Error1NoCuts
TH1F * Error1NoCuts
Definition: ElectronCalibration.h:196
ElectronCalibration::EoP_all
TH1F * EoP_all
Definition: ElectronCalibration.h:117
ElectronCalibration::GeneralMap
TH2F * GeneralMap
Definition: ElectronCalibration.h:150
ElectronCalibration::beginJob
void beginJob() override
Definition: ElectronCalibration.cc:70
edm::SortedCollection< EcalRecHit >
ElectronCalibration::MapCor10
TH2F * MapCor10
Definition: ElectronCalibration.h:161
ElectronCalibration::cutCalo2_
double cutCalo2_
Definition: ElectronCalibration.h:80
ElectronCalibration::EnergyVectorNoCuts
std::vector< float > EnergyVectorNoCuts
Definition: ElectronCalibration.h:96
ElectronCalibration::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: ElectronCalibration.cc:458
ElectronCalibration::ElectronCalibration
ElectronCalibration(const edm::ParameterSet &)
Definition: ElectronCalibration.cc:35
ElectronCalibration::cutESeed_
double cutESeed_
Definition: ElectronCalibration.h:81
ElectronCalibration::maxphi_
int maxphi_
Definition: ElectronCalibration.h:69
EDAnalyzer.h
ElectronCalibration::MisCalibs
TH1F * MisCalibs
Definition: ElectronCalibration.h:126
ElectronCalibration::calibinterNoCuts
TH1F * calibinterNoCuts
Definition: ElectronCalibration.h:145
ElectronCalibration::Error2
TH1F * Error2
Definition: ElectronCalibration.h:194
HouseholderDecomposition.h
ElectronCalibration::MapCor5NoCuts
TH2F * MapCor5NoCuts
Definition: ElectronCalibration.h:169
ElectronCalibration::Map
TH2F * Map
Definition: ElectronCalibration.h:121
ElectronCalibration::calibClusterSize
int calibClusterSize
Definition: ElectronCalibration.h:89
edm::Handle
Definition: AssociativeIterator.h:50
ElectronCalibration::e25OverScE
TH1F * e25OverScE
Definition: ElectronCalibration.h:120
ElectronCalibration::phiMax
int phiMax
Definition: ElectronCalibration.h:90
ElectronCalibration::MapCor3NoCuts
TH2F * MapCor3NoCuts
Definition: ElectronCalibration.h:167
EcalRecHitCollections.h
MinL3Algorithm.h
ElectronCalibration::calibinter
TH1F * calibinter
Definition: ElectronCalibration.h:144
ElectronCalibration::PinOverPout
TH1F * PinOverPout
Definition: ElectronCalibration.h:124
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
ElectronCalibration::MapCor7NoCuts
TH2F * MapCor7NoCuts
Definition: ElectronCalibration.h:171
ElectronCalibration::E25oPNoCuts
TH1F * E25oPNoCuts
Definition: ElectronCalibration.h:141
ElectronCalibration::eSeedOverPout2
TH1F * eSeedOverPout2
Definition: ElectronCalibration.h:200
ElectronCalibration::cutEPCalo2_
double cutEPCalo2_
Definition: ElectronCalibration.h:76
ElectronCalibration::MapCor8ESeed
TH2F * MapCor8ESeed
Definition: ElectronCalibration.h:185
MakerMacros.h
ElectronCalibration::Error2NoCuts
TH1F * Error2NoCuts
Definition: ElectronCalibration.h:197
ElectronCalibration::MapCor9
TH2F * MapCor9
Definition: ElectronCalibration.h:160
ElectronCalibration::Map3Dcalib
TH2F * Map3Dcalib
Definition: ElectronCalibration.h:142
ElectronCalibration::keventweight_
int keventweight_
Definition: ElectronCalibration.h:65
ElectronCalibration::MapCor5
TH2F * MapCor5
Definition: ElectronCalibration.h:156
ElectronCalibration::MapCorCalib
TH2F * MapCorCalib
Definition: ElectronCalibration.h:163
ElectronCalibration::hadOverEmESeed
TH1F * hadOverEmESeed
Definition: ElectronCalibration.h:206
ElectronCalibration::calibCluster
CalibrationCluster calibCluster
Definition: ElectronCalibration.h:84
ElectronCalibration::MapCor6
TH2F * MapCor6
Definition: ElectronCalibration.h:157
ElectronCalibration::e9Overe25
TH1F * e9Overe25
Definition: ElectronCalibration.h:119
ElectronCalibration::MapCor8
TH2F * MapCor8
Definition: ElectronCalibration.h:159
ElectronCalibration::EoPNoCuts
TH1F * EoPNoCuts
Definition: ElectronCalibration.h:136
ElectronCalibration::cutEPCalo1_
double cutEPCalo1_
Definition: ElectronCalibration.h:75
ElectronCalibration::MapCor5ESeed
TH2F * MapCor5ESeed
Definition: ElectronCalibration.h:182
ElectronCalibration::MapCor10NoCuts
TH2F * MapCor10NoCuts
Definition: ElectronCalibration.h:174
ElectronCalibration::etaMin
int etaMin
Definition: ElectronCalibration.h:90
ElectronCalibration::eSeedOverPout2NoCuts
TH1F * eSeedOverPout2NoCuts
Definition: ElectronCalibration.h:201
ElectronCalibration::E25oP
TH1F * E25oP
Definition: ElectronCalibration.h:122
ElectronCalibration::cutEPin2_
double cutEPin2_
Definition: ElectronCalibration.h:78
ElectronCalibration::EventMatrix
std::vector< std::vector< float > > EventMatrix
Definition: ElectronCalibration.h:93
ElectronCalibration::cut3_
double cut3_
Definition: ElectronCalibration.h:73
ElectronCalibration::MapCor9ESeed
TH2F * MapCor9ESeed
Definition: ElectronCalibration.h:186
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ElectronCalibration::minphi_
int minphi_
Definition: ElectronCalibration.h:70
ElectronCalibration::f
TFile * f
Definition: ElectronCalibration.h:110
ElectronCalibration::MyL3Algo1
MinL3Algorithm * MyL3Algo1
Definition: ElectronCalibration.h:101
ElectronCalibration::Error1
TH1F * Error1
Definition: ElectronCalibration.h:193
ElectronCalibration::PinMinPoutNoCuts
TH1F * PinMinPoutNoCuts
Definition: ElectronCalibration.h:191
ElectronCalibration::Map3DcalibNoCuts
TH2F * Map3DcalibNoCuts
Definition: ElectronCalibration.h:143
ElectronCalibration::MaxCCphi
std::vector< int > MaxCCphi
Definition: ElectronCalibration.h:95
edm::ParameterSet
Definition: ParameterSet.h:47
ElectronCalibration::Error3NoCuts
TH1F * Error3NoCuts
Definition: ElectronCalibration.h:198
ElectronCalibration::MapCor1
TH2F * MapCor1
Definition: ElectronCalibration.h:152
ElectronCalibration::PinOverPoutNoCuts
TH1F * PinOverPoutNoCuts
Definition: ElectronCalibration.h:147
Event.h
ElectronCalibration::MaxCCeta
std::vector< int > MaxCCeta
Definition: ElectronCalibration.h:94
ElectronCalibration::MapCor11NoCuts
TH2F * MapCor11NoCuts
Definition: ElectronCalibration.h:175
ElectronCalibration::Error3
TH1F * Error3
Definition: ElectronCalibration.h:195
ElectronCalibration::trPNoCuts
TH1F * trPNoCuts
Definition: ElectronCalibration.h:135
ElectronCalibration::e25NoCuts
TH1F * e25NoCuts
Definition: ElectronCalibration.h:132
ElectronCalibration::RatioCalibs
TH1F * RatioCalibs
Definition: ElectronCalibration.h:127
ElectronCalibration
Definition: ElectronCalibration.h:45
ElectronCalibration::recHitLabel_
edm::InputTag recHitLabel_
Definition: ElectronCalibration.h:60
ElectronCalibration::maxeta_
int maxeta_
Definition: ElectronCalibration.h:67
edm::EventSetup
Definition: EventSetup.h:57
ElectronCalibration::MapCor7
TH2F * MapCor7
Definition: ElectronCalibration.h:158
ElectronCalibration::MapCor7ESeed
TH2F * MapCor7ESeed
Definition: ElectronCalibration.h:184
ElectronCalibration::MapCor2ESeed
TH2F * MapCor2ESeed
Definition: ElectronCalibration.h:179
ElectronCalibration::EnergyVector
std::vector< float > EnergyVector
Definition: ElectronCalibration.h:91
ElectronCalibration::e25OverScENoCuts
TH1F * e25OverScENoCuts
Definition: ElectronCalibration.h:139
ElectronCalibration::e9NoCuts
TH1F * e9NoCuts
Definition: ElectronCalibration.h:133
ElectronCalibration::solution
std::vector< float > solution
Definition: ElectronCalibration.h:102
CalibrationCluster::CalibMap
std::map< EBDetId, unsigned int > CalibMap
Definition: CalibrationCluster.h:15
ElectronCalibration::ElePt_
double ElePt_
Definition: ElectronCalibration.h:66
ElectronCalibration::MaxCCphiNoCuts
std::vector< int > MaxCCphiNoCuts
Definition: ElectronCalibration.h:100
ElectronCalibration::keventweight
int keventweight
Definition: ElectronCalibration.h:89
ElectronCalibration::eSeedOverPout
TH1F * eSeedOverPout
Definition: ElectronCalibration.h:125
ElectronCalibration::MapCor4NoCuts
TH2F * MapCor4NoCuts
Definition: ElectronCalibration.h:168
ElectronCalibration::scENoCuts
TH1F * scENoCuts
Definition: ElectronCalibration.h:134
ElectronCalibration::cutEPin1_
double cutEPin1_
Definition: ElectronCalibration.h:77
ElectronCalibration::MapCor9NoCuts
TH2F * MapCor9NoCuts
Definition: ElectronCalibration.h:173
DetId.h
Frameworkfwd.h
ElectronCalibration::scE
TH1F * scE
Definition: ElectronCalibration.h:114
ElectronCalibration::ReducedMap
CalibrationCluster::CalibMap ReducedMap
Definition: ElectronCalibration.h:85
ElectronCalibration::DiffCalibs
TH1F * DiffCalibs
Definition: ElectronCalibration.h:128
ElectronCalibration::MapCor6ESeed
TH2F * MapCor6ESeed
Definition: ElectronCalibration.h:183
ElectronCalibration::endJob
void endJob() override
Definition: ElectronCalibration.cc:259
EventSetup.h
HouseholderDecomposition
Definition: HouseholderDecomposition.h:17
ElectronCalibration::phiMin
int phiMin
Definition: ElectronCalibration.h:90
ElectronCalibration::MapCor11
TH2F * MapCor11
Definition: ElectronCalibration.h:162
ElectronCalibration::MaxCCetaNoCuts
std::vector< int > MaxCCetaNoCuts
Definition: ElectronCalibration.h:99
ElectronCalibration::hadOverEm
TH1F * hadOverEm
Definition: ElectronCalibration.h:204
ElectronCalibration::EoP
TH1F * EoP
Definition: ElectronCalibration.h:116
ElectronCalibration::oldCalibs
std::vector< float > oldCalibs
Definition: ElectronCalibration.h:105
ElectronCalibration::numevent_
int numevent_
Definition: ElectronCalibration.h:108
ElectronCalibration::e25
TH1F * e25
Definition: ElectronCalibration.h:112
ElectronCalibration::trP
TH1F * trP
Definition: ElectronCalibration.h:115
ElectronCalibration::MapCor1ESeed
TH2F * MapCor1ESeed
Definition: ElectronCalibration.h:178
ElectronCalibration::MapCor3ESeed
TH2F * MapCor3ESeed
Definition: ElectronCalibration.h:180
ElectronCalibration::eSeedOverPout2ESeed
TH1F * eSeedOverPout2ESeed
Definition: ElectronCalibration.h:202
edm::Event
Definition: Event.h:73
ElectronCalibration::MapCor8NoCuts
TH2F * MapCor8NoCuts
Definition: ElectronCalibration.h:172
ElectronCalibration::DiffCalibsNoCuts
TH1F * DiffCalibsNoCuts
Definition: ElectronCalibration.h:130
ElectronCalibration::PinMinPout
TH1F * PinMinPout
Definition: ElectronCalibration.h:190
edm::InputTag
Definition: InputTag.h:15
ElectronCalibration::findMaxHit2
EBDetId findMaxHit2(const std::vector< DetId > &, const EBRecHitCollection *)
Definition: ElectronCalibration.cc:432
ElectronCalibration::calibsNoCuts
TH1F * calibsNoCuts
Definition: ElectronCalibration.h:137
ElectronCalibration::miscalibfile_
std::string miscalibfile_
Definition: ElectronCalibration.h:64
ElectronCalibration::MapCor4ESeed
TH2F * MapCor4ESeed
Definition: ElectronCalibration.h:181
ElectronCalibration::MapCor11ESeed
TH2F * MapCor11ESeed
Definition: ElectronCalibration.h:188
ElectronCalibration::calibs
TH1F * calibs
Definition: ElectronCalibration.h:118
ElectronCalibration::read_events
int read_events
Definition: ElectronCalibration.h:87
ElectronCalibration::MyHH
HouseholderDecomposition * MyHH
Definition: ElectronCalibration.h:146
ElectronCalibration::MapCor10ESeed
TH2F * MapCor10ESeed
Definition: ElectronCalibration.h:187
ElectronCalibration::e9
TH1F * e9
Definition: ElectronCalibration.h:113