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

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

#include <GReWeightNuXSecCCQEaxial.h>

Inheritance diagram for genie::rew::GReWeightNuXSecCCQEaxial:
genie::rew::GReWeightI

Public Member Functions

 GReWeightNuXSecCCQEaxial ()
 
 ~GReWeightNuXSecCCQEaxial ()
 
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...
 
double CalcChisq (void)
 
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_dpl
 CCQE model with dipole f/f (default) More...
 
XSecAlgorithmIfXSecModel_zexp
 CCQE model with z-expansion 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...
 
TFile * fTestFile
 
TNtupleD * fTestNtp
 

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> STFC, Rutherford Appleton Laboratory

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 43 of file GReWeightNuXSecCCQEaxial.h.

Constructor & Destructor Documentation

GReWeightNuXSecCCQEaxial::GReWeightNuXSecCCQEaxial ( )

Definition at line 51 of file GReWeightNuXSecCCQEaxial.cxx.

52 {
53  this->Init();
54 }
GReWeightNuXSecCCQEaxial::~GReWeightNuXSecCCQEaxial ( )

Definition at line 56 of file GReWeightNuXSecCCQEaxial.cxx.

57 {
58 #ifdef _G_REWEIGHT_CCQE_AXFF_DEBUG_
59  fTestFile->cd();
60  fTestNtp ->Write();
61  fTestFile->Close();
62  delete fTestFile;
63 #endif
64 }

Member Function Documentation

double GReWeightNuXSecCCQEaxial::CalcChisq ( void  )

Definition at line 165 of file GReWeightNuXSecCCQEaxial.cxx.

166 {
167  double chisq = TMath::Power(fFFTwkDial, 2.);
168  return chisq;
169 }
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
double GReWeightNuXSecCCQEaxial::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 102 of file GReWeightNuXSecCCQEaxial.cxx.

103 {
104  bool tweaked = (TMath::Abs(fFFTwkDial) > controls::kASmallNum);
105  if(!tweaked) return 1.;
106 
107  Interaction * interaction = event.Summary();
108 
109  bool is_qe = interaction->ProcInfo().IsQuasiElastic();
110  bool is_cc = interaction->ProcInfo().IsWeakCC();
111  if(!is_qe || !is_cc) return 1.;
112 
113  bool charm = interaction->ExclTag().IsCharmEvent(); // skip CCQE charm
114  if(charm) return 1.;
115 
116  int nupdg = event.Probe()->Pdg();
117  if(nupdg==kPdgNuMu && !fRewNumu ) return 1.;
118  if(nupdg==kPdgAntiNuMu && !fRewNumubar) return 1.;
119  if(nupdg==kPdgNuE && !fRewNue ) return 1.;
120  if(nupdg==kPdgAntiNuE && !fRewNuebar ) return 1.;
121 
122  //
123  // Calculate weight
124  // Input tweaking dial changes elastic nucleon form factors
125  // (twk dial: 0 -> default/dipole, twk dial: 1 -> zexp).
126  // Calculated weight includes `shape only effect in dsigma/dQ2
127  // (normalized to constant integrated cross section)
128  //
129 
130  interaction->KinePtr()->UseSelectedKinematics();
131  interaction->SetBit(kIAssumeFreeNucleon);
132 
133  double dial = fFFTwkDial;
134  double old_weight = event.Weight();
135  double def_xsec = event.DiffXSec();
136  double zexp_xsec = fXSecModel_zexp->XSec(interaction, kPSQ2fE);
137  //double def_integrated_xsec = fXSecModel_dpl->Integral(interaction);
138  //double zexp_integrated_xsec = fXSecModel_zexp->Integral(interaction);
139 
140  //assert(def_integrated_xsec > 0.);
141  //assert(zexp_integrated_xsec > 0.);
142 // if(def_integrated_xsec <= 0 || zexp_integrated_xsec <= 0) return 1.;
143 
144  //double def_ratio = def_xsec / def_integrated_xsec;
145  //double zexp_ratio = zexp_xsec / zexp_integrated_xsec;
146  double def_ratio = def_xsec ;
147  double zexp_ratio = zexp_xsec;
148 
149  assert(def_ratio > 0.);
150 // if(def_ratio <= 0) return 1.;
151 
152  double weight = old_weight * (dial * zexp_ratio + (1-dial)*def_ratio) / def_ratio;
153 
154 #ifdef _G_REWEIGHT_CCQE_AXFF_DEBUG_
155  double E = interaction->InitState().ProbeE(kRfHitNucRest);
156  double Q2 = interaction->Kine().Q2(true);
157  fTestNtp->Fill(
158  E,Q2,weight,def_integrated_xsec,zexp_integrated_xsec,def_xsec,zexp_xsec);
159 #endif
160 
161 
162  return weight;
163 }
bool IsWeakCC(void) const
const int kPdgNuE
Definition: PDGCodes.h:25
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:642
Kinematics * KinePtr(void) const
Definition: Interaction.h:73
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
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
const Kinematics & Kine(void) const
Definition: Interaction.h:68
XSecAlgorithmI * fXSecModel_zexp
CCQE model with z-expansion f/f ("maximally" tweaked)
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
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 GReWeightNuXSecCCQEaxial::Init ( void  )
private

Definition at line 171 of file GReWeightNuXSecCCQEaxial.cxx.

