Public Member Functions | Protected Attributes | List of all members
fxwgt::FluxWeights Class Reference

Store flux weigths for neutrino correction. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-01/MCReweight/FluxWeights.h"

Public Member Functions

 FluxWeights ()
 
void SetHadronProductionCentralValue (float cv)
 Set HP central value correction from PPFX. More...
 
void SetBeamFocusingCentralValue (float cv)
 Set beam focusing central value correction from PPFX. More...
 
void SetHadronProductionMultiUniverses (std::vector< float > vuniv)
 Set a vector of HP weights. Each entry represents the correction for one universe. More...
 
void SetBeamFocusingMultiUniverses (std::vector< float > vuniv)
 Set a vector of beam focusing weights. Each entry represents the correction for one universe. More...
 
void SetAdditionalCentralValue (float cv)
 Set an additional correction for the central value for not standard cases (special studies). More...
 
void SetAdditionalMultiUniverses (std::vector< float > vuniv)
 Set a vector of additional multi-universe weights for not standard cases (special studies). More...
 
float GetHadronProductionCentralValue () const
 Get HP central value correction from PPFX. More...
 
float GetBeamFocusingCentralValue () const
 Get beam focusing central value correction from PPFX. More...
 
float GetTotalCentralValue () const
 Get the total central value correction calculated as the product of the HP and Beam Focusing components. More...
 
float GetAdditionalCentralValue () const
 Get the additional stored central value correction. More...
 
std::vector< float > GetHadronProductionMultiUniverses () const
 Get a vector of HP multiuniverse weights. More...
 
std::vector< float > GetBeamFocusingMultiUniverses () const
 Get a vector of beam focusing multiuniverse weights. More...
 
std::vector< float > GetTotalMultiUniverses () const
 Get a vector of total multiuniverse weights (every entry is the product of the HP and Beam Focusing). More...
 
std::vector< float > GetAdditionalMultiUniverses () const
 Get a vector of the additional multiuniverse weights. More...
 
unsigned int GetNumberOfUniverses () const
 Get the total number of universes used. More...
 

Protected Attributes

float fcv_hp
 
float fcv_bf
 
float fcv_ad
 
std::vector< float > funiv_hp
 
std::vector< float > funiv_bf
 
std::vector< float > funiv_ad
 
unsigned int fnuniv
 

Detailed Description

Store flux weigths for neutrino correction.

Definition at line 15 of file FluxWeights.h.

Constructor & Destructor Documentation

fxwgt::FluxWeights::FluxWeights ( )

Definition at line 11 of file FluxWeights.cxx.

References fcv_ad, fcv_bf, fcv_hp, fnuniv, funiv_ad, funiv_bf, and funiv_hp.

11  {
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  }
std::vector< float > funiv_bf
Definition: FluxWeights.h:60
std::vector< float > funiv_ad
Definition: FluxWeights.h:61
std::vector< float > funiv_hp
Definition: FluxWeights.h:59
unsigned int fnuniv
Definition: FluxWeights.h:62

Member Function Documentation

float fxwgt::FluxWeights::GetAdditionalCentralValue ( ) const

Get the additional stored central value correction.

Definition at line 49 of file FluxWeights.cxx.

References fcv_ad.

49  {
50  return fcv_ad;
51  }
std::vector< float > fxwgt::FluxWeights::GetAdditionalMultiUniverses ( ) const

Get a vector of the additional multiuniverse weights.

Definition at line 65 of file FluxWeights.cxx.

References funiv_ad.

65  {
66  return funiv_ad;
67  }
std::vector< float > funiv_ad
Definition: FluxWeights.h:61
float fxwgt::FluxWeights::GetBeamFocusingCentralValue ( ) const

Get beam focusing central value correction from PPFX.

Definition at line 43 of file FluxWeights.cxx.

References fcv_bf.

43  {
44  return fcv_bf;
45  }
std::vector< float > fxwgt::FluxWeights::GetBeamFocusingMultiUniverses ( ) const

Get a vector of beam focusing multiuniverse weights.

Definition at line 55 of file FluxWeights.cxx.

References funiv_bf.

55  {
56  return funiv_bf;
57  }
std::vector< float > funiv_bf
Definition: FluxWeights.h:60
float fxwgt::FluxWeights::GetHadronProductionCentralValue ( ) const

Get HP central value correction from PPFX.

Definition at line 40 of file FluxWeights.cxx.

References fcv_hp.

40  {
41  return fcv_hp;
42  }
std::vector< float > fxwgt::FluxWeights::GetHadronProductionMultiUniverses ( ) const

Get a vector of HP multiuniverse weights.

Definition at line 52 of file FluxWeights.cxx.

References funiv_hp.

