Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
NeutrinoFluxReweight::AttenuationMC Class Reference

#include <AttenuationMC.h>

Static Public Member Functions

static AttenuationMCgetInstance ()
 

Public Attributes

TH1D * hXS_piAl
 
TH1D * hXS_prtC
 
TH1D * hXS_piC
 
TH1D * hXS_kapC
 
TH1D * hXS_kamC
 
std::vector< TH1D * > hzpostgt_pip_le
 
std::vector< TH1D * > hzpostgt_pip_me
 
std::vector< TH1D * > hzpostgt_pim_le
 
std::vector< TH1D * > hzpostgt_pim_me
 
std::vector< TH1D * > hzpostgt_kap_le
 
std::vector< TH1D * > hzpostgt_kap_me
 
std::vector< TH1D * > hzpostgt_kam_le
 
std::vector< TH1D * > hzpostgt_kam_me
 

Private Member Functions

 AttenuationMC ()
 
 ~AttenuationMC ()
 

Private Attributes

TFile * fInelXS_MC
 
TFile * fzpos_tgt_MC_le
 
TFile * fzpos_tgt_MC_me
 

Static Private Attributes

static AttenuationMCinstance = 0
 

Detailed Description

Definition at line 11 of file AttenuationMC.h.

Constructor & Destructor Documentation

NeutrinoFluxReweight::AttenuationMC::AttenuationMC ( )
private

Definition at line 9 of file AttenuationMC.cpp.

9  {
10  const char* ppfxDir = getenv("PPFX_DIR");
11  char dirData[400];
12  sprintf(dirData,"%s/data",ppfxDir);
13 
14  AttenuationMC::fInelXS_MC = new TFile(Form("%s/MC/InelXS_geant4.root",dirData),"read");
15 
16  AttenuationMC::fzpos_tgt_MC_le = new TFile(Form("%s/MIPP/tarpos_yield_le.root",dirData),"read");
17  AttenuationMC::fzpos_tgt_MC_me = new TFile(Form("%s/MIPP/tarpos_yield_me.root",dirData),"read");
18 
19  //Loading the geant4 inelastic cross section for pion on Aluminum
20  AttenuationMC::hXS_piAl = (TH1D*)AttenuationMC::fInelXS_MC->Get("pip/hpip_Al");
21  AttenuationMC::hXS_prtC = (TH1D*)AttenuationMC::fInelXS_MC->Get("prt/hprt_C");
22  AttenuationMC::hXS_piC = (TH1D*)AttenuationMC::fInelXS_MC->Get("pip/hpip_C");
23  AttenuationMC::hXS_kapC = (TH1D*)AttenuationMC::fInelXS_MC->Get("kap/hkap_C");
24  AttenuationMC::hXS_kamC = (TH1D*)AttenuationMC::fInelXS_MC->Get("kam/hkam_C");
25 
26  //Loading z postition histograms from MC g4NuMI:
27  //These are yields per z position per MIPP particle per MIPP bin.
28  //per 2.5E8 POT
29  //For pip: 124 bins, for pim: 119
30  char namehist[100];
31  for(int ibin=0;ibin<124;ibin++){
32  sprintf(namehist,"pip/htar_ydz_pip_bin%d",ibin);
33  AttenuationMC::hzpostgt_pip_le.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_le->Get(namehist));
34  AttenuationMC::hzpostgt_pip_me.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_me->Get(namehist));
35  }
36  for(int ibin=0;ibin<119;ibin++){
37  sprintf(namehist,"pim/htar_ydz_pim_bin%d",ibin);
38  AttenuationMC::hzpostgt_pim_le.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_le->Get(namehist));
39  AttenuationMC::hzpostgt_pim_me.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_me->Get(namehist));
40  }
41  //for kap and kam, we are going to get just thoese what we need (p_{Z} > 20 GeV/c)
42  //that means, for kap and kam do not consider the first 78 hist and for kam
43  for(int ibin=78;ibin<124;ibin++){
44  sprintf(namehist,"kap/htar_ydz_kap_bin%d",ibin);
45  AttenuationMC::hzpostgt_kap_le.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_le->Get(namehist));
46  AttenuationMC::hzpostgt_kap_me.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_me->Get(namehist));
47  sprintf(namehist,"kam/htar_ydz_kam_bin%d",ibin);
48  AttenuationMC::hzpostgt_kam_le.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_le->Get(namehist));
49  AttenuationMC::hzpostgt_kam_me.push_back((TH1D*)AttenuationMC::fzpos_tgt_MC_me->Get(namehist));
50  }
51 
52  }
std::vector< TH1D * > hzpostgt_kam_le
Definition: AttenuationMC.h:29
std::vector< TH1D * > hzpostgt_pip_le
Definition: AttenuationMC.h:26
std::vector< TH1D * > hzpostgt_kam_me
Definition: AttenuationMC.h:29
std::vector< TH1D * > hzpostgt_pim_me
Definition: AttenuationMC.h:27
std::vector< TH1D * > hzpostgt_pip_me
Definition: AttenuationMC.h:26
std::vector< TH1D * > hzpostgt_kap_me
Definition: AttenuationMC.h:28
std::string getenv(std::string const &name)
Definition: getenv.cc:15
std::vector< TH1D * > hzpostgt_kap_le
Definition: AttenuationMC.h:28
std::vector< TH1D * > hzpostgt_pim_le
Definition: AttenuationMC.h:27
NeutrinoFluxReweight::AttenuationMC::~AttenuationMC ( )
private

Definition at line 54 of file AttenuationMC.cpp.

54  {
55  }

Member Function Documentation

AttenuationMC * NeutrinoFluxReweight::AttenuationMC::getInstance ( )
static

Definition at line 57 of file AttenuationMC.cpp.

57  {
58  if (instance == 0) instance = new AttenuationMC;
59  return instance;
60  }
static AttenuationMC * instance
Definition: AttenuationMC.h:32

Member Data Documentation

TFile* NeutrinoFluxReweight::AttenuationMC::fInelXS_MC
private

Definition at line 33 of file AttenuationMC.h.

TFile* NeutrinoFluxReweight::AttenuationMC::fzpos_tgt_MC_le
private

Definition at line 34 of file AttenuationMC.h.

TFile* NeutrinoFluxReweight::AttenuationMC::fzpos_tgt_MC_me
private

Definition at line 35 of file AttenuationMC.h.

TH1D* NeutrinoFluxReweight::AttenuationMC::hXS_kamC

Definition at line 24 of file AttenuationMC.h.

TH1D* NeutrinoFluxReweight::AttenuationMC::hXS_kapC

Definition at line 23 of file AttenuationMC.h.

TH1D* NeutrinoFluxReweight::AttenuationMC::hXS_piAl

Definition at line 20 of file AttenuationMC.h.

TH1D* NeutrinoFluxReweight::AttenuationMC::hXS_piC

Definition at line 22 of file AttenuationMC.h.

TH1D* NeutrinoFluxReweight::AttenuationMC::hXS_prtC

Definition at line 21 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_kam_le

Definition at line 29 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_kam_me

Definition at line 29 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_kap_le

Definition at line 28 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_kap_me

Definition at line 28 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_pim_le

Definition at line 27 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_pim_me

Definition at line 27 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_pip_le

Definition at line 26 of file AttenuationMC.h.

std::vector<TH1D*> NeutrinoFluxReweight::AttenuationMC::hzpostgt_pip_me

Definition at line 26 of file AttenuationMC.h.

AttenuationMC * NeutrinoFluxReweight::AttenuationMC::instance = 0
staticprivate

Definition at line 32 of file AttenuationMC.h.


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