Public Member Functions | Protected Member Functions | List of all members
ana::GetNCPi0BDTID Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/CAFAna/Vars/NDNCPi0Xsec.h"

Public Member Functions

 GetNCPi0BDTID ()
 
float operator() (const caf::SRProxy *sr) const
 
 GetNCPi0BDTID ()
 
float operator() (const caf::SRProxy *sr) const
 

Protected Member Functions

float InitTMVA () const
 
float InitTMVA () const
 

Detailed Description

Definition at line 13 of file NDNCPi0Xsec.h.

Constructor & Destructor Documentation

ana::GetNCPi0BDTID::GetNCPi0BDTID ( )
inline

Definition at line 16 of file NDNCPi0Xsec.h.

References InitTMVA(), operator()(), and sr.

Referenced by GetNCPi0BDTID().

16 {}
ana::GetNCPi0BDTID::GetNCPi0BDTID ( )
inline

Definition at line 20 of file NDNCPi0Xsec.h.

References GetNCPi0BDTID(), InitTMVA(), ana::kNCPi0BDTID, operator()(), and sr.

20 {}

Member Function Documentation

float ana::GetNCPi0BDTID::InitTMVA ( ) const
protected

Definition at line 60 of file NDNCPi0Xsec.cxx.

References string.

Referenced by GetNCPi0BDTID(), and operator()().

61  {
62  if(!fReaderBDT) fReaderBDT = new TMVA::Reader;
63 
64 
65  // std::string pidlib = "/nova/app/users/kalra/caf_S170531_June32017/mywork/maketree/TrainingWithOptimizeSelection/includeCVNNC/weights/MVAnalysis_BDTG.weights.xml";
66  std::string pidlib = "/nova/app/users/acedeno/tag_releasesS18-06-14/NDAna/ncpi0_semi_inc_png_cvn/dataset/weights/Nc_pi0_nominaldataset_weights_BDTG.weights.xml";
67 
68  //std::string pidlib = "/nova/app/users/kalra/caf_S170531_June32017/mywork/maketree/TrainingWithOptimizeSelection/includeCVNNC/TryNEwTrainingWithSomePng2vars/weights/MVAnalysis_BDTG.weights.xml";
69 
70  fReaderBDT->AddVariable("npng1gamma", &TMVAvars[0]);
71  fReaderBDT->AddVariable("npng2gamma", &TMVAvars[1]);
72  fReaderBDT->AddVariable("ncgappng1", &TMVAvars[2]);
73  fReaderBDT->AddVariable("ncgappng2", &TMVAvars[3]);
74 
75 
76  fReaderBDT->BookMVA("BDTG", pidlib);
77  return 0.0f;
78  }
static TMVA::Reader * fReaderBDT
Definition: NDNCPi0Xsec.cxx:11
static float TMVAvars[4]
Definition: NDNCPi0Xsec.cxx:10
enum BeamMode string
float ana::GetNCPi0BDTID::InitTMVA ( ) const
protected
float ana::GetNCPi0BDTID::operator() ( const caf::SRProxy sr) const

Definition at line 13 of file NDNCPi0Xsec.cxx.

References caf::Proxy< caf::SRVertexBranch >::elastic, check_time_usage::float, caf::Proxy< caf::SRElastic >::fuzzyk, InitTMVA(), make_root_from_grid_output::ncgappng1, make_root_from_grid_output::ncgappng2, caf::Proxy< caf::SRFuzzyK >::npng, make_root_from_grid_output::npng1gamma, make_root_from_grid_output::npng2gamma, caf::Proxy< caf::SRFuzzyK >::png, and caf::Proxy< caf::StandardRecord >::vtx.

Referenced by GetNCPi0BDTID().

14  {
15  float ncpi0bdtid=-999;
16  float bdtg = -5.0;
17  if(!fReaderBDT) InitTMVA();
18 
19  float npng1gamma=0.0, npng2gamma=0.0, ncgappng1=0.0, ncgappng2=0.0;
20  //Nominal Prong-CVN
21  npng1gamma=sr->vtx.elastic.fuzzyk.png[0].cvnpart.photonid;
22 
23  if(sr->vtx.elastic.fuzzyk.npng<2) return float(-1);
24  npng2gamma=sr->vtx.elastic.fuzzyk.png[1].cvnpart.photonid;
25 
26  // 2View Prong_CVN
27  // npng1gamma=sr->vtx.elastic.fuzzyk.png[0].cvnpart2View.photonid;
28  // npng2gamma=sr->vtx.elastic.fuzzyk.png[1].cvnpart2View.photonid;
29 
30  // GenieLike Prong-CVN
31  // npng1gamma=sr->vtx.elastic.fuzzyk.png[0].cvnpart2GenieLike.photonid;
32  // npng2gamma=sr->vtx.elastic.fuzzyk.png[1].cvnpart2GenieLike.photonid;
33 
34  // 2FlatFlux Prong-CVN
35  // npng1gamma=sr->vtx.elastic.fuzzyk.png[0].cvnpart2FlatFlux.photonid;
36  // npng2gamma=sr->vtx.elastic.fuzzyk.png[1].cvnpart2FlatFlux.photonid;
37 
38 
39  ncgappng1=sr->vtx.elastic.fuzzyk.png[0].shwlid.gap;
40  ncgappng2=sr->vtx.elastic.fuzzyk.png[1].shwlid.gap;
41 
42 
43  TMVAvars[0] = npng1gamma;
44  TMVAvars[1] = npng2gamma;
45  TMVAvars[2] = ncgappng1;
46  TMVAvars[3] = ncgappng2;
47 
48 
49 
50  if(!fReaderBDT) InitTMVA();
51  bdtg = fReaderBDT->EvaluateMVA("BDTG");
52 
53  if (bdtg > ncpi0bdtid)
54  {
55  ncpi0bdtid=bdtg;
56  }
57  return ncpi0bdtid;
58  }
caf::Proxy< size_t > npng
Definition: SRProxy.h:2038
static TMVA::Reader * fReaderBDT
Definition: NDNCPi0Xsec.cxx:11
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
float InitTMVA() const
Definition: NDNCPi0Xsec.cxx:60
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2043
static float TMVAvars[4]
Definition: NDNCPi0Xsec.cxx:10
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146
float ana::GetNCPi0BDTID::operator() ( const caf::SRProxy sr) const

The documentation for this class was generated from the following files: