Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:39

0001 #ifndef ZEEPLOTS_H
0002 #define ZEEPLOTS_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    ElectronCalibration
0007 // Class:      ElectronCalibration
0008 //
0009 /**\class ElectronCalibration ElectronCalibration.cc Calibration/EcalCalibAlgos/src/ElectronCalibration.cc
0010 
0011  Description: Perform single electron calibration (tested on TB data only).
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Lorenzo AGOSTINO, Radek Ofierzynski
0018 //         Created:  Tue Jul 18 12:17:01 CEST 2006
0019 //
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 
0028 #include "DataFormats/Common/interface/TriggerResults.h"
0029 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0030 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0031 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0032 #include "FWCore/Framework/interface/Event.h"
0033 #include "FWCore/Framework/interface/MakerMacros.h"
0034 #include "FWCore/Framework/interface/EventSetup.h"
0035 #include "FWCore/Framework/interface/ESHandle.h"
0036 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0037 #include "Calibration/Tools/interface/HouseholderDecomposition.h"
0038 #include "Calibration/Tools/interface/MinL3Algorithm.h"
0039 #include "Calibration/Tools/interface/CalibrationCluster.h"
0040 #include "Calibration/Tools/interface/CalibElectron.h"
0041 #include "DataFormats/DetId/interface/DetId.h"
0042 #include "TFile.h"
0043 #include "TH1.h"
0044 #include "TH2.h"
0045 
0046 // class declaration
0047 //
0048 
0049 class ZeePlots {
0050 public:
0051   ZeePlots(const char*);
0052   ~ZeePlots();
0053 
0054   void openFile();
0055 
0056   void bookEleHistograms();
0057   void bookEleMCHistograms();
0058   void bookZHistograms();
0059   void bookZMCHistograms();
0060   void bookHLTHistograms();
0061   void bookEleClassesPlots();
0062 
0063   void fillZMCInfo(const HepMC::GenEvent*);
0064   void fillEleMCInfo(const HepMC::GenEvent*);
0065   void fillEleInfo(const reco::GsfElectronCollection*);
0066   void fillHLTInfo(edm::Handle<edm::TriggerResults>);
0067   void fillZInfo(std::pair<calib::CalibElectron*, calib::CalibElectron*> myZeeCandidate);
0068   void fillEleClassesPlots(calib::CalibElectron*);
0069 
0070   void writeEleHistograms();
0071   void writeZHistograms();
0072   void writeMCEleHistograms();
0073   void writeMCZHistograms();
0074   void writeHLTHistograms();
0075   void writeEleClassesPlots();
0076 
0077 private:
0078   TFile* file_;
0079   const char* fileName_;
0080 
0081   TH1F* h1_gen_ZMass_;
0082   TH1F* h1_gen_ZRapidity_;
0083   TH1F* h1_gen_ZEta_;
0084   TH1F* h1_gen_ZPhi_;
0085   TH1F* h1_gen_ZPt_;
0086 
0087   TH1F* h1_FiredTriggers_;
0088   TH1F* h1_HLT1Electron_FiredEvents_;
0089   TH1F* h1_HLT2Electron_FiredEvents_;
0090   TH1F* h1_HLT2ElectronRelaxed_FiredEvents_;
0091   TH1F* h1_HLT1Electron_HLT2Electron_FiredEvents_;
0092   TH1F* h1_HLT1Electron_HLT2ElectronRelaxed_FiredEvents_;
0093   TH1F* h1_HLT2Electron_HLT2ElectronRelaxed_FiredEvents_;
0094   TH1F* h1_HLT1Electron_HLT2Electron_HLT2ElectronRelaxed_FiredEvents_;
0095   TH1F* h1_HLTVisitedEvents_;
0096 
0097   TH1F* h1_mcEle_Energy_;
0098   TH1F* h1_mcElePt_;
0099   TH1F* h1_mcEleEta_;
0100   TH1F* h1_mcElePhi_;
0101 
0102   TH1F* h1_recoEleEnergy_;
0103   TH1F* h1_recoElePt_;
0104   TH1F* h1_recoEleEta_;
0105   TH1F* h1_recoElePhi_;
0106   TH1F* h1_nEleReco_;
0107 
0108   TH1F* h1_reco_ZEta_;
0109   TH1F* h1_reco_ZTheta_;
0110   TH1F* h1_reco_ZRapidity_;
0111   TH1F* h1_reco_ZPhi_;
0112   TH1F* h1_reco_ZPt_;
0113 
0114   TH1F* h1_occupancyVsEtaGold_;
0115   TH1F* h1_occupancyVsEtaSilver_;
0116   TH1F* h1_occupancyVsEtaCrack_;
0117   TH1F* h1_occupancyVsEtaShower_;
0118 };
0119 #endif