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

Reweighting vector form factors in GENIE CCQE neutrino cross section calculations. More...

#include <GReWeightNuXSecCCQEvec.h>

Inheritance diagram for genie::rew::GReWeightNuXSecCCQEvec:
genie::rew::GReWeightI

Public Member Functions

 GReWeightNuXSecCCQEvec ()
 
 ~GReWeightNuXSecCCQEvec ()
 
bool IsHandled (GSyst_t syst)
 does the current weight calculator handle the input nuisance param? More...
 
void SetSystematic (GSyst_t syst, double val)
 update the value for the specified nuisance param More...
 
void Reset (void)
 set all nuisance parameters to default values More...
 
void Reconfigure (void)
 propagate updated nuisance parameter values to actual MC, etc More...
 
double CalcWeight (const EventRecord &event)
 calculate a weight for the input event using the current nuisance param values More...
 
void RewNue (bool tf)
 
void RewNuebar (bool tf)
 
void RewNumu (bool tf)
 
void RewNumubar (bool tf)
 
- Public Member Functions inherited from genie::rew::GReWeightI
virtual ~GReWeightI ()
 

Private Member Functions

void Init (void)
 

Private Attributes

XSecAlgorithmIfXSecModel_bba
 CCQE model with BBA05 f/f (default) More...
 
XSecAlgorithmIfXSecModel_dpl
 CCQE model with dipole f/f ("maximally" tweaked) More...
 
double fFFTwkDial
 tweaking dial (0: bba/default, +1: dipole) More...
 
bool fRewNue
 reweight nu_e CC? More...
 
bool fRewNuebar
 reweight nu_e_bar CC? More...
 
bool fRewNumu
 reweight nu_mu CC? More...
 
bool fRewNumubar
 reweight nu_mu_bar CC? More...
 

Additional Inherited Members

- Protected Member Functions inherited from genie::rew::GReWeightI
 GReWeightI ()
 

Detailed Description

Reweighting vector form factors in GENIE CCQE neutrino cross section calculations.

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

Jim Dobson <J.Dobson07 imperial.ac.uk> Imperial College London

May 24, 2010

Copyright (c) 2003-2017, GENIE Neutrino MC Generator Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 45 of file GReWeightNuXSecCCQEvec.h.

Constructor & Destructor Documentation

GReWeightNuXSecCCQEvec::GReWeightNuXSecCCQEvec ( )

Definition at line 46 of file GReWeightNuXSecCCQEvec.cxx.

47 {
48  this->Init();
49 }
GReWeightNuXSecCCQEvec::~GReWeightNuXSecCCQEvec ( )

Definition at line 51 of file GReWeightNuXSecCCQEvec.cxx.

52 {
53 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_
54  fTestFile->cd();
55  fTestNtp ->Write();
56  fTestFile->Close();
57  delete fTestFile;
58 #endif
59 }

Member Function Documentation

double GReWeightNuXSecCCQEvec::CalcWeight ( const EventRecord event)
virtual

calculate a weight for the input event using the current nuisance param values

Implements genie::rew::GReWeightI.

Definition at line 97 of file GReWeightNuXSecCCQEvec.cxx.

98 {
99  bool tweaked = (TMath::Abs(fFFTwkDial) > controls::kASmallNum);
100  if(!tweaked) return 1.;
101 
102  Interaction * interaction = event.Summary();
103 
104  bool is_qe = interaction->ProcInfo().IsQuasiElastic();
105  bool is_cc = interaction->ProcInfo().IsWeakCC();
106  if(!is_qe || !is_cc) return 1.;
107 
108  bool charm = interaction->ExclTag().IsCharmEvent(); // skip CCQE charm
109  if(charm) return 1.;
110 
111  int nupdg = event.Probe()->Pdg();
112  if(nupdg==kPdgNuMu && !fRewNumu ) return 1.;
113  if(nupdg==kPdgAntiNuMu && !fRewNumubar) return 1.;
114  if(nupdg==kPdgNuE && !fRewNue ) return 1.;
115  if(nupdg==kPdgAntiNuE && !fRewNuebar ) return 1.;
116 
117  //
118  // Calculate weight
119  // Input tweaking dial changes elastic nucleon form factors
120  // (twk dial: 0 -> default/BBA, twk dial: 1 -> dipole).
121  // Calculated weight includes `shape only effect in dsigma/dQ2
122  // (normalized to constant integrated cross section)
123  //
124 
125  interaction->KinePtr()->UseSelectedKinematics();
126  interaction->SetBit(kIAssumeFreeNucleon);
127 
128  double dial = fFFTwkDial;
129  double old_weight = event.Weight();
130  double def_xsec = event.DiffXSec();
131  double dpl_xsec = fXSecModel_dpl->XSec(interaction, kPSQ2fE);
132  double def_integrated_xsec = fXSecModel_bba->Integral(interaction);
133  double dpl_integrated_xsec = fXSecModel_dpl->Integral(interaction);
134 
135  assert(def_integrated_xsec > 0.);
136  assert(dpl_integrated_xsec > 0.);
137 // if(def_integrated_xsec <= 0 || dpl_integrated_xsec <= 0) return 1.;
138 
139  double def_ratio = def_xsec / def_integrated_xsec;
140  double dpl_ratio = dpl_xsec / dpl_integrated_xsec;
141 
142  assert(def_ratio > 0.);
143 // if(def_ratio <= 0) return 1.;
144 
145  double weight = old_weight * (dial * dpl_ratio + (1-dial)*def_ratio) / def_ratio;
146 
147 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_
148  double E = interaction->InitState().ProbeE(kRfHitNucRest);
149  double Q2 = interaction->Kine().Q2(true);
150  fTestNtp->Fill(
151  E,Q2,weight,def_integrated_xsec,dpl_integrated_xsec,def_xsec,dpl_xsec);
152 #endif
153 
154 
155  return weight;
156 }
bool IsWeakCC(void) const
const int kPdgNuE
Definition: PDGCodes.h:25
XSecAlgorithmI * fXSecModel_dpl
CCQE model with dipole f/f ("maximally" tweaked)
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:642
Kinematics * KinePtr(void) const
Definition: Interaction.h:73
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
bool IsQuasiElastic(void) const
Definition: ProcessInfo.cxx:88
const int kPdgAntiNuE
Definition: PDGCodes.h:26
const int kPdgNuMu
Definition: PDGCodes.h:27
bool IsCharmEvent(void) const
Definition: XclsTag.h:48
Summary information for an interaction.
Definition: Interaction.h:53
void UseSelectedKinematics(void)
Definition: Kinematics.cxx:369
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
virtual double Integral(const Interaction *i) const =0
const Kinematics & Kine(void) const
Definition: Interaction.h:68
XSecAlgorithmI * fXSecModel_bba
CCQE model with BBA05 f/f (default)
static const double kASmallNum
Definition: Controls.h:40
const int kPdgAntiNuMu
Definition: PDGCodes.h:28
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:46
const XclsTag & ExclTag(void) const
Definition: Interaction.h:69
bool fRewNuebar
reweight nu_e_bar CC?
bool fRewNumubar
reweight nu_mu_bar CC?
const InitialState & InitState(void) const
Definition: Interaction.h:66
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:67
weight
Definition: test.py:293
double Q2(bool selected=false) const
Definition: Kinematics.cxx:135
double ProbeE(RefFrame_t rf) const
void GReWeightNuXSecCCQEvec::Init ( void  )
private

Definition at line 158 of file GReWeightNuXSecCCQEvec.cxx.

159 {
160  AlgFactory * algf = AlgFactory::Instance();
161 
162  AlgId id0("genie::LwlynSmithQELCCPXSec","Default");
163  Algorithm * alg0 = algf->AdoptAlgorithm(id0);
164  fXSecModel_bba = dynamic_cast<XSecAlgorithmI*>(alg0);
166 
167  AlgId id1("genie::LwlynSmithQELCCPXSec","DipoleELFF");
168  Algorithm * alg1 = algf->AdoptAlgorithm(id1);
169  fXSecModel_dpl = dynamic_cast<XSecAlgorithmI*>(alg1);
171 
172  this->RewNue (true);
173  this->RewNuebar (true);
174  this->RewNumu (true);
175  this->RewNumubar(true);
176 
177  fFFTwkDial = 0.;
178 
179 #ifdef _G_REWEIGHT_CCQE_VEC_DEBUG_
180  fTestFile = new TFile("./ccqevec_reweight_test.root","recreate");
181  fTestNtp = new TNtupleD("testntp","","E:Q2:wght:sig0:sig:dsig0:dsig");
182 #endif
183 
184 }
Cross Section Calculation Interface.
XSecAlgorithmI * fXSecModel_dpl
CCQE model with dipole f/f ("maximally" tweaked)
Algorithm abstract base class.
Definition: Algorithm.h:48
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
XSecAlgorithmI * fXSecModel_bba
CCQE model with BBA05 f/f (default)
void AdoptSubstructure(void)
Definition: Algorithm.cxx:287
Algorithm * AdoptAlgorithm(const AlgId &algid) const
Definition: AlgFactory.cxx:127
Algorithm ID (algorithm name + configuration set name)
Definition: AlgId.h:35
static AlgFactory * Instance()
Definition: AlgFactory.cxx:75
The GENIE Algorithm Factory.
Definition: AlgFactory.h:40
bool GReWeightNuXSecCCQEvec::IsHandled ( GSyst_t  syst)
virtual

