FluxWeights.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file FluxWeights.cxx
3 // \brief Store flux weigths for neutrino correction
4 // \author Leo Aliaga - laliaga@fnal.gov
5 ////////////////////////////////////////////////////////////////////////
6 
8 
9 namespace fxwgt
10 {
12  fcv_hp = 1;
13  fcv_bf = 1;
14  fcv_ad = 1;
15  funiv_hp.clear();
16  funiv_bf.clear();
17  funiv_ad.clear();
18  fnuniv = 0;
19  }
20  /////
22  fcv_hp = cv;
23  }
25  fcv_bf = cv;
26  }
27  void FluxWeights::SetHadronProductionMultiUniverses(std::vector<float> vuniv){
28  funiv_hp = vuniv;
29  }
30  void FluxWeights::SetBeamFocusingMultiUniverses(std::vector<float> vuniv){
31  funiv_bf = vuniv;
32  }
34  fcv_ad = cv;
35  }
36  void FluxWeights::SetAdditionalMultiUniverses(std::vector<float> vuniv){
37  funiv_ad = vuniv;
38  }
39  ////
41  return fcv_hp;
42  }
44  return fcv_bf;
45  }
47  return fcv_hp*fcv_bf;
48  }
50  return fcv_ad;
51  }
53  return funiv_hp;
54  }
55  std::vector<float> FluxWeights::GetBeamFocusingMultiUniverses() const{
56  return funiv_bf;
57  }
58  std::vector<float> FluxWeights::GetTotalMultiUniverses() const{
59  std::vector<float> tmp_vec;
60  for(unsigned int ii=0;ii<FluxWeights::GetNumberOfUniverses();ii++){
61  tmp_vec.push_back(funiv_hp[ii]*funiv_bf[ii]);
62  }
63  return tmp_vec;
64  }
65  std::vector<float> FluxWeights::GetAdditionalMultiUniverses() const{
66  return funiv_ad;
67  }
68  unsigned int FluxWeights::GetNumberOfUniverses() const{
69  return funiv_hp.size();
70  }
71 }
72 
std::vector< float > GetBeamFocusingMultiUniverses() const
Get a vector of beam focusing multiuniverse weights.
Definition: FluxWeights.cxx:55
void SetBeamFocusingMultiUniverses(std::vector< float > vuniv)
Set a vector of beam focusing weights. Each entry represents the correction for one universe...
Definition: FluxWeights.cxx:30
std::vector< float > funiv_bf
Definition: FluxWeights.h:60
void SetAdditionalCentralValue(float cv)
Set an additional correction for the central value for not standard cases (special studies)...
Definition: FluxWeights.cxx:33
void SetBeamFocusingCentralValue(float cv)
Set beam focusing central value correction from PPFX.
Definition: FluxWeights.cxx:24
std::vector< float > GetAdditionalMultiUniverses() const
Get a vector of the additional multiuniverse weights.
Definition: FluxWeights.cxx:65
std::vector< float > funiv_ad
Definition: FluxWeights.h:61
std::vector< float > GetTotalMultiUniverses() const
Get a vector of total multiuniverse weights (every entry is the product of the HP and Beam Focusing)...
Definition: FluxWeights.cxx:58
float GetHadronProductionCentralValue() const
Get HP central value correction from PPFX.
Definition: FluxWeights.cxx:40
std::vector< float > funiv_hp
Definition: FluxWeights.h:59
void SetAdditionalMultiUniverses(std::vector< float > vuniv)
Set a vector of additional multi-universe weights for not standard cases (special studies)...
Definition: FluxWeights.cxx:36
const std::string cv[Ncv]
float GetAdditionalCentralValue() const
Get the additional stored central value correction.
Definition: FluxWeights.cxx:49
void SetHadronProductionCentralValue(float cv)
Set HP central value correction from PPFX.
Definition: FluxWeights.cxx:21
float GetBeamFocusingCentralValue() const
Get beam focusing central value correction from PPFX.
Definition: FluxWeights.cxx:43
unsigned int GetNumberOfUniverses() const
Get the total number of universes used.
Definition: FluxWeights.cxx:68
unsigned int fnuniv
Definition: FluxWeights.h:62
std::vector< float > GetHadronProductionMultiUniverses() const
Get a vector of HP multiuniverse weights.
Definition: FluxWeights.cxx:52
void SetHadronProductionMultiUniverses(std::vector< float > vuniv)
Set a vector of HP weights. Each entry represents the correction for one universe.
Definition: FluxWeights.cxx:27
float GetTotalCentralValue() const
Get the total central value correction calculated as the product of the HP and Beam Focusing componen...
Definition: FluxWeights.cxx:46