52  {
53  return funiv_hp;
54  }
std::vector< float > funiv_hp
Definition: FluxWeights.h:59
unsigned int fxwgt::FluxWeights::GetNumberOfUniverses ( ) const

Get the total number of universes used.

Definition at line 68 of file FluxWeights.cxx.

References funiv_hp.

Referenced by caf::FluxReweights(), and GetTotalMultiUniverses().

68  {
69  return funiv_hp.size();
70  }
std::vector< float > funiv_hp
Definition: FluxWeights.h:59
float fxwgt::FluxWeights::GetTotalCentralValue ( ) const

Get the total central value correction calculated as the product of the HP and Beam Focusing components.

Definition at line 46 of file FluxWeights.cxx.

References fcv_bf, and fcv_hp.

Referenced by fnex::AnalysisSetupBase::FillTruthVars(), and caf::FluxReweights().

46  {
47  return fcv_hp*fcv_bf;
48  }
std::vector< float > fxwgt::FluxWeights::GetTotalMultiUniverses ( ) const

Get a vector of total multiuniverse weights (every entry is the product of the HP and Beam Focusing).

Definition at line 58 of file FluxWeights.cxx.

References funiv_bf, funiv_hp, and GetNumberOfUniverses().

Referenced by caf::FluxReweights().

58  {
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  }
std::vector< float > funiv_bf
Definition: FluxWeights.h:60
std::vector< float > funiv_hp
Definition: FluxWeights.h:59
unsigned int GetNumberOfUniverses() const
Get the total number of universes used.
Definition: FluxWeights.cxx:68
void fxwgt::FluxWeights::SetAdditionalCentralValue ( float  cv)

Set an additional correction for the central value for not standard cases (special studies).

Definition at line 33 of file FluxWeights.cxx.

References cv, and fcv_ad.

33  {
34  fcv_ad = cv;
35  }
const std::string cv[Ncv]
void fxwgt::FluxWeights::SetAdditionalMultiUniverses ( std::vector< float >  vuniv)

Set a vector of additional multi-universe weights for not standard cases (special studies).

Definition at line 36 of file FluxWeights.cxx.

References funiv_ad.

36  {
37  funiv_ad = vuniv;
38  }
std::vector< float > funiv_ad
Definition: FluxWeights.h:61
void fxwgt::FluxWeights::SetBeamFocusingCentralValue ( float  cv)

Set beam focusing central value correction from PPFX.

Definition at line 24 of file FluxWeights.cxx.

References cv, and fcv_bf.

Referenced by fxwgt::FluxWeightCalculator::produce().

24  {
25  fcv_bf = cv;
26  }
const std::string cv[Ncv]
void fxwgt::FluxWeights::SetBeamFocusingMultiUniverses ( std::vector< float >  vuniv)

Set a vector of beam focusing weights. Each entry represents the correction for one universe.

Definition at line 30 of file FluxWeights.cxx.

References funiv_bf.

Referenced by fxwgt::FluxWeightCalculator::produce().

30  {
31  funiv_bf = vuniv;
32  }
std::vector< float > funiv_bf
Definition: FluxWeights.h:60
void fxwgt::FluxWeights::SetHadronProductionCentralValue ( float  cv)

Set HP central value correction from PPFX.

Definition at line 21 of file FluxWeights.cxx.

References cv, and fcv_hp.

Referenced by fxwgt::FluxWeightCalculator::produce().

21  {
22  fcv_hp = cv;
23  }
const std::string cv[Ncv]
void fxwgt::FluxWeights::SetHadronProductionMultiUniverses ( std::vector< float >  vuniv)

Set a vector of HP weights. Each entry represents the correction for one universe.

Definition at line 27 of file FluxWeights.cxx.

References funiv_hp.

Referenced by fxwgt::FluxWeightCalculator::produce().

27  {
28  funiv_hp = vuniv;
29  }
std::vector< float > funiv_hp
Definition: FluxWeights.h:59

Member Data Documentation

float fxwgt::FluxWeights::fcv_ad
protected

Definition at line 58 of file FluxWeights.h.

Referenced by FluxWeights(), GetAdditionalCentralValue(), and SetAdditionalCentralValue().

float fxwgt::FluxWeights::fcv_bf
protected
float fxwgt::FluxWeights::fcv_hp
protected
unsigned int fxwgt::FluxWeights::fnuniv
protected

Definition at line 62 of file FluxWeights.h.

Referenced by FluxWeights().

std::vector<float> fxwgt::FluxWeights::funiv_ad
protected
std::vector<float> fxwgt::FluxWeights::funiv_bf
protected
std::vector<float> fxwgt::FluxWeights::funiv_hp
protected

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