CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/Calibration/EcalCalibAlgos/interface/ElectronCalibration.h

Go to the documentation of this file.
00001 #ifndef CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATION
00002 #define CALIBRATION_ECALCALIBALGOS_ELECTRONCALIBRATION
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    ElectronCalibration
00007 // Class:      ElectronCalibration
00008 // 
00016 //
00017 // Original Author:  Lorenzo AGOSTINO, Radek Ofierzynski
00018 //         Created:  Tue Jul 18 12:17:01 CEST 2006
00019 // $Id: ElectronCalibration.h,v 1.11 2010/07/30 02:40:20 wmtan Exp $
00020 //
00021 //
00022 
00023 
00024 // system include files
00025 #include <memory>
00026 
00027 // user include files
00028 #include "FWCore/Framework/interface/Frameworkfwd.h"
00029 #include "FWCore/Framework/interface/EDAnalyzer.h"
00030 
00031 #include "FWCore/Framework/interface/Event.h"
00032 #include "FWCore/Framework/interface/MakerMacros.h"
00033 #include "FWCore/Framework/interface/EventSetup.h"
00034 #include "FWCore/Framework/interface/ESHandle.h"
00035 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00036 #include "Calibration/Tools/interface/HouseholderDecomposition.h"
00037 #include "Calibration/Tools/interface/MinL3Algorithm.h"
00038 #include "Calibration/Tools/interface/CalibrationCluster.h"
00039 #include "DataFormats/DetId/interface/DetId.h"
00040 #include "TFile.h"
00041 #include "TH1.h"
00042 #include "TH2.h"
00043 
00044 
00045 // class decleration
00046 //
00047 
00048 class ElectronCalibration : public edm::EDAnalyzer {
00049    public:
00050       explicit ElectronCalibration(const edm::ParameterSet&);
00051       ~ElectronCalibration();
00052 
00053       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00054       virtual void beginJob();
00055       virtual void endJob();
00056    private:
00057 
00058       EBDetId  findMaxHit(edm::Handle<EBRecHitCollection> &);
00059       EBDetId  findMaxHit2(const std::vector<DetId> & ,const EBRecHitCollection* );
00060 
00061       // ----------member data ---------------------------
00062       std::string rootfile_;
00063       edm::InputTag recHitLabel_;
00064       edm::InputTag electronLabel_;
00065       edm::InputTag trackLabel_;
00066       std::string calibAlgo_;
00067       std::string miscalibfile_;
00068       int keventweight_;
00069       double ElePt_;
00070       int maxeta_;
00071       int mineta_;
00072       int maxphi_;
00073       int minphi_;
00074       double cut1_;
00075       double cut2_;
00076       double cut3_;
00077       int elecclass_;
00078       double cutEPCalo1_;
00079       double cutEPCalo2_;
00080       double cutEPin1_;
00081       double cutEPin2_;
00082       double cutCalo1_;
00083       double cutCalo2_;
00084       double cutESeed_;
00085       int ClusterSize_;
00086 
00087       CalibrationCluster calibCluster;
00088       CalibrationCluster::CalibMap ReducedMap;
00089       
00090       int read_events;
00091       
00092       int calibClusterSize,keventweight;
00093       int etaMin, etaMax, phiMin, phiMax;
00094       std::vector<float> EnergyVector;
00095       std::vector<float> WeightVector;
00096       std::vector<std::vector<float> > EventMatrix;
00097       std::vector<int> MaxCCeta;
00098       std::vector<int> MaxCCphi;
00099       std::vector<float> EnergyVectorNoCuts;
00100       std::vector<float> WeightVectorNoCuts;
00101       std::vector<std::vector<float> > EventMatrixNoCuts;
00102       std::vector<int> MaxCCetaNoCuts;
00103       std::vector<int> MaxCCphiNoCuts;
00104       MinL3Algorithm* MyL3Algo1;
00105       std::vector<float> solution;
00106       std::vector<float> solutionNoCuts;
00107       std::vector<float> newCalibs;
00108       std::vector<float> oldCalibs;
00109       
00110       int eventcrystal[171][360];
00111       int numevent_;
00112 
00113       TFile * f;
00114 
00115       TH1F * e25;
00116       TH1F * e9;
00117       TH1F * scE;
00118       TH1F * trP;
00119       TH1F * EoP;
00120       TH1F * EoP_all;
00121       TH1F * calibs;
00122       TH1F * e9Overe25;
00123       TH1F * e25OverScE;
00124       TH2F * Map;
00125       TH1F * E25oP;
00126 
00127       TH1F * PinOverPout;
00128       TH1F * eSeedOverPout;
00129       TH1F * MisCalibs;
00130       TH1F * RatioCalibs;
00131       TH1F * DiffCalibs;
00132       TH1F * RatioCalibsNoCuts;
00133       TH1F * DiffCalibsNoCuts;
00134 
00135       TH1F * e25NoCuts;
00136       TH1F * e9NoCuts;
00137       TH1F * scENoCuts;
00138       TH1F * trPNoCuts;
00139       TH1F * EoPNoCuts;
00140       TH1F * calibsNoCuts;
00141       TH1F * e9Overe25NoCuts;
00142       TH1F * e25OverScENoCuts;
00143       TH2F * MapNoCuts;
00144       TH1F * E25oPNoCuts;
00145       TH2F * Map3Dcalib;
00146       TH2F * Map3DcalibNoCuts;
00147       TH1F * calibinter;
00148       TH1F * calibinterNoCuts;
00149       HouseholderDecomposition * MyHH;
00150       TH1F * PinOverPoutNoCuts;
00151       TH1F * eSeedOverPoutNoCuts;
00152 
00153       TH2F * GeneralMap;
00154 
00155       TH2F * MapCor1;
00156       TH2F * MapCor2;
00157       TH2F * MapCor3;
00158       TH2F * MapCor4;
00159       TH2F * MapCor5;
00160       TH2F * MapCor6;
00161       TH2F * MapCor7;
00162       TH2F * MapCor8;
00163       TH2F * MapCor9;
00164       TH2F * MapCor10;
00165       TH2F * MapCor11;
00166       TH2F * MapCorCalib;
00167 
00168       TH2F * MapCor1NoCuts;
00169       TH2F * MapCor2NoCuts;
00170       TH2F * MapCor3NoCuts;
00171       TH2F * MapCor4NoCuts;
00172       TH2F * MapCor5NoCuts;
00173       TH2F * MapCor6NoCuts;
00174       TH2F * MapCor7NoCuts;
00175       TH2F * MapCor8NoCuts;
00176       TH2F * MapCor9NoCuts;
00177       TH2F * MapCor10NoCuts;
00178       TH2F * MapCor11NoCuts;
00179       TH2F * MapCorCalibNoCuts;
00180 
00181       TH2F * MapCor1ESeed;
00182       TH2F * MapCor2ESeed;
00183       TH2F * MapCor3ESeed;
00184       TH2F * MapCor4ESeed;
00185       TH2F * MapCor5ESeed;
00186       TH2F * MapCor6ESeed;
00187       TH2F * MapCor7ESeed;
00188       TH2F * MapCor8ESeed;
00189       TH2F * MapCor9ESeed;
00190       TH2F * MapCor10ESeed;
00191       TH2F * MapCor11ESeed;
00192 
00193 
00194       TH1F * PinMinPout; 
00195       TH1F * PinMinPoutNoCuts;
00196 
00197       TH1F * Error1;
00198       TH1F * Error2;
00199       TH1F * Error3;
00200       TH1F * Error1NoCuts;
00201       TH1F * Error2NoCuts;
00202       TH1F * Error3NoCuts;
00203 
00204       TH1F * eSeedOverPout2;
00205       TH1F * eSeedOverPout2NoCuts;
00206       TH1F * eSeedOverPout2ESeed;
00207 
00208       TH1F * hadOverEm;
00209       TH1F * hadOverEmNoCuts;
00210       TH1F * hadOverEmESeed;
00211 
00212 };
00213 #endif