CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTEgamma.h
Go to the documentation of this file.
1 #ifndef HLTrigger_HLTanalyzers_HLTEgamma_h
2 #define HLTrigger_HLTanalyzers_HLTEgamma_h
3 
4 
5 #include <vector>
6 #include <algorithm>
7 #include <memory>
8 #include <map>
9 
10 #include "TTree.h"
11 
23 
41 
46 
53 
60 class HLTEgamma {
61 public:
62  HLTEgamma();
63 
64  void setup(const edm::ParameterSet& pSet, TTree* tree);
65 
66  void clear(void);
67 
69  void analyze(
72  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
73  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
74  const edm::Handle<reco::ElectronIsolationMap> & NonIsoTrackEleIsolMap,
75  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
76  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
77  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
78  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
79  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
83  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleNonIsolMap,
88  EcalClusterLazyTools& lazyTools,
89  const edm::ESHandle<MagneticField>& theMagField,
90  reco::BeamSpot::Point & BSPosition,
91  std::vector<edm::Handle<edm::ValueMap<float> > > & eIDValueMap,
93  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
94  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
95  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
96  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
97  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
98  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
99  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
100  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
101  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
102  const edm::Handle<reco::SuperClusterCollection> & electronHFClusterHandle,
103  const edm::Handle<reco::RecoEcalCandidateCollection> & electronHFElectronHandle,
104  TTree* tree);
105 
106 private:
107  struct OpenHLTPhoton;
108  struct OpenHLTElectron;
109 
111  std::vector<OpenHLTPhoton> & photons,
112  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
116  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IsoMap,
117  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
118  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
119  EcalClusterLazyTools& lazyTools
120  );
121 
123  std::vector<OpenHLTPhoton> & photons,
124  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
127  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap,
128  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
129  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
130  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
131  EcalClusterLazyTools& lazyTools
132  );
133 
135  std::vector<OpenHLTElectron> & electrons,
136  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
137  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
139  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
140  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
141  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
142  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
144  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
145  EcalClusterLazyTools& lazyTools,
146  const edm::ESHandle<MagneticField>& theMagField,
147  reco::BeamSpot::Point & BSPosition );
148 
150  std::vector<OpenHLTElectron> & electrons,
151  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
152  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
154  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
155  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
156  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
157  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
159  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
160  EcalClusterLazyTools& lazyTools,
161  const edm::ESHandle<MagneticField>& theMagField,
162  reco::BeamSpot::Point & BSPosition );
163 
164  void CalculateDetaDphi(
165  const edm::ESHandle<MagneticField>& theMagField,
166  reco::BeamSpot::Point & BSPosition,
167  const reco::ElectronRef eleref,
168  float& deltaeta,
169  float& deltaphi, bool useTrackProjectionToEcal);
170 
171  // Tree variables
175  float *elscEt, *eld0corr;
177  int *elmishits;
178  float *eldist, *eldcot;
180 
186  int *eleId, *elNLostHits;//eleId = RL + 2*RT + 4*L + 4*T //elNLostHits = conversion rejection
188  int *heleNewSC;
190 
192 
193 
194  struct OpenHLTPhoton {
195  float Et;
196  float eta;
197  float phi;
198  float ecalIsol;
199  float hcalIsol;
200  float trackIsol;
201  float r9;
204  float hovereh;
205  float r9ID;
206  float et() const { return Et; } // Function defined as such to be compatible with EtGreater()
207  };
208 
210  float Et;
211  float eta;
212  float phi;
213  float E;
214  float p;
215  float hcalIsol;
216  float trackIsol;
217  float ecalIsol;
220  bool newSC;
222  float r9;
223  float Deta;
224  float Dphi;
225  float hovereh;
226  float r9ID;
227  float et() const { return Et; } // Function defined as such to be compatible with EtGreater()
228  };
229 
230 };
231 
232 #endif // HLTrigger_HLTanalyzers_HLTEgamma_h
float * eldcot
Definition: HLTEgamma.h:178
float * elet
Definition: HLTEgamma.h:172
float * hphothovereh
Definition: HLTEgamma.h:181
int * helel1iso
Definition: HLTEgamma.h:185
float * helephi
Definition: HLTEgamma.h:182
int nhltele
Definition: HLTEgamma.h:189
float * helehovereh
Definition: HLTEgamma.h:182
float * elTrkIsoR03
Definition: HLTEgamma.h:172
float * eltrkiso
Definition: HLTEgamma.h:173
float * elTrkChi2NDF
Definition: HLTEgamma.h:172
void MakeL1NonIsolatedElectrons(std::vector< OpenHLTElectron > &electrons, const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDNonIsoMap, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition)
Definition: HLTEgamma.cc:797
float * elIP
Definition: HLTEgamma.h:172
float * heleDeta
Definition: HLTEgamma.h:183
float * photonphi
Definition: HLTEgamma.h:179
float * eldist
Definition: HLTEgamma.h:178
float * hphottiso
Definition: HLTEgamma.h:181
float * elphi
Definition: HLTEgamma.h:172
float * heleClusShap
Definition: HLTEgamma.h:183
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:30
float * heleDphi
Definition: HLTEgamma.h:183
float * hphotet
Definition: HLTEgamma.h:181
float * photonet
Definition: HLTEgamma.h:179
float * elhOverE
Definition: HLTEgamma.h:174
int * hphotl1iso
Definition: HLTEgamma.h:185
void CalculateDetaDphi(const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition, const reco::ElectronRef eleref, float &deltaeta, float &deltaphi, bool useTrackProjectionToEcal)
Definition: HLTEgamma.cc:954
float * hhfcluster2Dcut
Definition: HLTEgamma.h:191
float * photonpt
Definition: HLTEgamma.h:179
void setup(const edm::ParameterSet &pSet, TTree *tree)
Definition: HLTEgamma.cc:38
float * hphoteiso
Definition: HLTEgamma.h:181
int * helePixelSeeds
Definition: HLTEgamma.h:185
float * ele
Definition: HLTEgamma.h:172
float * elECaloIsoR03
Definition: HLTEgamma.h:172
float * heleeiso
Definition: HLTEgamma.h:182
float * elpt
Definition: HLTEgamma.h:172
float * elscEt
Definition: HLTEgamma.h:175
float * helehiso
Definition: HLTEgamma.h:182
float * elHCaloIsoR03
Definition: HLTEgamma.h:172
float * heleet
Definition: HLTEgamma.h:182
float * eld0corr
Definition: HLTEgamma.h:175
float * hhfelept
Definition: HLTEgamma.h:191
float * heleeta
Definition: HLTEgamma.h:182
int nhlthfeclus
Definition: HLTEgamma.h:189
float * hphoteta
Definition: HLTEgamma.h:181
int * elmishits
Definition: HLTEgamma.h:177
int * heleNewSC
Definition: HLTEgamma.h:188
float * eleta
Definition: HLTEgamma.h:172
float et() const
Definition: HLTEgamma.h:206
float * elsigmaietaieta
Definition: HLTEgamma.h:174
float * hhfeleeta
Definition: HLTEgamma.h:191
float * heleE
Definition: HLTEgamma.h:182
void analyze(const edm::Handle< reco::GsfElectronCollection > &electrons, const edm::Handle< reco::PhotonCollection > &photons, const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::ElectronIsolationMap > &NonIsoTrackEleIsolMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackNonIsolMap, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition, std::vector< edm::Handle< edm::ValueMap< float > > > &eIDValueMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDNonIsoMap, const edm::Handle< reco::SuperClusterCollection > &electronHFClusterHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &electronHFElectronHandle, TTree *tree)
Definition: HLTEgamma.cc:256
float * photone
Definition: HLTEgamma.h:179
float * eldeltaPhiIn
Definition: HLTEgamma.h:174
float * helep
Definition: HLTEgamma.h:182
void MakeL1IsolatedElectrons(std::vector< OpenHLTElectron > &electrons, const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDIsoMap, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition)
Definition: HLTEgamma.cc:640
float * hphotR9ID
Definition: HLTEgamma.h:184
float * hphotR9
Definition: HLTEgamma.h:184
float * photoneta
Definition: HLTEgamma.h:179
int nhltgam
Definition: HLTEgamma.h:189
float * hphothiso
Definition: HLTEgamma.h:181
int * elNLostHits
Definition: HLTEgamma.h:186
bool * elIsEcalDriven
Definition: HLTEgamma.h:187
int * eleId
Definition: HLTEgamma.h:186
float * elecaliso
Definition: HLTEgamma.h:173
int nphoton
Definition: HLTEgamma.h:189
float * hhfclustere9e25
Definition: HLTEgamma.h:191
bool * elqGsfCtfScPixConsistent
Definition: HLTEgamma.h:176
int nele
Definition: HLTEgamma.h:189
void MakeL1NonIsolatedPhotons(std::vector< OpenHLTPhoton > &photons, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDNonIsoMap, EcalClusterLazyTools &lazyTools)
Definition: HLTEgamma.cc:561
float * heletiso
Definition: HLTEgamma.h:182
void MakeL1IsolatedPhotons(std::vector< OpenHLTPhoton > &photons, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDIsoMap, EcalClusterLazyTools &lazyTools)
Definition: HLTEgamma.cc:476
int nhlthfele
Definition: HLTEgamma.h:189
float * hphotphi
Definition: HLTEgamma.h:181
float * heleR9
Definition: HLTEgamma.h:184
float * hphotClusShap
Definition: HLTEgamma.h:183
float * elhcaliso
Definition: HLTEgamma.h:173
float * eldeltaEtaIn
Definition: HLTEgamma.h:174
float * elFbrem
Definition: HLTEgamma.h:172
void clear(void)
Definition: HLTEgamma.cc:193
float * heleR9ID
Definition: HLTEgamma.h:184