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 
48 
55 
62 class HLTEgamma {
63 public:
64  HLTEgamma();
65 
66  void setup(const edm::ParameterSet& pSet, TTree* tree);
67 
68  void clear(void);
69 
71  void analyze(
74  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
75  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
76  const edm::Handle<reco::ElectronIsolationMap> & NonIsoTrackEleIsolMap,
77  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
78  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
79  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
80  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
81  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
85  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleNonIsolMap,
90  EcalClusterLazyTools& lazyTools,
91  const edm::ESHandle<MagneticField>& theMagField,
92  reco::BeamSpot::Point & BSPosition,
93  std::vector<edm::Handle<edm::ValueMap<float> > > & eIDValueMap,
95  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
96  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
97  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
98  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
99  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
100  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
101  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
102  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
103  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
104  const edm::Handle<reco::SuperClusterCollection> & electronHFClusterHandle,
105  const edm::Handle<reco::RecoEcalCandidateCollection> & electronHFElectronHandle,
106  const edm::Handle<reco::HFEMClusterShapeAssociationCollection> & electronHFClusterAssociation,
108  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityEcalIsoMap,
109  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityHcalIsoMap,
110  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityTrackIsoMap,
112  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityR9IDMap,
113  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityHoverEHMap,
114  TTree* tree);
115 
116 private:
117  struct OpenHLTPhoton;
118  struct OpenHLTElectron;
119 
121  std::vector<OpenHLTPhoton> & photons,
122  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
126  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IsoMap,
127  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
128  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
129  EcalClusterLazyTools& lazyTools
130  );
131 
133  std::vector<OpenHLTPhoton> & photons,
134  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
137  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap,
138  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
139  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
140  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
141  EcalClusterLazyTools& lazyTools
142  );
143 
145  std::vector<OpenHLTElectron> & electrons,
146  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
147  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
149  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
150  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
151  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
152  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
154  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
155  EcalClusterLazyTools& lazyTools,
156  const edm::ESHandle<MagneticField>& theMagField,
157  reco::BeamSpot::Point & BSPosition );
158 
160  std::vector<OpenHLTElectron> & electrons,
161  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
162  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
164  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
165  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
166  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
167  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
169  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
170  EcalClusterLazyTools& lazyTools,
171  const edm::ESHandle<MagneticField>& theMagField,
172  reco::BeamSpot::Point & BSPosition );
173 
174  void CalculateDetaDphi(
175  const edm::ESHandle<MagneticField>& theMagField,
176  reco::BeamSpot::Point & BSPosition,
177  const reco::ElectronRef eleref,
178  float& deltaeta,
179  float& deltaphi, bool useTrackProjectionToEcal);
180 
181  // Tree variables
185  float *elscEt, *eld0corr;
187  int *elmishits;
188  float *eldist, *eldcot;
191 
195  //float *hphotClusShap, *heleClusShap, *heleDeta, *heleDphi;
196  //float *hphotR9, *heleR9, *hphotR9ID, *heleR9ID;
197  //int *hphotl1iso, *helel1iso, *helePixelSeeds;
201  int *eleId, *elNLostHits;//eleId = RL + 2*RT + 4*L + 4*T //elNLostHits = conversion rejection
203  int *heleNewSC;
205 
208 
209  struct OpenHLTPhoton {
210  float Et;
211  float eta;
212  float phi;
213  float ecalIsol;
214  float hcalIsol;
215  float trackIsol;
216  float r9;
219  float hovereh;
220  float r9ID;
221  float et() const { return Et; } // Function defined as such to be compatible with EtGreater()
222  };
223 
225  float Et;
226  float eta;
227  float phi;
228  float E;
229  float p;
230  float vtxZ;
231  float hcalIsol;
232  float trackIsol;
233  float ecalIsol;
236  bool newSC;
238  float r9;
239  float Deta;
240  float Dphi;
241  float hovereh;
242  float r9ID;
243  float et() const { return Et; } // Function defined as such to be compatible with EtGreater()
244  };
245 
246 };
247 
248 #endif // HLTrigger_HLTanalyzers_HLTEgamma_h
float * eldcot
Definition: HLTEgamma.h:188
float * elet
Definition: HLTEgamma.h:182
float * hphothovereh
Definition: HLTEgamma.h:193
int * helel1iso
Definition: HLTEgamma.h:200
float * hecalactivhovereh
Definition: HLTEgamma.h:192
float * hphotR9
Definition: HLTEgamma.h:199
float * helephi
Definition: HLTEgamma.h:194
float * photonhovere
Definition: HLTEgamma.h:190
int nhltele
Definition: HLTEgamma.h:204
float * helehovereh
Definition: HLTEgamma.h:194
int * hecalactivl1iso
Definition: HLTEgamma.h:200
float * elTrkIsoR03
Definition: HLTEgamma.h:182
float * eltrkiso
Definition: HLTEgamma.h:183
float * elTrkChi2NDF
Definition: HLTEgamma.h:182
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:935
float * elIP
Definition: HLTEgamma.h:182
float * heleDeta
Definition: HLTEgamma.h:198
int nhltecalactiv
Definition: HLTEgamma.h:204
float * photonphi
Definition: HLTEgamma.h:189
float * hhfclustereCOREe9
Definition: HLTEgamma.h:207
float * eldist
Definition: HLTEgamma.h:188
float * hphottiso
Definition: HLTEgamma.h:193
float * elphi
Definition: HLTEgamma.h:182
float * heleClusShap
Definition: HLTEgamma.h:198
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:30
float * photonecaliso
Definition: HLTEgamma.h:190
float * heleDphi
Definition: HLTEgamma.h:198
float * hphotet
Definition: HLTEgamma.h:193
float * photonr9id
Definition: HLTEgamma.h:190
float * hhfclustere1e9
Definition: HLTEgamma.h:207
float * photonet
Definition: HLTEgamma.h:189
float * elhOverE
Definition: HLTEgamma.h:184
void CalculateDetaDphi(const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition, const reco::ElectronRef eleref, float &deltaeta, float &deltaphi, bool useTrackProjectionToEcal)
Definition: HLTEgamma.cc:1094
float * hhfclusterphi
Definition: HLTEgamma.h:206
float * hhfcluster2Dcut
Definition: HLTEgamma.h:206
float * photonpt
Definition: HLTEgamma.h:189
void setup(const edm::ParameterSet &pSet, TTree *tree)
Definition: HLTEgamma.cc:38
float * hphoteiso
Definition: HLTEgamma.h:193
int * helePixelSeeds
Definition: HLTEgamma.h:200
float * ele
Definition: HLTEgamma.h:182
float * photonClusShap
Definition: HLTEgamma.h:190
float * elECaloIsoR03
Definition: HLTEgamma.h:182
float * heleeiso
Definition: HLTEgamma.h:194
float * elpt
Definition: HLTEgamma.h:182
float * elscEt
Definition: HLTEgamma.h:185
float * helehiso
Definition: HLTEgamma.h:194
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, const edm::Handle< reco::HFEMClusterShapeAssociationCollection > &electronHFClusterAssociation, const edm::Handle< reco::RecoEcalCandidateCollection > &activityECAL, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityEcalIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityHcalIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityTrackIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityR9Map, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityR9IDMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityHoverEHMap, TTree *tree)
Definition: HLTEgamma.cc:319
float * photontrkiso
Definition: HLTEgamma.h:190
float * elHCaloIsoR03
Definition: HLTEgamma.h:182
float * heleet
Definition: HLTEgamma.h:194
float * eld0corr
Definition: HLTEgamma.h:185
float * hhfelept
Definition: HLTEgamma.h:206
float * heleeta
Definition: HLTEgamma.h:194
float * hecalactivR9ID
Definition: HLTEgamma.h:199
int nhlthfeclus
Definition: HLTEgamma.h:204
float * hphoteta
Definition: HLTEgamma.h:193
int * elmishits
Definition: HLTEgamma.h:187
int * heleNewSC
Definition: HLTEgamma.h:203
float * eleta
Definition: HLTEgamma.h:182
float et() const
Definition: HLTEgamma.h:221
float * hhfclustereta
Definition: HLTEgamma.h:206
float * elsigmaietaieta
Definition: HLTEgamma.h:184
float * hhfeleeta
Definition: HLTEgamma.h:206
float * heleE
Definition: HLTEgamma.h:194
float * photone
Definition: HLTEgamma.h:189
float * eldeltaPhiIn
Definition: HLTEgamma.h:184
float * hecalactivtiso
Definition: HLTEgamma.h:192
int * hphotl1iso
Definition: HLTEgamma.h:200
float * helep
Definition: HLTEgamma.h:194
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:776
float * hphotR9ID
Definition: HLTEgamma.h:199
float * hecalactiveta
Definition: HLTEgamma.h:192
float * photonhcaliso
Definition: HLTEgamma.h:190
float * photoneta
Definition: HLTEgamma.h:189
int nhltgam
Definition: HLTEgamma.h:204
float * hecalactivClusShap
Definition: HLTEgamma.h:198
float * hphothiso
Definition: HLTEgamma.h:193
float * hecalactivhiso
Definition: HLTEgamma.h:192
int * elNLostHits
Definition: HLTEgamma.h:201
bool * elIsEcalDriven
Definition: HLTEgamma.h:202
float * hecalactivphi
Definition: HLTEgamma.h:192
float * hecalactivR9
Definition: HLTEgamma.h:199
int * eleId
Definition: HLTEgamma.h:201
float * elecaliso
Definition: HLTEgamma.h:183
int nphoton
Definition: HLTEgamma.h:204
float * hphotClusShap
Definition: HLTEgamma.h:198
float * hhfclustere9e25
Definition: HLTEgamma.h:206
bool * elqGsfCtfScPixConsistent
Definition: HLTEgamma.h:186
int nele
Definition: HLTEgamma.h:204
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:697
float * heletiso
Definition: HLTEgamma.h:194
float * hecalactivet
Definition: HLTEgamma.h:192
float * hhfclustereSeL
Definition: HLTEgamma.h:207
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:612
float * hecalactiveiso
Definition: HLTEgamma.h:192
int nhlthfele
Definition: HLTEgamma.h:204
float * hphotphi
Definition: HLTEgamma.h:193
float * heleR9
Definition: HLTEgamma.h:199
float * elhcaliso
Definition: HLTEgamma.h:183
float * eldeltaEtaIn
Definition: HLTEgamma.h:184
float * elFbrem
Definition: HLTEgamma.h:182
float * helevtxz
Definition: HLTEgamma.h:194
void clear(void)
Definition: HLTEgamma.cc:244
float * heleR9ID
Definition: HLTEgamma.h:199