CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/ElectroWeakAnalysis/ZEE/interface/AnalysisErsatz.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    AnalysisErsatz
00004 // Class:      AnalysisErsatz
00005 // 
00013 //
00014 // Original Author:  David Wardrope
00015 //         Created:  Fri Nov 14 15:00:43 GMT 2008
00016 // $Id: AnalysisErsatz.h,v 1.4 2010/01/14 12:39:56 fabozzi Exp $
00017 //
00018 //
00019 
00020 
00021 // system include files
00022 #include <memory>
00023 //Framework
00024 #include "FWCore/Framework/interface/Frameworkfwd.h"
00025 #include "FWCore/Framework/interface/EDAnalyzer.h"
00026 #include "FWCore/Framework/interface/Event.h"
00027 #include "FWCore/Framework/interface/MakerMacros.h"
00028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00029 #include "FWCore/ServiceRegistry/interface/Service.h"
00030 #include "CommonTools/UtilAlgos/interface/TFileService.h"
00031 //Random Number Generator
00032 #include "FWCore/Utilities/interface/RandomNumberGenerator.h"
00033 #include "CLHEP/Random/RandFlat.h"
00034 //Egamma 
00035 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00036 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00037 //OtherObjects
00038 #include "DataFormats/TrackReco/interface/Track.h"
00039 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00040 #include "DataFormats/Common/interface/TriggerResults.h"
00041 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00042 #include "DataFormats/METReco/interface/CaloMET.h"
00043 #include "DataFormats/METReco/interface/CaloMETFwd.h"
00044 #include "DataFormats/METReco/interface/GenMET.h"
00045 #include "DataFormats/METReco/interface/GenMETFwd.h"
00046 #include "DataFormats/METReco/interface/PFMET.h"
00047 #include "DataFormats/METReco/interface/PFMETFwd.h"
00048 #include "DataFormats/METReco/interface/MET.h"
00049 #include "DataFormats/METReco/interface/METFwd.h"
00050 //PhysicsTools
00051 //#include "PhysicsTools/Utilities/interface/deltaR.h"
00052 #include "DataFormats/Math/interface/deltaR.h"
00053 #include "PhysicsTools/CandUtils/interface/CenterOfMassBooster.h"
00054 #include "Math/GenVector/Boost.h"
00055 
00056 //Helper Functions
00057 #include "ElectroWeakAnalysis/ZEE/interface/UniqueElectrons.h"
00058 #include "ElectroWeakAnalysis/ZEE/interface/ElectronSelector.h"
00059 #include "ElectroWeakAnalysis/ZEE/interface/CaloVectors.h"
00060 //ROOT
00061 #include "TTree.h"
00062 
00063 #define nEntries_arr_ 4
00064 //
00065 // class declaration
00066 //
00067 
00068 //namespace CLHEP{
00069 //      class RandFlat;
00070 //}
00071 
00072 class AnalysisErsatz : public edm::EDAnalyzer {
00073    public:
00074       explicit AnalysisErsatz(const edm::ParameterSet&);
00075       ~AnalysisErsatz();
00076 
00077 
00078    private:
00079       virtual void beginJob() ;
00080       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00081       virtual void endJob() ;
00082 
00083       // ----------member data ---------------------------
00084         edm::InputTag MCTruthCollection_;
00085         edm::InputTag ElectronCollection_; 
00086         edm::InputTag CaloMEtCollection_, T1MEtCollection_, PfMEtCollection_, TcMEtCollection_, GenMEtCollection_;
00087         bool ErsatzEvent_, C_Fiducial_;
00088         enum cut_index_t { EtCut_, EB_sIhIh_, EB_dEtaIn_, EB_dPhiIn_, EB_TrckIso_, EB_EcalIso_, EB_HcalIso_,
00089                                 EE_sIhIh_, EE_dEtaIn_, EE_dPhiIn_, EE_TrckIso_, EE_EcalIso_, EE_HcalIso_};
00090         std::vector<double> CutVector_;
00091         double mW_, mZ_;
00092         edm::InputTag TriggerEvent_, TriggerResults_, TriggerPath_;
00093         std::string TriggerName_;
00094 
00095         TTree* t_;
00096         double Boson_pt_, Boson_y_, Boson_m_, Boson_mt_;
00097         double Boson_phi_;
00098         double McElec3_pt_[nEntries_arr_], McElec3_eta_[nEntries_arr_];
00099         double McElec1_pt_[nEntries_arr_], McElec1_eta_[nEntries_arr_];
00100         int RndmInt_;
00101         double RndmMcElec_pt_, RndmMcElec_eta_, RndmMcElec_phi_;
00102         double RndmMcElec_Rescaled_pt_, RndmMcElec_Rescaled_eta_, RndmMcElec_Rescaled_phi_;
00103         double RndmMcElecTRIG_pt_, RndmMcElecTRIG_eta_, RndmMcElecRECO_pt_, RndmMcElecRECO_eta_;
00104         double OthrMcElec_pt_, OthrMcElec_eta_, OthrMcElec_phi_;
00105         double OthrMcElecTRIG_pt_, OthrMcElecTRIG_eta_, OthrMcElecRECO_pt_, OthrMcElecRECO_eta_;
00106         double OthrMcElec_Rescaled_pt_, OthrMcElec_Rescaled_eta_, OthrMcElec_Rescaled_phi_;
00107         int  RndmTrig_, RndmReco_, OthrTrig_, OthrReco_;
00108         double McNu_pt_, McNu_eta_, McNu_phi_, McNu_ECALeta_;
00109         double McNu_vx_, McNu_vy_, McNu_vz_;
00110         double McLeptons_dPhi_, McLeptons_dEta_, McLeptons_dR_;
00111 
00112         double elec_q_[nEntries_arr_];
00113         double elec_pt_[nEntries_arr_], elec_eta_[nEntries_arr_], elec_phi_[nEntries_arr_];
00114         double elec_pt25_, elec_eta25_, elec_phi25_;
00115         double elec_sIhIh_[nEntries_arr_], elec_dPhiIn_[nEntries_arr_], elec_dEtaIn_[nEntries_arr_];
00116         double elec_trckIso_[nEntries_arr_], elec_ecalIso_[nEntries_arr_], elec_hcalIso_[nEntries_arr_];
00117         double elec_e5x5_[nEntries_arr_], elec_e2x5Max_[nEntries_arr_], elec_e1x5Max_[nEntries_arr_];
00118         double elec_hoe_[nEntries_arr_], elec_eop_[nEntries_arr_], elec_pin_[nEntries_arr_], elec_pout_[nEntries_arr_];
00119 
00120         double Selected_nuPt_[nEntries_arr_], Selected_nuEta_[nEntries_arr_], Selected_nuPhi_[nEntries_arr_];
00121         double caloMEt_, caloSumEt_, caloUESumEt_;
00122         double t1MEt_, t1MEtPhi_, t1SumEt_;
00123         double pfMEt_, pfMEtPhi_, pfSumEt_;
00124         double tcMEt_, tcMEtPhi_, tcSumEt_;
00125         double caloMEt25_, caloMEt30_;
00126         double caloMEtECAL25_, caloMEtECAL30_;//using ECAL eta to restrict neutrino
00127         double caloMEtPhi_, caloMEtPhi25_, caloMEtPhi30_;
00128         double caloMEtPhiECAL25_, caloMEtPhiECAL30_;//using ECAL eta to restrict neutrino
00129         double caloMt_[nEntries_arr_], caloMt25_[nEntries_arr_], caloMt30_[nEntries_arr_];
00130         double genMEt_, genMt_[nEntries_arr_], genUESumEt_, genMEt25_;
00131         int nHltObj_, nSelElecs_;
00132         double HltObj_pt_[nEntries_arr_], HltObj_eta_[nEntries_arr_];
00133 };
00134