7 : isInitialized_(kFALSE),
10 for (
unsigned i = 0;
i < 16; ++
i ) {
19 for (
unsigned i = 0;
i < 16; ++
i ) {
43 const std::string& oneProngNoEleMatch0Pi0woGSF_BL,
44 const std::string& oneProngNoEleMatch0Pi0wGSF_BL,
45 const std::string& oneProngNoEleMatch1Pi0woGSF_BL,
46 const std::string& oneProngNoEleMatch1Pi0wGSF_BL,
47 const std::string& oneProng0Pi0woGSF_BL,
48 const std::string& oneProng0Pi0wGSF_BL,
49 const std::string& oneProng1Pi0woGSF_BL,
50 const std::string& oneProng1Pi0wGSF_BL,
51 const std::string& oneProngNoEleMatch0Pi0woGSF_EC,
52 const std::string& oneProngNoEleMatch0Pi0wGSF_EC,
53 const std::string& oneProngNoEleMatch1Pi0woGSF_EC,
54 const std::string& oneProngNoEleMatch1Pi0wGSF_EC,
55 const std::string& oneProng0Pi0woGSF_EC,
56 const std::string& oneProng0Pi0wGSF_EC,
57 const std::string& oneProng1Pi0woGSF_EC,
58 const std::string& oneProng1Pi0wGSF_EC)
60 for (
unsigned i = 0;
i < 16; ++
i ) {
89 const std::string& oneProngNoEleMatch0Pi0woGSF_BL,
90 const std::string& oneProngNoEleMatch0Pi0wGSF_BL,
91 const std::string& oneProngNoEleMatch1Pi0woGSF_BL,
92 const std::string& oneProngNoEleMatch1Pi0wGSF_BL,
93 const std::string& oneProng0Pi0woGSF_BL,
94 const std::string& oneProng0Pi0wGSF_BL,
95 const std::string& oneProng1Pi0woGSF_BL,
96 const std::string& oneProng1Pi0wGSF_BL,
97 const std::string& oneProngNoEleMatch0Pi0woGSF_EC,
98 const std::string& oneProngNoEleMatch0Pi0wGSF_EC,
99 const std::string& oneProngNoEleMatch1Pi0woGSF_EC,
100 const std::string& oneProngNoEleMatch1Pi0wGSF_EC,
101 const std::string& oneProng0Pi0woGSF_EC,
102 const std::string& oneProng0Pi0wGSF_EC,
103 const std::string& oneProng1Pi0woGSF_EC,
104 const std::string& oneProng1Pi0wGSF_EC)
106 for (
unsigned i = 0;
i < 16; ++
i ) {
171 TMVA::Reader *readerNoEleMatchwoGwoGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
173 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
174 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
175 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
176 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
177 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
178 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
179 readerNoEleMatchwoGwoGSF_BL->AddVariable(
"Tau_dCrackPhi",&
Tau_dCrackPhi_);
180 readerNoEleMatchwoGwoGSF_BL->SetVerbose(
verbosity_);
182 TMVA::Reader *readerNoEleMatchwoGwGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
184 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
185 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
186 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
187 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
188 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
189 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
190 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
191 readerNoEleMatchwoGwGSF_BL->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
194 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_GSFTrackEta",&
Tau_GSFTrackEta_);
195 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
196 readerNoEleMatchwoGwGSF_BL->AddVariable(
"Tau_dCrackPhi",&
Tau_dCrackPhi_);
197 readerNoEleMatchwoGwGSF_BL->SetVerbose(
verbosity_);
199 TMVA::Reader *readerNoEleMatchwGwoGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
201 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
202 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
204 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
205 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
206 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
207 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_GammaEtaMom",&
Tau_GammaEtaMom_);
208 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_GammaPhiMom",&
Tau_GammaPhiMom_);
209 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_GammaEnFrac",&
Tau_GammaEnFrac_);
210 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
211 readerNoEleMatchwGwoGSF_BL->AddVariable(
"Tau_dCrackPhi",&
Tau_dCrackPhi_);
212 readerNoEleMatchwGwoGSF_BL->SetVerbose(
verbosity_);
214 TMVA::Reader *readerNoEleMatchwGwGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
216 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
217 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
219 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
220 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
221 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
222 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
223 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_GammaEtaMom",&
Tau_GammaEtaMom_);
224 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_GammaPhiMom",&
Tau_GammaPhiMom_);
225 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_GammaEnFrac",&
Tau_GammaEnFrac_);
226 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
227 readerNoEleMatchwGwGSF_BL->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
230 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_GSFTrackEta",&
Tau_GSFTrackEta_);
231 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
232 readerNoEleMatchwGwGSF_BL->AddVariable(
"Tau_dCrackPhi",&
Tau_dCrackPhi_);
233 readerNoEleMatchwGwGSF_BL->SetVerbose(
verbosity_);
235 TMVA::Reader *readerwoGwoGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
238 readerwoGwoGSF_BL->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
239 readerwoGwoGSF_BL->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
245 readerwoGwoGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
247 readerwoGwoGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
248 readerwoGwoGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
249 readerwoGwoGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
254 TMVA::Reader *readerwoGwGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
257 readerwoGwGSF_BL->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
258 readerwoGwGSF_BL->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
264 readerwoGwGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
266 readerwoGwGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
267 readerwoGwGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
268 readerwoGwGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
269 readerwoGwGSF_BL->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
270 readerwoGwGSF_BL->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
271 readerwoGwGSF_BL->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
279 TMVA::Reader *readerwGwoGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
282 readerwGwoGSF_BL->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
283 readerwGwoGSF_BL->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
289 readerwGwoGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
292 readerwGwoGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
293 readerwGwoGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
294 readerwGwoGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
302 TMVA::Reader *readerwGwGSF_BL =
new TMVA::Reader(
"!Color:Silent:Error" );
305 readerwGwGSF_BL->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
312 readerwGwGSF_BL->AddVariable(
"Tau_Pt",&
Tau_Pt_);
315 readerwGwGSF_BL->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
316 readerwGwGSF_BL->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
317 readerwGwGSF_BL->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
318 readerwGwGSF_BL->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
322 readerwGwGSF_BL->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
323 readerwGwGSF_BL->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
333 TMVA::Reader *readerNoEleMatchwoGwoGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
335 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
336 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
337 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
338 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
339 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
340 readerNoEleMatchwoGwoGSF_EC->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
341 readerNoEleMatchwoGwoGSF_EC->SetVerbose(
verbosity_);
343 TMVA::Reader *readerNoEleMatchwoGwGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
345 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
346 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
347 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
348 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
349 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
350 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
351 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
352 readerNoEleMatchwoGwGSF_EC->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
355 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_GSFTrackEta",&
Tau_GSFTrackEta_);
356 readerNoEleMatchwoGwGSF_EC->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
357 readerNoEleMatchwoGwGSF_EC->SetVerbose(
verbosity_);
359 TMVA::Reader *readerNoEleMatchwGwoGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
361 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
362 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
364 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
365 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
366 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
367 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_GammaEtaMom",&
Tau_GammaEtaMom_);
368 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_GammaPhiMom",&
Tau_GammaPhiMom_);
369 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_GammaEnFrac",&
Tau_GammaEnFrac_);
370 readerNoEleMatchwGwoGSF_EC->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
371 readerNoEleMatchwGwoGSF_EC->SetVerbose(
verbosity_);
373 TMVA::Reader *readerNoEleMatchwGwGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
375 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
376 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_EmFraction",&
Tau_EmFraction_);
378 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
379 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
380 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
381 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
382 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_GammaEtaMom",&
Tau_GammaEtaMom_);
383 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_GammaPhiMom",&
Tau_GammaPhiMom_);
384 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_GammaEnFrac",&
Tau_GammaEnFrac_);
385 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
386 readerNoEleMatchwGwGSF_EC->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
389 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_GSFTrackEta",&
Tau_GSFTrackEta_);
390 readerNoEleMatchwGwGSF_EC->AddVariable(
"Tau_dCrackEta",&
Tau_dCrackEta_);
391 readerNoEleMatchwGwGSF_EC->SetVerbose(
verbosity_);
393 TMVA::Reader *readerwoGwoGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
396 readerwoGwoGSF_EC->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
397 readerwoGwoGSF_EC->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
403 readerwoGwoGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
405 readerwoGwoGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
406 readerwoGwoGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
407 readerwoGwoGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
411 TMVA::Reader *readerwoGwGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
414 readerwoGwGSF_EC->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
415 readerwoGwGSF_EC->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
421 readerwoGwGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
423 readerwoGwGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
424 readerwoGwGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
425 readerwoGwGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
426 readerwoGwGSF_EC->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
427 readerwoGwGSF_EC->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
428 readerwoGwGSF_EC->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
435 TMVA::Reader *readerwGwoGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
438 readerwGwoGSF_EC->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
439 readerwGwoGSF_EC->AddVariable(
"Elec_Chi2GSF",&
Elec_Chi2GSF_);
445 readerwGwoGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
448 readerwGwoGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
449 readerwGwoGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
450 readerwGwoGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
457 TMVA::Reader *readerwGwGSF_EC =
new TMVA::Reader(
"!Color:Silent:Error" );
460 readerwGwGSF_EC->AddVariable(
"Elec_Fbrem",&
Elec_Fbrem_);
467 readerwGwGSF_EC->AddVariable(
"Tau_Pt",&
Tau_Pt_);
470 readerwGwGSF_EC->AddVariable(
"Tau_HadrHoP",&
Tau_HadrHoP_);
471 readerwGwGSF_EC->AddVariable(
"Tau_HadrEoP",&
Tau_HadrEoP_);
472 readerwGwGSF_EC->AddVariable(
"Tau_VisMass",&
Tau_VisMass_);
473 readerwGwGSF_EC->AddVariable(
"Tau_HadrMva",&
Tau_HadrMva_);
477 readerwGwGSF_EC->AddVariable(
"Tau_GSFChi2",&
Tau_GSFChi2_);
478 readerwGwGSF_EC->AddVariable(
"(Tau_GSFNumHits - Tau_KFNumHits)/(Tau_GSFNumHits + Tau_KFNumHits)",&
Tau_NumHitsVariable_);
506 Float_t TaudCrackEta,
507 Float_t TaudCrackPhi,
508 Float_t TauEmFraction,
509 Float_t TauSignalPFGammaCands,
510 Float_t TauLeadPFChargedHadrHoP,
511 Float_t TauLeadPFChargedHadrEoP,
514 const std::vector<Float_t>& GammasdEta,
515 const std::vector<Float_t>& GammasdPhi,
516 const std::vector<Float_t>& GammasPt,
517 Float_t TauKFNumHits,
518 Float_t TauGSFNumHits,
520 Float_t TauGSFTrackResol,
521 Float_t TauGSFTracklnPt,
522 Float_t TauGSFTrackEta,
524 Float_t TauSignalPFChargedCands,
535 Float_t ElecGSFNumHits,
536 Float_t ElecGSFTrackResol,
537 Float_t ElecGSFTracklnPt,
538 Float_t ElecGSFTrackEta)
546 for (
unsigned int i = 0 ;
i < GammasPt.size() ; ++
i ) {
547 double pt_i = GammasPt[
i];
548 double phi_i = GammasdPhi[
i];
551 double eta_i = GammasdEta[
i];
553 sumPt2 += (pt_i*pt_i);
554 dEta += (pt_i*eta_i);
555 dEta2 += (pt_i*eta_i*eta_i);
556 dPhi += (pt_i*phi_i);
557 dPhi2 += (pt_i*phi_i*phi_i);
560 Float_t TauGammaEnFrac = sumPt/TauPt;
569 Float_t TauGammaEtaMom = TMath::Sqrt(dEta2)*TMath::Sqrt(TauGammaEnFrac)*TauPt;
570 Float_t TauGammaPhiMom = TMath::Sqrt(dPhi2)*TMath::Sqrt(TauGammaEnFrac)*TauPt;
572 return MVAValue(TauEtaAtEcalEntrance,
577 TauSignalPFGammaCands,
578 TauLeadPFChargedHadrHoP,
579 TauLeadPFChargedHadrEoP,
592 TauSignalPFChargedCands,
611 Float_t TaudCrackEta,
612 Float_t TaudCrackPhi,
613 Float_t TauEmFraction,
614 Float_t TauSignalPFGammaCands,
615 Float_t TauLeadPFChargedHadrHoP,
616 Float_t TauLeadPFChargedHadrEoP,
619 Float_t TauGammaEtaMom,
620 Float_t TauGammaPhiMom,
621 Float_t TauGammaEnFrac,
622 Float_t TauKFNumHits,
623 Float_t TauGSFNumHits,
625 Float_t TauGSFTrackResol,
626 Float_t TauGSFTracklnPt,
627 Float_t TauGSFTrackEta,
629 Float_t TauSignalPFChargedCands,
640 Float_t ElecGSFNumHits,
641 Float_t ElecGSFTrackResol,
642 Float_t ElecGSFTracklnPt,
643 Float_t ElecGSFTrackEta)
680 if ( TauSignalPFChargedCands == 3 ) mva = 1.0;
681 else if (
deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf < 0.5) {
685 else if (
deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands == 0 && TauHasGsf > 0.5) {
689 else if (
deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf < 0.5) {
693 else if (
deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCands > 0 && TauHasGsf > 0.5) {
697 else if ( TauSignalPFGammaCands == 0 && TauHasGsf < 0.5) {
701 else if ( TauSignalPFGammaCands == 0 && TauHasGsf > 0.5) {
705 else if ( TauSignalPFGammaCands > 0 && TauHasGsf < 0.5) {
709 else if ( TauSignalPFGammaCands > 0 && TauHasGsf > 0.5) {
721 Float_t TauEtaAtEcalEntrance = -99.;
722 float sumEtaTimesEnergy = 0;
726 sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
727 sumEnergy += pfcandidate->energy();
729 if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
731 Float_t TauPt = thePFTau.
pt();
734 Float_t TauLeadPFChargedHadrHoP = 0.;
735 Float_t TauLeadPFChargedHadrEoP = 0.;
740 Float_t TauVisMass = thePFTau.
mass();
742 std::vector<Float_t> GammasdEta;
743 std::vector<Float_t> GammasdPhi;
744 std::vector<Float_t> GammasPt;
751 GammasdEta.push_back(gamma->eta() - thePFTau.
eta());
752 GammasdPhi.push_back(gamma->phi() - thePFTau.
phi());
754 GammasPt.push_back(gamma->pt());
756 Float_t TauKFNumHits = -99.;
760 Float_t TauGSFNumHits = -99.;
761 Float_t TauGSFChi2 = -99.;
762 Float_t TauGSFTrackResol = -99.;
763 Float_t TauGSFTracklnPt = -99.;
764 Float_t TauGSFTrackEta = -99.;
774 Float_t TauPhi = thePFTau.
phi();
775 float sumPhiTimesEnergy = 0;
776 float sumEnergyPhi = 0;
779 sumPhiTimesEnergy += pfcandidate->positionAtECALEntrance().phi()*pfcandidate->energy();
780 sumEnergyPhi += pfcandidate->energy();
782 if(sumEnergy>0)TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
783 Float_t TaudCrackPhi =
dCrackPhi(TauPhi,TauEtaAtEcalEntrance) ;
784 Float_t TaudCrackEta =
dCrackEta(TauEtaAtEcalEntrance) ;
788 Float_t ElecEta = theGsfEle.
eta();
789 Float_t ElecPhi = theGsfEle.
phi();
790 Float_t ElecPt = theGsfEle.
pt();
793 Float_t ElecEgamma = 0.;
797 pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) {
798 double pfClusterEn = (*pfCluster)->energy();
799 if ( pfCluster == pfSuperCluster->clustersBegin() ) ElecEe += pfClusterEn;
800 else ElecEgamma += pfClusterEn;
805 Float_t ElecFbrem = theGsfEle.
fbrem();
807 Float_t ElecChi2GSF = -99.;
808 Float_t ElecGSFNumHits = -99.;
809 Float_t ElecGSFTrackResol = -99.;
810 Float_t ElecGSFTracklnPt = -99.;
811 Float_t ElecGSFTrackEta = -99.;
813 ElecChi2GSF = (theGsfEle).gsfTrack()->normalizedChi2();
814 ElecGSFNumHits = (theGsfEle).gsfTrack()->numberOfValidHits();
815 if ( theGsfEle.
gsfTrack()->pt() > 0. ) {
816 ElecGSFTrackResol = theGsfEle.
gsfTrack()->ptError()/theGsfEle.
gsfTrack()->pt();
817 ElecGSFTracklnPt =
log(theGsfEle.
gsfTrack()->pt())*TMath::Ln10();
819 ElecGSFTrackEta = theGsfEle.
gsfTrack()->eta();
822 return MVAValue(TauEtaAtEcalEntrance,
827 TauSignalPFGammaCands,
828 TauLeadPFChargedHadrHoP,
829 TauLeadPFChargedHadrEoP,
842 TauSignalPFChargedCands,
861 Float_t TauEtaAtEcalEntrance = -99.;
862 float sumEtaTimesEnergy = 0;
866 sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
867 sumEnergy += pfcandidate->energy();
869 if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
871 Float_t TauPt = thePFTau.
pt();
874 Float_t TauLeadPFChargedHadrHoP = 0.;
875 Float_t TauLeadPFChargedHadrEoP = 0.;
880 Float_t TauVisMass = thePFTau.
mass();
882 std::vector<Float_t> GammasdEta;
883 std::vector<Float_t> GammasdPhi;
884 std::vector<Float_t> GammasPt;
891 GammasdEta.push_back(gamma->eta() - thePFTau.
eta());
892 GammasdPhi.push_back(gamma->phi() - thePFTau.
phi());
894 GammasPt.push_back(gamma->pt());
896 Float_t TauKFNumHits = -99.;
900 Float_t TauGSFNumHits = -99.;
901 Float_t TauGSFChi2 = -99.;
902 Float_t TauGSFTrackResol = -99.;
903 Float_t TauGSFTracklnPt = -99.;
904 Float_t TauGSFTrackEta = -99.;
914 Float_t TauPhi = thePFTau.
phi();
915 float sumPhiTimesEnergy = 0;
916 float sumEnergyPhi = 0;
919 sumPhiTimesEnergy += pfcandidate->positionAtECALEntrance().phi()*pfcandidate->energy();
920 sumEnergyPhi += pfcandidate->energy();
922 if(sumEnergy>0)TauPhi = sumPhiTimesEnergy/sumEnergyPhi;
923 Float_t TaudCrackPhi =
dCrackPhi(TauPhi,TauEtaAtEcalEntrance) ;
924 Float_t TaudCrackEta =
dCrackEta(TauEtaAtEcalEntrance) ;
928 Float_t dummyElecEta = 9.9;
930 return MVAValue(TauEtaAtEcalEntrance,
935 TauSignalPFGammaCands,
936 TauLeadPFChargedHadrHoP,
937 TauLeadPFChargedHadrEoP,
950 TauSignalPFChargedCands,
970 if(TMath::Abs(b)<TMath::Abs(a))
return b;
981 static std::vector<double> cPhi;
986 for(
unsigned i=1;
i<=17;++
i) cPhi[
i]=cPhi[0]-2*
i*pi/18;
990 double delta_cPhi=0.00638;
994 if (eta>=- 1.47464 && eta<= 1.47464){
997 if(eta<0) phi +=delta_cPhi;
999 if (phi>=-pi && phi<=pi){
1002 if (phi<cPhi[17] || phi>=cPhi[0]){
1003 if (phi<0) phi+= 2*
pi;
1004 m =
minimum(phi -cPhi[0],phi-cPhi[17]-2*pi);
1013 m=
minimum(phi-cPhi[i+1],phi-cPhi[i]);
1030 return TMath::Abs(m);
1038 double cracks[5] = {0, 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00};
1042 for(
int i=0;
i<5;
i++){
1043 double d =
minimum(eta-cracks[
i], eta+cracks[i]);
1044 if (TMath::Abs(d)<TMath::Abs(m)){
1049 return TMath::Abs(m);
Float_t Elec_EgammaOverPdif_
Float_t Elec_EtotOverPin_
math::XYZVectorF trackMomentumAtVtx() const
const PFCandidateRefVector & signalPFChargedHadrCands() const
Charged hadrons in signal region.
virtual double eta() const
momentum pseudorapidity
const PFCandidateRefVector & signalPFCands() const
PFCandidates in signal region.
Float_t Elec_GSFTrackResol_
bool isNonnull() const
Checks for non-null.
virtual double mass() const
mass
void Initialize_from_file(const std::string &methodName, const std::string &oneProngNoEleMatch0Pi0woGSF_BL, const std::string &oneProngNoEleMatch0Pi0wGSF_BL, const std::string &oneProngNoEleMatch1Pi0woGSF_BL, const std::string &oneProngNoEleMatch1Pi0wGSF_BL, const std::string &oneProng0Pi0woGSF_BL, const std::string &oneProng0Pi0wGSF_BL, const std::string &oneProng1Pi0woGSF_BL, const std::string &oneProng1Pi0wGSF_BL, const std::string &oneProngNoEleMatch0Pi0woGSF_EC, const std::string &oneProngNoEleMatch0Pi0wGSF_EC, const std::string &oneProngNoEleMatch1Pi0woGSF_EC, const std::string &oneProngNoEleMatch1Pi0wGSF_EC, const std::string &oneProng0Pi0woGSF_EC, const std::string &oneProng0Pi0wGSF_EC, const std::string &oneProng1Pi0woGSF_EC, const std::string &oneProng1Pi0wGSF_EC)
double dPhi(double phi1, double phi2)
math::XYZVectorF trackMomentumOut() const
double dCrackEta(double eta)
Float_t Tau_NumGammaCands_
Float_t Tau_GSFTrackResol_
Float_t Tau_EtaAtEcalEntrance_
double dCrackPhi(double phi, double eta)
double deltaR(double eta1, double eta2, double phi1, double phi2)
Float_t Tau_NumHitsVariable_
TMVA::Reader * fTMVAReader_[16]
const PFCandidateRef & leadPFChargedHadrCand() const
const PFCandidateRefVector & signalPFGammaCands() const
Gamma candidates in signal region.
virtual double pt() const
transverse momentum
Float_t Elec_GSFTracklnPt_
Float_t Elec_GSFTrackEta_
double minimum(double a, double b)
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
void Initialize_from_string(const std::string &methodName, const std::string &oneProngNoEleMatch0Pi0woGSF_BL, const std::string &oneProngNoEleMatch0Pi0wGSF_BL, const std::string &oneProngNoEleMatch1Pi0woGSF_BL, const std::string &oneProngNoEleMatch1Pi0wGSF_BL, const std::string &oneProng0Pi0woGSF_BL, const std::string &oneProng0Pi0wGSF_BL, const std::string &oneProng1Pi0woGSF_BL, const std::string &oneProng1Pi0wGSF_BL, const std::string &oneProngNoEleMatch0Pi0woGSF_EC, const std::string &oneProngNoEleMatch0Pi0wGSF_EC, const std::string &oneProngNoEleMatch1Pi0woGSF_EC, const std::string &oneProngNoEleMatch1Pi0wGSF_EC, const std::string &oneProng0Pi0woGSF_EC, const std::string &oneProng0Pi0wGSF_EC, const std::string &oneProng1Pi0woGSF_EC, const std::string &oneProng1Pi0wGSF_EC)
size_type size() const
Size of the RefVector.
Float_t Tau_GSFTracklnPt_
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPt, 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)
float electronPreIDOutput() const
virtual double phi() const
momentum azimuthal angle
SuperClusterRef pflowSuperCluster() const
tuple size
Write out results.
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
void loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)