CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ElectronCalibrationUniv.h
Go to the documentation of this file.
1 #ifndef CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATIONUNIV
2 #define CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATIONUNIV
3 
4 // -*- C++ -*-
5 //
6 // Package: ElectronCalibrationUniv
7 // Class: ElectronCalibrationUniv
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 
30 
31 // Geometry
36 
49 #include "TFile.h"
50 #include "TH1.h"
51 #include "TH2.h"
52 
54 
55 // class decleration
56 //
57 
58 class ElectronCalibrationUniv : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
59 public:
61  ~ElectronCalibrationUniv() override;
62 
63  void analyze(const edm::Event &, const edm::EventSetup &) override;
64  void beginJob() override;
65  void beginRun(edm::Run const &, edm::EventSetup const &) override;
66  void endRun(edm::Run const &, edm::EventSetup const &) override;
67  void endJob() override;
68 
69 private:
70  DetId findMaxHit(const std::vector<DetId> &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits);
71  bool TestEEvalidDetId(int crystal_ix, int crystal_iy, int iz);
72 
73  // ----------member data ---------------------------
74 
82  const int keventweight_;
83  const double elePt_;
84  const int maxeta_;
85  const int mineta_;
86  const int maxphi_;
87  const int minphi_;
88  const double cut1_;
89  const double cut2_;
90  const double cut3_;
91  const int numevent_;
92  const double cutEPCalo1_;
93  const double cutEPCalo2_;
94  const double cutEPin1_;
95  const double cutEPin2_;
96  const double cutCalo1_;
97  const double cutCalo2_;
98  const double cutESeed_;
99  const int clusterSize_;
100  const int elecclass_;
101 
103 
106  std::vector<float> EnergyVector;
107  std::vector<float> WeightVector;
108  std::vector<std::vector<float> > EventMatrix;
109  std::vector<int> MaxCCeta;
110  std::vector<int> MaxCCphi;
111  std::vector<float> EnergyVectorNoCuts;
112  std::vector<float> WeightVectorNoCuts;
113  std::vector<std::vector<float> > EventMatrixNoCuts;
114  std::vector<int> MaxCCetaNoCuts;
115  std::vector<int> MaxCCphiNoCuts;
118 
124 
125  std::vector<float> solution;
126  std::vector<float> solutionNoCuts;
127 
128  //For Universal Algo
129  std::vector<std::vector<DetId> > UnivEventIds;
130  std::map<DetId, float> Univsolution;
131 
132  // int eventcrystal[25][25];
133 
134  TFile *f;
135 
137 
138  TH1F *e25;
139  TH1F *e9;
140  TH1F *scE;
141  TH1F *trP;
142  TH1F *EoP;
143  TH1F *EoP_all;
144  TH1F *calibs;
147  TH1F *e9Overe25;
148  TH1F *e25OverScE;
149  TH2F *Map;
150  TH1F *E25oP;
151 
152  TH1F *PinOverPout;
154  /* TH1F * MisCalibs; */
155  /* TH1F * RatioCalibs; */
156  /* TH1F * DiffCalibs; */
157  /* TH1F * RatioCalibsNoCuts; */
158  /* TH1F * DiffCalibsNoCuts; */
159  /* TH1F * MisCalibsEndCapMinus; */
160  /* TH1F * MisCalibsEndCapPlus; */
161  /* TH1F * RatioCalibsEndCapMinus; */
162  /* TH1F * RatioCalibsEndCapPlus; */
163  /* TH1F * DiffCalibsEndCapMinus; */
164  /* TH1F * DiffCalibsEndCapPlus; */
165 
166  TH1F *e25NoCuts;
167  TH1F *e9NoCuts;
168  TH1F *scENoCuts;
169  TH1F *trPNoCuts;
170  TH1F *EoPNoCuts;
176  TH1F *E25oPNoCuts;
177  TH2F *Map3Dcalib;
181  TH1F *calibinter;
188 
189  TH2F *GeneralMap;
195 
196  TH2F *MapCor1;
197  TH2F *MapCor2;
198  TH2F *MapCor3;
199  TH2F *MapCor4;
200  TH2F *MapCor5;
201  TH2F *MapCor6;
202  TH2F *MapCor7;
203  TH2F *MapCor8;
204  TH2F *MapCor9;
205  TH2F *MapCor10;
206  TH2F *MapCor11;
207  // TH2F * MapCorCalib;
208 
220  /* TH2F * MapCorCalibEndCapMinus; */
221  /* TH2F * MapCorCalibEndCapPlus; */
222 
234 
235  TH2F *E25oPvsEta;
238 
239  TH1F *PinMinPout;
241 
242  TH1F *Error1;
243  TH1F *Error2;
244  TH1F *Error3;
248 
252 
253  TH1F *hadOverEm;
256 };
257 #endif
std::vector< float > solutionNoCuts
ElectronCalibrationUniv(const edm::ParameterSet &)
std::vector< std::vector< float > > EventMatrixNoCuts
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
std::vector< std::vector< float > > EventMatrix
void analyze(const edm::Event &, const edm::EventSetup &) override
MinL3AlgoUniv< DetId > * UnivL3
const edm::InputTag electronLabel_
const CaloTopology * theCaloTopology_
std::vector< std::vector< DetId > > UnivEventIds
const edm::InputTag ebRecHitLabel_
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
bool TestEEvalidDetId(int crystal_ix, int crystal_iy, int iz)
std::map< DetId, float > Univsolution
HouseholderDecomposition * MyHH
Definition: DetId.h:17
const std::string miscalibfileEndCap_
std::vector< float > EnergyVectorNoCuts
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
const edm::InputTag eeRecHitLabel_
void endRun(edm::Run const &, edm::EventSetup const &) override
std::vector< float > WeightVectorNoCuts
std::vector< float > WeightVector
std::vector< float > EnergyVector
Definition: Run.h:45
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
void beginRun(edm::Run const &, edm::EventSetup const &) override
DetId findMaxHit(const std::vector< DetId > &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits)