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

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

Public Member Functions

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

Protected Member Functions

void InitializeMippNA49NOvAND () const
 

Protected Attributes

TH1D * fRatiosn [4] = {0}
 

Detailed Description

Definition at line 120 of file Vars.h.

Constructor & Destructor Documentation

ana::GetWtMippNA49NOvAND::GetWtMippNA49NOvAND ( )
inline

Definition at line 123 of file Vars.h.

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

123 { }

Member Function Documentation

void ana::GetWtMippNA49NOvAND::InitializeMippNA49NOvAND ( ) const
protected

Definition at line 234 of file Vars.cxx.

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

234  {
235  if(fRatiosn[0]) return;
236  std::string fname = FindCAFAnaDir()+"/data/beam/NOvAMippNA49NDFD.root";
237  TFile fin(fname.c_str(), "read");
238  if(fin.IsZombie()) {
239  std::cerr << "Could not open " << fname << std::endl;
240  return;
241  }
242  fRatiosn[0] = (TH1D*)fin.Get("NDnumu")->Clone();
243  fRatiosn[0]->SetDirectory(0);
244  fRatiosn[1] = (TH1D*)fin.Get("NDanumu")->Clone();
245  fRatiosn[1]->SetDirectory(0);
246  fRatiosn[2] = (TH1D*)fin.Get("NDnue")->Clone();
247  fRatiosn[2]->SetDirectory(0);
248  fRatiosn[3] = (TH1D*)fin.Get("NDanue")->Clone();
249  fRatiosn[3]->SetDirectory(0);
250  }
TString fin
Definition: Style.C:24
OStream cerr
Definition: OStream.cxx:7
std::string FindCAFAnaDir()
Definition: Utilities.cxx:204
TH1D * fRatiosn[4]
Definition: Vars.h:127
enum BeamMode string
double ana::GetWtMippNA49NOvAND::operator() ( const caf::SRProxy sr) const

Definition at line 207 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.

208  {
210  if(sr->hdr.det!=1 || sr->mc.nnu==0) return 1;
211  double te = sr->mc.nu[0].E;
212  float weight = 1;
213  if(sr->mc.nu[0].pdgorig == 14) { // weights taken from Mipp+NA49 NOvA Xuebing & Kuldeep ratio plots
214  if(te < 20){weight = fRatiosn[0]->Interpolate(te);}
215  else {weight = 1;}
216  }
217  else if(sr->mc.nu[0].pdgorig == -14) {
218  if(te < 20) {weight = fRatiosn[1]->Interpolate(te);}
219  else {weight = 1;}
220  }
221  else if(sr->mc.nu[0].pdgorig == 12) {
222  if(te < 20) {weight = fRatiosn[2]->Interpolate(te);}
223  else {weight = 1;}
224  }
225 
226  else if(sr->mc.nu[0].pdgorig == -12) {
227  if(te < 20) {weight = fRatiosn[3]->Interpolate(te);}
228  else {weight = 1;}
229  }
230  else weight = 1;
231  return weight;
232  }
const Var weight
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
void InitializeMippNA49NOvAND() const
Definition: Vars.cxx:234
caf::Proxy< std::vector< caf::SRNeutrino > > nu
Definition: SRProxy.h:618
caf::Proxy< short int > nnu
Definition: SRProxy.h:617
caf::Proxy< caf::SRTruthBranch > mc
Definition: SRProxy.h:2138
TH1D * fRatiosn[4]
Definition: Vars.h:127
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232

Member Data Documentation

TH1D* ana::GetWtMippNA49NOvAND::fRatiosn[4] = {0}
mutableprotected

Definition at line 127 of file Vars.h.


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