Public Member Functions | Private Attributes | List of all members
genie::rew::GReWeightINukeParams::MFP Class Reference

#include <GReWeightINukeParams.h>

Public Member Functions

 MFP (HadronType_t hadtype=kRwINukeUndefined)
 
 ~MFP ()
 
double ScaleFactor (void) const
 mean free path scale factor = 1 + twk_dial * fractional_err More...
 
double TwkDial (void) const
 current value of mfp tweak dial More...
 
bool IsIncluded (void) const
 
bool IsTweaked (void) const
 
double ChisqPenalty (void) const
 
void Reset (void)
 
void SetTwkDial (double val)
 

Private Attributes

HadronType_t fHadType
 
GSyst_t fSyst
 
double fTwkDial
 
bool fIsIncluded
 

Detailed Description

Definition at line 109 of file GReWeightINukeParams.h.

Constructor & Destructor Documentation

GReWeightINukeParams::MFP::MFP ( GReWeightINukeParams::HadronType_t  ht = kRwINukeUndefined)

Definition at line 600 of file GReWeightINukeParams.cxx.

601 {
602  assert(ht != kRwINukeUndefined);
603 
604  fHadType = ht;
605 
606  // get corresponding GSyst_t param
608  else if (ht == kRwINukeNucl) fSyst = kINukeTwkDial_MFP_N;
609  else {
610  LOG("ReW", pFATAL)
611  << "Mean-free path reweighting code handles only pions or nucleons";
612  exit(1);
613  }
614 
615  this->Reset();
616 }
#define pFATAL
Definition: Messenger.h:47
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:87
tweak mean free path for nucleons
Definition: GSyst.h:125
tweak mean free path for pions
Definition: GSyst.h:124
GReWeightINukeParams::MFP::~MFP ( )

Definition at line 618 of file GReWeightINukeParams.cxx.

619 {
620 
621 }

Member Function Documentation

double GReWeightINukeParams::MFP::ChisqPenalty ( void  ) const

Definition at line 651 of file GReWeightINukeParams.cxx.

652 {
653  return TMath::Power(fTwkDial, 2.0);
654 }
bool GReWeightINukeParams::MFP::IsIncluded ( void  ) const

Definition at line 641 of file GReWeightINukeParams.cxx.

642 {
643  return fIsIncluded;
644 }
bool GReWeightINukeParams::MFP::IsTweaked ( void  ) const

Definition at line 646 of file GReWeightINukeParams.cxx.

647 {
648  return (TMath::Abs(fTwkDial) >= controls::kASmallNum);
649 }
static const double kASmallNum
Definition: Controls.h:40
void GReWeightINukeParams::MFP::Reset ( void  )

Definition at line 656 of file GReWeightINukeParams.cxx.

double GReWeightINukeParams::MFP::ScaleFactor ( void  ) const

mean free path scale factor = 1 + twk_dial * fractional_err

Definition at line 623 of file GReWeightINukeParams.cxx.

624 {
625  if(! this->IsTweaked()) return 1.;
626 
628 
629  double mfp_sigma = uncert->OneSigmaErr(fSyst);
630  double mfp_twkdial = this->TwkDial();
631  double scale_factor = 1.0 + mfp_sigma * mfp_twkdial;
632 
633  return scale_factor;
634 }
double OneSigmaErr(GSyst_t syst, int sign=0) const
double TwkDial(void) const
current value of mfp tweak dial
static GSystUncertainty * Instance(void)
void GReWeightINukeParams::MFP::SetTwkDial ( double  val)
double GReWeightINukeParams::MFP::TwkDial ( void  ) const

current value of mfp tweak dial

Definition at line 636 of file GReWeightINukeParams.cxx.

637 {
638  return fTwkDial;
639 }

Member Data Documentation

HadronType_t genie::rew::GReWeightINukeParams::MFP::fHadType
private

Definition at line 123 of file GReWeightINukeParams.h.

bool genie::rew::GReWeightINukeParams::MFP::fIsIncluded
private

Definition at line 126 of file GReWeightINukeParams.h.

GSyst_t genie::rew::GReWeightINukeParams::MFP::fSyst
private

Definition at line 124 of file GReWeightINukeParams.h.

double genie::rew::GReWeightINukeParams::MFP::fTwkDial
private

Definition at line 125 of file GReWeightINukeParams.h.


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