CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AntiElectronIDMVA2.cc
Go to the documentation of this file.
1 #include <TFile.h>
2 #include <TMath.h>
6 
8  : isInitialized_(kFALSE),
9  methodName_("BDT")
10 {
11  for ( unsigned i = 0; i < 10; ++i ) {
12  fTMVAReader_[i] = 0;
13  }
14 
15  verbosity_ = 1;
16 }
17 
19 {
20  for ( unsigned i = 0; i < 10; ++i ) {
21  if ( fTMVAReader_[i] ) delete fTMVAReader_[i];
22  }
23 }
24 
35 
36 
38  const std::string& oneProngNoEleMatch_BL,
39  const std::string& oneProng0Pi0_BL,
40  const std::string& oneProng1pi0woGSF_BL,
41  const std::string& oneProng1pi0wGSFwoPfEleMva_BL,
42  const std::string& oneProng1pi0wGSFwPfEleMva_BL,
43  const std::string& oneProngNoEleMatch_EC,
44  const std::string& oneProng0Pi0_EC,
45  const std::string& oneProng1pi0woGSF_EC,
46  const std::string& oneProng1pi0wGSFwoPfEleMva_EC,
47  const std::string& oneProng1pi0wGSFwPfEleMva_EC)
48 {
49  for ( unsigned i = 0; i < 10; ++i ) {
50  if ( fTMVAReader_[i] ) delete fTMVAReader_[i];
51  }
52 
53  isInitialized_ = kTRUE;
54  methodName_ = methodName;
55 
56  bookMVAs();
57 
68 }
69 
71  const std::string& oneProngNoEleMatch_BL,
72  const std::string& oneProng0Pi0_BL,
73  const std::string& oneProng1pi0woGSF_BL,
74  const std::string& oneProng1pi0wGSFwoPfEleMva_BL,
75  const std::string& oneProng1pi0wGSFwPfEleMva_BL,
76  const std::string& oneProngNoEleMatch_EC,
77  const std::string& oneProng0Pi0_EC,
78  const std::string& oneProng1pi0woGSF_EC,
79  const std::string& oneProng1pi0wGSFwoPfEleMva_EC,
80  const std::string& oneProng1pi0wGSFwPfEleMva_EC)
81 {
82  for ( unsigned i = 0; i < 10; ++i ) {
83  if ( fTMVAReader_[i] ) delete fTMVAReader_[i];
84  }
85 
86  isInitialized_ = kTRUE;
87  methodName_ = methodName;
88 
89  bookMVAs();
90 
91  int methodName_int = -1;
92  if ( methodName_ == "BDT" ) methodName_int = TMVA::Types::kBDT;
93  else throw cms::Exception("InvalidParameter")
94  << "Invalid TMVA method name = " << methodName_ << " !!\n";
95 
96  fTMVAReader_[k_NoEleMatch_BL]->BookMVA(methodName_int, oneProngNoEleMatch_BL.data());
97  fTMVAReader_[k_woG_BL]->BookMVA(methodName_int, oneProng0Pi0_BL.data());
98  fTMVAReader_[k_wGwoGSF_BL]->BookMVA(methodName_int, oneProng1pi0woGSF_BL.data());
99  fTMVAReader_[k_wGwGSFwoPFMVA_BL]->BookMVA(methodName_int, oneProng1pi0wGSFwoPfEleMva_BL.data());
100  fTMVAReader_[k_wGwGSFwPFMVA_BL]->BookMVA(methodName_int, oneProng1pi0wGSFwPfEleMva_BL.data());
101  fTMVAReader_[k_NoEleMatch_EC]->BookMVA(methodName_int, oneProngNoEleMatch_EC.data());
102  fTMVAReader_[k_woG_EC]->BookMVA(methodName_int, oneProng0Pi0_EC.data());
103  fTMVAReader_[k_wGwoGSF_EC]->BookMVA(methodName_int, oneProng1pi0woGSF_EC.data());
104  fTMVAReader_[k_wGwGSFwoPFMVA_EC]->BookMVA(methodName_int, oneProng1pi0wGSFwoPfEleMva_EC.data());
105  fTMVAReader_[k_wGwGSFwPFMVA_EC]->BookMVA(methodName_int, oneProng1pi0wGSFwPfEleMva_EC.data());
106 }
107 
109 {
110  //TMVA::Tools::Instance();
111 
112  GammadEta_ = 0.;
113  GammadPhi_ = 0.;
114  GammadPt_ = 0.;
115 
117  Tau_Pt_ = 0.;
118  Tau_HasGsf_ = 0.;
119  Tau_EmFraction_ = 0.;
121  Tau_NumGammaCands_ = 0.;
122  Tau_HadrHoP_ = 0.;
123  Tau_HadrEoP_ = 0.;
124  Tau_VisMass_ = 0.;
125  Tau_GammaEtaMom_ = 0.;
126  Tau_GammaPhiMom_ = 0.;
127  Tau_GammaEnFrac_ = 0.;
128  Tau_HadrMva_ = 0.;
129 
130  Elec_Eta_ = 0.;
131  Elec_Pt_ = 0.;
132  Elec_PFMvaOutput_ = 0.;
133  Elec_Ee_ = 0.;
134  Elec_Egamma_ = 0.;
135  Elec_Pin_ = 0.;
136  Elec_Pout_ = 0.;
137  Elec_EtotOverPin_ = 0.;
138  Elec_EeOverPout_ = 0.;
140  Elec_EarlyBrem_ = 0.;
141  Elec_LateBrem_ = 0.;
142  Elec_Fbrem_ = 0.;
143  Elec_Chi2KF_ = 0.;
144  Elec_Chi2GSF_ = 0.;
145  Elec_NumHits_ = 0.;
146  Elec_GSFTrackResol_ = 0.;
147  Elec_GSFTracklnPt_ = 0.;
148  Elec_GSFTrackEta_ = 0.;
149 
150 
151  TMVA::Reader* readerNoEleMatch_BL = new TMVA::Reader( "!Color:Silent:Error" );
152  readerNoEleMatch_BL->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
153  readerNoEleMatch_BL->AddVariable("Tau_Pt", &Tau_Pt_);
154  readerNoEleMatch_BL->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
155  readerNoEleMatch_BL->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
156  readerNoEleMatch_BL->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
157  readerNoEleMatch_BL->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
158  readerNoEleMatch_BL->AddVariable("Tau_VisMass", &Tau_VisMass_);
159  readerNoEleMatch_BL->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
160  readerNoEleMatch_BL->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
161  readerNoEleMatch_BL->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
162  readerNoEleMatch_BL->SetVerbose(verbosity_);
163 
164  TMVA::Reader* readerwoG_BL = new TMVA::Reader( "!Color:Silent:Error" );
165  readerwoG_BL->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
166  readerwoG_BL->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
167  readerwoG_BL->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
168  readerwoG_BL->AddVariable("Elec_Chi2KF", &Elec_Chi2KF_);
169  readerwoG_BL->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
170  readerwoG_BL->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
171  readerwoG_BL->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
172  readerwoG_BL->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
173  readerwoG_BL->AddVariable("Tau_Pt", &Tau_Pt_);
174  readerwoG_BL->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
175  readerwoG_BL->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
176  readerwoG_BL->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
177  readerwoG_BL->AddVariable("Tau_VisMass", &Tau_VisMass_);
178  readerwoG_BL->SetVerbose(verbosity_);
179 
180  TMVA::Reader* readerwGwoGSF_BL = new TMVA::Reader( "!Color:Silent:Error" );
181  readerwGwoGSF_BL->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
182  readerwGwoGSF_BL->AddVariable("Elec_EgammaOverPdif", &Elec_EgammaOverPdif_);
183  readerwGwoGSF_BL->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
184  readerwGwoGSF_BL->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
185  readerwGwoGSF_BL->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
186  readerwGwoGSF_BL->AddVariable("Elec_NumHits", &Elec_NumHits_);
187  readerwGwoGSF_BL->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
188  readerwGwoGSF_BL->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
189  readerwGwoGSF_BL->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
190  readerwGwoGSF_BL->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
191  readerwGwoGSF_BL->AddVariable("Tau_Pt", &Tau_Pt_);
192  readerwGwoGSF_BL->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
193  readerwGwoGSF_BL->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
194  readerwGwoGSF_BL->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
195  readerwGwoGSF_BL->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
196  readerwGwoGSF_BL->AddVariable("Tau_VisMass", &Tau_VisMass_);
197  readerwGwoGSF_BL->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
198  readerwGwoGSF_BL->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
199  readerwGwoGSF_BL->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
200  readerwGwoGSF_BL->SetVerbose(verbosity_);
201 
202  TMVA::Reader* readerwGwGSFwoPFMVA_BL = new TMVA::Reader( "!Color:Silent:Error" );
203  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
204  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_Chi2KF", &Elec_Chi2KF_);
205  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
206  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_NumHits", &Elec_NumHits_);
207  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
208  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
209  readerwGwGSFwoPFMVA_BL->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
210  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
211  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_Pt", &Tau_Pt_);
212  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
213  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
214  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
215  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
216  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_VisMass", &Tau_VisMass_);
217  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
218  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
219  readerwGwGSFwoPFMVA_BL->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
220  readerwGwGSFwoPFMVA_BL->SetVerbose(verbosity_);
221 
222  TMVA::Reader* readerwGwGSFwPFMVA_BL = new TMVA::Reader( "!Color:Silent:Error" );
223  readerwGwGSFwPFMVA_BL->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
224  readerwGwGSFwPFMVA_BL->AddVariable("Elec_EeOverPout", &Elec_EeOverPout_);
225  readerwGwGSFwPFMVA_BL->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
226  readerwGwGSFwPFMVA_BL->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
227  readerwGwGSFwPFMVA_BL->AddVariable("Elec_NumHits", &Elec_NumHits_);
228  readerwGwGSFwPFMVA_BL->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
229  readerwGwGSFwPFMVA_BL->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
230  readerwGwGSFwPFMVA_BL->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
231  readerwGwGSFwPFMVA_BL->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
232  readerwGwGSFwPFMVA_BL->AddVariable("Tau_Pt", &Tau_Pt_);
233  readerwGwGSFwPFMVA_BL->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
234  readerwGwGSFwPFMVA_BL->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
235  readerwGwGSFwPFMVA_BL->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
236  readerwGwGSFwPFMVA_BL->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
237  readerwGwGSFwPFMVA_BL->AddVariable("Tau_VisMass", &Tau_VisMass_);
238  readerwGwGSFwPFMVA_BL->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
239  readerwGwGSFwPFMVA_BL->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
240  readerwGwGSFwPFMVA_BL->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
241  readerwGwGSFwPFMVA_BL->SetVerbose(verbosity_);
242 
243  TMVA::Reader* readerNoEleMatch_EC = new TMVA::Reader( "!Color:Silent:Error" );
244  readerNoEleMatch_EC->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
245  readerNoEleMatch_EC->AddVariable("Tau_Pt", &Tau_Pt_);
246  readerNoEleMatch_EC->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
247  readerNoEleMatch_EC->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
248  readerNoEleMatch_EC->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
249  readerNoEleMatch_EC->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
250  readerNoEleMatch_EC->AddVariable("Tau_VisMass", &Tau_VisMass_);
251  readerNoEleMatch_EC->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
252  readerNoEleMatch_EC->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
253  readerNoEleMatch_EC->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
254  readerNoEleMatch_EC->SetVerbose(verbosity_);
255 
256  TMVA::Reader* readerwoG_EC = new TMVA::Reader( "!Color:Silent:Error" );
257  readerwoG_EC->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
258  readerwoG_EC->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
259  readerwoG_EC->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
260  readerwoG_EC->AddVariable("Elec_Chi2KF", &Elec_Chi2KF_);
261  readerwoG_EC->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
262  readerwoG_EC->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
263  readerwoG_EC->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
264  readerwoG_EC->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
265  readerwoG_EC->AddVariable("Tau_Pt", &Tau_Pt_);
266  readerwoG_EC->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
267  readerwoG_EC->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
268  readerwoG_EC->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
269  readerwoG_EC->AddVariable("Tau_VisMass", &Tau_VisMass_);
270  readerwoG_EC->SetVerbose(verbosity_);
271 
272  TMVA::Reader* readerwGwoGSF_EC = new TMVA::Reader( "!Color:Silent:Error" );
273  readerwGwoGSF_EC->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
274  readerwGwoGSF_EC->AddVariable("Elec_EgammaOverPdif", &Elec_EgammaOverPdif_);
275  readerwGwoGSF_EC->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
276  readerwGwoGSF_EC->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
277  readerwGwoGSF_EC->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
278  readerwGwoGSF_EC->AddVariable("Elec_NumHits", &Elec_NumHits_);
279  readerwGwoGSF_EC->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
280  readerwGwoGSF_EC->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
281  readerwGwoGSF_EC->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
282  readerwGwoGSF_EC->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
283  readerwGwoGSF_EC->AddVariable("Tau_Pt", &Tau_Pt_);
284  readerwGwoGSF_EC->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
285  readerwGwoGSF_EC->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
286  readerwGwoGSF_EC->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
287  readerwGwoGSF_EC->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
288  readerwGwoGSF_EC->AddVariable("Tau_VisMass", &Tau_VisMass_);
289  readerwGwoGSF_EC->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
290  readerwGwoGSF_EC->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
291  readerwGwoGSF_EC->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
292  readerwGwoGSF_EC->SetVerbose(verbosity_);
293 
294  TMVA::Reader* readerwGwGSFwoPFMVA_EC = new TMVA::Reader( "!Color:Silent:Error" );
295  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_Fbrem", &Elec_Fbrem_);
296  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_Chi2KF", &Elec_Chi2KF_);
297  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
298  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_NumHits", &Elec_NumHits_);
299  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
300  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
301  readerwGwGSFwoPFMVA_EC->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
302  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
303  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_Pt", &Tau_Pt_);
304  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
305  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
306  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
307  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
308  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_VisMass", &Tau_VisMass_);
309  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
310  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
311  readerwGwGSFwoPFMVA_EC->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
312  readerwGwGSFwoPFMVA_EC->SetVerbose(verbosity_);
313 
314  TMVA::Reader* readerwGwGSFwPFMVA_EC = new TMVA::Reader( "!Color:Silent:Error" );
315  readerwGwGSFwPFMVA_EC->AddVariable("Elec_EtotOverPin", &Elec_EtotOverPin_);
316  readerwGwGSFwPFMVA_EC->AddVariable("Elec_EeOverPout", &Elec_EeOverPout_);
317  readerwGwGSFwPFMVA_EC->AddVariable("Elec_LateBrem", &Elec_LateBrem_);
318  readerwGwGSFwPFMVA_EC->AddVariable("Elec_Chi2GSF", &Elec_Chi2GSF_);
319  readerwGwGSFwPFMVA_EC->AddVariable("Elec_NumHits", &Elec_NumHits_);
320  readerwGwGSFwPFMVA_EC->AddVariable("Elec_GSFTrackResol", &Elec_GSFTrackResol_);
321  readerwGwGSFwPFMVA_EC->AddVariable("Elec_GSFTracklnPt", &Elec_GSFTracklnPt_);
322  readerwGwGSFwPFMVA_EC->AddVariable("Elec_GSFTrackEta", &Elec_GSFTrackEta_);
323  readerwGwGSFwPFMVA_EC->AddVariable("Tau_EtaAtEcalEntrance", &Tau_EtaAtEcalEntrance_);
324  readerwGwGSFwPFMVA_EC->AddVariable("Tau_Pt", &Tau_Pt_);
325  readerwGwGSFwPFMVA_EC->AddVariable("Tau_EmFraction", &Tau_EmFraction_);
326  readerwGwGSFwPFMVA_EC->AddVariable("Tau_NumGammaCands", &Tau_NumGammaCands_);
327  readerwGwGSFwPFMVA_EC->AddVariable("Tau_HadrHoP", &Tau_HadrHoP_);
328  readerwGwGSFwPFMVA_EC->AddVariable("Tau_HadrEoP", &Tau_HadrEoP_);
329  readerwGwGSFwPFMVA_EC->AddVariable("Tau_VisMass", &Tau_VisMass_);
330  readerwGwGSFwPFMVA_EC->AddVariable("Tau_GammaEtaMom", &Tau_GammaEtaMom_);
331  readerwGwGSFwPFMVA_EC->AddVariable("Tau_GammaPhiMom", &Tau_GammaPhiMom_);
332  readerwGwGSFwPFMVA_EC->AddVariable("Tau_GammaEnFrac", &Tau_GammaEnFrac_);
333  readerwGwGSFwPFMVA_EC->SetVerbose(verbosity_);
334 
335  fTMVAReader_[k_NoEleMatch_BL] = readerNoEleMatch_BL;
336  fTMVAReader_[k_woG_BL] = readerwoG_BL;
337  fTMVAReader_[k_wGwoGSF_BL] = readerwGwoGSF_BL;
338  fTMVAReader_[k_wGwGSFwoPFMVA_BL] = readerwGwGSFwoPFMVA_BL;
339  fTMVAReader_[k_wGwGSFwPFMVA_BL] = readerwGwGSFwPFMVA_BL;
340  fTMVAReader_[k_NoEleMatch_EC] = readerNoEleMatch_EC;
341  fTMVAReader_[k_woG_EC] = readerwoG_EC;
342  fTMVAReader_[k_wGwoGSF_EC] = readerwGwoGSF_EC;
343  fTMVAReader_[k_wGwGSFwoPFMVA_EC] = readerwGwGSFwoPFMVA_EC;
344  fTMVAReader_[k_wGwGSFwPFMVA_EC] = readerwGwGSFwPFMVA_EC;
345 }
346 
347 double AntiElectronIDMVA2::MVAValue(Float_t TauEtaAtEcalEntrance,
348  Float_t TauPhi,
349  Float_t TauPt,
350  Float_t TauSignalPFChargedCands,
351  Float_t TauSignalPFGammaCands,
352  Float_t TauLeadPFChargedHadrHoP,
353  Float_t TauLeadPFChargedHadrEoP,
354  Float_t TauHasGsf,
355  Float_t TauVisMass,
356  Float_t TauEmFraction,
357  const std::vector<Float_t>& GammasdEta,
358  const std::vector<Float_t>& GammasdPhi,
359  const std::vector<Float_t>& GammasPt,
360  Float_t ElecEta,
361  Float_t ElecPhi,
362  Float_t ElecPt,
363  Float_t ElecPFMvaOutput,
364  Float_t ElecEe,
365  Float_t ElecEgamma,
366  Float_t ElecPin,
367  Float_t ElecPout,
368  Float_t ElecEarlyBrem,
369  Float_t ElecLateBrem,
370  Float_t ElecFbrem,
371  Float_t ElecChi2KF,
372  Float_t ElecChi2GSF,
373  Float_t ElecNumHits,
374  Float_t ElecGSFTrackResol,
375  Float_t ElecGSFTracklnPt,
376  Float_t ElecGSFTrackEta)
377 {
378  double sumPt = 0.;
379  double dEta = 0.;
380  double dEta2 = 0.;
381  double dPhi = 0.;
382  double dPhi2 = 0.;
383  double sumPt2 = 0.;
384  for ( unsigned int i = 0 ; i < GammasPt.size() ; ++i ) {
385  double pt_i = GammasPt[i];
386  double phi_i = GammasdPhi[i];
387  if ( GammasdPhi[i] > TMath::Pi() ) phi_i = GammasdPhi[i] - 2*TMath::Pi();
388  else if ( GammasdPhi[i] < -TMath::Pi() ) phi_i = GammasdPhi[i] + 2*TMath::Pi();
389  double eta_i = GammasdEta[i];
390  sumPt += pt_i;
391  sumPt2 += (pt_i*pt_i);
392  dEta += (pt_i*eta_i);
393  dEta2 += (pt_i*eta_i*eta_i);
394  dPhi += (pt_i*phi_i);
395  dPhi2 += (pt_i*phi_i*phi_i);
396  }
397 
398  Float_t GammaEnFrac = sumPt/TauPt;
399 
400  if ( sumPt > 0. ) {
401  dEta /= sumPt;
402  dPhi /= sumPt;
403  dEta2 /= sumPt;
404  dPhi2 /= sumPt;
405  }
406 
407  Float_t GammaEtaMom = TMath::Sqrt(dEta2)*TMath::Sqrt(GammaEnFrac)*TauPt;
408  Float_t GammaPhiMom = TMath::Sqrt(dPhi2)*TMath::Sqrt(GammaEnFrac)*TauPt;
409 
410  return MVAValue(TauEtaAtEcalEntrance,
411  TauPhi,
412  TauPt,
413  TauSignalPFChargedCands,
414  TauSignalPFGammaCands,
415  TauLeadPFChargedHadrHoP,
416  TauLeadPFChargedHadrEoP,
417  TauHasGsf,
418  TauVisMass,
419  TauEmFraction,
420  GammaEtaMom,
421  GammaPhiMom,
422  GammaEnFrac,
423  ElecEta,
424  ElecPhi,
425  ElecPt,
426  ElecPFMvaOutput,
427  ElecEe,
428  ElecEgamma,
429  ElecPin,
430  ElecPout,
431  ElecEarlyBrem,
432  ElecLateBrem,
433  ElecFbrem,
434  ElecChi2KF,
435  ElecChi2GSF,
436  ElecNumHits,
437  ElecGSFTrackResol,
438  ElecGSFTracklnPt,
439  ElecGSFTrackEta);
440 }
441 
442 double AntiElectronIDMVA2::MVAValue(Float_t TauEtaAtEcalEntrance,
443  Float_t TauPhi,
444  Float_t TauPt,
445  Float_t TauSignalPFChargedCands,
446  Float_t TauSignalPFGammaCands,
447  Float_t TauLeadPFChargedHadrHoP,
448  Float_t TauLeadPFChargedHadrEoP,
449  Float_t TauHasGsf,
450  Float_t TauVisMass,
451  Float_t TauEmFraction,
452  Float_t GammaEtaMom,
453  Float_t GammaPhiMom,
454  Float_t GammaEnFrac,
455  Float_t ElecEta,
456  Float_t ElecPhi,
457  Float_t ElecPt,
458  Float_t ElecPFMvaOutput,
459  Float_t ElecEe,
460  Float_t ElecEgamma,
461  Float_t ElecPin,
462  Float_t ElecPout,
463  Float_t ElecEarlyBrem,
464  Float_t ElecLateBrem,
465  Float_t ElecFbrem,
466  Float_t ElecChi2KF,
467  Float_t ElecChi2GSF,
468  Float_t ElecNumHits,
469  Float_t ElecGSFTrackResol,
470  Float_t ElecGSFTracklnPt,
471  Float_t ElecGSFTrackEta)
472 {
473 
474  if ( !isInitialized_ ) {
475  std::cout << "Error: AntiElectronMVA not properly initialized.\n";
476  return -99.;
477  }
478 
479  Tau_EtaAtEcalEntrance_ = TauEtaAtEcalEntrance;
480  Tau_Pt_ = TauPt;
481  Tau_HasGsf_ = TauHasGsf;
482  Tau_EmFraction_ = TMath::Max(TauEmFraction,float(0.0));
483  Tau_NumChargedCands_ = TauSignalPFChargedCands;
484  Tau_NumGammaCands_ = TauSignalPFGammaCands;
485  Tau_HadrHoP_ = TauLeadPFChargedHadrHoP;
486  Tau_HadrEoP_ = TauLeadPFChargedHadrEoP;
487  Tau_VisMass_ = TauVisMass;
488  Tau_GammaEtaMom_ = GammaEtaMom;
489  Tau_GammaPhiMom_ = GammaPhiMom;
490  Tau_GammaEnFrac_ = GammaEnFrac;
491 
492  Elec_Eta_ = ElecEta;
493  Elec_Pt_ = ElecPt;
494  Elec_EtotOverPin_ = (ElecEe + ElecEgamma)/ElecPin;
495  Elec_EgammaOverPdif_ = ElecEgamma/(ElecPin - ElecPout);
496  Elec_EarlyBrem_ = ElecEarlyBrem;
497  Elec_LateBrem_ = ElecLateBrem;
498  Elec_Fbrem_ = ElecFbrem;
499  Elec_Chi2KF_ = ElecChi2KF;
500  Elec_Chi2GSF_ = ElecChi2GSF;
501  Elec_NumHits_ = ElecNumHits;
502  Elec_GSFTrackResol_ = ElecGSFTrackResol;
503  Elec_GSFTracklnPt_ = ElecGSFTracklnPt;
504  Elec_GSFTrackEta_ = ElecGSFTrackEta;
505 
506  double mva = -99.;
507  if ( Tau_NumChargedCands_ == 3 ) mva = 1.0;
508  else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 ) {
509  if ( TMath::Abs(TauEtaAtEcalEntrance) < 1.5 ) mva = fTMVAReader_[k_NoEleMatch_BL]->EvaluateMVA(methodName_);
510  else mva = fTMVAReader_[k_NoEleMatch_EC]->EvaluateMVA(methodName_);
511  } else if ( TauSignalPFGammaCands == 0 ) {
512  if ( TMath::Abs(TauEtaAtEcalEntrance) < 1.5 ) mva = fTMVAReader_[k_woG_BL]->EvaluateMVA(methodName_);
513  else mva = fTMVAReader_[k_woG_EC]->EvaluateMVA(methodName_);
514  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf < 0.5 ) {
515  if ( TMath::Abs(TauEtaAtEcalEntrance) < 1.5 ) mva = fTMVAReader_[k_wGwoGSF_BL]->EvaluateMVA(methodName_);
516  else mva = fTMVAReader_[k_wGwoGSF_EC]->EvaluateMVA(methodName_);
517  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 && ElecPFMvaOutput < -0.1 ) {
518  if ( TMath::Abs(TauEtaAtEcalEntrance) < 1.5 ) mva = fTMVAReader_[k_wGwGSFwoPFMVA_BL]->EvaluateMVA(methodName_);
519  else mva = fTMVAReader_[k_wGwGSFwoPFMVA_EC]->EvaluateMVA(methodName_);
520  } else if ( TauSignalPFGammaCands > 0 && TauHasGsf > 0.5 && ElecPFMvaOutput > -0.1 ) {
521  if ( TMath::Abs(TauEtaAtEcalEntrance) < 1.5 ) mva = fTMVAReader_[k_wGwGSFwPFMVA_BL]->EvaluateMVA(methodName_);
522  else mva = fTMVAReader_[k_wGwGSFwPFMVA_EC]->EvaluateMVA(methodName_);
523  }
524 
525  return mva;
526 }
527 
528 
530  const reco::GsfElectron& theGsfEle)
531 
532 {
533  float sumEtaTimesEnergy = 0;
534  float sumEnergy = 0;
535  Float_t TauEtaAtEcalEntrance = 0;
536  for(unsigned int j = 0 ; j < (thePFTau.signalPFCands()).size() ; j++){
537  reco::PFCandidateRef pfcandidate = (thePFTau.signalPFCands()).at(j);
538  sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
539  sumEnergy += pfcandidate->energy();
540  }
541  if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
542 
543  Float_t TauPhi = thePFTau.phi();
544  Float_t TauPt = thePFTau.pt();
545  Float_t TauSignalPFChargedCands = thePFTau.signalPFChargedHadrCands().size();
546  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
547  Float_t TauLeadPFChargedHadrHoP = 0.;
548  Float_t TauLeadPFChargedHadrEoP = 0.;
549  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
550  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
551  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
552  }
553  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
554  Float_t TauVisMass = thePFTau.mass();
555  Float_t TauEmFraction = TMath::Max(thePFTau.emFraction(), (Float_t)0.);
556  std::vector<Float_t> GammasdEta;
557  std::vector<Float_t> GammasdPhi;
558  std::vector<Float_t> GammasPt;
559  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
560  reco::PFCandidateRef gamma = thePFTau.signalPFGammaCands().at(i);
561  if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) {
562  GammasdEta.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta());
563  GammasdPhi.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi());
564  } else {
565  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
566  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
567  }
568  GammasPt.push_back(gamma->pt());
569  }
570 
571  Float_t ElecEta = theGsfEle.eta();
572  Float_t ElecPhi = theGsfEle.phi();
573  Float_t ElecPt = theGsfEle.pt();
574  Float_t ElecPFMvaOutput = theGsfEle.mvaOutput().mva;
575  //Variables related to the electron Cluster
576  Float_t ElecEe = 0.;
577  Float_t ElecEgamma = 0.;
578  reco::SuperClusterRef pfSuperCluster = theGsfEle.pflowSuperCluster();
579  if ( pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable() ) {
580  for ( reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin();
581  pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) {
582  double pfClusterEn = (*pfCluster)->energy();
583  if ( pfCluster == pfSuperCluster->clustersBegin() ) Elec_Ee_ += pfClusterEn;
584  else Elec_Egamma_ += pfClusterEn;
585  }
586  }
587  Float_t ElecPin = TMath::Sqrt(theGsfEle.trackMomentumAtVtx().Mag2());
588  Float_t ElecPout = TMath::Sqrt(theGsfEle.trackMomentumOut().Mag2());
589  Float_t ElecEarlyBrem = theGsfEle.mvaInput().earlyBrem;
590  Float_t ElecLateBrem = theGsfEle.mvaInput().lateBrem;
591  Float_t ElecFbrem = theGsfEle.fbrem();
592  //Variables related to the CtfTrack
593  Float_t ElecChi2KF = -99.;
594  Float_t ElecNumHits = -99.;
595  if ( theGsfEle.closestCtfTrackRef().isNonnull() ) {
596  ElecChi2KF = theGsfEle.closestCtfTrackRef()->normalizedChi2();
597  ElecNumHits = theGsfEle.closestCtfTrackRef()->numberOfValidHits();
598  }
599  //Variables related to the GsfTrack
600  Float_t ElecChi2GSF = -99.;
601  Float_t ElecGSFTrackResol = -99.;
602  Float_t ElecGSFTracklnPt = -99.;
603  Float_t ElecGSFTrackEta = -99.;
604  if ( theGsfEle.gsfTrack().isNonnull() ) {
605  ElecChi2GSF = (theGsfEle).gsfTrack()->normalizedChi2();
606  if ( theGsfEle.gsfTrack()->pt() > 0. ) {
607  ElecGSFTrackResol = theGsfEle.gsfTrack()->ptError()/theGsfEle.gsfTrack()->pt();
608  ElecGSFTracklnPt = log(theGsfEle.gsfTrack()->pt())*TMath::Ln10();
609  }
610  ElecGSFTrackEta = theGsfEle.gsfTrack()->eta();
611  }
612 
613  return MVAValue(TauEtaAtEcalEntrance,
614  TauPhi,
615  TauPt,
616  TauSignalPFChargedCands,
617  TauSignalPFGammaCands,
618  TauLeadPFChargedHadrHoP,
619  TauLeadPFChargedHadrEoP,
620  TauHasGsf,
621  TauVisMass,
622  TauEmFraction,
623  GammasdEta,
624  GammasdPhi,
625  GammasPt,
626  ElecEta,
627  ElecPhi,
628  ElecPt,
629  ElecPFMvaOutput,
630  ElecEe,
631  ElecEgamma,
632  ElecPin,
633  ElecPout,
634  ElecEarlyBrem,
635  ElecLateBrem,
636  ElecFbrem,
637  ElecChi2KF,
638  ElecChi2GSF,
639  ElecNumHits,
640  ElecGSFTrackResol,
641  ElecGSFTracklnPt,
642  ElecGSFTrackEta);
643 }
644 
646 {
647  float sumEtaTimesEnergy = 0;
648  float sumEnergy = 0;
649  Float_t TauEtaAtEcalEntrance =0;
650  for(unsigned int j = 0 ; j < (thePFTau.signalPFCands()).size() ; j++){
651  reco::PFCandidateRef pfcandidate = (thePFTau.signalPFCands()).at(j);
652  sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
653  sumEnergy += pfcandidate->energy();
654  }
655  if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
656 
657  Float_t TauPhi = thePFTau.phi();
658  Float_t TauPt = thePFTau.pt();
659  Float_t TauSignalPFChargedCands = thePFTau.signalPFChargedHadrCands().size();
660  Float_t TauSignalPFGammaCands = thePFTau.signalPFGammaCands().size();
661  Float_t TauLeadPFChargedHadrHoP = 0.;
662  Float_t TauLeadPFChargedHadrEoP = 0.;
663  if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) {
664  TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
665  TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p();
666  }
667  Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull();
668  Float_t TauVisMass = thePFTau.mass();
669  Float_t TauEmFraction = TMath::Max(thePFTau.emFraction(), (Float_t)0.);
670  std::vector<Float_t> GammasdEta;
671  std::vector<Float_t> GammasdPhi;
672  std::vector<Float_t> GammasPt;
673  for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) {
674  reco::PFCandidateRef gamma = thePFTau.signalPFGammaCands().at(i);
675  if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) {
676  GammasdEta.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta());
677  GammasdPhi.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi());
678  } else {
679  GammasdEta.push_back(gamma->eta() - thePFTau.eta());
680  GammasdPhi.push_back(gamma->phi() - thePFTau.phi());
681  }
682  GammasPt.push_back(gamma->pt());
683  }
684 
685  Float_t dummyElecEta = 9.9;
686 
687  return MVAValue(TauEtaAtEcalEntrance,
688  TauPhi,
689  TauPt,
690  TauSignalPFChargedCands,
691  TauSignalPFGammaCands,
692  TauLeadPFChargedHadrHoP,
693  TauLeadPFChargedHadrEoP,
694  TauHasGsf,
695  TauVisMass,
696  TauEmFraction,
697  GammasdEta,
698  GammasdPhi,
699  GammasPt,
700  dummyElecEta,
701  0.,
702  0.,
703  0.,
704  0.,
705  0.,
706  0.,
707  0.,
708  0.,
709  0.,
710  0.,
711  0.,
712  0.,
713  0.,
714  0.,
715  0.,
716  0.);
717 }
const double Pi
int i
Definition: DBlmapReader.cc:9
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:272
float emFraction() const
Definition: PFTau.cc:158
const PFCandidateRefVector & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:75
float fbrem() const
Definition: GsfElectron.h:639
bool isAvailable() const
Definition: Ref.h:276
const PFCandidateRefVector & signalPFCands() const
PFCandidates in signal region.
Definition: PFTau.cc:73
TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:185
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
void Initialize_from_string(const std::string &methodName, const std::string &oneProngNoEleMatch_BL, const std::string &oneProng0Pi0_BL, const std::string &oneProng1pi0woGSF_BL, const std::string &oneProng1pi0wGSFwoPfEleMva_BL, const std::string &oneProng1pi0wGSFwPfEleMva_BL, const std::string &oneProngNoEleMatch_EC, const std::string &oneProng0Pi0_EC, const std::string &oneProng1pi0woGSF_EC, const std::string &oneProng1pi0wGSFwoPfEleMva_EC, const std::string &oneProng1pi0wGSFwPfEleMva_EC)
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
const MvaInput & mvaInput() const
Definition: GsfElectron.h:557
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:274
TMVA::Reader * fTMVAReader_[10]
int j
Definition: DBlmapReader.cc:9
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
void Initialize_from_file(const std::string &methodName, const std::string &oneProngNoEleMatch_BL, const std::string &oneProng0Pi0_BL, const std::string &oneProng1pi0woGSF_BL, const std::string &oneProng1pi0wGSFwoPfEleMva_BL, const std::string &oneProng1pi0wGSFwPfEleMva_BL, const std::string &oneProngNoEleMatch_EC, const std::string &oneProng0Pi0_EC, const std::string &oneProng1pi0woGSF_EC, const std::string &oneProng1pi0wGSFwoPfEleMva_EC, const std::string &oneProng1pi0wGSFwPfEleMva_EC)
virtual float mass() const GCC11_FINAL
mass
const PFCandidateRef & leadPFChargedHadrCand() const
Definition: PFTau.cc:62
const PFCandidateRefVector & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:79
const MvaOutput & mvaOutput() const
Definition: GsfElectron.h:558
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:76
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPhi, Float_t TauPt, Float_t TauSignalPFChargedCands, Float_t TauSignalPFGammaCands, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauHasGsf, Float_t TauVisMass, Float_t TauEmFraction, const std::vector< Float_t > &GammasdEta, const std::vector< Float_t > &GammasdPhi, const std::vector< Float_t > &GammasPt, Float_t ElecEta, Float_t ElecPhi, Float_t ElecPt, Float_t ElecPFMvaOutput, Float_t ElecEe, Float_t ElecEgamma, Float_t ElecPin, Float_t ElecPout, Float_t ElecEarlyBrem, Float_t ElecLateBrem, Float_t ElecFbrem, Float_t ElecChi2KF, Float_t ElecChi2GSF, Float_t ElecNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecGSFTrackEta)
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
tuple cout
Definition: gather_cfg.py:121
virtual float pt() const GCC11_FINAL
transverse momentum
SuperClusterRef pflowSuperCluster() const
Definition: GsfElectron.h:174
tuple size
Write out results.
list at
Definition: asciidump.py:428
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
void loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)