CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
ElectronIDMVA Class Reference

#include <ElectronIDMVA.h>

Public Types

enum  EElectronEffectiveAreaType {
  kEleChargedIso03, kEleNeutralHadronIso03, kEleGammaIso03, kEleGammaIsoVetoEtaStrip03,
  kEleChargedIso04, kEleNeutralHadronIso04, kEleGammaIso04, kEleGammaIsoVetoEtaStrip04,
  kEleNeutralHadronIso007, kEleHoverE, kEleHcalDepth1OverEcal, kEleHcalDepth2OverEcal
}
 

Public Member Functions

Double_t ElectronEffectiveArea (EElectronEffectiveAreaType type, Double_t Eta)
 
 ElectronIDMVA ()
 
void Initialize (TString methodName, unsigned int version, TString Subdet0Pt10To20Weights, TString Subdet1Pt10To20Weights, TString Subdet2Pt10To20Weights, TString Subdet0Pt20ToInfWeights, TString Subdet1Pt20ToInfWeights, TString Subdet2Pt20ToInfWeights)
 
Bool_t IsInitialized () const
 
Double_t MVAValue (HWW &, const unsigned int ele, const unsigned int vertex)
 
Double_t MVAValue (Double_t ElePt, Double_t EleSCEta, Double_t EleSigmaIEtaIEta, Double_t EleDEtaIn, Double_t EleDPhiIn, Double_t EleD0, Double_t EleDZ, Double_t EleFBrem, Double_t EleEOverP, Double_t EleESeedClusterOverPout, Double_t EleSigmaIPhiIPhi, Double_t EleNBrem, Double_t EleOneOverEMinusOneOverP, Double_t EleESeedClusterOverPIn, Double_t EleIP3d, Double_t EleIP3dSig)
 
Double_t MVAValue (Double_t ElePt, Double_t EleEta, Double_t PileupEnergyDensity, Double_t EleSigmaIEtaIEta, Double_t EleDEtaIn, Double_t EleDPhiIn, Double_t EleHoverE, Double_t EleD0, Double_t EleDZ, Double_t EleFBrem, Double_t EleEOverP, Double_t EleESeedClusterOverPout, Double_t EleSigmaIPhiIPhi, Double_t EleNBrem, Double_t EleOneOverEMinusOneOverP, Double_t EleESeedClusterOverPIn, Double_t EleIP3d, Double_t EleIP3dSig, Double_t EleGsfTrackChi2OverNdof, Double_t EledEtaCalo, Double_t EledPhiCalo, Double_t EleR9, Double_t EleSCEtaWidth, Double_t EleSCPhiWidth, Double_t EleCovIEtaIPhi, Double_t ElePreShowerOverRaw, Double_t EleChargedIso03, Double_t EleNeutralHadronIso03, Double_t EleGammaIso03, Double_t EleChargedIso04, Double_t EleNeutralHadronIso04, Double_t EleGammaIso04, Bool_t printDebug=kFALSE)
 
 ~ElectronIDMVA ()
 

Protected Attributes

Bool_t fIsInitialized
 
TString fMethodname
 
Float_t fMVAVar_EleChargedIso03OverPt
 
Float_t fMVAVar_EleChargedIso04OverPt
 
Float_t fMVAVar_EleCovIEtaIPhi
 
Float_t fMVAVar_EleD0
 
Float_t fMVAVar_EledEtaCalo
 
Float_t fMVAVar_EleDEtaIn
 
Float_t fMVAVar_EledPhiCalo
 
Float_t fMVAVar_EleDPhiIn
 
Float_t fMVAVar_EleDZ
 
Float_t fMVAVar_EleEOverP
 
Float_t fMVAVar_EleESeedClusterOverPIn
 
Float_t fMVAVar_EleESeedClusterOverPout
 
Float_t fMVAVar_EleFBrem
 
Float_t fMVAVar_EleGammaIso03OverPt
 
Float_t fMVAVar_EleGammaIso04OverPt
 
Float_t fMVAVar_EleGsfTrackChi2OverNdof
 
Float_t fMVAVar_EleHoverE
 
Float_t fMVAVar_EleIP3d
 
Float_t fMVAVar_EleIP3dSig
 
Float_t fMVAVar_EleNBrem
 
Float_t fMVAVar_EleNeutralHadronIso03OverPt
 
Float_t fMVAVar_EleNeutralHadronIso04OverPt
 
Float_t fMVAVar_EleOneOverEMinusOneOverP
 
Float_t fMVAVar_ElePreShowerOverRaw
 
Float_t fMVAVar_EleR9
 
Float_t fMVAVar_EleSCEtaWidth
 
Float_t fMVAVar_EleSCPhiWidth
 
Float_t fMVAVar_EleSigmaIEtaIEta
 
Float_t fMVAVar_EleSigmaIPhiIPhi
 
TMVA::Reader * fTMVAReader [6]
 
unsigned int version_
 

Detailed Description

Definition at line 24 of file ElectronIDMVA.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

ElectronIDMVA::ElectronIDMVA ( )

Definition at line 15 of file ElectronIDMVA.cc.

References fTMVAReader, and i.

15  :
16  fMethodname("BDTG method"),
17  fIsInitialized(kFALSE)
18 {
19  // Constructor.
20  for(UInt_t i=0; i<6; ++i) {
21  fTMVAReader[i] = 0;
22  }
23 }
int i
Definition: DBlmapReader.cc:9
Bool_t fIsInitialized
TString fMethodname
TMVA::Reader * fTMVAReader[6]
ElectronIDMVA::~ElectronIDMVA ( )

Definition at line 27 of file ElectronIDMVA.cc.

References fTMVAReader, and i.

28 {
29  for(UInt_t i=0; i<6; ++i) {
30  if (fTMVAReader[i]) delete fTMVAReader[i];
31  }
32 }
int i
Definition: DBlmapReader.cc:9
TMVA::Reader * fTMVAReader[6]

Member Function Documentation

Double_t ElectronIDMVA::ElectronEffectiveArea ( EElectronEffectiveAreaType  type,
Double_t  Eta 
)

Definition at line 469 of file ElectronIDMVA.cc.

References kEleChargedIso03, kEleChargedIso04, kEleGammaIso03, kEleGammaIso04, kEleGammaIsoVetoEtaStrip03, kEleGammaIsoVetoEtaStrip04, kEleHcalDepth1OverEcal, kEleHcalDepth2OverEcal, kEleHoverE, kEleNeutralHadronIso007, kEleNeutralHadronIso03, and kEleNeutralHadronIso04.

Referenced by MVAValue().

