TargetAttenuationReweighter.h
Go to the documentation of this file.
1 #ifndef TARGETATTENUATIONREWEIGHTER_H
2 #define TARGETATTENUATIONREWEIGHTER_H
3 
5 
6 #if defined __clang__
7  #pragma clang diagnostic push
8  #pragma clang diagnostic ignored "-Wunused-private-field"
9 #endif
10 namespace NeutrinoFluxReweight{
11 
12  /*! \class TargetAttenuationReweighter
13  * \brief Reweight to account for attenuation of the beam in the target
14  *
15  * If the MC does not get the reaction cross-section correct the number of interactions in the target, the number of
16  * primary protons which do not interact in the target, and the distribution of interactions along z are affected. MIPP
17  * measures yields per incoming proton, not per interaction, so their measurment includes the probability of interaction
18  * and also the yield per interaction.
19  */
20 
22  public:
23  TargetAttenuationReweighter(int iuniv, const ParameterTable& cv_pars, const ParameterTable& univ_pars);
25  virtual std::vector<bool> canReweight(const InteractionChainData& aa);
26  virtual double calculateWeight(const InteractionChainData& aa);
27  /*!
28  * Uses the input target configuration to figure out and return
29  * the upstream edge of the 1st budal monitor.
30  * This function will look at the input string, remove anything that's
31  * not a digit, and then interpret the rest as an offset from the 000z position
32  */
33  static double targetStartZ(const std::string& tgtcfg);
34 
35  //!Get the additional shift for the Minerva playlist if this is defined
36  static double shiftPlaylist(const int ipl);
37 
38  //! does the configuration correspond to the ME beam?
39  static bool isME(const std::string& tgtcfg);
40 
41  //! does the configuration correspond to the LE beam?
42  static bool isLE(const std::string& tgtcfg);
43 
44  static double getTargetPenetrationLE(double z_start, double z_end, double z0_budal);
45  static double getTargetPenetrationME(double z_start, double z_end, double z0_budal);
46 
47  static double getZTgtExit(double pos_start[], double mom_start[], bool leflag, bool meflag);
48 
49  private:
52  int iUniv;
57 
58  };
59 
60 
61 }
62 #if defined __clang__
63  #pragma clang diagnostic pop
64 #endif
65 
66 #endif
A list/table of parameter names and values.
Reweight to account for attenuation of the beam in the target.
static bool isLE(const std::string &tgtcfg)
does the configuration correspond to the LE beam?
std::string string
Definition: nybbler.cc:12
Information about the chain of interactions leading to a neutrino.
static double shiftPlaylist(const int ipl)
Get the additional shift for the Minerva playlist if this is defined.
static double getZTgtExit(double pos_start[], double mom_start[], bool leflag, bool meflag)
static double getTargetPenetrationLE(double z_start, double z_end, double z0_budal)
static bool isME(const std::string &tgtcfg)
does the configuration correspond to the ME beam?
TargetAttenuationReweighter(int iuniv, const ParameterTable &cv_pars, const ParameterTable &univ_pars)
virtual std::vector< bool > canReweight(const InteractionChainData &aa)
Look through the InteractionChainData input and identify those Interactions that can be reweighted as...
virtual double calculateWeight(const InteractionChainData &aa)
calculate a weight for this interaction chain given the central value parameters and the parameters f...
static double getTargetPenetrationME(double z_start, double z_end, double z0_budal)