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

Reweight a MC survival probabiity when the particles through volumes. More...

#include <OtherAbsorptionOutOfTargetReweighter.h>

Inheritance diagram for NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter:
NeutrinoFluxReweight::IInteractionChainReweighting

Public Member Functions

 OtherAbsorptionOutOfTargetReweighter (int iuniv, const ParameterTable &cv_pars, const ParameterTable &univ_pars)
 
virtual ~OtherAbsorptionOutOfTargetReweighter ()
 
virtual std::vector< boolcanReweight (const InteractionChainData &aa)
 Look through the InteractionChainData input and identify those Interactions that can be reweighted as part of a chain. We return a vector indicating which elements will be assigned a weight by calculateWeight. More...
 
virtual double calculateWeight (const InteractionChainData &aa)
 calculate a weight for this interaction chain given the central value parameters and the parameters for this universe. The weight is something like: f(cv)/f(MC) * f(univ)/f(cv) where cv in this case corresponds to the best value of the parameter, given the data. If univ_pars=cv_pars then we are calculating a central value weight. Note, canReweight() should be called to determine which elements of the chain are covered by the weight returned by calculateWeight() More...
 
- Public Member Functions inherited from NeutrinoFluxReweight::IInteractionChainReweighting
virtual ~IInteractionChainReweighting ()
 

Public Attributes

const ParameterTablecvPars
 
const ParameterTableunivPars
 

Private Attributes

int iUniv
 
float inel_kapAl_xsec_lowP
 
float inel_kapAl_xsec_highP
 

Detailed Description

Reweight a MC survival probabiity when the particles through volumes.

Definition at line 16 of file OtherAbsorptionOutOfTargetReweighter.h.

Constructor & Destructor Documentation

NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::OtherAbsorptionOutOfTargetReweighter ( int  iuniv,
const ParameterTable cv_pars,
const ParameterTable univ_pars 
)

The constructor. Note, we pass central value and single universe parameters in this constructor only. There is thus a 1 to 1 correspondence between an instance of this class and a given universe.

Definition at line 12 of file OtherAbsorptionOutOfTargetReweighter.cpp.

12  :cvPars(cv_pars),univPars(univ_pars),iUniv(iuniv){
13 
14  // const boost::interprocess::flat_map<std::string, double>& dsig_table = univPars.getMap();
15  inel_kapAl_xsec_lowP = univPars.getParameterValue("inel_kapAl_xsec_lowP");
16  inel_kapAl_xsec_highP = univPars.getParameterValue("inel_kapAl_xsec_highP");
17  }
double getParameterValue(const std::string &name) const
get the value of a parameter. throw an exception of a well defined type if we don&#39;t have it ...
NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::~OtherAbsorptionOutOfTargetReweighter ( )
virtual

Definition at line 18 of file OtherAbsorptionOutOfTargetReweighter.cpp.

18  {
19 
20  }

Member Function Documentation

double NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::calculateWeight ( const InteractionChainData aa)
virtual

calculate a weight for this interaction chain given the central value parameters and the parameters for this universe. The weight is something like: f(cv)/f(MC) * f(univ)/f(cv) where cv in this case corresponds to the best value of the parameter, given the data. If univ_pars=cv_pars then we are calculating a central value weight. Note, canReweight() should be called to determine which elements of the chain are covered by the weight returned by calculateWeight()

Implements NeutrinoFluxReweight::IInteractionChainReweighting.

Definition at line 41 of file OtherAbsorptionOutOfTargetReweighter.cpp.

41  {
42 
43  std::vector<ParticlesThroughVolumesData> vec_ptv = aa.ptv_info;
44 
45  double shift_lowP = inel_kapAl_xsec_lowP;
46  double shift_highP = inel_kapAl_xsec_highP;
47 
48  double NA_mb = 6.02E-4;
49  double wgt = 1.0;
50  double tot_dist = 0.0;
51  double low_val = 1.E-20;
52 
53  for(int index_vol=0;index_vol<3;index_vol++){
54  for(int ii=0;ii<3;ii++){
55 
56  tot_dist = vec_ptv[index_vol].AmountMat[ii];
57  if(tot_dist<low_val)continue;
58  if(abs(vec_ptv[index_vol].Pdgs[ii])==321 || abs(vec_ptv[index_vol].Pdgs[ii])==211 || vec_ptv[index_vol].Pdgs[ii]==2212 || vec_ptv[index_vol].Pdgs[ii]==2112 || abs(vec_ptv[index_vol].Pdgs[ii])<100)continue;
59 
60  tot_dist *= NA_mb;
61  if(vec_ptv[index_vol].Moms[ii]<2.0){
62  tot_dist *= shift_lowP;
63  }
64  else if(vec_ptv[index_vol].Moms[ii]>=2.0){
65  tot_dist *= shift_highP;
66  }
67  wgt *= exp(-1.0*tot_dist);
68  }
69  }
70  return wgt;
71 
72  }
T abs(T value)
std::vector< bool > NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::canReweight ( const InteractionChainData aa)
virtual

Look through the InteractionChainData input and identify those Interactions that can be reweighted as part of a chain. We return a vector indicating which elements will be assigned a weight by calculateWeight.

Implements NeutrinoFluxReweight::IInteractionChainReweighting.

Definition at line 21 of file OtherAbsorptionOutOfTargetReweighter.cpp.

21  {
22 
23  std::vector<bool> this_nodes;
24  //int index_vol = 0;
25  double low_val = 1.E-20;
26 
27  std::vector<ParticlesThroughVolumesData> vec_ptv = aa.ptv_info;
28 
29  bool passVOL = false;
30  //Cheking at least one ancestor with amount of materail value:
31 
32  for(int index_vol=0;index_vol<3;index_vol++){
33  for(int ii=0;ii<3;ii++){
34  passVOL = passVOL || (vec_ptv[index_vol].AmountMat[ii] >low_val && (abs(vec_ptv[index_vol].Pdgs[ii])!=211 && abs(vec_ptv[index_vol].Pdgs[ii])!=321 && vec_ptv[index_vol].Pdgs[ii]!=2212 && vec_ptv[index_vol].Pdgs[ii]!=2112 && abs(vec_ptv[index_vol].Pdgs[ii])>99));
35  }
36  }
37  this_nodes.push_back(passVOL);
38  return this_nodes;
39 
40  }
T abs(T value)

Member Data Documentation

const ParameterTable& NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::cvPars

Definition at line 27 of file OtherAbsorptionOutOfTargetReweighter.h.

float NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::inel_kapAl_xsec_highP
private

Definition at line 31 of file OtherAbsorptionOutOfTargetReweighter.h.

float NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::inel_kapAl_xsec_lowP
private

Definition at line 31 of file OtherAbsorptionOutOfTargetReweighter.h.

int NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::iUniv
private

Definition at line 30 of file OtherAbsorptionOutOfTargetReweighter.h.

const ParameterTable& NeutrinoFluxReweight::OtherAbsorptionOutOfTargetReweighter::univPars

Definition at line 28 of file OtherAbsorptionOutOfTargetReweighter.h.


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