172 {
173  AlgFactory * algf = AlgFactory::Instance();
174 
175  AlgId id0("genie::LwlynSmithQELCCPXSec","Default");
176  Algorithm * alg0 = algf->AdoptAlgorithm(id0);
177  fXSecModel_dpl = dynamic_cast<XSecAlgorithmI*>(alg0);
179 
180  AlgId id1("genie::LwlynSmithQELCCPXSec","ZExp");
181  Algorithm * alg1 = algf->AdoptAlgorithm(id1);
182  fXSecModel_zexp = dynamic_cast<XSecAlgorithmI*>(alg1);
184 
185  this->RewNue (true);
186  this->RewNuebar (true);
187  this->RewNumu (true);
188  this->RewNumubar(true);
189 
190  fFFTwkDial = 0.;
191 
192 #ifdef _G_REWEIGHT_CCQE_AXFF_DEBUG_
193  fTestFile = new TFile("./ccqeaxil_reweight_test.root","recreate");
194  fTestNtp = new TNtupleD("testntp","","E:Q2:wght:sig0:sig:dsig0:dsig");
195 #endif
196 
197 }
Cross Section Calculation Interface.
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
XSecAlgorithmI * fXSecModel_dpl
CCQE model with dipole f/f (default)
Algorithm abstract base class.
Definition: Algorithm.h:48
XSecAlgorithmI * fXSecModel_zexp
CCQE model with z-expansion f/f ("maximally" tweaked)
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 GReWeightNuXSecCCQEaxial::IsHandled ( GSyst_t  syst)
virtual

does the current weight calculator handle the input nuisance param?

Implements genie::rew::GReWeightI.

Definition at line 66 of file GReWeightNuXSecCCQEaxial.cxx.

67 {
68  switch(syst) {
69  case ( kXSecTwkDial_AxFFCCQEshape ) :
70  return true;
71  break;
72  default:
73  return false;
74  break;
75  }
76  return false;
77 }
tweak axial nucleon form factors (dipole -> z-expansion) - shape only effect of dsigma(CCQE)/dQ2 ...
Definition: GSyst.h:161
void GReWeightNuXSecCCQEaxial::Reconfigure ( void  )
virtual

propagate updated nuisance parameter values to actual MC, etc

Implements genie::rew::GReWeightI.

Definition at line 97 of file GReWeightNuXSecCCQEaxial.cxx.

98 {
99 
100 }
void GReWeightNuXSecCCQEaxial::Reset ( void  )
virtual

set all nuisance parameters to default values

Implements genie::rew::GReWeightI.

Definition at line 92 of file GReWeightNuXSecCCQEaxial.cxx.

93 {
94  fFFTwkDial = 0.;
95 }
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
void genie::rew::GReWeightNuXSecCCQEaxial::RewNue ( bool  tf)
inline

Definition at line 58 of file GReWeightNuXSecCCQEaxial.h.

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

Definition at line 59 of file GReWeightNuXSecCCQEaxial.h.

59 { fRewNuebar = tf; }
Definition: tf_graph.h:23
void genie::rew::GReWeightNuXSecCCQEaxial::RewNumu ( bool  tf)
inline

Definition at line 60 of file GReWeightNuXSecCCQEaxial.h.

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

Definition at line 61 of file GReWeightNuXSecCCQEaxial.h.

61 { fRewNumubar = tf; }
Definition: tf_graph.h:23
void GReWeightNuXSecCCQEaxial::SetSystematic ( GSyst_t  syst,
double  val 
)
virtual

update the value for the specified nuisance param

Implements genie::rew::GReWeightI.

Definition at line 79 of file GReWeightNuXSecCCQEaxial.cxx.

80 {
81  if(!this->IsHandled(syst)) return;
82 
83  switch(syst) {
84  case ( kXSecTwkDial_AxFFCCQEshape ) :
85  fFFTwkDial = twk_dial;
86  break;
87  default:
88  return;
89  }
90 }
double fFFTwkDial
tweaking dial (0: bba/default, +1: dipole)
tweak axial nucleon form factors (dipole -> z-expansion) - shape only effect of dsigma(CCQE)/dQ2 ...
Definition: GSyst.h:161
bool IsHandled(GSyst_t syst)
does the current weight calculator handle the input nuisance param?

Member Data Documentation

double genie::rew::GReWeightNuXSecCCQEaxial::fFFTwkDial
private

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

Definition at line 70 of file GReWeightNuXSecCCQEaxial.h.

bool genie::rew::GReWeightNuXSecCCQEaxial::fRewNue
private

reweight nu_e CC?

Definition at line 72 of file GReWeightNuXSecCCQEaxial.h.

bool genie::rew::GReWeightNuXSecCCQEaxial::fRewNuebar
private

reweight nu_e_bar CC?

Definition at line 73 of file GReWeightNuXSecCCQEaxial.h.

bool genie::rew::GReWeightNuXSecCCQEaxial::fRewNumu
private

reweight nu_mu CC?

Definition at line 74 of file GReWeightNuXSecCCQEaxial.h.

bool genie::rew::GReWeightNuXSecCCQEaxial::fRewNumubar
private

reweight nu_mu_bar CC?

Definition at line 75 of file GReWeightNuXSecCCQEaxial.h.

TFile* genie::rew::GReWeightNuXSecCCQEaxial::fTestFile
private

Definition at line 77 of file GReWeightNuXSecCCQEaxial.h.

TNtupleD* genie::rew::GReWeightNuXSecCCQEaxial::fTestNtp
private

Definition at line 78 of file GReWeightNuXSecCCQEaxial.h.

XSecAlgorithmI* genie::rew::GReWeightNuXSecCCQEaxial::fXSecModel_dpl
private

CCQE model with dipole f/f (default)

Definition at line 67 of file GReWeightNuXSecCCQEaxial.h.

XSecAlgorithmI* genie::rew::GReWeightNuXSecCCQEaxial::fXSecModel_zexp
private

CCQE model with z-expansion f/f ("maximally" tweaked)

Definition at line 68 of file GReWeightNuXSecCCQEaxial.h.


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