CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTEgamma.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <sstream>
3 #include <istream>
4 #include <fstream>
5 #include <iomanip>
6 #include <string>
7 #include <cmath>
8 #include <functional>
9 #include <cstdlib>
10 #include <cstring>
11 
16 
17 
18 
20 
24 
26 
27 #include "HLTMessages.h"
28 
29 static const size_t kMaxEl = 10000;
30 static const size_t kMaxPhot = 10000;
31 static const size_t kMaxhPhot = 500;
32 static const size_t kMaxhEle = 500;
33 
35 }
36 
37 /* Setup the analysis to put the branch-variables size_to the tree. */
38 void HLTEgamma::setup(const edm::ParameterSet& pSet, TTree* HltTree)
39 {
40  elpt = new float[kMaxEl];
41  elphi = new float[kMaxEl];
42  eleta = new float[kMaxEl];
43  elet = new float[kMaxEl];
44  ele = new float[kMaxEl];
45  eleId = new int[kMaxEl];// RL + 2*RT + 4*L + 4*T
46  elIP = new float[kMaxEl];
47  elNLostHits = new int[kMaxEl];
48  elTrkChi2NDF = new float[kMaxEl];
49  elTrkIsoR03 = new float[kMaxEl];
50  elECaloIsoR03 = new float[kMaxEl];
51  elHCaloIsoR03 = new float[kMaxEl];
52  elIsEcalDriven = new bool[kMaxEl];
53  elFbrem = new float[kMaxEl];
54  elmishits = new int[kMaxEl];
55  eldist = new float[kMaxEl];
56  eldcot = new float[kMaxEl];
57  eltrkiso = new float[kMaxEl];
58  elecaliso = new float[kMaxEl];
59  elhcaliso = new float[kMaxEl];
60  elsigmaietaieta = new float[kMaxEl];
61  eldeltaPhiIn = new float[kMaxEl];
62  eldeltaEtaIn = new float[kMaxEl];
63  elhOverE = new float[kMaxEl];
64  elscEt = new float[kMaxEl];
65  eld0corr = new float[kMaxEl];
66  elqGsfCtfScPixConsistent = new bool[kMaxEl];
67 
68  photonpt = new float[kMaxPhot];
69  photonphi = new float[kMaxPhot];
70  photoneta = new float[kMaxPhot];
71  photonet = new float[kMaxPhot];
72  photone = new float[kMaxPhot];
73  photontrkiso = new float[kMaxPhot];
74  photonecaliso = new float[kMaxPhot];
75  photonhcaliso = new float[kMaxPhot];
76  photonhovere = new float[kMaxPhot];
77  photonClusShap = new float[kMaxPhot];
78  photonr9id = new float[kMaxPhot];
79 
80  hphotet = new float[kMaxhPhot];
81  hphoteta = new float[kMaxhPhot];
82  hphotphi = new float[kMaxhPhot];
83  hphoteiso = new float[kMaxhPhot];
84  hphothiso = new float[kMaxhPhot];
85  hphottiso = new float[kMaxhPhot];
86  hphotl1iso = new int[kMaxhPhot];
87  hphotClusShap = new float[kMaxhPhot];
88  hphotR9 = new float[kMaxhPhot];
89  hphothovereh = new float[kMaxhPhot];
90  hphotR9ID = new float[kMaxhPhot];
91 
92  hecalactivet = new float[kMaxhPhot];
93  hecalactiveta = new float[kMaxhPhot];
94  hecalactivphi = new float[kMaxhPhot];
95  hecalactiveiso = new float[kMaxhPhot];
96  hecalactivhiso = new float[kMaxhPhot];
97  hecalactivtiso = new float[kMaxhPhot];
98  hecalactivl1iso = new int[kMaxhPhot];
99  hecalactivClusShap = new float[kMaxhPhot];
100  hecalactivR9 = new float[kMaxhPhot];
101  hecalactivhovereh = new float[kMaxhPhot];
102  hecalactivR9ID = new float[kMaxhPhot];
103 
104  heleet = new float[kMaxhEle];
105  heleeta = new float[kMaxhEle];
106  helephi = new float[kMaxhEle];
107  helevtxz = new float[kMaxhEle];
108  heleE = new float[kMaxhEle];
109  helep = new float[kMaxhEle];
110  helehiso = new float[kMaxhEle];
111  heleeiso = new float[kMaxhEle];
112  heletiso = new float[kMaxhEle];
113  helel1iso = new int[kMaxhEle];
114  helePixelSeeds = new int[kMaxhEle];
115  heleNewSC = new int[kMaxhEle];
116  heleClusShap = new float[kMaxhEle];
117  heleDeta = new float[kMaxhEle];
118  heleDphi = new float[kMaxhEle];
119  heleR9 = new float[kMaxhEle];
120  helehovereh = new float[kMaxhEle];
121  heleR9ID = new float[kMaxhEle];
122 
123  hhfelept = new float[kMaxhEle];
124  hhfeleeta = new float[kMaxhEle];
125  hhfclustere9e25 = new float[kMaxhEle];
126  hhfclustere1e9 = new float[kMaxhEle];
127  hhfclustereCOREe9 = new float[kMaxhEle];
128  hhfclustereSeL = new float[kMaxhEle];
129  hhfcluster2Dcut = new float[kMaxhEle];
130  hhfclustereta = new float[kMaxhEle];
131  hhfclusterphi = new float[kMaxhEle];
132 
133 
134  nele = 0;
135  nphoton = 0;
136  nhltecalactiv = 0;
137  nhltgam = 0;
138  nhltele = 0;
139  nhlthfele = 0;
140  nhlthfeclus = 0;
141 
142  // Egamma-specific branches of the tree
143  HltTree->Branch("NrecoElec", & nele, "NrecoElec/I");
144  HltTree->Branch("recoElecPt", elpt, "recoElecPt[NrecoElec]/F");
145  HltTree->Branch("recoElecPhi", elphi, "recoElecPhi[NrecoElec]/F");
146  HltTree->Branch("recoElecEta", eleta, "recoElecEta[NrecoElec]/F");
147  HltTree->Branch("recoElecEt", elet, "recoElecEt[NrecoElec]/F");
148  HltTree->Branch("recoElecE", ele, "recoElecE[NrecoElec]/F");
149  HltTree->Branch("recoElecEleID", eleId, "recoElecEleID[NrecoElec]/I");
150  HltTree->Branch("recoElecIP", elIP, "recoElecIP[NrecoElec]/F");
151  HltTree->Branch("recoElecNLostHits", elNLostHits, "recoElecNLostHits[NrecoElec]/I");
152  HltTree->Branch("recoElecChi2NDF", elTrkChi2NDF, "recoElecChi2NDF[NrecoElec]/F");
153  HltTree->Branch("recoElecTrkIsoR03", elTrkIsoR03, "recoElecTrkIsoR03[NrecoElec]/F");
154  HltTree->Branch("recoElecECaloIsoR03", elECaloIsoR03, "recoElecECaloIsoR03[NrecoElec]/F");
155  HltTree->Branch("recoElecHCaloIsoR03", elHCaloIsoR03, "recoElecHCaloIsoR03[NrecoElec]/F");
156  HltTree->Branch("recoElecIsEcalDriven", elIsEcalDriven, "recoElecIsEcalDriven[NrecoElec]/O");
157  HltTree->Branch("recoElecFbrem", elFbrem, "recoElecFbrem[NrecoElec]/F");
158  HltTree->Branch("recoElecmishits", elmishits, "recoElecmishits[NrecoElec]/I");
159  HltTree->Branch("recoElecdist", eldist, "recoElecdist[NrecoElec]/F");
160  HltTree->Branch("recoElecdcot", eldcot, "recoElecdcot[NrecoElec]/F");
161  HltTree->Branch("recoElectrkiso", eltrkiso, "recoElectrkiso[NrecoElec]/F");
162  HltTree->Branch("recoElececaliso", elecaliso, "recoElececaliso[NrecoElec]/F");
163  HltTree->Branch("recoElechcaliso", elhcaliso, "recoElechcaliso[NrecoElec]/F");
164  HltTree->Branch("recoElecsigmaietaieta", elsigmaietaieta, "recoElecsigmaietaieta[NrecoElec]/F");
165  HltTree->Branch("recoElecdeltaPhiIn", eldeltaPhiIn, "recoElecdeltaPhiIn[NrecoElec]/F");
166  HltTree->Branch("recoElecdeltaEtaIn", eldeltaEtaIn, "recoElecdeltaEtaIn[NrecoElec]/F");
167  HltTree->Branch("recoElechOverE", elhOverE, "recoElechOverE[NrecoElec]/F");
168  HltTree->Branch("recoElecscEt", elscEt, "recoElecscEt[NrecoElec]/F");
169  HltTree->Branch("recoElecd0corr", eld0corr, "recoElecd0corr[NrecoElec]/F");
170  HltTree->Branch("recoElecqGsfCtfScPixConsistent", elqGsfCtfScPixConsistent, "recoElecqGsfCtfScPixConsistent[NrecoElec]/O");
171 
172  HltTree->Branch("NrecoPhot", &nphoton, "NrecoPhot/I");
173  HltTree->Branch("recoPhotPt", photonpt, "recoPhotPt[NrecoPhot]/F");
174  HltTree->Branch("recoPhotPhi", photonphi, "recoPhotPhi[NrecoPhot]/F");
175  HltTree->Branch("recoPhotEta", photoneta, "recoPhotEta[NrecoPhot]/F");
176  HltTree->Branch("recoPhotEt", photonet, "recoPhotEt[NrecoPhot]/F");
177  HltTree->Branch("recoPhotE", photone, "recoPhotE[NrecoPhot]/F");
178  HltTree->Branch("recoPhotTiso", photontrkiso, "recoPhotTiso[NrecoPhot]/F");
179  HltTree->Branch("recoPhotEiso", photonecaliso, "recoPhotEiso[NrecoPhot]/F");
180  HltTree->Branch("recoPhotHiso", photonhcaliso, "recoPhotHiso[NrecoPhot]/F");
181  HltTree->Branch("recoPhotHoverE", photonhovere, "recoPhotHoverE[NrecoPhot]/F");
182  HltTree->Branch("recoPhotClusShap", photonClusShap, "recoPhotClusShap[NrecoPhot]/F");
183  HltTree->Branch("recoPhotR9ID", photonr9id, "recoPhotR9ID[NrecoPhot]/F");
184 
185  HltTree->Branch("NohPhot", & nhltgam, "NohPhot/I");
186  HltTree->Branch("ohPhotEt", hphotet, "ohPhotEt[NohPhot]/F");
187  HltTree->Branch("ohPhotEta", hphoteta, "ohPhotEta[NohPhot]/F");
188  HltTree->Branch("ohPhotPhi", hphotphi, "ohPhotPhi[NohPhot]/F");
189  HltTree->Branch("ohPhotEiso", hphoteiso, "ohPhotEiso[NohPhot]/F");
190  HltTree->Branch("ohPhotHiso", hphothiso, "ohPhotHiso[NohPhot]/F");
191  HltTree->Branch("ohPhotTiso", hphottiso, "ohPhotTiso[NohPhot]/F");
192  HltTree->Branch("ohPhotL1iso", hphotl1iso, "ohPhotL1iso[NohPhot]/I");
193  HltTree->Branch("ohPhotClusShap", hphotClusShap, "ohPhotClusShap[NohPhot]/F");
194  HltTree->Branch("ohPhotR9", hphotR9, "ohPhotR9[NohPhot]/F");
195  HltTree->Branch("ohPhotHforHoverE", hphothovereh, "ohPhotHforHoverE[NohPhot]/F");
196  HltTree->Branch("ohPhotR9ID", hphotR9ID, "ohPhotR9ID[NohPhot]/F");
197 
198  HltTree->Branch("NohEcalActiv", & nhltecalactiv, "NohEcalActiv/I");
199  HltTree->Branch("ohEcalActivEt", hecalactivet, "ohEcalActivEt[NohEcalActiv]/F");
200  HltTree->Branch("ohEcalActivEta", hecalactiveta, "ohEcalActivEta[NohEcalActiv]/F");
201  HltTree->Branch("ohEcalActivPhi", hecalactivphi, "ohEcalActivPhi[NohEcalActiv]/F");
202  HltTree->Branch("ohEcalActivEiso", hecalactiveiso, "ohEcalActivEiso[NohEcalActiv]/F");
203  HltTree->Branch("ohEcalActivHiso", hecalactivhiso, "ohEcalActivHiso[NohEcalActiv]/F");
204  HltTree->Branch("ohEcalActivTiso", hecalactivtiso, "ohEcalActivTiso[NohEcalActiv]/F");
205  HltTree->Branch("ohEcalActivL1iso", hecalactivl1iso, "ohEcalActivL1iso[NohEcalActiv]/I");
206  HltTree->Branch("ohEcalActivClusShap", hecalactivClusShap, "ohEcalActivClusShap[NohEcalActiv]/F");
207  HltTree->Branch("ohEcalActivR9", hecalactivR9, "ohEcalActivR9[NohEcalActiv]/F");
208  HltTree->Branch("ohEcalActivHforHoverE", hecalactivhovereh, "ohEcalActivHforHoverE[NohEcalActiv]/F");
209  HltTree->Branch("ohEcalActivR9ID", hecalactivR9ID, "ohEcalActivR9ID[NohEcalActiv]/F");
210 
211  HltTree->Branch("NohEle", & nhltele, "NohEle/I");
212  HltTree->Branch("ohEleEt", heleet, "ohEleEt[NohEle]/F");
213  HltTree->Branch("ohEleEta", heleeta, "ohEleEta[NohEle]/F");
214  HltTree->Branch("ohElePhi", helephi, "ohElePhi[NohEle]/F");
215  HltTree->Branch("ohEleVtxZ", helevtxz, "ohEleVtxZ[NohEle]/F");
216  HltTree->Branch("ohEleE", heleE, "ohEleE[NohEle]/F");
217  HltTree->Branch("ohEleP", helep, "ohEleP[NohEle]/F");
218  HltTree->Branch("ohEleHiso", helehiso, "ohEleHiso[NohEle]/F");
219  HltTree->Branch("ohEleTiso", heletiso, "ohEleTiso[NohEle]/F");
220  HltTree->Branch("ohEleEiso", heleeiso, "ohEleEiso[NohEle]/F");
221  HltTree->Branch("ohEleL1iso", helel1iso, "ohEleLiso[NohEle]/I");
222  HltTree->Branch("ohElePixelSeeds", helePixelSeeds, "ohElePixelSeeds[NohEle]/I");
223  HltTree->Branch("ohEleNewSC", heleNewSC, "ohEleNewSC[NohEle]/I");
224  HltTree->Branch("ohEleClusShap", heleClusShap, "ohEleClusShap[NohEle]/F");
225  HltTree->Branch("ohEleDeta", heleDeta, "ohEleDeta[NohEle]/F");
226  HltTree->Branch("ohEleDphi", heleDphi, "ohEleDphi[NohEle]/F");
227  HltTree->Branch("ohEleR9", heleR9, "ohEleR9[NohEle]/F");
228  HltTree->Branch("ohEleHforHoverE", helehovereh, "ohEleHforHoverE[NohEle]/F");
229  HltTree->Branch("ohEleR9ID", heleR9ID, "ohEleR9ID[NohEle]/F");
230  HltTree->Branch("NohHFEle", &nhlthfele , "NohHFEle/I");
231  HltTree->Branch("ohHFElePt", hhfelept, "ohHFElePt[NohHFEle]/F");
232  HltTree->Branch("ohHFEleEta", hhfeleeta, "ohHFEleEta[NohHFEle]/F");
233  HltTree->Branch("NohHFECALClus", &nhlthfeclus, "NohHFECALClus/I");
234 
235  HltTree->Branch("ohHFEleClustere9e25", hhfclustere9e25, "ohHFEleClustere9e25[NohHFECALClus]/F");
236  HltTree->Branch("ohHFEleClustere1e9", hhfclustere1e9, "ohHFEleClustere1e9[NohHFECALClus]/F");
237  HltTree->Branch("ohHFEleClustereCOREe9", hhfclustereCOREe9, "ohHFEleClustereCOREe9[NohHFECALClus]/F");
238  HltTree->Branch("ohHFEleClustereSeL", hhfclustereSeL, "ohHFEleClustereSeL[NohHFECALClus]/F");
239  HltTree->Branch("ohHFEleCluster2Dcut", hhfcluster2Dcut, "ohHFEleCluster2Dcut[NohHFECALClus]/F");
240  HltTree->Branch("ohHFEleClusterEta", hhfclustereta, "ohHFEleClusterEta[NohHFECALClus]/F");
241  HltTree->Branch("ohHFEleClusterPhi", hhfclusterphi, "ohHFEleClusterPhi[NohHFECALClus]/F");
242 }
243 
245 {
246  std::memset(elpt, '\0', kMaxEl * sizeof(float));
247  std::memset(elphi, '\0', kMaxEl * sizeof(float));
248  std::memset(eleta, '\0', kMaxEl * sizeof(float));
249  std::memset(elet, '\0', kMaxEl * sizeof(float));
250  std::memset(ele, '\0', kMaxEl * sizeof(float));
251  std::memset(ele, '\0', kMaxEl * sizeof(int));
252  std::memset(elIP, '\0', kMaxEl * sizeof(float));
253  std::memset(elNLostHits, '\0', kMaxEl * sizeof(int));
254  std::memset(elTrkChi2NDF, '\0', kMaxEl * sizeof(float));
255  std::memset(elTrkIsoR03, '\0', kMaxEl * sizeof(float));
256  std::memset(elECaloIsoR03, '\0', kMaxEl * sizeof(float));
257  std::memset(elHCaloIsoR03, '\0', kMaxEl * sizeof(float));
258  std::memset(elIsEcalDriven, '\0', kMaxEl * sizeof(bool));
259  std::memset(elFbrem, '\0', kMaxEl * sizeof(float));
260 
261  std::memset(photonpt, '\0', kMaxPhot * sizeof(float));
262  std::memset(photonphi, '\0', kMaxPhot * sizeof(float));
263  std::memset(photoneta, '\0', kMaxPhot * sizeof(float));
264  std::memset(photonet, '\0', kMaxPhot * sizeof(float));
265  std::memset(photone, '\0', kMaxPhot * sizeof(float));
266  std::memset(photontrkiso, '\0', kMaxPhot * sizeof(float));
267  std::memset(photonecaliso, '\0', kMaxPhot * sizeof(float));
268  std::memset(photonhcaliso, '\0', kMaxPhot * sizeof(float));
269  std::memset(photonhovere, '\0', kMaxPhot * sizeof(float));
270  std::memset(photonClusShap, '\0', kMaxPhot * sizeof(float));
271  std::memset(photonr9id, '\0', kMaxPhot * sizeof(float));
272 
273  std::memset(hphotet, '\0', kMaxhPhot * sizeof(float));
274  std::memset(hphoteta, '\0', kMaxhPhot * sizeof(float));
275  std::memset(hphotphi, '\0', kMaxhPhot * sizeof(float));
276  std::memset(helevtxz, '\0', kMaxhEle * sizeof(float));
277  std::memset(hphoteiso, '\0', kMaxhPhot * sizeof(float));
278  std::memset(hphothiso, '\0', kMaxhPhot * sizeof(float));
279  std::memset(hphottiso, '\0', kMaxhPhot * sizeof(float));
280  std::memset(hphotl1iso, '\0', kMaxhPhot * sizeof(int));
281  std::memset(hphotClusShap, '\0', kMaxhPhot * sizeof(float));
282 
283  std::memset(heleet, '\0', kMaxhEle * sizeof(float));
284  std::memset(heleeta, '\0', kMaxhEle * sizeof(float));
285  std::memset(helephi, '\0', kMaxhEle * sizeof(float));
286  std::memset(heleE, '\0', kMaxhEle * sizeof(float));
287  std::memset(helep, '\0', kMaxhEle * sizeof(float));
288  std::memset(helehiso, '\0', kMaxhEle * sizeof(float));
289  std::memset(heletiso, '\0', kMaxhEle * sizeof(float));
290  std::memset(heleeiso, '\0', kMaxhEle * sizeof(float));
291  std::memset(helehovereh, '\0', kMaxhEle * sizeof(float));
292  std::memset(helel1iso, '\0', kMaxhEle * sizeof(int));
293  std::memset(helePixelSeeds, '\0', kMaxhEle * sizeof(int));
294  std::memset(heleNewSC, '\0', kMaxhEle * sizeof(int));
295  std::memset(heleClusShap, '\0', kMaxhEle * sizeof(float));
296  std::memset(heleDeta, '\0', kMaxhEle * sizeof(float));
297  std::memset(heleDphi, '\0', kMaxhEle * sizeof(float));
298 
299  std::memset(hhfelept, '\0', kMaxhEle * sizeof(float));
300  std::memset(hhfeleeta, '\0', kMaxhEle * sizeof(float));
301 
302  std::memset(hhfclustere9e25, '\0', kMaxhEle * sizeof(float));
303  std::memset(hhfclustere1e9, '\0', kMaxhEle * sizeof(float));
304  std::memset(hhfclustereCOREe9, '\0', kMaxhEle * sizeof(float));
305  std::memset(hhfclustereSeL, '\0', kMaxhEle * sizeof(float));
306  std::memset(hhfcluster2Dcut, '\0', kMaxhEle * sizeof(float));
307  std::memset(hhfclustereta, '\0', kMaxhEle * sizeof(float));
308  std::memset(hhfclusterphi, '\0', kMaxhEle * sizeof(float));
309 
310  nele = 0;
311  nphoton = 0;
312  nhltgam = 0;
313  nhltele = 0;
314  nhlthfele = 0;
315  nhlthfeclus = 0;
316 }
317 
318 /* **Analyze the event** */
321  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
322  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
323  const edm::Handle<reco::ElectronIsolationMap> & NonIsoTrackEleIsolMap,
324  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
325  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
326  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
327  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
328  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
332  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & HcalEleNonIsolMap,
336  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap,
337  EcalClusterLazyTools& lazyTools,
338  const edm::ESHandle<MagneticField>& theMagField,
339  reco::BeamSpot::Point & BSPosition,
340  std::vector<edm::Handle<edm::ValueMap<float> > > & eIDValueMap,
341  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IsoMap,
342  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
343  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
344  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
345  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
346  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
347  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
348  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
349  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
350  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
351  const edm::Handle<reco::SuperClusterCollection> & electronHFECALClusters,
352  const edm::Handle<reco::RecoEcalCandidateCollection> & electronHFElectrons,
353  const edm::Handle<reco::HFEMClusterShapeAssociationCollection> & electronHFClusterAssociation,
355  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityEcalIsoMap,
356  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityHcalIsoMap,
357  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityTrackIsoMap,
359  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityR9IDMap,
360  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & activityHoverEHMap,
361  TTree* HltTree)
362 {
363  // reset the tree variables
364  clear();
365 
366  if (electrons.isValid()) {
367  reco::GsfElectronCollection myelectrons( electrons->begin(), electrons->end() );
368  nele = myelectrons.size();
369  std::sort(myelectrons.begin(), myelectrons.end(), EtGreater());
370  int iel = 0;
371  for (reco::GsfElectronCollection::const_iterator i = myelectrons.begin(); i != myelectrons.end(); i++) {
372  elpt[iel] = i->pt();
373  elphi[iel] = i->phi();
374  eleta[iel] = i->eta();
375  elet[iel] = i->et();
376  ele[iel] = i->energy();
377 
378  if(i->gsfTrack().isNonnull()){
379  elNLostHits[iel] = i->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
380  elIP[iel] = i->gsfTrack()->dxy(BSPosition);
381  elTrkChi2NDF[iel] = i->gsfTrack()->normalizedChi2();
382  }
383  else {
384  elNLostHits[iel] = -99.;
385  elIP[iel] = -99.;
386  elTrkChi2NDF[iel] = -99.;
387  }
388 
389  elTrkIsoR03[iel] = i->dr03TkSumPt();
390  elECaloIsoR03[iel] = i->dr03EcalRecHitSumEt();
391  elHCaloIsoR03[iel] = i->dr03HcalTowerSumEt();
392  elIsEcalDriven[iel] = i->ecalDrivenSeed();
393  elFbrem[iel] = i->fbrem();
394  elscEt[iel] = i->superCluster()->energy()*sin((2*atan(exp(-i->superCluster()->eta()))));
395  elhOverE[iel] = i->hadronicOverEm();
396  elsigmaietaieta[iel] = i->sigmaIetaIeta();
397  eldeltaPhiIn[iel] = i->deltaPhiSuperClusterTrackAtVtx();
398  eldeltaEtaIn[iel] = i->deltaEtaSuperClusterTrackAtVtx();
399  elmishits[iel] = i->gsfTrack()->hitPattern().numberOfHits(reco::HitPattern::MISSING_INNER_HITS);
400  eltrkiso[iel] = i->dr03TkSumPt();
401  elecaliso[iel] = i->dr03EcalRecHitSumEt();
402  elhcaliso[iel] = i->dr03HcalTowerSumEt();
403  eld0corr[iel]= - (i->gsfTrack()->dxy(BSPosition));
404  elqGsfCtfScPixConsistent[iel]=i->isGsfCtfScPixChargeConsistent();;
405 
406  // conversion info will be available after 3_10_X
407  eldist[iel] = 0;// fabs(i->convDist());
408  eldcot[iel] = 0; //fabs(i->convDcot());
409 
410  iel++;
411  }
412  } else {
413  nele = 0;
414  }
415 
416  if (photons.isValid()) {
417  reco::PhotonCollection myphotons(* photons);
418  nphoton = myphotons.size();
419  std::sort(myphotons.begin(), myphotons.end(), EtGreater());
420  int ipho = 0;
421  for (reco::PhotonCollection::const_iterator i = myphotons.begin(); i!= myphotons.end(); i++) {
422  photonpt[ipho] = i->pt();
423  photonphi[ipho] = i->phi();
424  photoneta[ipho] = i->eta();
425  photonet[ipho] = i->et();
426  photone[ipho] = i->energy();
427  photontrkiso[ipho] = i->trkSumPtSolidConeDR04();
428  photonecaliso[ipho] = i->ecalRecHitSumEtConeDR04();
429  photonhcaliso[ipho] = i->hcalTowerSumEtConeDR04();
430  photonhovere[ipho] = i->hadronicOverEm();
431  photonClusShap[ipho] = i->sigmaIetaIeta();
432  photonr9id[ipho] = i->r9();
433  ipho++;
434  }
435  } else {
436  nphoton = 0;
437  }
438 
440 
442  std::vector<OpenHLTPhoton> theHLTPhotons;
444  theHLTPhotons,
445  recoIsolecalcands,
446  EcalIsolMap,
447  HcalIsolMap,
448  TrackIsolMap,
449  photonR9IsoMap,
450  photonHoverEHIsoMap,
451  photonR9IDIsoMap,
452  lazyTools);
454  theHLTPhotons,
455  recoNonIsolecalcands,
456  EcalNonIsolMap,
457  HcalNonIsolMap,
458  TrackNonIsolMap,
459  photonR9NonIsoMap,
460  photonHoverEHNonIsoMap,
461  photonR9IDNonIsoMap,
462  lazyTools);
463 
464  std::sort(theHLTPhotons.begin(), theHLTPhotons.end(), EtGreater());
465  nhltgam = theHLTPhotons.size();
466 
467  for (int u = 0; u < nhltgam; u++) {
468  hphotet[u] = theHLTPhotons[u].Et;
469  hphoteta[u] = theHLTPhotons[u].eta;
470  hphotphi[u] = theHLTPhotons[u].phi;
471  hphoteiso[u] = theHLTPhotons[u].ecalIsol;
472  hphothiso[u] = theHLTPhotons[u].hcalIsol;
473  hphottiso[u] = theHLTPhotons[u].trackIsol;
474  hphotl1iso[u] = theHLTPhotons[u].L1Isolated;
475  hphotClusShap[u] = theHLTPhotons[u].clusterShape;
476  hphothovereh[u] = theHLTPhotons[u].hovereh;
477  hphotR9[u] = theHLTPhotons[u].r9;
478  hphotR9ID[u] = theHLTPhotons[u].r9ID;
479  }
480  // Activity
481  std::vector<OpenHLTPhoton> theHLTActivityPhotons;
483  theHLTActivityPhotons,
484  activityECAL,
485  activityEcalIsoMap,
486  activityHcalIsoMap,
487  activityTrackIsoMap,
488  activityR9Map,
489  activityHoverEHMap,
490  activityR9IDMap,
491  lazyTools);
492 
493  std::sort(theHLTActivityPhotons.begin(), theHLTActivityPhotons.end(), EtGreater());
494  nhltecalactiv = theHLTActivityPhotons.size();
495 
496  for (int u = 0; u < nhltecalactiv; u++) {
497  hecalactivet[u] = theHLTActivityPhotons[u].Et;
498  hecalactiveta[u] = theHLTActivityPhotons[u].eta;
499  hecalactivphi[u] = theHLTActivityPhotons[u].phi;
500  hecalactiveiso[u] = theHLTActivityPhotons[u].ecalIsol;
501  hecalactivhiso[u] = theHLTActivityPhotons[u].hcalIsol;
502  hecalactivtiso[u] = theHLTActivityPhotons[u].trackIsol;
503  hecalactivl1iso[u] = theHLTActivityPhotons[u].L1Isolated;
504  hecalactivClusShap[u] = theHLTActivityPhotons[u].clusterShape;
505  hecalactivhovereh[u] = theHLTActivityPhotons[u].hovereh;
506  hecalactivR9[u] = theHLTActivityPhotons[u].r9;
507  hecalactivR9ID[u] = theHLTActivityPhotons[u].r9ID;
508  }
509 
511  std::vector<OpenHLTElectron> theHLTElectrons;
513  theHLTElectrons,
514  electronIsoHandle,
515  recoIsolecalcands,
516  HcalEleIsolMap,
517  L1IsoPixelSeedsMap,
518  TrackEleIsolMap,
519  electronR9IsoMap,
520  photonHoverEHIsoMap,
521  EcalIsolMap,
522  electronR9IDIsoMap,
523  lazyTools,
524  theMagField,
525  BSPosition);
527  theHLTElectrons,
528  electronNonIsoHandle,
529  recoNonIsolecalcands,
530  HcalEleNonIsolMap,
531  L1NonIsoPixelSeedsMap,
532  NonIsoTrackEleIsolMap,
533  electronR9NonIsoMap,
534  photonHoverEHNonIsoMap,
535  EcalNonIsolMap,
536  electronR9IDNonIsoMap,
537  lazyTools,
538  theMagField,
539  BSPosition);
540 
541  std::sort(theHLTElectrons.begin(), theHLTElectrons.end(), EtGreater());
542  nhltele = theHLTElectrons.size();
543 
544  for (int u = 0; u < nhltele; u++) {
545  heleet[u] = theHLTElectrons[u].Et;
546  heleeta[u] = theHLTElectrons[u].eta;
547  helephi[u] = theHLTElectrons[u].phi;
548  helevtxz[u] = theHLTElectrons[u].vtxZ;
549  heleE[u] = theHLTElectrons[u].E;
550  helep[u] = theHLTElectrons[u].p;
551  helehiso[u] = theHLTElectrons[u].hcalIsol;
552  helePixelSeeds[u] = theHLTElectrons[u].pixelSeeds;
553  heletiso[u] = theHLTElectrons[u].trackIsol;
554  heleeiso[u] = theHLTElectrons[u].ecalIsol;
555  helel1iso[u] = theHLTElectrons[u].L1Isolated;
556  heleNewSC[u] = theHLTElectrons[u].newSC;
557  heleClusShap[u] = theHLTElectrons[u].clusterShape;
558  heleDeta[u] = theHLTElectrons[u].Deta;
559  heleDphi[u] = theHLTElectrons[u].Dphi;
560  heleR9[u] = theHLTElectrons[u].r9;
561  helehovereh[u] = theHLTElectrons[u].hovereh;
562  heleR9ID[u] = theHLTElectrons[u].r9ID;
563  }
564 
565  if(electronHFElectrons.isValid()) {
566  for (reco::RecoEcalCandidateCollection::const_iterator hfelecand = electronHFElectrons->begin(); hfelecand!=electronHFElectrons->end(); hfelecand++) {
567  hhfelept[nhlthfele] = hfelecand->pt();
568  hhfeleeta[nhlthfele] = hfelecand->eta();
569 
570  nhlthfele++;
571 
572  if(electronHFECALClusters.isValid()) {
573 
574  const reco::RecoEcalCandidate& HFcan = (*hfelecand);
575  reco::SuperClusterRef theClusRef=HFcan.superCluster();
576  const reco::SuperCluster& hfECALSuperCluster=*theClusRef;
577  const reco::HFEMClusterShapeRef clusShapeRef=(*electronHFClusterAssociation).find(theClusRef)->val;
578  const reco::HFEMClusterShape& clusShape=*clusShapeRef;
579 
580 
581  float hfCluster2Dcut =(clusShape.eCOREe9()-(clusShape.eSeL()*1.125));
582  float hfClustere9e25 = clusShape.eLong3x3()/clusShape.eLong5x5();
583  float hfClustere1e9 = clusShape.eLong1x1()/clusShape.eLong3x3();
584  float hfClustereCOREe9 = clusShape.eCOREe9();
585  float hfClustereSeL = clusShape.eSeL();
586 
587  hhfcluster2Dcut[nhlthfeclus] = hfCluster2Dcut;
588  hhfclustere9e25[nhlthfeclus] = hfClustere9e25;
589  hhfclustere1e9[nhlthfeclus] = hfClustere1e9;
590  hhfclustereCOREe9[nhlthfeclus] = hfClustereCOREe9;
591  hhfclustereSeL[nhlthfeclus] = hfClustereSeL;
592  hhfclustereta[nhlthfeclus] = hfECALSuperCluster.eta();
593  hhfclusterphi[nhlthfeclus] = hfECALSuperCluster.phi();
594 
595  } else {
596 
602  hhfclustereta[nhlthfeclus] = 0.0;
603  hhfclusterphi[nhlthfeclus] = 0.0;
604 
605  }
606 
607  nhlthfeclus++;
608  }
609  }
610 }
611 
613  std::vector<OpenHLTPhoton> & theHLTPhotons,
614  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
618  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IsoMap,
619  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
620  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDIsoMap,
621  EcalClusterLazyTools& lazyTools )
622  {
623  // Iterator to the isolation-map
625 
626  if (recoIsolecalcands.isValid()) {
627  // loop over SuperCluster and fill the HLTPhotons
628 
629 
630  for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
631  recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
632 
633  OpenHLTPhoton pho;
634  pho.ecalIsol = -999;
635  pho.hcalIsol = -999;
636  pho.trackIsol = -999;
637  pho.clusterShape = -999;
638  pho.L1Isolated = true;
639  pho.Et = recoecalcand->et();
640  pho.eta = recoecalcand->eta();
641  pho.phi = recoecalcand->phi();
642  pho.r9 = -999.;
643  pho.hovereh = -999.;
644  pho.r9ID = -999.;
645 
646  //Get the cluster shape
647  // std::vector<float> vCov = lazyTools.covariances( *(recoecalcand->superCluster()->seed()) );
648  std::vector<float> vCov = lazyTools.localCovariances( *(recoecalcand->superCluster()->seed()) );
649  double sigmaee = sqrt(vCov[0]);
650  // float EtaSC = fabs(recoecalcand->eta());
651  // if(EtaSC > 1.479 ) {//Endcap
652  // sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
653  // }
654  pho.clusterShape = sigmaee;
655 
656  // Method to get the reference to the candidate
657  reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand));
658 
659  // First/Second member of the Map: Ref-to-Candidate(mapi)/Isolation(->val)
660  // fill the ecal Isolation
661  if (EcalIsolMap.isValid()) {
662  mapi = (*EcalIsolMap).find(ref);
663  if (mapi !=(*EcalIsolMap).end()) { pho.ecalIsol = mapi->val;}
664  }
665  // fill the hcal Isolation
666  if (HcalIsolMap.isValid()) {
667  mapi = (*HcalIsolMap).find(ref);
668  if (mapi !=(*HcalIsolMap).end()) { pho.hcalIsol = mapi->val;}
669  }
670  // fill the track Isolation
671  if (TrackIsolMap.isValid()) {
672  mapi = (*TrackIsolMap).find(ref);
673  if (mapi !=(*TrackIsolMap).end()) { pho.trackIsol = mapi->val;}
674  }
675  // fill the R9
676  if (photonR9IsoMap.isValid()) {
677  mapi = (*photonR9IsoMap).find(ref);
678  if (mapi !=(*photonR9IsoMap).end()) { pho.r9 = mapi->val;}
679  }
680  // fill the H for H/E
681  if (photonHoverEHIsoMap.isValid()) {
682  mapi = (*photonHoverEHIsoMap).find(ref);
683  if (mapi !=(*photonHoverEHIsoMap).end()) { pho.hovereh = mapi->val;}
684  }
685  // fill the R9ID
686  if (photonR9IDIsoMap.isValid()) {
687  mapi = (*photonR9IDIsoMap).find(ref);
688  if (mapi !=(*photonR9IDIsoMap).end()) { pho.r9ID = mapi->val;}
689  }
690 
691  // store the photon into the vector
692  theHLTPhotons.push_back(pho);
693  }
694  }
695  }
696 
698  std::vector<OpenHLTPhoton> & theHLTPhotons,
699  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
702  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & TrackNonIsolMap,
703  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9NonIsoMap,
704  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
705  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonR9IDNonIsoMap,
706  EcalClusterLazyTools& lazyTools )
707  {
709 
710  if (recoNonIsolecalcands.isValid()) {
711  for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
712  recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
713  // loop over SuperCluster and fill the HLTPhotons
714  OpenHLTPhoton pho;
715  pho.ecalIsol = -999;
716  pho.hcalIsol = -999;
717  pho.trackIsol = -999;
718  pho.clusterShape = -999;
719  pho.L1Isolated = false;
720  pho.Et = recoecalcand->et();
721  pho.eta = recoecalcand->eta();
722  pho.phi = recoecalcand->phi();
723  pho.r9 = -999;
724  pho.hovereh = -999.;
725  pho.r9ID = -999.;
726 
727  //Get the cluster shape
728  // std::vector<float> vCov = lazyTools.covariances( *(recoecalcand->superCluster()->seed()) );
729  std::vector<float> vCov = lazyTools.localCovariances( *(recoecalcand->superCluster()->seed()) );
730  double sigmaee = sqrt(vCov[0]);
731  // float EtaSC = fabs(recoecalcand->eta());
732  // if(EtaSC > 1.479 ) {//Endcap
733  // sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
734  // }
735  pho.clusterShape = sigmaee;
736 
737  reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand));
738 
739  // fill the ecal Isolation
740  if (EcalNonIsolMap.isValid()) {
741  mapi = (*EcalNonIsolMap).find(ref);
742  if (mapi !=(*EcalNonIsolMap).end()) { pho.ecalIsol = mapi->val;}
743  }
744  // fill the hcal Isolation
745  if (HcalNonIsolMap.isValid()) {
746  mapi = (*HcalNonIsolMap).find(ref);
747  if (mapi !=(*HcalNonIsolMap).end()) { pho.hcalIsol = mapi->val;}
748  }
749  // fill the track Isolation
750  if (TrackNonIsolMap.isValid()) {
751  mapi = (*TrackNonIsolMap).find(ref);
752  if (mapi !=(*TrackNonIsolMap).end()) { pho.trackIsol = mapi->val;}
753  }
754  // fill the R9
755  if (photonR9NonIsoMap.isValid()) {
756  mapi = (*photonR9NonIsoMap).find(ref);
757  if (mapi !=(*photonR9NonIsoMap).end()) { pho.r9 = mapi->val;}
758  }
759  // fill the H for H/E
760  if (photonHoverEHNonIsoMap.isValid()) {
761  mapi = (*photonHoverEHNonIsoMap).find(ref);
762  if (mapi !=(*photonHoverEHNonIsoMap).end()) { pho.hovereh = mapi->val;}
763  }
764  // fill the R9ID
765  if (photonR9IDNonIsoMap.isValid()) {
766  mapi = (*photonR9IDNonIsoMap).find(ref);
767  if (mapi !=(*photonR9IDNonIsoMap).end()) { pho.r9ID = mapi->val;}
768  }
769 
770  // store the photon into the vector
771  theHLTPhotons.push_back(pho);
772  }
773  }
774  }
775 
777  std::vector<OpenHLTElectron> & theHLTElectrons,
778  const edm::Handle<reco::ElectronCollection> & electronIsoHandle,
779  const edm::Handle<reco::RecoEcalCandidateCollection> & recoIsolecalcands,
781  const edm::Handle<reco::ElectronSeedCollection> & L1IsoPixelSeedsMap,
782  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
783  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IsoMap,
784  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHIsoMap,
786  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDIsoMap,
787  EcalClusterLazyTools& lazyTools,
788  const edm::ESHandle<MagneticField>& theMagField,
789  reco::BeamSpot::Point & BSPosition )
790  {
791  // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
792  if (recoIsolecalcands.isValid()) {
793  for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
794  recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
795  // get the ref to the SC:
796  reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand));
797  reco::SuperClusterRef recrSC = ref->superCluster();
798  //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
799 
801  ele.hcalIsol = -999;
802  ele.trackIsol = -999;
803  ele.ecalIsol = -999;
804  ele.L1Isolated = true;
805  ele.p = -999;
806  ele.pixelSeeds = -999;
807  ele.newSC = true;
808  ele.clusterShape = -999;
809  ele.Dphi = 700;
810  ele.Deta = 700;
811  ele.hovereh = -999;
812  ele.Et = recoecalcand->et();
813  ele.eta = recoecalcand->eta();
814  ele.phi = recoecalcand->phi();
815  ele.E = recrSC->energy();
816  //Get the cluster shape
817  // std::vector<float> vCov = lazyTools.covariances( *(recrSC->seed()) );
818  std::vector<float> vCov = lazyTools.localCovariances( *(recrSC->seed()) );
819  double sigmaee = sqrt(vCov[0]);
820  // float EtaSC = fabs(recoecalcand->eta());
821  // if(EtaSC > 1.479 ) {//Endcap
822  // sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
823  // }
824  ele.clusterShape = sigmaee;
825  ele.r9 = -999.;
826  ele.r9ID = -999.;
827 
828  // fill the ecal Isolation
829  if (EcalIsolMap.isValid()) {
830  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*EcalIsolMap).find(ref);
831  if (mapi !=(*EcalIsolMap).end()) { ele.ecalIsol = mapi->val;}
832  }
833  // fill the hcal Isolation
834  if (HcalEleIsolMap.isValid()) {
835  //reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand)) );
836  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
837  if (mapi !=(*HcalEleIsolMap).end()) { ele.hcalIsol = mapi->val; }
838  }
839  // fill the R9
840  if (electronR9IsoMap.isValid()) {
841  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*electronR9IsoMap).find( ref );
842  if (mapi !=(*electronR9IsoMap).end()) { ele.r9 = mapi->val; }
843  }
844  // fill the H for H/E
845  if (photonHoverEHIsoMap.isValid()) {
846  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*photonHoverEHIsoMap).find(ref);
847  if (mapi !=(*photonHoverEHIsoMap).end()) { ele.hovereh = mapi->val;}
848  }
849  // fill the R9ID
850  if (electronR9IDIsoMap.isValid()) {
851  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*electronR9IDIsoMap).find( ref );
852  if (mapi !=(*electronR9IDIsoMap).end()) { ele.r9ID = mapi->val; }
853  }
854 
855  // look if the SC has associated pixelSeeds
856  int nmatch = 0;
857 
858  if (L1IsoPixelSeedsMap.isValid()) {
859  for (reco::ElectronSeedCollection::const_iterator it = L1IsoPixelSeedsMap->begin();
860  it != L1IsoPixelSeedsMap->end(); it++) {
861  edm::RefToBase<reco::CaloCluster> caloCluster = it->caloCluster() ;
862  reco::SuperClusterRef scRef = caloCluster.castTo<reco::SuperClusterRef>() ;
863  if (&(*recrSC) == &(*scRef)) { nmatch++; }
864  }
865  }
866 
867  ele.pixelSeeds = nmatch;
868 
869  // look if the SC was promoted to an electron:
870  if (electronIsoHandle.isValid()) {
871  bool FirstElectron = true;
872  reco::ElectronRef electronref;
873  for (reco::ElectronCollection::const_iterator iElectron = electronIsoHandle->begin();
874  iElectron != electronIsoHandle->end(); iElectron++) {
875  // 1) find the SC from the electron
876  electronref = reco::ElectronRef(electronIsoHandle, iElectron - electronIsoHandle->begin());
877  const reco::SuperClusterRef theClus = electronref->superCluster(); // SC from the electron;
878  if (&(*recrSC) == &(*theClus)) { // ref is the RecoEcalCandidateRef corresponding to the electron
879  if (FirstElectron) { // the first electron is stored in ele, keeping the ele.newSC = true
880  FirstElectron = false;
881  ele.p = electronref->track()->momentum().R();
882  ele.vtxZ = electronref->track()->vertex().z();
883  float deta=-100, dphi=-100;
884  CalculateDetaDphi(theMagField,BSPosition , electronref , deta, dphi, false);
885  ele.Dphi=dphi; ele.Deta=deta;
886  // fill the track Isolation
887  if (TrackEleIsolMap.isValid()) {
888  reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find(electronref);
889  if (mapTr != (*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val; }
890  }
891  }
892  else {
893  // FirstElectron is false, i.e. the SC of this electron is common to another electron.
894  // A new OpenHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
895  OpenHLTElectron ele2;
896  ele2.hcalIsol = ele.hcalIsol;
897  ele2.trackIsol = -999;
898  ele2.Dphi = 700;
899  ele2.Deta = 700;
900  ele2.Et = ele.Et;
901  ele2.eta = ele.eta;
902  ele2.phi = ele.phi;
903  ele2.vtxZ = electronref->track()->vertex().z();
904  ele2.E = ele.E;
905  ele2.L1Isolated = ele.L1Isolated;
906  ele2.pixelSeeds = ele.pixelSeeds;
907  ele2.clusterShape = ele.clusterShape;
908  ele2.newSC = false;
909  ele2.p = electronref->track()->momentum().R();
910  ele2.r9 = ele.r9;
911  ele2.hovereh = ele.hovereh;
912  ele2.ecalIsol = ele.ecalIsol;
913  ele2.r9ID = ele.r9ID;
914  float deta=-100, dphi=-100;
915  CalculateDetaDphi(theMagField,BSPosition , electronref , deta, dphi, false);
916  ele2.Dphi=dphi; ele2.Deta=deta;
917  // fill the track Isolation
918  if (TrackEleIsolMap.isValid()) {
919  reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
920  if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
921  }
922  theHLTElectrons.push_back(ele2);
923  }
924  }
925  } // end of loop over electrons
926  } // end of if (electronIsoHandle) {
927 
928  //store the electron into the vector
929  theHLTElectrons.push_back(ele);
930  } // end of loop over ecalCandidates
931  } // end of if (recoIsolecalcands) {
932  }
933 
934 
936  std::vector<OpenHLTElectron> & theHLTElectrons,
937  const edm::Handle<reco::ElectronCollection> & electronNonIsoHandle,
938  const edm::Handle<reco::RecoEcalCandidateCollection> & recoNonIsolecalcands,
940  const edm::Handle<reco::ElectronSeedCollection> & L1NonIsoPixelSeedsMap,
941  const edm::Handle<reco::ElectronIsolationMap> & TrackEleIsolMap,
942  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9NonIsoMap,
943  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & photonHoverEHNonIsoMap,
944  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & EcalNonIsolMap,
945  const edm::Handle<reco::RecoEcalCandidateIsolationMap> & electronR9IDNonIsoMap,
946  EcalClusterLazyTools& lazyTools,
947  const edm::ESHandle<MagneticField>& theMagField,
948  reco::BeamSpot::Point & BSPosition )
949  {
950  // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
951  if (recoNonIsolecalcands.isValid()) {
952  for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
953  recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
954  //get the ref to the SC:
955  reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand));
956  reco::SuperClusterRef recrSC = ref->superCluster();
957  //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
958 
960  ele.hcalIsol = -999;
961  ele.trackIsol = -999;
962  ele.ecalIsol = -999;
963  ele.L1Isolated = false;
964  ele.p = -999;
965  ele.pixelSeeds = -999;
966  ele.newSC = true;
967  ele.clusterShape = -999;
968  ele.Dphi = 700;
969  ele.Deta = 700;
970  ele.r9 = -999.;
971  ele.r9ID = -999.;
972  ele.hovereh = -999;
973  ele.Et = recoecalcand->et();
974  ele.eta = recoecalcand->eta();
975  ele.phi = recoecalcand->phi();
976  ele.E = recrSC->energy();
977  //Get the cluster shape
978  // std::vector<float> vCov = lazyTools.covariances( *(recrSC->seed()) );
979  std::vector<float> vCov = lazyTools.localCovariances( *(recrSC->seed()) );
980  double sigmaee = sqrt(vCov[0]);
981  // float EtaSC = fabs(recoecalcand->eta());
982  // if(EtaSC > 1.479 ) {//Endcap
983  // sigmaee = sigmaee - 0.02*(EtaSC - 2.3);
984  // }
985  ele.clusterShape = sigmaee;
986 
987  // fill the ecal Isolation
988  if (EcalNonIsolMap.isValid()) {
989  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*EcalNonIsolMap).find(ref);
990  if (mapi !=(*EcalNonIsolMap).end()) { ele.ecalIsol = mapi->val;}
991  }
992  // fill the hcal Isolation
993  if (HcalEleIsolMap.isValid()) {
994  // reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand)) );
995  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
996  if (mapi !=(*HcalEleIsolMap).end()) {ele.hcalIsol = mapi->val;}
997  }
998  // fill the R9
999  if (electronR9NonIsoMap.isValid()) {
1000  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*electronR9NonIsoMap).find( ref );
1001  if (mapi !=(*electronR9NonIsoMap).end()) { ele.r9 = mapi->val; }
1002  }
1003  // fill the H for H/E
1004  if (photonHoverEHNonIsoMap.isValid()) {
1005  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*photonHoverEHNonIsoMap).find(ref);
1006  if (mapi !=(*photonHoverEHNonIsoMap).end()) { ele.hovereh = mapi->val;}
1007  }
1008  // fill the R9ID
1009  if (electronR9IDNonIsoMap.isValid()) {
1010  reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*electronR9IDNonIsoMap).find( ref );
1011  if (mapi !=(*electronR9IDNonIsoMap).end()) { ele.r9ID = mapi->val; }
1012  }
1013 
1014  // look if the SC has associated pixelSeeds
1015  int nmatch = 0;
1016 
1017  if (L1NonIsoPixelSeedsMap.isValid()) {
1018  for (reco::ElectronSeedCollection::const_iterator it = L1NonIsoPixelSeedsMap->begin();
1019  it != L1NonIsoPixelSeedsMap->end(); it++) {
1020  edm::RefToBase<reco::CaloCluster> caloCluster = it->caloCluster() ;
1021  reco::SuperClusterRef scRef = caloCluster.castTo<reco::SuperClusterRef>() ;
1022  if (&(*recrSC) == &(*scRef)) { nmatch++;}
1023  }
1024  }
1025 
1026  ele.pixelSeeds = nmatch;
1027 
1028  // look if the SC was promoted to an electron:
1029  if (electronNonIsoHandle.isValid()) {
1030  bool FirstElectron = true;
1031  reco::ElectronRef electronref;
1032  for (reco::ElectronCollection::const_iterator iElectron = electronNonIsoHandle->begin();
1033  iElectron != electronNonIsoHandle->end();iElectron++) {
1034  // 1) find the SC from the electron
1035  electronref = reco::ElectronRef(electronNonIsoHandle, iElectron - electronNonIsoHandle->begin());
1036  const reco::SuperClusterRef theClus = electronref->superCluster(); //SC from the electron;
1037  if (&(*recrSC) == &(*theClus)) { // ref is the RecoEcalCandidateRef corresponding to the electron
1038  if (FirstElectron) { //the first electron is stored in ele, keeping the ele.newSC = true
1039  FirstElectron = false;
1040  ele.p = electronref->track()->momentum().R();
1041  ele.vtxZ = electronref->track()->dz();
1042  float deta=-100, dphi=-100;
1043  CalculateDetaDphi(theMagField,BSPosition , electronref , deta, dphi, false);
1044  ele.Dphi=dphi; ele.Deta=deta;
1045 
1046  // fill the track Isolation
1047  if (TrackEleIsolMap.isValid()) {
1048  reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
1049  if (mapTr !=(*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val;}
1050  }
1051  } else {
1052  // FirstElectron is false, i.e. the SC of this electron is common to another electron.
1053  // A new OpenHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
1054  OpenHLTElectron ele2;
1055  ele2.hcalIsol = ele.hcalIsol;
1056  ele2.trackIsol =-999;
1057  ele2.ecalIsol = ele.ecalIsol;
1058  ele2.Dphi = 700;
1059  ele2.Deta = 700;
1060  ele2.Et = ele.Et;
1061  ele2.eta = ele.eta;
1062  ele2.phi = ele.phi;
1063  ele2.vtxZ = electronref->track()->dz();
1064  ele2.E = ele.E;
1065  ele2.L1Isolated = ele.L1Isolated;
1066  ele2.pixelSeeds = ele.pixelSeeds;
1067  ele2.clusterShape = ele.clusterShape;
1068  ele2.newSC = false;
1069  ele2.p = electronref->track()->momentum().R();
1070  ele2.r9 = ele.r9;
1071  ele2.hovereh = ele.hovereh;
1072  ele2.r9ID = ele.r9ID;
1073  float deta=-100, dphi=-100;
1074  CalculateDetaDphi(theMagField,BSPosition , electronref , deta, dphi, false);
1075  ele2.Dphi=dphi; ele2.Deta=deta;
1076 
1077  // fill the track Isolation
1078  if (TrackEleIsolMap.isValid()) {
1079  reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
1080  if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
1081  }
1082  theHLTElectrons.push_back(ele2);
1083  }
1084  }
1085  } // end of loop over electrons
1086  } // end of if (electronNonIsoHandle) {
1087 
1088  // store the electron into the vector
1089  theHLTElectrons.push_back(ele);
1090  } // end of loop over ecalCandidates
1091  } // end of if (recoNonIsolecalcands) {
1092  }
1093 
1095  reco::BeamSpot::Point & BSPosition,
1096  const reco::ElectronRef eleref,
1097  float& deltaeta,
1098  float& deltaphi, bool useTrackProjectionToEcal )
1099  {
1100 
1101  const reco::SuperClusterRef theClus = eleref->superCluster();
1102  math::XYZVector scv(theClus->x(), theClus->y(), theClus->z());
1103 
1104  const math::XYZVector trackMom = eleref->track()->momentum();
1105 
1106  math::XYZPoint SCcorrPosition(theClus->x()-BSPosition.x(), theClus->y()-BSPosition.y() , theClus->z()-eleref->track()->vz() );
1107  deltaeta = SCcorrPosition.eta()-eleref->track()->eta();
1108 
1109  if(useTrackProjectionToEcal){
1110  ECALPositionCalculator posCalc;
1111  const math::XYZPoint vertex(BSPosition.x(),BSPosition.y(),eleref->track()->vz());
1112 
1113  float phi1= posCalc.ecalPhi(theMagField.product(),trackMom,vertex,1);
1114  float phi2= posCalc.ecalPhi(theMagField.product(),trackMom,vertex,-1);
1115 
1116  float deltaphi1=fabs( phi1 - theClus->position().phi() );
1117  if(deltaphi1>6.283185308) deltaphi1 -= 6.283185308;
1118  if(deltaphi1>3.141592654) deltaphi1 = 6.283185308-deltaphi1;
1119 
1120  float deltaphi2=fabs( phi2 - theClus->position().phi() );
1121  if(deltaphi2>6.283185308) deltaphi2 -= 6.283185308;
1122  if(deltaphi2>3.141592654) deltaphi2 = 6.283185308-deltaphi2;
1123 
1124  deltaphi = deltaphi1;
1125  if(deltaphi2<deltaphi1){ deltaphi = deltaphi2;}
1126  }
1127  else {
1128  deltaphi=fabs(eleref->track()->outerPosition().phi()-theClus->phi());
1129  if(deltaphi>6.283185308) deltaphi -= 6.283185308;
1130  if(deltaphi>3.141592654) deltaphi = 6.283185308-deltaphi;
1131  }
1132 
1133  }
float * eldcot
Definition: HLTEgamma.h:188
float * elet
Definition: HLTEgamma.h:182
float * hphothovereh
Definition: HLTEgamma.h:193
int i
Definition: DBlmapReader.cc:9
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
double eLong5x5() const
float * elIP
Definition: HLTEgamma.h:182
float * heleDeta
Definition: HLTEgamma.h:198
double eLong1x1() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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
virtual reco::SuperClusterRef superCluster() const
reference to a superCluster
edm::Ref< RecoEcalCandidateCollection > RecoEcalCandidateRef
reference to an object in a collection of RecoEcalCandidate objects
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:29
float * photonecaliso
Definition: HLTEgamma.h:190
float * heleDphi
Definition: HLTEgamma.h:198
float * hphotet
Definition: HLTEgamma.h:193
float * photonr9id
Definition: HLTEgamma.h:190
edm::Ref< ElectronCollection > ElectronRef
reference to an object in a collection of Electron objects
Definition: ElectronFwd.h:15
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
float * hhfclustere1e9
Definition: HLTEgamma.h:207
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:161
float * photonet
Definition: HLTEgamma.h:189
static const size_t kMaxhPhot
Definition: HLTEgamma.cc:31
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
double ecalPhi(const MagneticField *magField, const math::XYZVector &momentum, const math::XYZPoint &vertex, const int charge)
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
T sqrt(T t)
Definition: SSEVec.h:48
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
double eLong3x3() const
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
bool isValid() const
Definition: HandleBase.h:76
int nhlthfeclus
Definition: HLTEgamma.h:204
float * hphoteta
Definition: HLTEgamma.h:193
int * elmishits
Definition: HLTEgamma.h:187
int * heleNewSC
Definition: HLTEgamma.h:203
static const size_t kMaxEl
Definition: HLTEgamma.cc:29
float * eleta
Definition: HLTEgamma.h:182
static const size_t kMaxhEle
Definition: HLTEgamma.cc:32
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
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
float * hecalactivtiso
Definition: HLTEgamma.h:192
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
int * hphotl1iso
Definition: HLTEgamma.h:200
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
float * helep
Definition: HLTEgamma.h:194
REF castTo() const
cast to a concrete type
Definition: RefToBase.h:242
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
T const * product() const
Definition: ESHandle.h:86
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
static const size_t kMaxPhot
Definition: HLTEgamma.cc:30
float * hhfclustere9e25
Definition: HLTEgamma.h:206
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:164
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