00001 // Class: LeptonRecoSkim 00002 // 00010 // 00011 // Original Author: Massimiliano Chiorboli,40 4-A01,+41227671535, 00012 // Created: Wed Mar 31 21:49:08 CEST 2010 00013 // $Id: LeptonRecoSkim.h,v 1.2 2010/11/18 01:04:21 wmtan Exp $ 00014 // 00015 // 00016 #include <memory> 00017 #include <fstream> 00018 00019 // user include files 00020 #include "FWCore/Framework/interface/Frameworkfwd.h" 00021 #include "FWCore/Framework/interface/EDFilter.h" 00022 00023 #include "FWCore/Framework/interface/Event.h" 00024 #include "FWCore/Framework/interface/MakerMacros.h" 00025 00026 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00027 #include "DataFormats/Common/interface/Handle.h" 00028 #include "FWCore/Framework/interface/ESHandle.h" 00029 00030 //includes for reco objects 00031 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" 00032 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" 00033 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h" 00034 #include "Geometry/CaloTopology/interface/CaloTopology.h" 00035 #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h" 00036 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" 00037 #include "Geometry/CaloTopology/interface/EcalBarrelTopology.h" 00038 #include "Geometry/CaloTopology/interface/EcalEndcapTopology.h" 00039 #include "DataFormats/MuonReco/interface/Muon.h" 00040 #include "DataFormats/MuonReco/interface/MuonFwd.h" 00041 #include "DataFormats/JetReco/interface/Jet.h" 00042 #include "DataFormats/BTauReco/interface/JetTag.h" 00043 #include "DataFormats/JetReco/interface/PFJet.h" 00044 #include "DataFormats/JetReco/interface/PFJetCollection.h" 00045 #include "DataFormats/JetReco/interface/CaloJetCollection.h" 00046 #include "DataFormats/JetReco/interface/CaloJet.h" 00047 #include "DataFormats/TrackReco/interface/Track.h" 00048 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00049 00050 //includes for PF 00051 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" 00052 00053 00054 //includes for Trigger 00055 #include "DataFormats/Common/interface/TriggerResults.h" 00056 #include "FWCore/Common/interface/TriggerNames.h" 00057 00058 00059 class LeptonRecoSkim : public edm::EDFilter { 00060 public: 00061 explicit LeptonRecoSkim(const edm::ParameterSet&); 00062 ~LeptonRecoSkim(); 00063 00064 private: 00065 virtual void beginJob() ; 00066 virtual bool filter(edm::Event&, const edm::EventSetup&); 00067 virtual void endJob() ; 00068 00069 void handleObjects(const edm::Event&, const edm::EventSetup& iSetup); 00070 00071 00072 00073 edm::InputTag hltLabel; 00074 std::string filterName; 00075 edm::InputTag m_electronSrc; 00076 edm::InputTag m_pfelectronSrc; 00077 edm::InputTag m_muonSrc; 00078 edm::InputTag m_jetsSrc; 00079 edm::InputTag m_pfjetsSrc; 00080 edm::InputTag m_ebRecHitsSrc; 00081 edm::InputTag m_eeRecHitsSrc; 00082 00083 const reco::GsfElectronCollection* theElectronCollection ; 00084 const reco::PFCandidateCollection* thePfCandidateCollection ; 00085 const reco::MuonCollection* theMuonCollection ; 00086 const reco::CaloJetCollection* theCaloJetCollection ; 00087 const reco::PFJetCollection* thePFJetCollection ; 00088 const EcalRecHitCollection* theEcalBarrelCollection; 00089 const EcalRecHitCollection* theEcalEndcapCollection; 00090 const CaloTopology* theCaloTopology; 00091 const CaloGeometry* theCaloGeometry; 00092 00093 bool firstEvent; 00094 00095 00096 00097 bool useElectronSelection; 00098 bool usePfElectronSelection; 00099 bool useMuonSelection; 00100 bool useHtSelection; 00101 bool usePFHtSelection; 00102 00103 00104 bool ElectronCutPassed; 00105 bool PfElectronCutPassed; 00106 bool MuonCutPassed; 00107 bool HtCutPassed; 00108 bool PFHtCutPassed; 00109 00110 00111 double ptElecMin; 00112 double ptPfElecMin; 00113 int nSelectedElectrons; 00114 int nSelectedPfElectrons; 00115 double ptGlobalMuonMin; 00116 double ptTrackerMuonMin; 00117 int nSelectedMuons; 00118 double htMin; 00119 double pfHtMin; 00120 double htJetThreshold; 00121 double pfHtJetThreshold; 00122 00123 00124 00125 int NeventsTotal; 00126 int NeventsFiltered; 00127 int NHltMu9; 00128 int NHltDiMu3; 00129 00130 int NtotalElectrons; 00131 int NmvaElectrons; 00132 // ----------member data --------------------------- 00133 }; 00134