does the current weight calculator handle the input nuisance param?

Implements genie::rew::GReWeightI.

Definition at line 61 of file GReWeightNuXSecCCQEvec.cxx.

62 {
63  switch(syst) {
64  case ( kXSecTwkDial_VecFFCCQEshape ) :
65  return true;
66  break;
67  default:
68  return false;
69  break;
70  }
71  return false;
72 }
tweak elastic nucleon form factors (BBA/default -> dipole) - shape only effect of dsigma(CCQE)/dQ2 ...
Definition: GSyst.h:53
void GReWeightNuXSecCCQEvec::Reconfigure ( void  )
virtual

propagate updated nuisance parameter values to actual MC, etc

Implements genie::rew::GReWeightI.

Definition at line 92 of file GReWeightNuXSecCCQEvec.cxx.

93 {
94 
95 }
void GReWeightNuXSecCCQEvec::Reset ( void  )
virtual

set all nuisance parameters to default values

Implements genie::rew::GReWeightI.

Definition at line 87 of file GReWeightNuXSecCCQEvec.cxx.

88 {
89  fFFTwkDial = 0.;
90 }
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
void genie::rew::GReWeightNuXSecCCQEvec::RewNue ( bool  tf)
inline

Definition at line 59 of file GReWeightNuXSecCCQEvec.h.

59 { fRewNue = tf; }
Definition: tf_graph.h:23
void genie::rew::GReWeightNuXSecCCQEvec::RewNuebar ( bool  tf)
inline

Definition at line 60 of file GReWeightNuXSecCCQEvec.h.

60 { fRewNuebar = tf; }
Definition: tf_graph.h:23
bool fRewNuebar
reweight nu_e_bar CC?
void genie::rew::GReWeightNuXSecCCQEvec::RewNumu ( bool  tf)
inline

Definition at line 61 of file GReWeightNuXSecCCQEvec.h.

61 { fRewNumu = tf; }
Definition: tf_graph.h:23
void genie::rew::GReWeightNuXSecCCQEvec::RewNumubar ( bool  tf)
inline

Definition at line 62 of file GReWeightNuXSecCCQEvec.h.

62 { fRewNumubar = tf; }
Definition: tf_graph.h:23
bool fRewNumubar
reweight nu_mu_bar CC?
void GReWeightNuXSecCCQEvec::SetSystematic ( GSyst_t  syst,
double  val 
)
virtual

update the value for the specified nuisance param

Implements genie::rew::GReWeightI.

Definition at line 74 of file GReWeightNuXSecCCQEvec.cxx.

75 {
76  if(!this->IsHandled(syst)) return;
77 
78  switch(syst) {
79  case ( kXSecTwkDial_VecFFCCQEshape ) :
80  fFFTwkDial = twk_dial;
81  break;
82  default:
83  return;
84  }
85 }
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
tweak elastic nucleon form factors (BBA/default -> dipole) - shape only effect of dsigma(CCQE)/dQ2 ...
Definition: GSyst.h:53
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?

Member Data Documentation

double genie::rew::GReWeightNuXSecCCQEvec::fFFTwkDial
private

tweaking dial (0: bba/default, +1: dipole)

Definition at line 71 of file GReWeightNuXSecCCQEvec.h.

bool genie::rew::GReWeightNuXSecCCQEvec::fRewNue
private

reweight nu_e CC?

Definition at line 73 of file GReWeightNuXSecCCQEvec.h.

bool genie::rew::GReWeightNuXSecCCQEvec::fRewNuebar
private

reweight nu_e_bar CC?

Definition at line 74 of file GReWeightNuXSecCCQEvec.h.

bool genie::rew::GReWeightNuXSecCCQEvec::fRewNumu
private

reweight nu_mu CC?

Definition at line 75 of file GReWeightNuXSecCCQEvec.h.

bool genie::rew::GReWeightNuXSecCCQEvec::fRewNumubar
private

reweight nu_mu_bar CC?

Definition at line 76 of file GReWeightNuXSecCCQEvec.h.

XSecAlgorithmI* genie::rew::GReWeightNuXSecCCQEvec::fXSecModel_bba
private

CCQE model with BBA05 f/f (default)

Definition at line 68 of file GReWeightNuXSecCCQEvec.h.

XSecAlgorithmI* genie::rew::GReWeightNuXSecCCQEvec::fXSecModel_dpl
private

CCQE model with dipole f/f ("maximally" tweaked)

Definition at line 69 of file GReWeightNuXSecCCQEvec.h.


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