CMS 3D CMS Logo

AntiElectronIDMVA5.cc
Go to the documentation of this file.
2 
4 
10 
13 
14 #include <TFile.h>
15 
17  : isInitialized_(false),
18  mva_NoEleMatch_woGwoGSF_BL_(nullptr),
19  mva_NoEleMatch_woGwGSF_BL_(nullptr),
20  mva_NoEleMatch_wGwoGSF_BL_(nullptr),
21  mva_NoEleMatch_wGwGSF_BL_(nullptr),
22  mva_woGwoGSF_BL_(nullptr),
23  mva_woGwGSF_BL_(nullptr),
24  mva_wGwoGSF_BL_(nullptr),
25  mva_wGwGSF_BL_(nullptr),
26  mva_NoEleMatch_woGwoGSF_EC_(nullptr),
27  mva_NoEleMatch_woGwGSF_EC_(nullptr),
28  mva_NoEleMatch_wGwoGSF_EC_(nullptr),
29  mva_NoEleMatch_wGwGSF_EC_(nullptr),
30  mva_woGwoGSF_EC_(nullptr),
31  mva_woGwGSF_EC_(nullptr),
32  mva_wGwoGSF_EC_(nullptr),
33  mva_wGwGSF_EC_(nullptr)
34 {
35  loadMVAfromDB_ = cfg.exists("loadMVAfromDB") ? cfg.getParameter<bool>("loadMVAfromDB"): false;
36  if ( !loadMVAfromDB_ ) {
37  if(cfg.exists("inputFileName")){
38  inputFileName_ = cfg.getParameter<edm::FileInPath>("inputFileName");
39  }else throw cms::Exception("MVA input not defined") << "Requested to load tau MVA input from ROOT file but no file provided in cfg file";
40 
41  }
42  mvaName_NoEleMatch_woGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_BL");
43  mvaName_NoEleMatch_woGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwGSF_BL");
44  mvaName_NoEleMatch_wGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_BL");
45  mvaName_NoEleMatch_wGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwGSF_BL");
46  mvaName_woGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_woGwoGSF_BL");
47  mvaName_woGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_woGwGSF_BL");
48  mvaName_wGwoGSF_BL_ = cfg.getParameter<std::string>("mvaName_wGwoGSF_BL");
49  mvaName_wGwGSF_BL_ = cfg.getParameter<std::string>("mvaName_wGwGSF_BL");
50  mvaName_NoEleMatch_woGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwoGSF_EC");
51  mvaName_NoEleMatch_woGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_woGwGSF_EC");
52  mvaName_NoEleMatch_wGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwoGSF_EC");
53  mvaName_NoEleMatch_wGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_NoEleMatch_wGwGSF_EC");
54  mvaName_woGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_woGwoGSF_EC");
55  mvaName_woGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_woGwGSF_EC");
56  mvaName_wGwoGSF_EC_ = cfg.getParameter<std::string>("mvaName_wGwoGSF_EC");
57  mvaName_wGwGSF_EC_ = cfg.getParameter<std::string>("mvaName_wGwGSF_EC");
58 
59  Var_NoEleMatch_woGwoGSF_Barrel_ = new Float_t[10];
60  Var_NoEleMatch_woGwGSF_Barrel_ = new Float_t[16];
61  Var_NoEleMatch_wGwoGSF_Barrel_ = new Float_t[14];
62  Var_NoEleMatch_wGwGSF_Barrel_ = new Float_t[20];
63  Var_woGwoGSF_Barrel_ = new Float_t[18];
64  Var_woGwGSF_Barrel_ = new Float_t[24];
65  Var_wGwoGSF_Barrel_ = new Float_t[22];
66  Var_wGwGSF_Barrel_ = new Float_t[28];
67  Var_NoEleMatch_woGwoGSF_Endcap_ = new Float_t[9];
68  Var_NoEleMatch_woGwGSF_Endcap_ = new Float_t[15];
69  Var_NoEleMatch_wGwoGSF_Endcap_ = new Float_t[13];
70  Var_NoEleMatch_wGwGSF_Endcap_ = new Float_t[19];
71  Var_woGwoGSF_Endcap_ = new Float_t[17];
72  Var_woGwGSF_Endcap_ = new Float_t[23];
73  Var_wGwoGSF_Endcap_ = new Float_t[21];
74  Var_wGwGSF_Endcap_ = new Float_t[27];
75 
76  verbosity_ = 0;
77 }
78 
80 {
85  delete [] Var_woGwoGSF_Barrel_;
86  delete [] Var_woGwGSF_Barrel_;
87  delete [] Var_wGwoGSF_Barrel_;
88  delete [] Var_wGwGSF_Barrel_;
93  delete [] Var_woGwoGSF_Endcap_;
94  delete [] Var_woGwGSF_Endcap_;
95  delete [] Var_wGwoGSF_Endcap_;
96  delete [] Var_wGwGSF_Endcap_;
97  if ( !loadMVAfromDB_ ){
102  delete mva_woGwoGSF_BL_;
103  delete mva_woGwGSF_BL_;
104  delete mva_wGwoGSF_BL_;
105  delete mva_wGwGSF_BL_;
110  delete mva_woGwoGSF_EC_;
111  delete mva_woGwGSF_EC_;
112  delete mva_wGwoGSF_EC_;
113  delete mva_wGwGSF_EC_;
114  }
115  for ( std::vector<TFile*>::iterator it = inputFilesToDelete_.begin();
116  it != inputFilesToDelete_.end(); ++it ) {
117  delete (*it);
118  }
119 }
120 
121 namespace
122 {
123  const GBRForest* loadMVAfromFile(TFile* inputFile, const std::string& mvaName)
124  {
125 
126  //const GBRForest* mva = dynamic_cast<GBRForest*>(inputFile->Get(mvaName.data())); // CV: dynamic_cast<GBRForest*> fails for some reason ?!
127  const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data());
128  if ( !mva )
129  throw cms::Exception("PFRecoTauDiscriminationAgainstMuonMVA::loadMVA")
130  << " Failed to load MVA = " << mvaName.data() << " from file " << " !!\n";
131 
132  return mva;
133  }
134 
135  const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName)
136  {
138  es.get<GBRWrapperRcd>().get(mvaName, mva);
139  return mva.product();
140  }
141 }
142 
144 {
145  if ( !isInitialized_ ) {
146  if ( loadMVAfromDB_ ) {
163  } else {
164  if ( inputFileName_.location() == edm::FileInPath::Unknown ) throw cms::Exception("PFRecoTauDiscriminationAgainstMuonMVA::loadMVA")
165  << " Failed to find File = " << inputFileName_ << " !!\n";
166  TFile* inputFile = new TFile(inputFileName_.fullPath().data());
167 
168  mva_NoEleMatch_woGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_BL_);
169  mva_NoEleMatch_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwGSF_BL_);
170  mva_NoEleMatch_wGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_BL_);
171  mva_NoEleMatch_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwGSF_BL_);
172  mva_woGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwoGSF_BL_);
173  mva_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_BL_);
174  mva_wGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwoGSF_BL_);
175  mva_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_BL_);
176  mva_NoEleMatch_woGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_EC_);
177  mva_NoEleMatch_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwGSF_EC_);
178  mva_NoEleMatch_wGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_EC_);
179  mva_NoEleMatch_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwGSF_EC_);
180  mva_woGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwoGSF_EC_);
181  mva_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_EC_);
182  mva_wGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwoGSF_EC_);
183  mva_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_EC_);
184  inputFilesToDelete_.push_back(inputFile);
185  }
186  isInitialized_ = true;
187  }
188 }
189 
190 double AntiElectronIDMVA5::MVAValue(Float_t TauEtaAtEcalEntrance,
191  Float_t TauPt,
192  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
193  Float_t TauLeadChargedPFCandPt,
194  Float_t TaudCrackEta,
195  Float_t TaudCrackPhi,
196  Float_t TauEmFraction,
197  Float_t TauSignalPFGammaCands,
198  Float_t TauLeadPFChargedHadrHoP,
199  Float_t TauLeadPFChargedHadrEoP,
200  Float_t TauVisMass,
201  Float_t TauHadrMva,
202  const std::vector<Float_t>& GammasdEta,
203  const std::vector<Float_t>& GammasdPhi,
204  const std::vector<Float_t>& GammasPt,
205  Float_t TauKFNumHits,
206  Float_t TauGSFNumHits,
207  Float_t TauGSFChi2,
208  Float_t TauGSFTrackResol,
209  Float_t TauGSFTracklnPt,
210  Float_t TauGSFTrackEta,
211  Float_t TauPhi,
212  Float_t TauSignalPFChargedCands,
213  Float_t TauHasGsf,
214  Float_t ElecEta,
215  Float_t ElecPhi,
216  Float_t ElecPt,
217  Float_t ElecEe,
218  Float_t ElecEgamma,
219  Float_t ElecPin,
220  Float_t ElecPout,
221  Float_t ElecFbrem,
222  Float_t ElecChi2GSF,
223  Float_t ElecGSFNumHits,
224  Float_t ElecGSFTrackResol,
225  Float_t ElecGSFTracklnPt,
226  Float_t ElecGSFTrackEta)
227 {
228  double sumPt = 0.;
229  double dEta2 = 0.;
230  double dPhi2 = 0.;
231  for ( unsigned int i = 0 ; i < GammasPt.size() ; ++i ) {
232  double pt_i = GammasPt[i];
233  double phi_i = GammasdPhi[i];
234  if ( GammasdPhi[i] > M_PI ) phi_i = GammasdPhi[i] - 2*M_PI;
235  else if ( GammasdPhi[i] < -M_PI ) phi_i = GammasdPhi[i] + 2*M_PI;
236  double eta_i = GammasdEta[i];
237  sumPt += pt_i;
238  dEta2 += (pt_i*eta_i*eta_i);
239  dPhi2 += (pt_i*phi_i*phi_i);
240  }
241 
242  Float_t TauGammaEnFrac = sumPt/TauPt;
243 
244  if ( sumPt > 0. ) {
245  dEta2 /= sumPt;
246  dPhi2 /= sumPt;
247  }
248 
249  Float_t TauGammaEtaMom = std::sqrt(dEta2)*std::sqrt(TauGammaEnFrac)*TauPt;
250  Float_t TauGammaPhiMom = std::sqrt(dPhi2)*std::sqrt(TauGammaEnFrac)*TauPt;
251 
252  return MVAValue(TauEtaAtEcalEntrance,
253  TauPt,
254  TauLeadChargedPFCandEtaAtEcalEntrance,
255  TauLeadChargedPFCandPt,
256  TaudCrackEta,
257  TaudCrackPhi,
258  TauEmFraction,
259  TauSignalPFGammaCands,
260  TauLeadPFChargedHadrHoP,
261  TauLeadPFChargedHadrEoP,
262  TauVisMass,
263  TauHadrMva,
264  TauGammaEtaMom,
265  TauGammaPhiMom,
266  TauGammaEnFrac,
267  TauKFNumHits,
268  TauGSFNumHits,
269  TauGSFChi2,
270  TauGSFTrackResol,
271  TauGSFTracklnPt,
272  TauGSFTrackEta,
273  TauPhi,
274  TauSignalPFChargedCands,
275  TauHasGsf,
276  ElecEta,
277  ElecPhi,
278  ElecPt,
279  ElecEe,
280  ElecEgamma,
281  ElecPin,
282  ElecPout,
283  ElecFbrem,
284  ElecChi2GSF,
285  ElecGSFNumHits,
286  ElecGSFTrackResol,
287  ElecGSFTracklnPt,
288  ElecGSFTrackEta);
289 }
290 
291 double AntiElectronIDMVA5::MVAValue(Float_t TauEtaAtEcalEntrance,
292  Float_t TauPt,
293  Float_t TauLeadChargedPFCandEtaAtEcalEntrance,
294  Float_t TauLeadChargedPFCandPt,
295  Float_t TaudCrackEta,
296  Float_t TaudCrackPhi,
297  Float_t TauEmFract,
298  Float_t TauSignalPFGammaCands,
299  Float_t TauLeadPFChargedHadrHoP,
300  Float_t TauLeadPFChargedHadrEoP,
301  Float_t TauVisMass,
302  Float_t TauHadrMva,
303  Float_t TauGammaEtaMom,
304  Float_t TauGammaPhiMom,
305  Float_t TauGammaEnFrac,
306  Float_t TauKFNumHits,
307  Float_t TauGSFNumHits,
308  Float_t TauGSFChi2,
309  Float_t TauGSFTrackResol,
310  Float_t TauGSFTracklnPt,
311  Float_t TauGSFTrackEta,
312  Float_t TauPhi,
313  Float_t TauSignalPFChargedCands,
314  Float_t TauHasGsf,
315  Float_t ElecEta,
316  Float_t ElecPhi,
317  Float_t ElecPt,
318  Float_t ElecEe,
319  Float_t ElecEgamma,
320  Float_t ElecPin,
321  Float_t ElecPout,
322  Float_t ElecFbrem,
323  Float_t ElecChi2GSF,
324  Float_t ElecGSFNumHits,
325  Float_t ElecGSFTrackResol,
326  Float_t ElecGSFTracklnPt,
327  Float_t ElecGSFTrackEta)
328 {
329  if ( !isInitialized_ ) {
330  throw cms::Exception("ClassNotInitialized")
331  << " AntiElectronMVA not properly initialized !!\n";
332  }
333 
334  Float_t TauEmFraction = std::max(TauEmFract, float(0.));
335  Float_t TauNumHitsVariable = (TauGSFNumHits - TauKFNumHits)/(TauGSFNumHits + TauKFNumHits);
336  Float_t ElecEtotOverPin = (ElecEe + ElecEgamma)/ElecPin;
337  Float_t ElecEgammaOverPdif = ElecEgamma/(ElecPin - ElecPout);
338 
339  double mvaValue = -99.;
340  if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf < 0.5) {
341  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
342  Var_NoEleMatch_woGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance;
343  Var_NoEleMatch_woGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
344  Var_NoEleMatch_woGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
345  Var_NoEleMatch_woGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
346  Var_NoEleMatch_woGwoGSF_Barrel_[4] = TauEmFraction;
347  Var_NoEleMatch_woGwoGSF_Barrel_[5] = TauLeadPFChargedHadrHoP;
348  Var_NoEleMatch_woGwoGSF_Barrel_[6] = TauLeadPFChargedHadrEoP;
349  Var_NoEleMatch_woGwoGSF_Barrel_[7] = TauVisMass;
350  Var_NoEleMatch_woGwoGSF_Barrel_[8] = TaudCrackEta;
351  Var_NoEleMatch_woGwoGSF_Barrel_[9] = TaudCrackPhi;
353  } else {
354  Var_NoEleMatch_woGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance;
355  Var_NoEleMatch_woGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
356  Var_NoEleMatch_woGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
357  Var_NoEleMatch_woGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
358  Var_NoEleMatch_woGwoGSF_Endcap_[4] = TauEmFraction;
359  Var_NoEleMatch_woGwoGSF_Endcap_[5] = TauLeadPFChargedHadrHoP;
360  Var_NoEleMatch_woGwoGSF_Endcap_[6] = TauLeadPFChargedHadrEoP;
361  Var_NoEleMatch_woGwoGSF_Endcap_[7] = TauVisMass;
362  Var_NoEleMatch_woGwoGSF_Endcap_[8] = TaudCrackEta;
364  }
365  } else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf > 0.5) {
366  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
367  Var_NoEleMatch_woGwGSF_Barrel_[0] = TauEtaAtEcalEntrance;
368  Var_NoEleMatch_woGwGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
369  Var_NoEleMatch_woGwGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
370  Var_NoEleMatch_woGwGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
371  Var_NoEleMatch_woGwGSF_Barrel_[4] = TauEmFraction;
372  Var_NoEleMatch_woGwGSF_Barrel_[5] = TauLeadPFChargedHadrHoP;
373  Var_NoEleMatch_woGwGSF_Barrel_[6] = TauLeadPFChargedHadrEoP;
374  Var_NoEleMatch_woGwGSF_Barrel_[7] = TauVisMass;
375  Var_NoEleMatch_woGwGSF_Barrel_[8] = TauHadrMva;
376  Var_NoEleMatch_woGwGSF_Barrel_[9] = TauGSFChi2;
377  Var_NoEleMatch_woGwGSF_Barrel_[10] = TauNumHitsVariable;
378  Var_NoEleMatch_woGwGSF_Barrel_[11] = TauGSFTrackResol;
379  Var_NoEleMatch_woGwGSF_Barrel_[12] = TauGSFTracklnPt;
380  Var_NoEleMatch_woGwGSF_Barrel_[13] = TauGSFTrackEta;
381  Var_NoEleMatch_woGwGSF_Barrel_[14] = TaudCrackEta;
382  Var_NoEleMatch_woGwGSF_Barrel_[15] = TaudCrackPhi;
384  } else {
385  Var_NoEleMatch_woGwGSF_Endcap_[0] = TauEtaAtEcalEntrance;
386  Var_NoEleMatch_woGwGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
387  Var_NoEleMatch_woGwGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
388  Var_NoEleMatch_woGwGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
389  Var_NoEleMatch_woGwGSF_Endcap_[4] = TauEmFraction;
390  Var_NoEleMatch_woGwGSF_Endcap_[5] = TauLeadPFChargedHadrHoP;
391  Var_NoEleMatch_woGwGSF_Endcap_[6] = TauLeadPFChargedHadrEoP;
392  Var_NoEleMatch_woGwGSF_Endcap_[7] = TauVisMass;
393  Var_NoEleMatch_woGwGSF_Endcap_[8] = TauHadrMva;
394  Var_NoEleMatch_woGwGSF_Endcap_[9] = TauGSFChi2;
395  Var_NoEleMatch_woGwGSF_Endcap_[10] = TauNumHitsVariable;
396  Var_NoEleMatch_woGwGSF_Endcap_[11] = TauGSFTrackResol;
397  Var_NoEleMatch_woGwGSF_Endcap_[12] = TauGSFTracklnPt;
398  Var_NoEleMatch_woGwGSF_Endcap_[13] = TauGSFTrackEta;
399  Var_NoEleMatch_woGwGSF_Endcap_[14] = TaudCrackEta;
401  }
402  } else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf < 0.5 ) {
403  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){
404  Var_NoEleMatch_wGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance;
405  Var_NoEleMatch_wGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
406  Var_NoEleMatch_wGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
407  Var_NoEleMatch_wGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
408  Var_NoEleMatch_wGwoGSF_Barrel_[4] = TauEmFraction;
409  Var_NoEleMatch_wGwoGSF_Barrel_[5] = TauSignalPFGammaCands;
410  Var_NoEleMatch_wGwoGSF_Barrel_[6] = TauLeadPFChargedHadrHoP;
411  Var_NoEleMatch_wGwoGSF_Barrel_[7] = TauLeadPFChargedHadrEoP;
412  Var_NoEleMatch_wGwoGSF_Barrel_[8] = TauVisMass;
413  Var_NoEleMatch_wGwoGSF_Barrel_[9] = TauGammaEtaMom;
414  Var_NoEleMatch_wGwoGSF_Barrel_[10] = TauGammaPhiMom;
415  Var_NoEleMatch_wGwoGSF_Barrel_[11] = TauGammaEnFrac;
416  Var_NoEleMatch_wGwoGSF_Barrel_[12] = TaudCrackEta;
417  Var_NoEleMatch_wGwoGSF_Barrel_[13] = TaudCrackPhi;
419  } else {
420  Var_NoEleMatch_wGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance;
421  Var_NoEleMatch_wGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
422  Var_NoEleMatch_wGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
423  Var_NoEleMatch_wGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
424  Var_NoEleMatch_wGwoGSF_Endcap_[4] = TauEmFraction;
425  Var_NoEleMatch_wGwoGSF_Endcap_[5] = TauSignalPFGammaCands;
426  Var_NoEleMatch_wGwoGSF_Endcap_[6] = TauLeadPFChargedHadrHoP;
427  Var_NoEleMatch_wGwoGSF_Endcap_[7] = TauLeadPFChargedHadrEoP;
428  Var_NoEleMatch_wGwoGSF_Endcap_[8] = TauVisMass;
429  Var_NoEleMatch_wGwoGSF_Endcap_[9] = TauGammaEtaMom;
430  Var_NoEleMatch_wGwoGSF_Endcap_[10] = TauGammaPhiMom;
431  Var_NoEleMatch_wGwoGSF_Endcap_[11] = TauGammaEnFrac;
432  Var_NoEleMatch_wGwoGSF_Endcap_[12] = TaudCrackEta;
434  }
435  }
436  else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 ) {
437  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
438  Var_NoEleMatch_wGwGSF_Barrel_[0] = TauEtaAtEcalEntrance;
439  Var_NoEleMatch_wGwGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
440  Var_NoEleMatch_wGwGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
441  Var_NoEleMatch_wGwGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt));
442  Var_NoEleMatch_wGwGSF_Barrel_[4] = TauEmFraction;
443  Var_NoEleMatch_wGwGSF_Barrel_[5] = TauSignalPFGammaCands;
444  Var_NoEleMatch_wGwGSF_Barrel_[6] = TauLeadPFChargedHadrHoP;
445  Var_NoEleMatch_wGwGSF_Barrel_[7] = TauLeadPFChargedHadrEoP;
446  Var_NoEleMatch_wGwGSF_Barrel_[8] = TauVisMass;
447  Var_NoEleMatch_wGwGSF_Barrel_[9] = TauHadrMva;
448  Var_NoEleMatch_wGwGSF_Barrel_[10] = TauGammaEtaMom;
449  Var_NoEleMatch_wGwGSF_Barrel_[11] = TauGammaPhiMom;
450  Var_NoEleMatch_wGwGSF_Barrel_[12] = TauGammaEnFrac;
451  Var_NoEleMatch_wGwGSF_Barrel_[13] = TauGSFChi2;
452  Var_NoEleMatch_wGwGSF_Barrel_[14] = TauNumHitsVariable;
453  Var_NoEleMatch_wGwGSF_Barrel_[15] = TauGSFTrackResol;
454  Var_NoEleMatch_wGwGSF_Barrel_[16] = TauGSFTracklnPt;
455  Var_NoEleMatch_wGwGSF_Barrel_[17] = TauGSFTrackEta;
456  Var_NoEleMatch_wGwGSF_Barrel_[18] = TaudCrackEta;
457  Var_NoEleMatch_wGwGSF_Barrel_[19] = TaudCrackPhi;
459  } else {
460  Var_NoEleMatch_wGwGSF_Endcap_[0] = TauEtaAtEcalEntrance;
461  Var_NoEleMatch_wGwGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance;
462  Var_NoEleMatch_wGwGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
463  Var_NoEleMatch_wGwGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt));
464  Var_NoEleMatch_wGwGSF_Endcap_[4] = TauEmFraction;
465  Var_NoEleMatch_wGwGSF_Endcap_[5] = TauSignalPFGammaCands;
466  Var_NoEleMatch_wGwGSF_Endcap_[6] = TauLeadPFChargedHadrHoP;
467  Var_NoEleMatch_wGwGSF_Endcap_[7] = TauLeadPFChargedHadrEoP;
468  Var_NoEleMatch_wGwGSF_Endcap_[8] = TauVisMass;
469  Var_NoEleMatch_wGwGSF_Endcap_[9] = TauHadrMva;
470  Var_NoEleMatch_wGwGSF_Endcap_[10] = TauGammaEtaMom;
471  Var_NoEleMatch_wGwGSF_Endcap_[11] = TauGammaPhiMom;
472  Var_NoEleMatch_wGwGSF_Endcap_[12] = TauGammaEnFrac;
473  Var_NoEleMatch_wGwGSF_Endcap_[13] = TauGSFChi2;
474  Var_NoEleMatch_wGwGSF_Endcap_[14] = TauNumHitsVariable;
475  Var_NoEleMatch_wGwGSF_Endcap_[15] = TauGSFTrackResol;
476  Var_NoEleMatch_wGwGSF_Endcap_[16] = TauGSFTracklnPt;
477  Var_NoEleMatch_wGwGSF_Endcap_[17] = TauGSFTrackEta;
478  Var_NoEleMatch_wGwGSF_Endcap_[18] = TaudCrackEta;
480  }
481  } else if ( TauSignalPFGammaCands == 0 && TauHasGsf < 0.5 ) {
482  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
483  Var_woGwoGSF_Barrel_[0] = ElecEtotOverPin;
484  Var_woGwoGSF_Barrel_[1] = ElecEgammaOverPdif;
485  Var_woGwoGSF_Barrel_[2] = ElecFbrem;
486  Var_woGwoGSF_Barrel_[3] = ElecChi2GSF;
487  Var_woGwoGSF_Barrel_[4] = ElecGSFNumHits;
488  Var_woGwoGSF_Barrel_[5] = ElecGSFTrackResol;
489  Var_woGwoGSF_Barrel_[6] = ElecGSFTracklnPt;
490  Var_woGwoGSF_Barrel_[7] = ElecGSFTrackEta;
491  Var_woGwoGSF_Barrel_[8] = TauEtaAtEcalEntrance;
492  Var_woGwoGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
493  Var_woGwoGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
494  Var_woGwoGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
495  Var_woGwoGSF_Barrel_[12] = TauEmFraction;
496  Var_woGwoGSF_Barrel_[13] = TauLeadPFChargedHadrHoP;
497  Var_woGwoGSF_Barrel_[14] = TauLeadPFChargedHadrEoP;
498  Var_woGwoGSF_Barrel_[15] = TauVisMass;
499  Var_woGwoGSF_Barrel_[16] = TaudCrackEta;
500  Var_woGwoGSF_Barrel_[17] = TaudCrackPhi;
502  } else {
503  Var_woGwoGSF_Endcap_[0] = ElecEtotOverPin;
504  Var_woGwoGSF_Endcap_[1] = ElecEgammaOverPdif;
505  Var_woGwoGSF_Endcap_[2] = ElecFbrem;
506  Var_woGwoGSF_Endcap_[3] = ElecChi2GSF;
507  Var_woGwoGSF_Endcap_[4] = ElecGSFNumHits;
508  Var_woGwoGSF_Endcap_[5] = ElecGSFTrackResol;
509  Var_woGwoGSF_Endcap_[6] = ElecGSFTracklnPt;
510  Var_woGwoGSF_Endcap_[7] = ElecGSFTrackEta;
511  Var_woGwoGSF_Endcap_[8] = TauEtaAtEcalEntrance;
512  Var_woGwoGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
513  Var_woGwoGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
514  Var_woGwoGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
515  Var_woGwoGSF_Endcap_[12] = TauEmFraction;
516  Var_woGwoGSF_Endcap_[13] = TauLeadPFChargedHadrHoP;
517  Var_woGwoGSF_Endcap_[14] = TauLeadPFChargedHadrEoP;
518  Var_woGwoGSF_Endcap_[15] = TauVisMass;
519  Var_woGwoGSF_Endcap_[16] = TaudCrackEta;
521  }
522  } else if ( TauSignalPFGammaCands == 0 && TauHasGsf > 0.5 ) {
523  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
524  Var_woGwGSF_Barrel_[0] = ElecEtotOverPin;
525  Var_woGwGSF_Barrel_[1] = ElecEgammaOverPdif;
526  Var_woGwGSF_Barrel_[2] = ElecFbrem;
527  Var_woGwGSF_Barrel_[3] = ElecChi2GSF;
528  Var_woGwGSF_Barrel_[4] = ElecGSFNumHits;
529  Var_woGwGSF_Barrel_[5] = ElecGSFTrackResol;
530  Var_woGwGSF_Barrel_[6] = ElecGSFTracklnPt;
531  Var_woGwGSF_Barrel_[7] = ElecGSFTrackEta;
532  Var_woGwGSF_Barrel_[8] = TauEtaAtEcalEntrance;
533  Var_woGwGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
534  Var_woGwGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
535  Var_woGwGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
536  Var_woGwGSF_Barrel_[12] = TauEmFraction;
537  Var_woGwGSF_Barrel_[13] = TauLeadPFChargedHadrHoP;
538  Var_woGwGSF_Barrel_[14] = TauLeadPFChargedHadrEoP;
539  Var_woGwGSF_Barrel_[15] = TauVisMass;
540  Var_woGwGSF_Barrel_[16] = TauHadrMva;
541  Var_woGwGSF_Barrel_[17] = TauGSFChi2;
542  Var_woGwGSF_Barrel_[18] = TauNumHitsVariable;
543  Var_woGwGSF_Barrel_[19] = TauGSFTrackResol;
544  Var_woGwGSF_Barrel_[20] = TauGSFTracklnPt;
545  Var_woGwGSF_Barrel_[21] = TauGSFTrackEta;
546  Var_woGwGSF_Barrel_[22] = TaudCrackEta;
547  Var_woGwGSF_Barrel_[23] = TaudCrackPhi;
549  } else {
550  Var_woGwGSF_Endcap_[0] = ElecEtotOverPin;
551  Var_woGwGSF_Endcap_[1] = ElecEgammaOverPdif;
552  Var_woGwGSF_Endcap_[2] = ElecFbrem;
553  Var_woGwGSF_Endcap_[3] = ElecChi2GSF;
554  Var_woGwGSF_Endcap_[4] = ElecGSFNumHits;
555  Var_woGwGSF_Endcap_[5] = ElecGSFTrackResol;
556  Var_woGwGSF_Endcap_[6] = ElecGSFTracklnPt;
557  Var_woGwGSF_Endcap_[7] = ElecGSFTrackEta;
558  Var_woGwGSF_Endcap_[8] = TauEtaAtEcalEntrance;
559  Var_woGwGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
560  Var_woGwGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
561  Var_woGwGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
562  Var_woGwGSF_Endcap_[12] = TauEmFraction;
563  Var_woGwGSF_Endcap_[13] = TauLeadPFChargedHadrHoP;
564  Var_woGwGSF_Endcap_[14] = TauLeadPFChargedHadrEoP;
565  Var_woGwGSF_Endcap_[15] = TauVisMass;
566  Var_woGwGSF_Endcap_[16] = TauHadrMva;
567  Var_woGwGSF_Endcap_[17] = TauGSFChi2;
568  Var_woGwGSF_Endcap_[18] = TauNumHitsVariable;
569  Var_woGwGSF_Endcap_[19] = TauGSFTrackResol;
570  Var_woGwGSF_Endcap_[20] = TauGSFTracklnPt;
571  Var_woGwGSF_Endcap_[21] = TauGSFTrackEta;
572  Var_woGwGSF_Endcap_[22] = TaudCrackEta;
574  }
575  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf < 0.5 ) {
576  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
577  Var_wGwoGSF_Barrel_[0] = ElecEtotOverPin;
578  Var_wGwoGSF_Barrel_[1] = ElecEgammaOverPdif;
579  Var_wGwoGSF_Barrel_[2] = ElecFbrem;
580  Var_wGwoGSF_Barrel_[3] = ElecChi2GSF;
581  Var_wGwoGSF_Barrel_[4] = ElecGSFNumHits;
582  Var_wGwoGSF_Barrel_[5] = ElecGSFTrackResol;
583  Var_wGwoGSF_Barrel_[6] = ElecGSFTracklnPt;
584  Var_wGwoGSF_Barrel_[7] = ElecGSFTrackEta;
585  Var_wGwoGSF_Barrel_[8] = TauEtaAtEcalEntrance;
586  Var_wGwoGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
587  Var_wGwoGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
588  Var_wGwoGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
589  Var_wGwoGSF_Barrel_[12] = TauEmFraction;
590  Var_wGwoGSF_Barrel_[13] = TauSignalPFGammaCands;
591  Var_wGwoGSF_Barrel_[14] = TauLeadPFChargedHadrHoP;
592  Var_wGwoGSF_Barrel_[15] = TauLeadPFChargedHadrEoP;
593  Var_wGwoGSF_Barrel_[16] = TauVisMass;
594  Var_wGwoGSF_Barrel_[17] = TauGammaEtaMom;
595  Var_wGwoGSF_Barrel_[18] = TauGammaPhiMom;
596  Var_wGwoGSF_Barrel_[19] = TauGammaEnFrac;
597  Var_wGwoGSF_Barrel_[20] = TaudCrackEta;
598  Var_wGwoGSF_Barrel_[21] = TaudCrackPhi;
600  } else {
601  Var_wGwoGSF_Endcap_[0] = ElecEtotOverPin;
602  Var_wGwoGSF_Endcap_[1] = ElecEgammaOverPdif;
603  Var_wGwoGSF_Endcap_[2] = ElecFbrem;
604  Var_wGwoGSF_Endcap_[3] = ElecChi2GSF;
605  Var_wGwoGSF_Endcap_[4] = ElecGSFNumHits;
606  Var_wGwoGSF_Endcap_[5] = ElecGSFTrackResol;
607  Var_wGwoGSF_Endcap_[6] = ElecGSFTracklnPt;
608  Var_wGwoGSF_Endcap_[7] = ElecGSFTrackEta;
609  Var_wGwoGSF_Endcap_[8] = TauEtaAtEcalEntrance;
610  Var_wGwoGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
611  Var_wGwoGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
612  Var_wGwoGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
613  Var_wGwoGSF_Endcap_[12] = TauEmFraction;
614  Var_wGwoGSF_Endcap_[13] = TauSignalPFGammaCands;
615  Var_wGwoGSF_Endcap_[14] = TauLeadPFChargedHadrHoP;
616  Var_wGwoGSF_Endcap_[15] = TauLeadPFChargedHadrEoP;
617  Var_wGwoGSF_Endcap_[16] = TauVisMass;
618  Var_wGwoGSF_Endcap_[17] = TauGammaEtaMom;
619  Var_wGwoGSF_Endcap_[18] = TauGammaPhiMom;
620  Var_wGwoGSF_Endcap_[19] = TauGammaEnFrac;
621  Var_wGwoGSF_Endcap_[20] = TaudCrackEta;
623  }
624  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 ) {
625  if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) {
626  Var_wGwGSF_Barrel_[0] = ElecEtotOverPin;
627  Var_wGwGSF_Barrel_[1] = ElecEgammaOverPdif;
628  Var_wGwGSF_Barrel_[2] = ElecFbrem;
629  Var_wGwGSF_Barrel_[3] = ElecChi2GSF;
630  Var_wGwGSF_Barrel_[4] = ElecGSFNumHits;
631  Var_wGwGSF_Barrel_[5] = ElecGSFTrackResol;
632  Var_wGwGSF_Barrel_[6] = ElecGSFTracklnPt;
633  Var_wGwGSF_Barrel_[7] = ElecGSFTrackEta;
634  Var_wGwGSF_Barrel_[8] = TauEtaAtEcalEntrance;
635  Var_wGwGSF_Barrel_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
636  Var_wGwGSF_Barrel_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
637  Var_wGwGSF_Barrel_[11] = std::log(std::max(float(1.), TauPt));
638  Var_wGwGSF_Barrel_[12] = TauEmFraction;
639  Var_wGwGSF_Barrel_[13] = TauSignalPFGammaCands;
640  Var_wGwGSF_Barrel_[14] = TauLeadPFChargedHadrHoP;
641  Var_wGwGSF_Barrel_[15] = TauLeadPFChargedHadrEoP;
642  Var_wGwGSF_Barrel_[16] = TauVisMass;
643  Var_wGwGSF_Barrel_[17] = TauHadrMva;
644  Var_wGwGSF_Barrel_[18] = TauGammaEtaMom;
645  Var_wGwGSF_Barrel_[19] = TauGammaPhiMom;
646  Var_wGwGSF_Barrel_[20] = TauGammaEnFrac;
647  Var_wGwGSF_Barrel_[21] = TauGSFChi2;
648  Var_wGwGSF_Barrel_[22] = TauNumHitsVariable;
649  Var_wGwGSF_Barrel_[23] = TauGSFTrackResol;
650  Var_wGwGSF_Barrel_[24] = TauGSFTracklnPt;
651  Var_wGwGSF_Barrel_[25] = TauGSFTrackEta;
652  Var_wGwGSF_Barrel_[26] = TaudCrackEta;
653  Var_wGwGSF_Barrel_[27] = TaudCrackPhi;
655  } else {
656  Var_wGwGSF_Endcap_[0] = ElecEtotOverPin;
657  Var_wGwGSF_Endcap_[1] = ElecEgammaOverPdif;
658  Var_wGwGSF_Endcap_[2] = ElecFbrem;
659  Var_wGwGSF_Endcap_[3] = ElecChi2GSF;
660  Var_wGwGSF_Endcap_[4] = ElecGSFNumHits;
661  Var_wGwGSF_Endcap_[5] = ElecGSFTrackResol;
662  Var_wGwGSF_Endcap_[6] = ElecGSFTracklnPt;
663  Var_wGwGSF_Endcap_[7] = ElecGSFTrackEta;
664  Var_wGwGSF_Endcap_[8] = TauEtaAtEcalEntrance;
665  Var_wGwGSF_Endcap_[9] = TauLeadChargedPFCandEtaAtEcalEntrance;
666  Var_wGwGSF_Endcap_[10] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt));
667  Var_wGwGSF_Endcap_[11] = std::log(std::max(float(1.), TauPt));
668  Var_wGwGSF_Endcap_[12] = TauEmFraction;
669  Var_wGwGSF_Endcap_[13] = TauSignalPFGammaCands;
670  Var_wGwGSF_Endcap_[14] = TauLeadPFChargedHadrHoP;
671  Var_wGwGSF_Endcap_[15] = TauLeadPFChargedHadrEoP;
672  Var_wGwGSF_Endcap_[16] = TauVisMass;
673  Var_wGwGSF_Endcap_[17] = TauHadrMva;
674  Var_wGwGSF_Endcap_[18] = TauGammaEtaMom;
675  Var_wGwGSF_Endcap_[19] = TauGammaPhiMom;
676  Var_wGwGSF_Endcap_[20] = TauGammaEnFrac;
677  Var_wGwGSF_Endcap_[21] = TauGSFChi2;
678  Var_wGwGSF_Endcap_[22] = TauNumHitsVariable;
679  Var_wGwGSF_Endcap_[23] = TauGSFTrackResol;
680  Var_wGwGSF_Endcap_[24] = TauGSFTracklnPt;
681  Var_wGwGSF_Endcap_[25] = TauGSFTrackEta;
682  Var_wGwGSF_Endcap_[26] = TaudCrackEta;
684  }
685  }
686  return mvaValue;
687 }
688 
690  const reco::GsfElectron& theGsfEle)
691 
692 {
693  Float_t TauEtaAtEcalEntrance = -99.;
694  float sumEtaTimesEnergy = 0.;
695  float sumEnergy = 0.;
696  const std::vector<reco::PFCandidatePtr>& signalPFCands = thePFTau.signalPFCands();
697  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
698  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
699  sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy();
700  sumEnergy += (*pfCandidate)->energy();
701  }
702  if ( sumEnergy > 0. ) {
703  TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
704  }
705 
706  float TauLeadChargedPFCandEtaAtEcalEntrance = -99.;
707  float TauLeadChargedPFCandPt = -99.;
708  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
709  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
710  const reco::Track* track = nullptr;
711  if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get();
712  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get();
713  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get();
714  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get();
715  else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get();
716  if ( track ) {
717  if ( track->pt() > TauLeadChargedPFCandPt ) {
718  TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta();
719  TauLeadChargedPFCandPt = track->pt();
720  }
721  }
722  }
723 
724  Float_t TauPt = thePFTau.pt();
725  Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.);
726  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
727  Float_t TauLeadPFChargedHadrHoP = 0.;
728  Float_t TauLeadPFChargedHadrEoP = 0.;
729  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
730  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
731  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
732  }
733  Float_t TauVisMass = thePFTau.mass();
734  Float_t TauHadrMva = std::max(thePFTau.electronPreIDOutput(), float(-1.0));
735  std::vector<Float_t> GammasdEta;
736  std::vector<Float_t> GammasdPhi;
737  std::vector<Float_t> GammasPt;
738  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
740  if ( thePFTau.leadChargedHadrCand().isNonnull() ) {
741  GammasdEta.push_back(gamma->eta() - thePFTau.leadChargedHadrCand()->eta());
742  GammasdPhi.push_back(gamma->phi() - thePFTau.leadChargedHadrCand()->phi());
743  } else {
744  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
745  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
746  }
747  GammasPt.push_back(gamma->pt());
748  }
749  Float_t TauKFNumHits = -99.;
750  if ( (thePFTau.leadPFChargedHadrCand()->trackRef()).isNonnull() ) {
751  TauKFNumHits = thePFTau.leadPFChargedHadrCand()->trackRef()->numberOfValidHits();
752  }
753  Float_t TauGSFNumHits = -99.;
754  Float_t TauGSFChi2 = -99.;
755  Float_t TauGSFTrackResol = -99.;
756  Float_t TauGSFTracklnPt = -99.;
757  Float_t TauGSFTrackEta = -99.;
758  if ( (thePFTau.leadPFChargedHadrCand()->gsfTrackRef()).isNonnull() ) {
759  TauGSFChi2 = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->normalizedChi2();
760  TauGSFNumHits = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->numberOfValidHits();
761  if ( thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt() > 0. ) {
762  TauGSFTrackResol = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->ptError()/thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt();
763  TauGSFTracklnPt = log(thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt())*M_LN10;
764  }
765  TauGSFTrackEta = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->eta();
766  }
767  Float_t TauPhi = thePFTau.phi();
768  float sumPhiTimesEnergy = 0.;
769  float sumEnergyPhi = 0.;
770  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
771  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
772  sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy();
773  sumEnergyPhi += (*pfCandidate)->energy();
774  }
775  if ( sumEnergyPhi > 0. ) {
776  TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
777  }
778  Float_t TaudCrackPhi = dCrackPhi(TauPhi, TauEtaAtEcalEntrance);
779  Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance);
780  Float_t TauSignalPFChargedCands = thePFTau.signalChargedHadrCands().size();
781  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
782 
783  Float_t ElecEta = theGsfEle.eta();
784  Float_t ElecPhi = theGsfEle.phi();
785  Float_t ElecPt = theGsfEle.pt();
786  //Variables related to the electron Cluster
787  Float_t ElecEe = 0.;
788  Float_t ElecEgamma = 0.;
789  reco::SuperClusterRef pfSuperCluster = theGsfEle.parentSuperCluster();
790  if ( pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable() ) {
791  for ( reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin();
792  pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) {
793  double pfClusterEn = (*pfCluster)->energy();
794  if ( pfCluster == pfSuperCluster->clustersBegin() ) ElecEe += pfClusterEn;
795  else ElecEgamma += pfClusterEn;
796  }
797  }
798  Float_t ElecPin = std::sqrt(theGsfEle.trackMomentumAtVtx().Mag2());
799  Float_t ElecPout = std::sqrt(theGsfEle.trackMomentumOut().Mag2());
800  Float_t ElecFbrem = theGsfEle.fbrem();
801  //Variables related to the GsfTrack
802  Float_t ElecChi2GSF = -99.;
803  Float_t ElecGSFNumHits = -99.;
804  Float_t ElecGSFTrackResol = -99.;
805  Float_t ElecGSFTracklnPt = -99.;
806  Float_t ElecGSFTrackEta = -99.;
807  if ( theGsfEle.gsfTrack().isNonnull() ) {
808  ElecChi2GSF = (theGsfEle).gsfTrack()->normalizedChi2();
809  ElecGSFNumHits = (theGsfEle).gsfTrack()->numberOfValidHits();
810  if ( theGsfEle.gsfTrack()->pt() > 0. ) {
811  ElecGSFTrackResol = theGsfEle.gsfTrack()->ptError()/theGsfEle.gsfTrack()->pt();
812  ElecGSFTracklnPt = log(theGsfEle.gsfTrack()->pt())*M_LN10;
813  }
814  ElecGSFTrackEta = theGsfEle.gsfTrack()->eta();
815  }
816 
817  return MVAValue(TauEtaAtEcalEntrance,
818  TauPt,
819  TauLeadChargedPFCandEtaAtEcalEntrance,
820  TauLeadChargedPFCandPt,
821  TaudCrackEta,
822  TaudCrackPhi,
823  TauEmFraction,
824  TauSignalPFGammaCands,
825  TauLeadPFChargedHadrHoP,
826  TauLeadPFChargedHadrEoP,
827  TauVisMass,
828  TauHadrMva,
829  GammasdEta,
830  GammasdPhi,
831  GammasPt,
832  TauKFNumHits,
833  TauGSFNumHits,
834  TauGSFChi2,
835  TauGSFTrackResol,
836  TauGSFTracklnPt,
837  TauGSFTrackEta,
838  TauPhi,
839  TauSignalPFChargedCands,
840  TauHasGsf,
841  ElecEta,
842  ElecPhi,
843  ElecPt,
844  ElecEe,
845  ElecEgamma,
846  ElecPin,
847  ElecPout,
848  ElecFbrem,
849  ElecChi2GSF,
850  ElecGSFNumHits,
851  ElecGSFTrackResol,
852  ElecGSFTracklnPt,
853  ElecGSFTrackEta);
854 }
855 
857 {
858  Float_t TauEtaAtEcalEntrance = -99.;
859  float sumEtaTimesEnergy = 0.;
860  float sumEnergy = 0.;
861  const std::vector<reco::PFCandidatePtr>& signalPFCands = thePFTau.signalPFCands();
862  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
863  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
864  sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy();
865  sumEnergy += (*pfCandidate)->energy();
866  }
867  if ( sumEnergy > 0. ) {
868  TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
869  }
870 
871  float TauLeadChargedPFCandEtaAtEcalEntrance = -99.;
872  float TauLeadChargedPFCandPt = -99.;
873  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
874  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
875  const reco::Track* track = nullptr;
876  if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get();
877  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get();
878  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get();
879  else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get();
880  else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get();
881  if ( track ) {
882  if ( track->pt() > TauLeadChargedPFCandPt ) {
883  TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta();
884  TauLeadChargedPFCandPt = track->pt();
885  }
886  }
887  }
888 
889  Float_t TauPt = thePFTau.pt();
890  Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.);
891  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
892  Float_t TauLeadPFChargedHadrHoP = 0.;
893  Float_t TauLeadPFChargedHadrEoP = 0.;
894  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
895  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
896  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
897  }
898  Float_t TauVisMass = thePFTau.mass();
899  Float_t TauHadrMva = std::max(thePFTau.electronPreIDOutput(),float(-1.0));
900  std::vector<Float_t> GammasdEta;
901  std::vector<Float_t> GammasdPhi;
902  std::vector<Float_t> GammasPt;
903  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
905  if ( thePFTau.leadChargedHadrCand().isNonnull() ) {
906  GammasdEta.push_back(gamma->eta() - thePFTau.leadChargedHadrCand()->eta());
907  GammasdPhi.push_back(gamma->phi() - thePFTau.leadChargedHadrCand()->phi());
908  } else {
909  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
910  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
911  }
912  GammasPt.push_back(gamma->pt());
913  }
914  Float_t TauKFNumHits = -99.;
915  if ( (thePFTau.leadPFChargedHadrCand()->trackRef()).isNonnull() ) {
916  TauKFNumHits = thePFTau.leadPFChargedHadrCand()->trackRef()->numberOfValidHits();
917  }
918  Float_t TauGSFNumHits = -99.;
919  Float_t TauGSFChi2 = -99.;
920  Float_t TauGSFTrackResol = -99.;
921  Float_t TauGSFTracklnPt = -99.;
922  Float_t TauGSFTrackEta = -99.;
923  if ( (thePFTau.leadPFChargedHadrCand()->gsfTrackRef()).isNonnull() ) {
924  TauGSFChi2 = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->normalizedChi2();
925  TauGSFNumHits = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->numberOfValidHits();
926  if ( thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt() > 0. ) {
927  TauGSFTrackResol = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->ptError()/thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt();
928  TauGSFTracklnPt = log(thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->pt())*M_LN10;
929  }
930  TauGSFTrackEta = thePFTau.leadPFChargedHadrCand()->gsfTrackRef()->eta();
931  }
932  Float_t TauPhi = thePFTau.phi();
933  float sumPhiTimesEnergy = 0.;
934  float sumEnergyPhi = 0.;
935  for ( std::vector<reco::PFCandidatePtr>::const_iterator pfCandidate = signalPFCands.begin();
936  pfCandidate != signalPFCands.end(); ++pfCandidate ) {
937  sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy();
938  sumEnergyPhi += (*pfCandidate)->energy();
939  }
940  if ( sumEnergyPhi > 0. ) {
941  TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
942  }
943  Float_t TaudCrackPhi = dCrackPhi(TauPhi,TauEtaAtEcalEntrance) ;
944  Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance) ;
945  Float_t TauSignalPFChargedCands = thePFTau.signalChargedHadrCands().size();
946  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
947 
948  Float_t dummyElecEta = 9.9;
949 
950  return MVAValue(TauEtaAtEcalEntrance,
951  TauPt,
952  TauLeadChargedPFCandEtaAtEcalEntrance,
953  TauLeadChargedPFCandPt,
954  TaudCrackEta,
955  TaudCrackPhi,
956  TauEmFraction,
957  TauSignalPFGammaCands,
958  TauLeadPFChargedHadrHoP,
959  TauLeadPFChargedHadrEoP,
960  TauVisMass,
961  TauHadrMva,
962  GammasdEta,
963  GammasdPhi,
964  GammasPt,
965  TauKFNumHits,
966  TauGSFNumHits,
967  TauGSFChi2,
968  TauGSFTrackResol,
969  TauGSFTracklnPt,
970  TauGSFTrackEta,
971  TauPhi,
972  TauSignalPFChargedCands,
973  TauHasGsf,
974  dummyElecEta,
975  0.,
976  0.,
977  0.,
978  0.,
979  0.,
980  0.,
981  0.,
982  0.,
983  0.,
984  0.,
985  0.,
986  0.);
987 }
988 
989 double AntiElectronIDMVA5::minimum(double a, double b)
990 {
991  if ( std::abs(b) < std::abs(a) ) return b;
992  else return a;
993 }
994 
995 
996 #include<array>
997 namespace {
998 
999  // IN: define locations of the 18 phi-cracks
1000  std::array<double,18> fill_cPhi() {
1001  constexpr double pi = M_PI; // 3.14159265358979323846;
1002  std::array<double,18> cPhi;
1003  // IN: define locations of the 18 phi-cracks
1004  cPhi[0] = 2.97025;
1005  for ( unsigned iCrack = 1; iCrack <= 17; ++iCrack )
1006  cPhi[iCrack] = cPhi[0] - 2.*iCrack*pi/18;
1007  return cPhi;
1008  }
1009 
1010  const std::array<double,18> cPhi = fill_cPhi();
1011 
1012 }
1013 
1014 
1015 
1016 double AntiElectronIDMVA5::dCrackPhi(double phi, double eta)
1017 {
1018 //--- compute the (unsigned) distance to the closest phi-crack in the ECAL barrel
1019 
1020  constexpr double pi = M_PI; // 3.14159265358979323846;
1021 
1022  // IN: shift of this location if eta < 0
1023  constexpr double delta_cPhi = 0.00638;
1024 
1025  double retVal = 99.;
1026 
1027  if ( eta >= -1.47464 && eta <= 1.47464 ) {
1028 
1029  // the location is shifted
1030  if ( eta < 0. ) phi += delta_cPhi;
1031 
1032  // CV: need to bring-back phi into interval [-pi,+pi]
1033  if ( phi > pi ) phi -= 2.*pi;
1034  if ( phi < -pi ) phi += 2.*pi;
1035 
1036  if ( phi >= -pi && phi <= pi ) {
1037 
1038  // the problem of the extrema:
1039  if ( phi < cPhi[17] || phi >= cPhi[0] ) {
1040  if ( phi < 0. ) phi += 2.*pi;
1041  retVal = minimum(phi - cPhi[0], phi - cPhi[17] - 2.*pi);
1042  } else {
1043  // between these extrema...
1044  bool OK = false;
1045  unsigned iCrack = 16;
1046  while( !OK ) {
1047  if ( phi < cPhi[iCrack] ) {
1048  retVal = minimum(phi - cPhi[iCrack + 1], phi - cPhi[iCrack]);
1049  OK = true;
1050  } else {
1051  iCrack -= 1;
1052  }
1053  }
1054  }
1055  } else {
1056  retVal = 0.; // IN: if there is a problem, we assume that we are in a crack
1057  }
1058  } else {
1059  return -99.;
1060  }
1061 
1062  return std::abs(retVal);
1063 }
1064 
1066 {
1067 //--- compute the (unsigned) distance to the closest eta-crack in the ECAL barrel
1068 
1069  // IN: define locations of the eta-cracks
1070  double cracks[5] = { 0., 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00 };
1071 
1072  double retVal = 99.;
1073 
1074  for ( int iCrack = 0; iCrack < 5 ; ++iCrack ) {
1075  double d = minimum(eta - cracks[iCrack], eta + cracks[iCrack]);
1076  if ( std::abs(d) < std::abs(retVal) ) {
1077  retVal = d;
1078  }
1079  }
1080 
1081  return std::abs(retVal);
1082 }
const GBRForest * mva_woGwGSF_BL_
bool isAvailable() const
Definition: Ref.h:575
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:186
Float_t * Var_NoEleMatch_woGwoGSF_Endcap_
Float_t * Var_NoEleMatch_wGwoGSF_Barrel_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
double eta() const final
momentum pseudorapidity
virtual SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:190
const GBRForest * mva_woGwoGSF_BL_
double minimum(double a, double b)
edm::FileInPath inputFileName_
const GBRForest * mva_wGwoGSF_EC_
std::string mvaName_woGwoGSF_BL_
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:295
#define nullptr
const GBRForest * mva_NoEleMatch_woGwGSF_EC_
std::string mvaName_NoEleMatch_woGwoGSF_EC_
bool exists(std::string const &parameterName) const
checks if a parameter exists
double pt() const final
transverse momentum
float emFraction() const
Definition: PFTau.cc:330
float fbrem() const
Definition: GsfElectron.h:772
Float_t * Var_NoEleMatch_woGwoGSF_Barrel_
std::string mvaName_NoEleMatch_woGwGSF_BL_
const GBRForest * mva_NoEleMatch_wGwGSF_EC_
const Double_t pi
std::string mvaName_woGwoGSF_EC_
std::string mvaName_NoEleMatch_woGwGSF_EC_
std::string mvaName_wGwoGSF_EC_
const GBRForest * mva_NoEleMatch_woGwoGSF_EC_
void beginEvent(const edm::Event &, const edm::EventSetup &)
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:690
const GBRForest * mva_woGwoGSF_EC_
const GBRForest * mva_NoEleMatch_wGwGSF_BL_
const GBRForest * mva_NoEleMatch_woGwoGSF_BL_
const CandidatePtr & leadChargedHadrCand() const
Definition: PFTau.cc:67
T sqrt(T t)
Definition: SSEVec.h:18
std::string mvaName_wGwoGSF_BL_
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:297
double pt() const
track transverse momentum
Definition: TrackBase.h:660
std::string mvaName_woGwGSF_EC_
std::string mvaName_woGwGSF_BL_
const GBRForest * mva_woGwGSF_EC_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::string mvaName_wGwGSF_EC_
std::string mvaName_NoEleMatch_wGwoGSF_BL_
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
Definition: PFTau.cc:172
Float_t * Var_NoEleMatch_woGwGSF_Endcap_
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< TFile * > inputFilesToDelete_
LocationCode location() const
Where was the file found?
Definition: FileInPath.cc:161
std::string mvaName_NoEleMatch_woGwoGSF_BL_
double dCrackEta(double eta)
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
#define M_PI
const GBRForest * mva_wGwoGSF_BL_
std::string mvaName_wGwGSF_BL_
std::pair< int, edm::FunctionWithDict > OK
Definition: findMethod.cc:136
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPt, Float_t TauLeadChargedPFCandEtaAtEcalEntrance, Float_t TauLeadChargedPFCandPt, Float_t TaudCrackEta, Float_t TaudCrackPhi, Float_t TauEmFraction, Float_t TauSignalPFGammaCands, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauVisMass, Float_t TauHadrMva, const std::vector< Float_t > &GammasdEta, const std::vector< Float_t > &GammasdPhi, const std::vector< Float_t > &GammasPt, Float_t TauKFNumHits, Float_t TauGSFNumHits, Float_t TauGSFChi2, Float_t TauGSFTrackResol, Float_t TauGSFTracklnPt, Float_t TauGSFTrackEta, Float_t TauPhi, Float_t TauSignalPFChargedCands, Float_t TauHasGsf, Float_t ElecEta, Float_t ElecPhi, Float_t ElecPt, Float_t ElecEe, Float_t ElecEgamma, Float_t ElecPin, Float_t ElecPout, Float_t ElecFbrem, Float_t ElecChi2GSF, Float_t ElecGSFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecGSFTrackEta)
const GBRForest * mva_NoEleMatch_woGwGSF_BL_
const GBRForest * mva_NoEleMatch_wGwoGSF_BL_
std::string mvaName_NoEleMatch_wGwGSF_BL_
Float_t * Var_NoEleMatch_woGwGSF_Barrel_
const GBRForest * mva_wGwGSF_BL_
double b
Definition: hdecay.h:120
Float_t * Var_NoEleMatch_wGwGSF_Endcap_
const std::vector< reco::CandidatePtr > & signalChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:80
const GBRForest * mva_NoEleMatch_wGwoGSF_EC_
const GBRForest * mva_wGwGSF_EC_
double a
Definition: hdecay.h:121
double dCrackPhi(double phi, double eta)
T get() const
Definition: EventSetup.h:71
std::string mvaName_NoEleMatch_wGwoGSF_EC_
std::string fullPath() const
Definition: FileInPath.cc:163
std::string mvaName_NoEleMatch_wGwGSF_EC_
Float_t * Var_NoEleMatch_wGwGSF_Barrel_
const PFCandidatePtr leadPFChargedHadrCand() const
Getters for different PFCandidates for PFTaus made from PFCandidates.
Definition: PFTau.cc:154
AntiElectronIDMVA5(const edm::ParameterSet &)
double GetClassifier(const float *vector) const
Definition: GBRForest.h:36
float electronPreIDOutput() const
Definition: PFTau.cc:337
double phi() const final
momentum azimuthal angle
T const * product() const
Definition: ESHandle.h:86
Float_t * Var_NoEleMatch_wGwoGSF_Endcap_
#define constexpr
double mass() const final
mass
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Definition: PFTau.cc:193