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

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-03-07/CAFAna/Vars/Vars.h"

Public Member Functions

 GetWtMippNA49NOvAFD ()
 
double operator() (const caf::SRProxy *sr) const
 

Protected Member Functions

void InitializeMippNA49NOvAFD () const
 

Protected Attributes

TH1D * fRatiosf [4] = {0}
 

Detailed Description

Definition at line 129 of file Vars.h.

Constructor & Destructor Documentation

ana::GetWtMippNA49NOvAFD::GetWtMippNA49NOvAFD ( )
inline

Definition at line 132 of file Vars.h.

References ana::GetWtMinervaND::operator()(), and sr.

132 { }

Member Function Documentation

void ana::GetWtMippNA49NOvAFD::InitializeMippNA49NOvAFD ( ) const
protected

Definition at line 280 of file Vars.cxx.

References om::cerr, allTimeWatchdog::endl, fin, ana::FindCAFAnaDir(), plot_validation_datamc::fname, and string.

280  {
281  if(fRatiosf[0]) return;
282  std::string fname = FindCAFAnaDir()+"/data/beam/NOvAMippNA49NDFD.root";
283  TFile fin(fname.c_str(), "read");
284  if(fin.IsZombie()) {
285  std::cerr << "Could not open " << fname << std::endl;
286  return;
287  }
288  fRatiosf[0] = (TH1D*)fin.Get("FDnumu")->Clone();
289  fRatiosf[0]->SetDirectory(0);
290  fRatiosf[1] = (TH1D*)fin.Get("FDanumu")->Clone();
291  fRatiosf[1]->SetDirectory(0);
292  fRatiosf[2] = (TH1D*)fin.Get("FDnue")->Clone();
293  fRatiosf[2]->SetDirectory(0);
294  fRatiosf[3] = (TH1D*)fin.Get("FDanue")->Clone();
295  fRatiosf[3]->SetDirectory(0);
296  }
TString fin
Definition: Style.C:24
OStream cerr
Definition: OStream.cxx:7
std::string FindCAFAnaDir()
Definition: Utilities.cxx:204
TH1D * fRatiosf[4]
Definition: Vars.h:136
enum BeamMode string
double ana::GetWtMippNA49NOvAFD::operator() ( const caf::SRProxy sr) const

Definition at line 253 of file Vars.cxx.

References caf::Proxy< caf::SRHeader >::det, caf::Proxy< caf::StandardRecord >::hdr, caf::Proxy< caf::StandardRecord >::mc, caf::Proxy< caf::SRTruthBranch >::nnu, caf::Proxy< caf::SRTruthBranch >::nu, and ana::weight.

254  {
256  if(sr->hdr.det!=2 || sr->mc.nnu==0) return 1;
257 
258  double te = sr->mc.nu[0].E;
259  float weight = 1;
260 
261  if(sr->mc.nu[0].pdgorig == 14) { // weights taken from Mipp+NA49 NOvA Xuebing & Kuldeep ratio plots
262  if(te < 20){weight = fRatiosf[0]->Interpolate(te);}
263  else {weight = 1;}
264  }
265  else if(sr->mc.nu[0].pdgorig == -14) {
266  if(te < 20) {weight = fRatiosf[1]->Interpolate(te);}
267  else {weight = 1;}
268  }
269  else if(sr->mc.nu[0].pdgorig == 12) {
270  if(te < 20) {weight = fRatiosf[2]->Interpolate(te);}
271  else {weight = 1;}
272  }
273  else if(sr->mc.nu[0].pdgorig == -12) {
274  if(te < 20) {weight = fRatiosf[3]->Interpolate(te);}
275  else {weight = 1;}
276  }
277  else weight = 1;
278  return weight;
279  }
const Var weight
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
void InitializeMippNA49NOvAFD() const
Definition: Vars.cxx:280
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
TH1D * fRatiosf[4]
Definition: Vars.h:136
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232

Member Data Documentation

TH1D* ana::GetWtMippNA49NOvAFD::fRatiosf[4] = {0}
mutableprotected

Definition at line 136 of file Vars.h.


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