00001 #ifndef HLTrigger_HLTanalyzers_HLTEgamma_h
00002 #define HLTrigger_HLTanalyzers_HLTEgamma_h
00003
00004
00005 #include <vector>
00006 #include <algorithm>
00007 #include <memory>
00008 #include <map>
00009
00010 #include "TTree.h"
00011
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00014 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00015 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00016 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00017 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00018 #include "DataFormats/Candidate/interface/Candidate.h"
00019 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00020 #include "HLTrigger/HLTanalyzers/interface/JetUtil.h"
00021 #include "HLTrigger/HLTanalyzers/interface/CaloTowerBoundries.h"
00022 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00023
00024 #include "FWCore/Framework/interface/Event.h"
00025 #include "FWCore/Framework/interface/EventSetup.h"
00026 #include "DataFormats/Common/interface/Handle.h"
00027 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00028 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00029 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
00030 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
00031 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateIsolation.h"
00032 #include "DataFormats/Common/interface/RefToBase.h"
00033 #include "DataFormats/Common/interface/Ref.h"
00034 #include "DataFormats/Common/interface/RefProd.h"
00035 #include "FWCore/Framework/interface/ESHandle.h"
00036 #include "DataFormats/Common/interface/AssociationMap.h"
00037 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00038 #include "DataFormats/EgammaReco/interface/ElectronPixelSeed.h"
00039 #include "DataFormats/EgammaReco/interface/ElectronPixelSeedFwd.h"
00040 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00041
00042 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
00043 #include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h"
00044 #include "DataFormats/TrackReco/interface/Track.h"
00045 #include "DataFormats/EgammaCandidates/interface/ElectronIsolationAssociation.h"
00046
00053 class HLTEgamma {
00054 public:
00055 HLTEgamma();
00056
00057 void setup(const edm::ParameterSet& pSet, TTree* tree);
00058
00059 void clear(void);
00060
00062 void analyze(
00063 const edm::Handle<reco::GsfElectronCollection> & electrons,
00064 const edm::Handle<reco::PhotonCollection> & photons,
00065 const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
00066 const edm::Handle<reco::ElectronCollection> & electronIsoHandleLW,
00067 const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
00068 const edm::Handle<reco::ElectronCollection> & electronNonIsoHandleLW,
00069 const edm::Handle<reco::ElectronIsolationMap> & NonIsoTrackEleIsolMap,
00070 const edm::Handle<reco::ElectronIsolationMap> & NonIsoTrackEleIsolMapLW,
00071 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
00072 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMapLW,
00073 const edm::Handle<reco::ElectronPixelSeedCollection> & L1IsoPixelSeedsMap,
00074 const edm::Handle<reco::ElectronPixelSeedCollection> & L1IsoPixelSeedsMapLW,
00075 const edm::Handle<reco::ElectronPixelSeedCollection> & L1NonIsoPixelSeedsMap,
00076 const edm::Handle<reco::ElectronPixelSeedCollection> & L1NonIsoPixelSeedsMapLW,
00077 const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
00078 const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
00079 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & EcalIsolMap,
00080 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & EcalNonIsolMap,
00081 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleIsolMap,
00082 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleNonIsolMap,
00083 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalIsolMap,
00084 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalNonIsolMap,
00085 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackIsolMap,
00086 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap,
00087 TTree* tree);
00088
00089 private:
00090
00091 void MakeL1IsolatedPhotons(
00092 const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
00093 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & EcalIsolMap,
00094 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalIsolMap,
00095 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackIsolMap);
00096
00097 void MakeL1NonIsolatedPhotons(
00098 const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
00099 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & EcalNonIsolMap,
00100 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalNonIsolMap,
00101 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap);
00102
00103 void MakeL1IsolatedElectrons(
00104 const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
00105 const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
00106 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleIsolMap,
00107 const edm::Handle<reco::ElectronPixelSeedCollection> & L1IsoPixelSeedsMap,
00108 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap);
00109
00110 void MakeL1NonIsolatedElectrons(
00111 const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
00112 const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
00113 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleIsolMap,
00114 const edm::Handle<reco::ElectronPixelSeedCollection> & L1NonIsoPixelSeedsMap,
00115 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap);
00116
00117 void MakeL1IsolatedElectronsLargeWindows(
00118 const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
00119 const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
00120 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleIsolMap,
00121 const edm::Handle<reco::ElectronPixelSeedCollection> & L1IsoPixelSeedsMap,
00122 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap);
00123
00124 void MakeL1NonIsolatedElectronsLargeWindows(
00125 const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
00126 const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
00127 const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleIsolMap,
00128 const edm::Handle<reco::ElectronPixelSeedCollection> & L1NonIsoPixelSeedsMap,
00129 const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap);
00130
00131
00132 float *elpt, *elphi, *eleta, *elet, *ele;
00133 float *photonpt, *photonphi, *photoneta, *photonet, *photone;
00134 float *hphotet, *hphoteta, *hphotphi, *hphoteiso, *hphothiso, *hphottiso;
00135 float *heleet, *heleeta, *helephi, *heleE, *helep, *helehiso, *heletiso;
00136 float *heleetLW, *heleetaLW, *helephiLW, *heleELW, *helepLW, *helehisoLW, *heletisoLW;
00137 int *hphotl1iso, *helel1iso, *helePixelSeeds, *helel1isoLW, *helePixelSeedsLW;
00138 int *heleNewSC, *heleNewSCLW;
00139 int nele, nphoton, nhltgam, nhltele, nhlteleLW;
00140
00141 class myHLTPhoton {
00142 public:
00143 float Et;
00144 float eta;
00145 float phi;
00146 float ecalIsol;
00147 float hcalIsol;
00148 float trackIsol;
00149 bool L1Isolated;
00150
00151 float et() const { return Et; }
00152 };
00153 std::vector<myHLTPhoton> theHLTPhotons;
00154
00155 class myHLTElectron {
00156 public:
00157 float Et;
00158 float eta;
00159 float phi;
00160 float E;
00161 float p;
00162 float hcalIsol;
00163 float trackIsol;
00164 bool L1Isolated;
00165 int pixelSeeds;
00166 bool newSC;
00167
00168 float et() const { return Et; }
00169 };
00170 std::vector<myHLTElectron> theHLTElectrons;
00171 std::vector<myHLTElectron> theHLTElectronsLargeWindows;
00172
00173 };
00174
00175 #endif // HLTrigger_HLTanalyzers_HLTEgamma_h