469  {
470 
471  Double_t EffectiveArea = 0;
472 
473  if (fabs(Eta) < 1.0) {
474  if (type == ElectronIDMVA::kEleChargedIso03) EffectiveArea = 0.000;
475  if (type == ElectronIDMVA::kEleNeutralHadronIso03) EffectiveArea = 0.017;
476  if (type == ElectronIDMVA::kEleGammaIso03) EffectiveArea = 0.045;
477  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.014;
478  if (type == ElectronIDMVA::kEleChargedIso04) EffectiveArea = 0.000;
479  if (type == ElectronIDMVA::kEleNeutralHadronIso04) EffectiveArea = 0.034;
480  if (type == ElectronIDMVA::kEleGammaIso04) EffectiveArea = 0.079;
481  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.014;
482  if (type == ElectronIDMVA::kEleNeutralHadronIso007) EffectiveArea = 0.000;
483  if (type == ElectronIDMVA::kEleHoverE) EffectiveArea = 0.00016;
484  if (type == ElectronIDMVA::kEleHcalDepth1OverEcal) EffectiveArea = 0.00016;
485  if (type == ElectronIDMVA::kEleHcalDepth2OverEcal) EffectiveArea = 0.00000;
486  } else if (fabs(Eta) >= 1.0 && fabs(Eta) < 1.479 ) {
487  if (type == ElectronIDMVA::kEleChargedIso03) EffectiveArea = 0.000;
488  if (type == ElectronIDMVA::kEleNeutralHadronIso03) EffectiveArea = 0.025;
489  if (type == ElectronIDMVA::kEleGammaIso03) EffectiveArea = 0.052;
490  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.030;
491  if (type == ElectronIDMVA::kEleChargedIso04) EffectiveArea = 0.000;
492  if (type == ElectronIDMVA::kEleNeutralHadronIso04) EffectiveArea = 0.050;
493  if (type == ElectronIDMVA::kEleGammaIso04) EffectiveArea = 0.073;
494  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.030;
495  if (type == ElectronIDMVA::kEleNeutralHadronIso007) EffectiveArea = 0.000;
496  if (type == ElectronIDMVA::kEleHoverE) EffectiveArea = 0.00022;
497  if (type == ElectronIDMVA::kEleHcalDepth1OverEcal) EffectiveArea = 0.00022;
498  if (type == ElectronIDMVA::kEleHcalDepth2OverEcal) EffectiveArea = 0.00000;
499  } else if (fabs(Eta) >= 1.479 && fabs(Eta) < 2.0 ) {
500  if (type == ElectronIDMVA::kEleChargedIso03) EffectiveArea = 0.000;
501  if (type == ElectronIDMVA::kEleNeutralHadronIso03) EffectiveArea = 0.030;
502  if (type == ElectronIDMVA::kEleGammaIso03) EffectiveArea = 0.170;
503  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.134;
504  if (type == ElectronIDMVA::kEleChargedIso04) EffectiveArea = 0.000;
505  if (type == ElectronIDMVA::kEleNeutralHadronIso04) EffectiveArea = 0.060;
506  if (type == ElectronIDMVA::kEleGammaIso04) EffectiveArea = 0.187;
507  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.134;
508  if (type == ElectronIDMVA::kEleNeutralHadronIso007) EffectiveArea = 0.000;
509  if (type == ElectronIDMVA::kEleHoverE) EffectiveArea = 0.00030;
510  if (type == ElectronIDMVA::kEleHcalDepth1OverEcal) EffectiveArea = 0.00026;
511  if (type == ElectronIDMVA::kEleHcalDepth2OverEcal) EffectiveArea = 0.00002;
512  } else if (fabs(Eta) >= 2.0 && fabs(Eta) < 2.25 ) {
513  if (type == ElectronIDMVA::kEleChargedIso03) EffectiveArea = 0.000;
514  if (type == ElectronIDMVA::kEleNeutralHadronIso03) EffectiveArea = 0.022;
515  if (type == ElectronIDMVA::kEleGammaIso03) EffectiveArea = 0.623;
516  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.516;
517  if (type == ElectronIDMVA::kEleChargedIso04) EffectiveArea = 0.000;
518  if (type == ElectronIDMVA::kEleNeutralHadronIso04) EffectiveArea = 0.055;
519  if (type == ElectronIDMVA::kEleGammaIso04) EffectiveArea = 0.659;
520  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.517;
521  if (type == ElectronIDMVA::kEleNeutralHadronIso007) EffectiveArea = 0.000;
522  if (type == ElectronIDMVA::kEleHoverE) EffectiveArea = 0.00054;
523  if (type == ElectronIDMVA::kEleHcalDepth1OverEcal) EffectiveArea = 0.00045;
524  if (type == ElectronIDMVA::kEleHcalDepth2OverEcal) EffectiveArea = 0.00003;
525  } else if (fabs(Eta) >= 2.25 && fabs(Eta) < 2.5 ) {
526  if (type == ElectronIDMVA::kEleChargedIso03) EffectiveArea = 0.000;
527  if (type == ElectronIDMVA::kEleNeutralHadronIso03) EffectiveArea = 0.018;
528  if (type == ElectronIDMVA::kEleGammaIso03) EffectiveArea = 1.198;
529  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 1.049;
530  if (type == ElectronIDMVA::kEleChargedIso04) EffectiveArea = 0.000;
531  if (type == ElectronIDMVA::kEleNeutralHadronIso04) EffectiveArea = 0.073;
532  if (type == ElectronIDMVA::kEleGammaIso04) EffectiveArea = 1.258;
533  if (type == ElectronIDMVA::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 1.051;
534  if (type == ElectronIDMVA::kEleNeutralHadronIso007) EffectiveArea = 0.000;
535  if (type == ElectronIDMVA::kEleHoverE) EffectiveArea = 0.00082;
536  if (type == ElectronIDMVA::kEleHcalDepth1OverEcal) EffectiveArea = 0.00066;
537  if (type == ElectronIDMVA::kEleHcalDepth2OverEcal) EffectiveArea = 0.00004;
538  }
539 
540  return EffectiveArea;
541 }
type
Definition: HCALResponse.h:21
void ElectronIDMVA::Initialize ( TString  methodName,
unsigned int  version,
TString  Subdet0Pt10To20Weights,
TString  Subdet1Pt10To20Weights,
TString  Subdet2Pt10To20Weights,
TString  Subdet0Pt20ToInfWeights,
TString  Subdet1Pt20ToInfWeights,
TString  Subdet2Pt20ToInfWeights 
)

Definition at line 35 of file ElectronIDMVA.cc.

References fIsInitialized, fMethodname, fMVAVar_EleChargedIso03OverPt, fMVAVar_EleChargedIso04OverPt, fMVAVar_EleCovIEtaIPhi, fMVAVar_EleD0, fMVAVar_EledEtaCalo, fMVAVar_EleDEtaIn, fMVAVar_EledPhiCalo, fMVAVar_EleDPhiIn, fMVAVar_EleEOverP, fMVAVar_EleESeedClusterOverPIn, fMVAVar_EleESeedClusterOverPout, fMVAVar_EleFBrem, fMVAVar_EleGammaIso03OverPt, fMVAVar_EleGammaIso04OverPt, fMVAVar_EleGsfTrackChi2OverNdof, fMVAVar_EleIP3d, fMVAVar_EleIP3dSig, fMVAVar_EleNBrem, fMVAVar_EleNeutralHadronIso03OverPt, fMVAVar_EleNeutralHadronIso04OverPt, fMVAVar_EleOneOverEMinusOneOverP, fMVAVar_ElePreShowerOverRaw, fMVAVar_EleR9, fMVAVar_EleSCEtaWidth, fMVAVar_EleSCPhiWidth, fMVAVar_EleSigmaIEtaIEta, fMVAVar_EleSigmaIPhiIPhi, fTMVAReader, i, BeamSplash_cfg::version, and version_.

41  {
42 
43  if (version != 1 && version != 2 && version != 3) {
44  edm::LogError("InvalidInput") << "[ElectronIDMVA::Initialize] Version must be 1 or 2 or 3. Aborting.";
45  return;
46  }
47 
48  version_ = version;
49 
50  fIsInitialized = kTRUE;
51  fMethodname = methodName;
52 
53  for(UInt_t i=0; i<6; ++i) {
54  if (fTMVAReader[i]) delete fTMVAReader[i];
55 
56  fTMVAReader[i] = new TMVA::Reader( "!Color:!Silent:Error" );
57  fTMVAReader[i]->SetVerbose(kTRUE);
58  // order matters!
59 
60  if (version == 1) {
61  fTMVAReader[i] = new TMVA::Reader( "!Color:!Silent:Error" );
62  fTMVAReader[i]->SetVerbose(kTRUE);
63  fTMVAReader[i]->AddVariable( "SigmaIEtaIEta", &fMVAVar_EleSigmaIEtaIEta );
64  fTMVAReader[i]->AddVariable( "DEtaIn", &fMVAVar_EleDEtaIn );
65  fTMVAReader[i]->AddVariable( "DPhiIn", &fMVAVar_EleDPhiIn );
66  fTMVAReader[i]->AddVariable( "FBrem", &fMVAVar_EleFBrem );
67  fTMVAReader[i]->AddVariable( "EOverP", &fMVAVar_EleEOverP );
68  fTMVAReader[i]->AddVariable( "ESeedClusterOverPout", &fMVAVar_EleESeedClusterOverPout );
69  fTMVAReader[i]->AddVariable( "SigmaIPhiIPhi", &fMVAVar_EleSigmaIPhiIPhi );
70  fTMVAReader[i]->AddVariable( "NBrem", &fMVAVar_EleNBrem );
71  fTMVAReader[i]->AddVariable( "OneOverEMinusOneOverP", &fMVAVar_EleOneOverEMinusOneOverP );
72  fTMVAReader[i]->AddVariable( "ESeedClusterOverPIn", &fMVAVar_EleESeedClusterOverPIn );
73  } else if (version == 2) {
74  fTMVAReader[i] = new TMVA::Reader( "!Color:!Silent:Error" );
75  fTMVAReader[i]->AddVariable( "SigmaIEtaIEta", &fMVAVar_EleSigmaIEtaIEta );
76  fTMVAReader[i]->AddVariable( "DEtaIn", &fMVAVar_EleDEtaIn );
77  fTMVAReader[i]->AddVariable( "DPhiIn", &fMVAVar_EleDPhiIn );
78  fTMVAReader[i]->AddVariable( "D0", &fMVAVar_EleD0 );
79  fTMVAReader[i]->AddVariable( "FBrem", &fMVAVar_EleFBrem );
80  fTMVAReader[i]->AddVariable( "EOverP", &fMVAVar_EleEOverP );
81  fTMVAReader[i]->AddVariable( "ESeedClusterOverPout", &fMVAVar_EleESeedClusterOverPout );
82  fTMVAReader[i]->AddVariable( "SigmaIPhiIPhi", &fMVAVar_EleSigmaIPhiIPhi );
83  fTMVAReader[i]->AddVariable( "NBrem", &fMVAVar_EleNBrem );
84  fTMVAReader[i]->AddVariable( "OneOverEMinusOneOverP", &fMVAVar_EleOneOverEMinusOneOverP );
85  fTMVAReader[i]->AddVariable( "ESeedClusterOverPIn", &fMVAVar_EleESeedClusterOverPIn );
86  fTMVAReader[i]->AddVariable( "IP3d", &fMVAVar_EleIP3d );
87  fTMVAReader[i]->AddVariable( "IP3dSig", &fMVAVar_EleIP3dSig );
88  } else if (version == 3) {
89  fTMVAReader[i]->AddVariable( "SigmaIEtaIEta", &fMVAVar_EleSigmaIEtaIEta );
90  fTMVAReader[i]->AddVariable( "DEtaIn", &fMVAVar_EleDEtaIn );
91  fTMVAReader[i]->AddVariable( "DPhiIn", &fMVAVar_EleDPhiIn );
92  //fTMVAReader[i]->AddVariable( "HoverE", &fMVAVar_EleHoverE );
93  fTMVAReader[i]->AddVariable( "D0", &fMVAVar_EleD0 );
94  fTMVAReader[i]->AddVariable( "FBrem", &fMVAVar_EleFBrem );
95  fTMVAReader[i]->AddVariable( "EOverP", &fMVAVar_EleEOverP );
96  fTMVAReader[i]->AddVariable( "ESeedClusterOverPout", &fMVAVar_EleESeedClusterOverPout );
97  fTMVAReader[i]->AddVariable( "SigmaIPhiIPhi", &fMVAVar_EleSigmaIPhiIPhi );
98  fTMVAReader[i]->AddVariable( "OneOverEMinusOneOverP", &fMVAVar_EleOneOverEMinusOneOverP );
99  fTMVAReader[i]->AddVariable( "ESeedClusterOverPIn", &fMVAVar_EleESeedClusterOverPIn );
100  fTMVAReader[i]->AddVariable( "IP3d", &fMVAVar_EleIP3d );
101  fTMVAReader[i]->AddVariable( "IP3dSig", &fMVAVar_EleIP3dSig );
102 
103  fTMVAReader[i]->AddVariable( "GsfTrackChi2OverNdof", &fMVAVar_EleGsfTrackChi2OverNdof );
104  fTMVAReader[i]->AddVariable( "dEtaCalo", &fMVAVar_EledEtaCalo );
105  fTMVAReader[i]->AddVariable( "dPhiCalo", &fMVAVar_EledPhiCalo );
106  fTMVAReader[i]->AddVariable( "R9", &fMVAVar_EleR9 );
107  fTMVAReader[i]->AddVariable( "SCEtaWidth", &fMVAVar_EleSCEtaWidth );
108  fTMVAReader[i]->AddVariable( "SCPhiWidth", &fMVAVar_EleSCPhiWidth );
109  fTMVAReader[i]->AddVariable( "CovIEtaIPhi", &fMVAVar_EleCovIEtaIPhi );
110  if (i == 2 || i == 5) {
111  fTMVAReader[i]->AddVariable( "PreShowerOverRaw", &fMVAVar_ElePreShowerOverRaw );
112  }
113  fTMVAReader[i]->AddVariable( "ChargedIso03", &fMVAVar_EleChargedIso03OverPt );
114  fTMVAReader[i]->AddVariable( "NeutralHadronIso03", &fMVAVar_EleNeutralHadronIso03OverPt );
115  fTMVAReader[i]->AddVariable( "GammaIso03", &fMVAVar_EleGammaIso03OverPt );
116  fTMVAReader[i]->AddVariable( "ChargedIso04", &fMVAVar_EleChargedIso04OverPt );
117  fTMVAReader[i]->AddVariable( "NeutralHadronIso04", &fMVAVar_EleNeutralHadronIso04OverPt );
118  fTMVAReader[i]->AddVariable( "GammaIso04", &fMVAVar_EleGammaIso04OverPt );
119  }
120 
121  if (i==0) fTMVAReader[i]->BookMVA(fMethodname , Subdet0Pt10To20Weights );
122  if (i==1) fTMVAReader[i]->BookMVA(fMethodname , Subdet1Pt10To20Weights );
123  if (i==2) fTMVAReader[i]->BookMVA(fMethodname , Subdet2Pt10To20Weights );
124  if (i==3) fTMVAReader[i]->BookMVA(fMethodname , Subdet0Pt20ToInfWeights );
125  if (i==4) fTMVAReader[i]->BookMVA(fMethodname , Subdet1Pt20ToInfWeights );
126  if (i==5) fTMVAReader[i]->BookMVA(fMethodname , Subdet2Pt20ToInfWeights );
127 
128  }
129 
130 }
int i
Definition: DBlmapReader.cc:9
Float_t fMVAVar_EleNBrem
Float_t fMVAVar_EleESeedClusterOverPIn
Float_t fMVAVar_ElePreShowerOverRaw
Float_t fMVAVar_EleIP3dSig
Float_t fMVAVar_EleDEtaIn
Float_t fMVAVar_EleSigmaIPhiIPhi
Bool_t fIsInitialized
TString fMethodname
Float_t fMVAVar_EleNeutralHadronIso03OverPt
Float_t fMVAVar_EleSCEtaWidth
Float_t fMVAVar_EleR9
Float_t fMVAVar_EleD0
Float_t fMVAVar_EledPhiCalo
Float_t fMVAVar_EleChargedIso03OverPt
Float_t fMVAVar_EleFBrem
Float_t fMVAVar_EledEtaCalo
Float_t fMVAVar_EleIP3d
Float_t fMVAVar_EleGammaIso03OverPt
Float_t fMVAVar_EleNeutralHadronIso04OverPt
Float_t fMVAVar_EleSCPhiWidth
Float_t fMVAVar_EleCovIEtaIPhi
Float_t fMVAVar_EleGammaIso04OverPt
Float_t fMVAVar_EleSigmaIEtaIEta
Float_t fMVAVar_EleESeedClusterOverPout
Float_t fMVAVar_EleEOverP
TMVA::Reader * fTMVAReader[6]
unsigned int version_
Float_t fMVAVar_EleOneOverEMinusOneOverP
Float_t fMVAVar_EleDPhiIn
Float_t fMVAVar_EleChargedIso04OverPt
Float_t fMVAVar_EleGsfTrackChi2OverNdof
Bool_t ElectronIDMVA::IsInitialized ( ) const
inline

Definition at line 37 of file ElectronIDMVA.h.

References fIsInitialized.

37 { return fIsInitialized; }
Bool_t fIsInitialized
Double_t ElectronIDMVA::MVAValue ( HWW hww,
const unsigned int  ele,
const unsigned int  vertex 
)

Definition at line 133 of file ElectronIDMVA.cc.

References HWWFunctions::electron_d0PV_wwV1(), HWWFunctions::electron_dzPV_wwV1(), ElectronEffectiveArea(), HWW::els_chi2(), HWW::els_dEtaIn(), HWW::els_dEtaOut(), HWW::els_dPhiIn(), HWW::els_dPhiOut(), HWW::els_e3x3(), HWW::els_eOverPIn(), HWW::els_eSC(), HWW::els_eSCPresh(), HWW::els_eSCRaw(), HWW::els_eSeedOverPIn(), HWW::els_eSeedOverPOut(), HWW::els_etaSC(), HWW::els_etaSCwidth(), HWW::els_fbrem(), HWW::els_gsftrkidx(), HWW::els_hOverE(), HWW::els_ip3d(), HWW::els_ip3derr(), HWW::els_iso03_pf_ch(), HWW::els_iso03_pf_gamma05(), HWW::els_iso03_pf_nhad05(), HWW::els_iso04_pf_ch(), HWW::els_iso04_pf_gamma05(), HWW::els_iso04_pf_nhad05(), HWW::els_ndof(), HWW::els_nSeed(), HWW::els_p4(), HWW::els_phiSCwidth(), HWW::els_scindex(), HWW::els_sigmaIEtaIEta(), HWW::els_sigmaIPhiIPhi(), HWW::els_trk_p4(), HWW::evt_event(), HWW::evt_lumiBlock(), HWW::evt_run(), HWW::evt_ww_rho_vor(), first, fIsInitialized, fMethodname, fMVAVar_EleChargedIso03OverPt, fMVAVar_EleChargedIso04OverPt, fMVAVar_EleCovIEtaIPhi, fMVAVar_EleD0, fMVAVar_EledEtaCalo, fMVAVar_EleDEtaIn, fMVAVar_EledPhiCalo, fMVAVar_EleDPhiIn, fMVAVar_EleDZ, fMVAVar_EleEOverP, fMVAVar_EleESeedClusterOverPIn, fMVAVar_EleESeedClusterOverPout, fMVAVar_EleFBrem, fMVAVar_EleGammaIso03OverPt, fMVAVar_EleGammaIso04OverPt, fMVAVar_EleGsfTrackChi2OverNdof, fMVAVar_EleHoverE, fMVAVar_EleIP3d, fMVAVar_EleIP3dSig, fMVAVar_EleNBrem, fMVAVar_EleNeutralHadronIso03OverPt, fMVAVar_EleNeutralHadronIso04OverPt, fMVAVar_EleOneOverEMinusOneOverP, fMVAVar_ElePreShowerOverRaw, fMVAVar_EleR9, fMVAVar_EleSCEtaWidth, fMVAVar_EleSCPhiWidth, fMVAVar_EleSigmaIEtaIEta, fMVAVar_EleSigmaIPhiIPhi, fTMVAReader, HWWFunctions::gsftrks_d0_pv(), kEleChargedIso03, kEleChargedIso04, kEleGammaIso03, kEleGammaIso04, kEleGammaIsoVetoEtaStrip03, kEleGammaIsoVetoEtaStrip04, kEleNeutralHadronIso007, kEleNeutralHadronIso03, kEleNeutralHadronIso04, LogDebug, funct::pow(), matplotRender::reader, HWW::scs_sigmaIEtaIPhi(), and version_.

133  {
134 
135  if (!fIsInitialized) {
136  edm::LogError("NotInitialized") << "Error: ElectronIDMVA not properly initialized.";
137  return -9999;
138  }
139 
140  Int_t subdet = 0;
141  if (fabs(hww.els_etaSC().at(ele)) < 1.0) subdet = 0;
142  else if (fabs(hww.els_etaSC().at(ele)) < 1.479) subdet = 1;
143  else subdet = 2;
144  Int_t ptBin = 0;
145  if (hww.els_p4().at(ele).Pt() > 20.0) ptBin = 1;
146 
147  //set all input variables
149  fMVAVar_EleDEtaIn = hww.els_dEtaIn().at(ele);
150  fMVAVar_EleDPhiIn = hww.els_dPhiIn().at(ele);
151  if (version_ == 3) fMVAVar_EleHoverE = hww.els_hOverE().at(ele); //this is new
152  fMVAVar_EleD0 = electron_d0PV_wwV1(hww, ele);
153  fMVAVar_EleDZ = electron_dzPV_wwV1(hww, ele);
154  fMVAVar_EleFBrem = hww.els_fbrem().at(ele);
155  fMVAVar_EleEOverP = hww.els_eOverPIn().at(ele);
158  fMVAVar_EleNBrem = hww.els_nSeed().at(ele);
159  TVector3 pIn(hww.els_trk_p4().at(ele).px(), hww.els_trk_p4().at(ele).py(), hww.els_trk_p4().at(ele).pz());
160  fMVAVar_EleOneOverEMinusOneOverP = 1./hww.els_eSC().at(ele) - 1./pIn.Mag();
162  const double gsfsign = ( (gsftrks_d0_pv(hww, hww.els_gsftrkidx().at(ele),0).first) >=0 ) ? 1. : -1.;
163  fMVAVar_EleIP3d = hww.els_ip3d().at(ele)*gsfsign;
164  if (hww.els_ip3derr().at(ele) == 0.0) fMVAVar_EleIP3dSig = 0.0;
165  else fMVAVar_EleIP3dSig = hww.els_ip3d().at(ele)*gsfsign / hww.els_ip3derr().at(ele);
166 
167  if (version_ == 3) { //these are new
168  Double_t ElePt = hww.els_p4().at(ele).pt();
169  Double_t EleEta = hww.els_etaSC().at(ele);
170  Double_t Rho = hww.evt_ww_rho_vor();
171  fMVAVar_EleGsfTrackChi2OverNdof = hww.els_chi2().at(ele) / hww.els_ndof().at(ele);
172  fMVAVar_EledEtaCalo = hww.els_dEtaOut().at(ele);
173  fMVAVar_EledPhiCalo = hww.els_dPhiOut().at(ele);
174  fMVAVar_EleR9 = hww.els_e3x3().at(ele) / hww.els_eSCRaw().at(ele);
175  fMVAVar_EleSCEtaWidth = hww.els_etaSCwidth().at(ele);
176  fMVAVar_EleSCPhiWidth = hww.els_phiSCwidth().at(ele);
177  fMVAVar_EleCovIEtaIPhi = hww.scs_sigmaIEtaIPhi().at(hww.els_scindex().at(ele))>0 ? pow(hww.scs_sigmaIEtaIPhi().at(hww.els_scindex().at(ele)),2) : -1.* pow(hww.scs_sigmaIEtaIPhi().at(hww.els_scindex().at(ele)),2);
178  fMVAVar_ElePreShowerOverRaw = hww.els_eSCPresh().at(ele) / hww.els_eSCRaw().at(ele);
180  = (hww.els_iso03_pf_ch().at(ele) //electronIsoValuePF(ele, vertex, 0.3, 99999., 0.1, 0.07, 0.025, -999., 0)*ElePt
181  - Rho * ElectronEffectiveArea(ElectronIDMVA::kEleChargedIso03, EleEta)) / ElePt;
183  = (hww.els_iso03_pf_nhad05().at(ele) //electronIsoValuePF(ele, vertex, 0.3, 0.5, 0.1, 0.07, 0.025, -999., 130)*ElePt
187  = (hww.els_iso03_pf_gamma05().at(ele) //electronIsoValuePF(ele, vertex, 0.3, 0.5, 0.1, 0.07, 0.025, -999., 22)*ElePt
191  = (hww.els_iso04_pf_ch().at(ele) //electronIsoValuePF(ele, vertex, 0.4, 99999., 0.1, 0.07, 0.025, -999., 0)*ElePt
192  - Rho * ElectronEffectiveArea(ElectronIDMVA::kEleChargedIso04, EleEta)) / ElePt;
194  = (hww.els_iso04_pf_nhad05().at(ele) //electronIsoValuePF(ele, vertex, 0.4, 0.5, 0.1, 0.07, 0.025, -999., 130)*ElePt
198  = (hww.els_iso04_pf_gamma05().at(ele) //electronIsoValuePF(ele, vertex, 0.4, 0.5, 0.1, 0.07, 0.025, -999., 22)*ElePt
201  }
202 
203  Double_t mva = -9999;
204  TMVA::Reader *reader = 0;
205  Int_t MVABin = -1;
206  if (subdet == 0 && ptBin == 0) MVABin = 0;
207  if (subdet == 1 && ptBin == 0) MVABin = 1;
208  if (subdet == 2 && ptBin == 0) MVABin = 2;
209  if (subdet == 0 && ptBin == 1) MVABin = 3;
210  if (subdet == 1 && ptBin == 1) MVABin = 4;
211  if (subdet == 2 && ptBin == 1) MVABin = 5;
212  assert(MVABin >= 0 && MVABin <= 5);
213  reader = fTMVAReader[MVABin];
214 
215  mva = reader->EvaluateMVA( fMethodname );
216 
217 
218  //DEBUG
219  if (0) {
220  LogDebug("ElectronIDMVA") << hww.evt_run() << " " << hww.evt_lumiBlock() << " " << hww.evt_event() << " " << hww.evt_ww_rho_vor()
221  << hww.els_p4().at(ele).pt() << " " << hww.els_etaSC().at(ele) << " --> MVABin " << MVABin << " : "
222  << fMVAVar_EleSigmaIEtaIEta << " "
223  << fMVAVar_EleDEtaIn << " "
224  << fMVAVar_EleDPhiIn << " "
225  << fMVAVar_EleHoverE << " "
226  << fMVAVar_EleD0 << " "
227  << fMVAVar_EleDZ << " "
228  << fMVAVar_EleFBrem << " "
229  << fMVAVar_EleEOverP << " "
231  << fMVAVar_EleSigmaIPhiIPhi << " "
232  << fMVAVar_EleNBrem << " "
233  << fMVAVar_EleOneOverEMinusOneOverP << " "
235  << fMVAVar_EleIP3d << " "
236  << fMVAVar_EleIP3dSig << " "
238  << fMVAVar_EledEtaCalo << " "
239  << fMVAVar_EledPhiCalo << " "
240  << fMVAVar_EleR9 << " "
241  << fMVAVar_EleSCEtaWidth << " "
242  << fMVAVar_EleSCPhiWidth << " "
243  << fMVAVar_EleCovIEtaIPhi << " "
251  << " === : === "
252  << mva;
253  }
254  return mva;
255 
256 }
#define LogDebug(id)
std::vector< float > & els_ip3derr()
Definition: HWW.cc:181
std::vector< float > & els_iso04_pf_nhad05()
Definition: HWW.cc:233
Float_t fMVAVar_EleNBrem
Float_t fMVAVar_EleESeedClusterOverPIn
Float_t fMVAVar_ElePreShowerOverRaw
Float_t fMVAVar_EleIP3dSig
double electron_dzPV_wwV1(HWW &, unsigned int index)
Float_t fMVAVar_EleDEtaIn
Float_t fMVAVar_EleSigmaIPhiIPhi
std::vector< float > & els_e3x3()
Definition: HWW.cc:249
std::vector< float > & els_ndof()
Definition: HWW.cc:189
Float_t fMVAVar_EleHoverE
Bool_t fIsInitialized
TString fMethodname
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
Float_t fMVAVar_EleNeutralHadronIso03OverPt
std::vector< int > & els_nSeed()
Definition: HWW.cc:321
std::vector< float > & els_ip3d()
Definition: HWW.cc:177
std::vector< float > & els_fbrem()
Definition: HWW.cc:153
Float_t fMVAVar_EleSCEtaWidth
unsigned int & evt_lumiBlock()
Definition: HWW.cc:611
Float_t fMVAVar_EleR9
float & evt_ww_rho_vor()
Definition: HWW.cc:623
Float_t fMVAVar_EleD0
Float_t fMVAVar_EledPhiCalo
Float_t fMVAVar_EleChargedIso03OverPt
Float_t fMVAVar_EleFBrem
std::vector< int > & els_gsftrkidx()
Definition: HWW.cc:333
Float_t fMVAVar_EledEtaCalo
Float_t fMVAVar_EleIP3d
std::vector< float > & els_eOverPIn()
Definition: HWW.cc:157
std::vector< int > & els_scindex()
Definition: HWW.cc:325
std::vector< float > & els_iso03_pf_ch()
Definition: HWW.cc:217
std::vector< float > & els_iso03_pf_gamma05()
Definition: HWW.cc:225
Float_t fMVAVar_EleGammaIso03OverPt
Float_t fMVAVar_EleNeutralHadronIso04OverPt
Float_t fMVAVar_EleSCPhiWidth
unsigned int & evt_run()
Definition: HWW.cc:607
Float_t fMVAVar_EleCovIEtaIPhi
std::vector< float > & els_eSeedOverPOut()
Definition: HWW.cc:161
std::vector< float > & els_chi2()
Definition: HWW.cc:185
Float_t fMVAVar_EleGammaIso04OverPt
std::vector< float > & els_eSC()
Definition: HWW.cc:173
std::vector< float > & els_dEtaOut()
Definition: HWW.cc:193
double electron_d0PV_wwV1(HWW &, unsigned int index)
std::vector< float > & els_dPhiOut()
Definition: HWW.cc:197
bool first
Definition: L1TdeRCT.cc:75
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
std::vector< float > & els_eSCPresh()
Definition: HWW.cc:213
Double_t ElectronEffectiveArea(EElectronEffectiveAreaType type, Double_t Eta)
std::vector< float > & els_iso03_pf_nhad05()
Definition: HWW.cc:221
std::vector< float > & els_iso04_pf_gamma05()
Definition: HWW.cc:237
Float_t fMVAVar_EleSigmaIEtaIEta
std::vector< float > & els_etaSCwidth()
Definition: HWW.cc:205
std::vector< float > & scs_sigmaIEtaIPhi()
Definition: HWW.cc:681
std::vector< float > & els_eSCRaw()
Definition: HWW.cc:201
Float_t fMVAVar_EleESeedClusterOverPout
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
std::vector< float > & els_iso04_pf_ch()
Definition: HWW.cc:229
std::pair< double, double > gsftrks_d0_pv(HWW &, int itrk, int ipv)
Float_t fMVAVar_EleEOverP
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
unsigned int & evt_event()
Definition: HWW.cc:615
Float_t fMVAVar_EleDZ
TMVA::Reader * fTMVAReader[6]
unsigned int version_
std::vector< float > & els_phiSCwidth()
Definition: HWW.cc:209
std::vector< float > & els_eSeedOverPIn()
Definition: HWW.cc:165
Float_t fMVAVar_EleOneOverEMinusOneOverP
Float_t fMVAVar_EleDPhiIn
std::vector< float > & els_sigmaIEtaIEta()
Definition: HWW.cc:121
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
Float_t fMVAVar_EleChargedIso04OverPt
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
std::vector< float > & els_sigmaIPhiIPhi()
Definition: HWW.cc:169
Float_t fMVAVar_EleGsfTrackChi2OverNdof
Double_t ElectronIDMVA::MVAValue ( Double_t  ElePt,
Double_t  EleSCEta,
Double_t  EleSigmaIEtaIEta,
Double_t  EleDEtaIn,
Double_t  EleDPhiIn,
Double_t  EleD0,
Double_t  EleDZ,
Double_t  EleFBrem,
Double_t  EleEOverP,
Double_t  EleESeedClusterOverPout,
Double_t  EleSigmaIPhiIPhi,
Double_t  EleNBrem,
Double_t  EleOneOverEMinusOneOverP,
Double_t  EleESeedClusterOverPIn,
Double_t  EleIP3d,
Double_t  EleIP3dSig 
)

Definition at line 259 of file ElectronIDMVA.cc.

References fIsInitialized, fMethodname, fMVAVar_EleD0, fMVAVar_EleDEtaIn, fMVAVar_EleDPhiIn, fMVAVar_EleDZ, fMVAVar_EleEOverP, fMVAVar_EleESeedClusterOverPIn, fMVAVar_EleESeedClusterOverPout, fMVAVar_EleFBrem, fMVAVar_EleIP3d, fMVAVar_EleIP3dSig, fMVAVar_EleNBrem, fMVAVar_EleOneOverEMinusOneOverP, fMVAVar_EleSigmaIEtaIEta, fMVAVar_EleSigmaIPhiIPhi, fTMVAReader, and matplotRender::reader.

274  {
275 
276  if (!fIsInitialized) {
277  edm::LogError("NotInitialized") << "Error: ElectronIDMVA not properly initialized.";
278  return -9999;
279  }
280 
281  Int_t subdet = 0;
282  if (fabs(EleSCEta) < 1.0) subdet = 0;
283  else if (fabs(EleSCEta) < 1.479) subdet = 1;
284  else subdet = 2;
285  Int_t ptBin = 0;
286  if (ElePt > 20.0) ptBin = 1;
287 
288  //set all input variables
289  fMVAVar_EleSigmaIEtaIEta = EleSigmaIEtaIEta;
290  fMVAVar_EleDEtaIn = EleDEtaIn;
291  fMVAVar_EleDPhiIn = EleDPhiIn;
292  fMVAVar_EleD0 = EleD0;
293  fMVAVar_EleDZ = EleDZ;
294  fMVAVar_EleFBrem = EleFBrem;
295  fMVAVar_EleEOverP = EleEOverP;
296  fMVAVar_EleESeedClusterOverPout = EleESeedClusterOverPout;
297  fMVAVar_EleSigmaIPhiIPhi = EleSigmaIPhiIPhi;
298  fMVAVar_EleNBrem = EleNBrem;
299  fMVAVar_EleOneOverEMinusOneOverP = EleOneOverEMinusOneOverP;
300  fMVAVar_EleESeedClusterOverPIn = EleESeedClusterOverPIn;
301  fMVAVar_EleIP3d = EleIP3d;
302  fMVAVar_EleIP3dSig = EleIP3dSig;
303 
304  Double_t mva = -9999;
305  TMVA::Reader *reader = 0;
306  Int_t MVABin = -1;
307  if (subdet == 0 && ptBin == 0) MVABin = 0;
308  if (subdet == 1 && ptBin == 0) MVABin = 1;
309  if (subdet == 2 && ptBin == 0) MVABin = 2;
310  if (subdet == 0 && ptBin == 1) MVABin = 3;
311  if (subdet == 1 && ptBin == 1) MVABin = 4;
312  if (subdet == 2 && ptBin == 1) MVABin = 5;
313  assert(MVABin >= 0 && MVABin <= 5);
314  reader = fTMVAReader[MVABin];
315 
316  mva = reader->EvaluateMVA( fMethodname );
317 
318  return mva;
319 }
Float_t fMVAVar_EleNBrem
Float_t fMVAVar_EleESeedClusterOverPIn
Float_t fMVAVar_EleIP3dSig
Float_t fMVAVar_EleDEtaIn
Float_t fMVAVar_EleSigmaIPhiIPhi
Bool_t fIsInitialized
TString fMethodname
Float_t fMVAVar_EleD0
Float_t fMVAVar_EleFBrem
Float_t fMVAVar_EleIP3d
Float_t fMVAVar_EleSigmaIEtaIEta
Float_t fMVAVar_EleESeedClusterOverPout
Float_t fMVAVar_EleEOverP
Float_t fMVAVar_EleDZ
TMVA::Reader * fTMVAReader[6]
Float_t fMVAVar_EleOneOverEMinusOneOverP
Float_t fMVAVar_EleDPhiIn
Double_t ElectronIDMVA::MVAValue ( Double_t  ElePt,
Double_t  EleEta,
Double_t  PileupEnergyDensity,
Double_t  EleSigmaIEtaIEta,
Double_t  EleDEtaIn,
Double_t  EleDPhiIn,
Double_t  EleHoverE,
Double_t  EleD0,
Double_t  EleDZ,
Double_t  EleFBrem,
Double_t  EleEOverP,
Double_t  EleESeedClusterOverPout,
Double_t  EleSigmaIPhiIPhi,
Double_t  EleNBrem,
Double_t  EleOneOverEMinusOneOverP,
Double_t  EleESeedClusterOverPIn,
Double_t  EleIP3d,
Double_t  EleIP3dSig,
Double_t  EleGsfTrackChi2OverNdof,
Double_t  EledEtaCalo,
Double_t  EledPhiCalo,
Double_t  EleR9,
Double_t  EleSCEtaWidth,
Double_t  EleSCPhiWidth,
Double_t  EleCovIEtaIPhi,
Double_t  ElePreShowerOverRaw,
Double_t  EleChargedIso03,
Double_t  EleNeutralHadronIso03,
Double_t  EleGammaIso03,
Double_t  EleChargedIso04,
Double_t  EleNeutralHadronIso04,
Double_t  EleGammaIso04,
Bool_t  printDebug = kFALSE 
)

Definition at line 321 of file ElectronIDMVA.cc.

References ElectronEffectiveArea(), fIsInitialized, fMethodname, fMVAVar_EleChargedIso03OverPt, fMVAVar_EleChargedIso04OverPt, fMVAVar_EleCovIEtaIPhi, fMVAVar_EleD0, fMVAVar_EledEtaCalo, fMVAVar_EleDEtaIn, fMVAVar_EledPhiCalo, fMVAVar_EleDPhiIn, fMVAVar_EleDZ, fMVAVar_EleEOverP, fMVAVar_EleESeedClusterOverPIn, fMVAVar_EleESeedClusterOverPout, fMVAVar_EleFBrem, fMVAVar_EleGammaIso03OverPt, fMVAVar_EleGammaIso04OverPt, fMVAVar_EleGsfTrackChi2OverNdof, fMVAVar_EleHoverE, fMVAVar_EleIP3d, fMVAVar_EleIP3dSig, fMVAVar_EleNBrem, fMVAVar_EleNeutralHadronIso03OverPt, fMVAVar_EleNeutralHadronIso04OverPt, fMVAVar_EleOneOverEMinusOneOverP, fMVAVar_ElePreShowerOverRaw, fMVAVar_EleR9, fMVAVar_EleSCEtaWidth, fMVAVar_EleSCPhiWidth, fMVAVar_EleSigmaIEtaIEta, fMVAVar_EleSigmaIPhiIPhi, fTMVAReader, kEleChargedIso03, kEleChargedIso04, kEleGammaIso03, kEleGammaIso04, kEleGammaIsoVetoEtaStrip03, kEleGammaIsoVetoEtaStrip04, kEleNeutralHadronIso007, kEleNeutralHadronIso03, kEleNeutralHadronIso04, LogDebug, and matplotRender::reader.

352  {
353 
354  if (!fIsInitialized) {
355  edm::LogError("NotInitialized") << "Error: ElectronIDMVA not properly initialized.";
356  return -9999;
357  }
358 
359  Double_t Rho = 0;
360  //jgran if (!(TMath::IsNaN(PileupEnergyDensity) || isinf(PileupEnergyDensity))) Rho = PileupEnergyDensity;
361  Rho = PileupEnergyDensity; //jgran
362 
363  Int_t subdet = 0;
364  if (fabs(EleEta) < 1.0) subdet = 0;
365  else if (fabs(EleEta) < 1.479) subdet = 1;
366  else subdet = 2;
367  Int_t ptBin = 0;
368  if (ElePt > 20.0) ptBin = 1;
369 
370  //set all input variables
371  fMVAVar_EleSigmaIEtaIEta = EleSigmaIEtaIEta;
372  fMVAVar_EleDEtaIn = EleDEtaIn;
373  fMVAVar_EleDPhiIn = EleDPhiIn;
374  fMVAVar_EleHoverE = EleHoverE;
375  fMVAVar_EleD0 = EleD0;
376  fMVAVar_EleDZ = EleDZ;
377  fMVAVar_EleFBrem = EleFBrem;
378  fMVAVar_EleEOverP = EleEOverP;
379  fMVAVar_EleESeedClusterOverPout = EleESeedClusterOverPout;
380  fMVAVar_EleSigmaIPhiIPhi = EleSigmaIPhiIPhi;
381  fMVAVar_EleNBrem = EleNBrem;
382  fMVAVar_EleOneOverEMinusOneOverP = EleOneOverEMinusOneOverP;
383  fMVAVar_EleESeedClusterOverPIn = EleESeedClusterOverPIn;
384  fMVAVar_EleIP3d = EleIP3d;
385  fMVAVar_EleIP3dSig = EleIP3dSig;
386  fMVAVar_EleGsfTrackChi2OverNdof = EleGsfTrackChi2OverNdof;
387  fMVAVar_EledEtaCalo = EledEtaCalo;
388  fMVAVar_EledPhiCalo = EledPhiCalo;
389  fMVAVar_EleR9 = EleR9;
390  fMVAVar_EleSCEtaWidth = EleSCEtaWidth;
391  fMVAVar_EleSCPhiWidth = EleSCPhiWidth;
392  fMVAVar_EleCovIEtaIPhi = EleCovIEtaIPhi;
393  fMVAVar_ElePreShowerOverRaw = ElePreShowerOverRaw;
395  = (EleChargedIso03
396  - Rho * ElectronEffectiveArea(ElectronIDMVA::kEleChargedIso03, EleEta)) / ElePt;
398  = (EleNeutralHadronIso03
402  = (EleGammaIso03
406  = (EleChargedIso04
409  = (EleNeutralHadronIso04
413  = (EleGammaIso04
416 
417  Double_t mva = -9999;
418  TMVA::Reader *reader = 0;
419  Int_t MVABin = -1;
420  if (subdet == 0 && ptBin == 0) MVABin = 0;
421  if (subdet == 1 && ptBin == 0) MVABin = 1;
422  if (subdet == 2 && ptBin == 0) MVABin = 2;
423  if (subdet == 0 && ptBin == 1) MVABin = 3;
424  if (subdet == 1 && ptBin == 1) MVABin = 4;
425  if (subdet == 2 && ptBin == 1) MVABin = 5;
426  assert(MVABin >= 0 && MVABin <= 5);
427  reader = fTMVAReader[MVABin];
428 
429  mva = reader->EvaluateMVA( fMethodname );
430 
431  if (printDebug == kTRUE) {
432  LogDebug("ElectronIDMVA") << ElePt << " " << EleEta << " " << " --> MVABin " << MVABin << " : "
433  << fMVAVar_EleSigmaIEtaIEta << " "
434  << fMVAVar_EleDEtaIn << " "
435  << fMVAVar_EleDPhiIn << " "
436  << fMVAVar_EleHoverE << " "
437  << fMVAVar_EleD0 << " "
438  << fMVAVar_EleDZ << " "
439  << fMVAVar_EleFBrem << " "
440  << fMVAVar_EleEOverP << " "
442  << fMVAVar_EleSigmaIPhiIPhi << " "
443  << fMVAVar_EleNBrem << " "
446  << fMVAVar_EleIP3d << " "
447  << fMVAVar_EleIP3dSig << " "
449  << fMVAVar_EledEtaCalo << " "
450  << fMVAVar_EledPhiCalo << " "
451  << fMVAVar_EleR9 << " "
452  << fMVAVar_EleSCEtaWidth << " "
453  << fMVAVar_EleSCPhiWidth << " "
454  << fMVAVar_EleCovIEtaIPhi << " "
462  << " === : === "
463  << mva;
464  }
465 
466  return mva;
467 }
#define LogDebug(id)
Float_t fMVAVar_EleNBrem
Float_t fMVAVar_EleESeedClusterOverPIn
Float_t fMVAVar_ElePreShowerOverRaw
Float_t fMVAVar_EleIP3dSig
Float_t fMVAVar_EleDEtaIn
Float_t fMVAVar_EleSigmaIPhiIPhi
Float_t fMVAVar_EleHoverE
Bool_t fIsInitialized
TString fMethodname
Float_t fMVAVar_EleNeutralHadronIso03OverPt
Float_t fMVAVar_EleSCEtaWidth
Float_t fMVAVar_EleR9
Float_t fMVAVar_EleD0
Float_t fMVAVar_EledPhiCalo
Float_t fMVAVar_EleChargedIso03OverPt
Float_t fMVAVar_EleFBrem
Float_t fMVAVar_EledEtaCalo
Float_t fMVAVar_EleIP3d
Float_t fMVAVar_EleGammaIso03OverPt
Float_t fMVAVar_EleNeutralHadronIso04OverPt
Float_t fMVAVar_EleSCPhiWidth
Float_t fMVAVar_EleCovIEtaIPhi
Float_t fMVAVar_EleGammaIso04OverPt
Double_t ElectronEffectiveArea(EElectronEffectiveAreaType type, Double_t Eta)
Float_t fMVAVar_EleSigmaIEtaIEta
Float_t fMVAVar_EleESeedClusterOverPout
Float_t fMVAVar_EleEOverP
Float_t fMVAVar_EleDZ
TMVA::Reader * fTMVAReader[6]
Float_t fMVAVar_EleOneOverEMinusOneOverP
Float_t fMVAVar_EleDPhiIn
Float_t fMVAVar_EleChargedIso04OverPt
Float_t fMVAVar_EleGsfTrackChi2OverNdof

Member Data Documentation

Bool_t ElectronIDMVA::fIsInitialized
protected

Definition at line 107 of file ElectronIDMVA.h.

Referenced by Initialize(), IsInitialized(), and MVAValue().

TString ElectronIDMVA::fMethodname
protected

Definition at line 106 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleChargedIso03OverPt
protected

Definition at line 132 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleChargedIso04OverPt
protected

Definition at line 135 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleCovIEtaIPhi
protected

Definition at line 130 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleD0
protected

Definition at line 113 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EledEtaCalo
protected

Definition at line 125 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleDEtaIn
protected

Definition at line 110 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EledPhiCalo
protected

Definition at line 126 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleDPhiIn
protected

Definition at line 111 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleDZ
protected

Definition at line 114 of file ElectronIDMVA.h.

Referenced by MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleEOverP
protected

Definition at line 116 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleESeedClusterOverPIn
protected

Definition at line 121 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleESeedClusterOverPout
protected

Definition at line 117 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleFBrem
protected

Definition at line 115 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleGammaIso03OverPt
protected

Definition at line 134 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleGammaIso04OverPt
protected

Definition at line 137 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleGsfTrackChi2OverNdof
protected

Definition at line 124 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleHoverE
protected

Definition at line 112 of file ElectronIDMVA.h.

Referenced by MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleIP3d
protected

Definition at line 122 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleIP3dSig
protected

Definition at line 123 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleNBrem
protected

Definition at line 119 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleNeutralHadronIso03OverPt
protected

Definition at line 133 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleNeutralHadronIso04OverPt
protected

Definition at line 136 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleOneOverEMinusOneOverP
protected

Definition at line 120 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_ElePreShowerOverRaw
protected

Definition at line 131 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleR9
protected

Definition at line 127 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleSCEtaWidth
protected

Definition at line 128 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleSCPhiWidth
protected

Definition at line 129 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleSigmaIEtaIEta
protected

Definition at line 109 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

Float_t ElectronIDMVA::fMVAVar_EleSigmaIPhiIPhi
protected

Definition at line 118 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().

TMVA::Reader* ElectronIDMVA::fTMVAReader[6]
protected

Definition at line 105 of file ElectronIDMVA.h.

Referenced by ElectronIDMVA(), Initialize(), MVAValue(), and ~ElectronIDMVA().

unsigned int ElectronIDMVA::version_
protected

Definition at line 139 of file ElectronIDMVA.h.

Referenced by Initialize(), and MVAValue().