neugen_wrapper Class Reference

#include <neugen3_dummy.h>

List of all members.

Public Member Functions

 neugen_wrapper ()
 neugen_wrapper (const char *name)
 neugen_wrapper (const neugen_config *config)
 ~neugen_wrapper ()
const char * name (void) const
void set_default_config (void)
void reconfigure (const neugen_config *config)
void set_cuts (neugen_cuts *cuts)
void no_cuts (void)
float xsec (float e, interaction *ni, neugen_cuts *cuts=0)
float exclusive_xsec (float e, interaction *ni, final_state *final, neugen_cuts *cuts=0)
float diff_xsec (float e, kinematic_variable_t kid, float kval, interaction *ni, neugen_cuts *cuts=0)
float exclusive_diff_xsec (float e, kinematic_variable_t kid, float kval, interaction *ni, final_state *final, neugen_cuts *cuts=0)
float reweight (TLorentzVector *pnu, TLorentzVector *pnucleon, kinematic_variable_t kvid1, float kv1, kinematic_variable_t kvid2, float kv2, interaction *ni, process_t proc, final_state *fi, neugen_config *newconf, neugen_config *oldconf=0, double stdXSec=0)
float offshell_diff_xsec (TLorentzVector *pnu, TLorentzVector *pnucleon, interaction *ni, process_t proc, final_state *fi, kinematic_variable_t kvid1, float kv1, kinematic_variable_t kvid2, float kv2)
xsec_vs_energyxsec_spline (float emin, float emax, int nbins, interaction *ni, neugen_cuts *cuts=0)
xsec_vs_energyexclusive_xsec_spline (float emin, float emax, int nbins, interaction *ni, final_state *final, neugen_cuts *cuts=0)
void print (ostream &stream) const
void print_configuration ()
void begin_generation ()
 neugen_wrapper ()
 neugen_wrapper (const char *name)
 neugen_wrapper (const neugen_config *config)
 ~neugen_wrapper ()
const char * name (void) const
void set_default_config (void)
void reconfigure (const neugen_config *config)
void set_cuts (neugen_cuts *cuts)
void no_cuts (void)
float xsec (float e, interaction *ni, neugen_cuts *cuts=0)
float exclusive_xsec (float e, interaction *ni, final_state *final, neugen_cuts *cuts=0)
float diff_xsec (float e, kinematic_variable_t kid, float kval, interaction *ni, neugen_cuts *cuts=0)
float exclusive_diff_xsec (float e, kinematic_variable_t kid, float kval, interaction *ni, final_state *final, neugen_cuts *cuts=0)
float reweight (TLorentzVector *pnu, TLorentzVector *pnucleon, kinematic_variable_t kvid1, float kv1, kinematic_variable_t kvid2, float kv2, interaction *ni, process_t proc, final_state *fi, neugen_config *newconf, neugen_config *oldconf=0, double stdXSec=0)
float reweight (TLorentzVector *pnu, TLorentzVector *pnucleon, kinematic_variable_t kvid1, float kv1, kinematic_variable_t kvid2, float kv2, interaction *ni, process_t proc, final_state *fi, neugen_config *newconf, double stdXSec, bool load=true)
float offshell_diff_xsec (TLorentzVector *pnu, TLorentzVector *pnucleon, interaction *ni, process_t proc, final_state *fi, kinematic_variable_t kvid1, float kv1, kinematic_variable_t kvid2, float kv2)
xsec_vs_energyxsec_spline (float emin, float emax, int nbins, interaction *ni, neugen_cuts *cuts=0)
xsec_vs_energyexclusive_xsec_spline (float emin, float emax, int nbins, interaction *ni, final_state *final, neugen_cuts *cuts=0)
void print (ostream &stream) const
void print_configuration ()
void begin_generation ()

Private Member Functions

void init (void)
void init (void)

Private Attributes

string _name
neugen_config_config

Friends

ostream & operator<< (ostream &stream, const neugen_wrapper &conf)
ostream & operator<< (ostream &stream, const neugen_wrapper &conf)

Detailed Description

____________________________________________________________________________

Definition at line 188 of file neugen3_dummy.h.


Constructor & Destructor Documentation

neugen_wrapper::neugen_wrapper (  ) 

Definition at line 217 of file neugen3_dummy.cxx.

References die_wrapper().

00218 { 
00219   die_wrapper(false,"ctor"); 
00220 }

neugen_wrapper::neugen_wrapper ( const char *  name  ) 

Definition at line 222 of file neugen3_dummy.cxx.

References _name, and die_wrapper().

00223 {
00224   _name = name;
00225   die_wrapper(false,"ctor",name); 
00226 }

neugen_wrapper::neugen_wrapper ( const neugen_config config  ) 

Definition at line 228 of file neugen3_dummy.cxx.

References _config, neugen_config::_name, and die_wrapper().

00229 { 
00230   if ( ! _config ) _config = new neugen_config;
00231   /*  *(_config) = *(config);  */  // assignment operator broken
00232   cerr << "neugen_wrapper called with neugen_config \"" 
00233        << config->_name << "\"" << endl;
00234   /* _config->_name = config->_name; */ // probably due to skew
00235   die_wrapper(false,"ctor[neugen_config*]"); 
00236 }

neugen_wrapper::~neugen_wrapper (  ) 

Definition at line 238 of file neugen3_dummy.cxx.

00239 {
00240   cerr << "neugen3_dummy ~neugen_wrapper"
00241        << " ... oddly you've survived :-)" << endl;
00242 }

neugen_wrapper::neugen_wrapper (  ) 
neugen_wrapper::neugen_wrapper ( const char *  name  ) 
neugen_wrapper::neugen_wrapper ( const neugen_config config  ) 
neugen_wrapper::~neugen_wrapper (  ) 

Member Function Documentation

void neugen_wrapper::begin_generation (  )  [inline]

Definition at line 131 of file neugen_wrapper.h.

References begin_generation_().

00131 {begin_generation_();}

void neugen_wrapper::begin_generation (  ) 

Definition at line 276 of file neugen3_dummy.cxx.

References die_wrapper().

Referenced by MadMKAnalysis::CreatePAN(), and NuIntranuke::InitReweight().

00277 {
00278   die_wrapper(true,"init"); 
00279 }

float neugen_wrapper::diff_xsec ( float  e,
kinematic_variable_t  kid,
float  kval,
interaction ni,
neugen_cuts cuts = 0 
)
float neugen_wrapper::diff_xsec ( float  e,
kinematic_variable_t  kid,
float  kval,
interaction ni,
neugen_cuts cuts = 0 
)

Definition at line 298 of file neugen3_dummy.cxx.

References die_wrapper().

00303 {
00304   die_wrapper(true,"diff_xsec"); 
00305   return 0;
00306 }

float neugen_wrapper::exclusive_diff_xsec ( float  e,
kinematic_variable_t  kid,
float  kval,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)
float neugen_wrapper::exclusive_diff_xsec ( float  e,
kinematic_variable_t  kid,
float  kval,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)

Definition at line 308 of file neugen3_dummy.cxx.

References die_wrapper().

00314 {
00315   die_wrapper(true,"exclusive_diff_xsec"); 
00316   return 0;
00317 }

float neugen_wrapper::exclusive_xsec ( float  e,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)
float neugen_wrapper::exclusive_xsec ( float  e,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)

Definition at line 289 of file neugen3_dummy.cxx.

References die_wrapper().

00293 {
00294   die_wrapper(true,"exclusive_xsec"); 
00295   return 0;
00296 }

xsec_vs_energy* neugen_wrapper::exclusive_xsec_spline ( float  emin,
float  emax,
int  nbins,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)
xsec_vs_energy * neugen_wrapper::exclusive_xsec_spline ( float  emin,
float  emax,
int  nbins,
interaction ni,
final_state final,
neugen_cuts cuts = 0 
)

Definition at line 360 of file neugen3_dummy.cxx.

References die_wrapper().

00366 {
00367   die_wrapper(true,"exclusive_xsec_spline"); 
00368   return 0;
00369 }

void neugen_wrapper::init ( void   )  [private]
void neugen_wrapper::init ( void   )  [private]

Definition at line 244 of file neugen3_dummy.cxx.

References die_wrapper().

00245 {
00246   die_wrapper(false,"init"); 
00247 }

const char* neugen_wrapper::name ( void   )  const [inline]

Definition at line 82 of file neugen_wrapper.h.

References _name.

00082 { return _name.c_str(); }

const char* neugen_wrapper::name ( void   )  const [inline]

Definition at line 198 of file neugen3_dummy.h.

References neugen_config::_name.

00198 { return _name.c_str(); }

void neugen_wrapper::no_cuts ( void   ) 
void neugen_wrapper::no_cuts ( void   ) 

Definition at line 266 of file neugen3_dummy.cxx.

References die_wrapper().

00267 {
00268   die_wrapper(false,"no_cuts");
00269 }

float neugen_wrapper::offshell_diff_xsec ( TLorentzVector *  pnu,
TLorentzVector *  pnucleon,
interaction ni,
process_t  proc,
final_state fi,
kinematic_variable_t  kvid1,
float  kv1,
kinematic_variable_t  kvid2,
float  kv2 
)
float neugen_wrapper::offshell_diff_xsec ( TLorentzVector *  pnu,
TLorentzVector *  pnucleon,
interaction ni,
process_t  proc,
final_state fi,
kinematic_variable_t  kvid1,
float  kv1,
kinematic_variable_t  kvid2,
float  kv2 
)

Definition at line 336 of file neugen3_dummy.cxx.

References die_wrapper().

Referenced by NeugenWeightCalculator::GetWeight(), NuTransition::GetXSecNeugen(), NuTransSME::GetXSecNeugen(), and reweight().

00345 {
00346   die_wrapper(true,"offshell_diff_xsec"); 
00347   return 0;
00348 }

void neugen_wrapper::print ( ostream &  stream  )  const
void neugen_wrapper::print ( ostream &  stream  )  const

Definition at line 572 of file neugen_wrapper.cxx.

References _config, and _name.

Referenced by operator<<().

00573 {
00574   stream << "Name:..........." << _name  << endl;
00575   stream << "Current config: " << endl;
00576   stream << *_config << endl;
00577 }

void neugen_wrapper::print_configuration (  )  [inline]

Definition at line 130 of file neugen_wrapper.h.

References print_configuration_().

void neugen_wrapper::print_configuration (  ) 

Definition at line 271 of file neugen3_dummy.cxx.

References die_wrapper().

Referenced by MadMKAnalysis::CreatePAN(), and NuIntranuke::InitReweight().

00272 {
00273   die_wrapper(false,"print_configuration"); 
00274 }

void neugen_wrapper::reconfigure ( const neugen_config config  ) 
void neugen_wrapper::reconfigure ( const neugen_config config  ) 

Definition at line 254 of file neugen3_dummy.cxx.

References _config, and die_wrapper().

Referenced by NuIntranuke::Reweight(), and reweight().

00255 {
00256   if ( ! _config ) _config = new neugen_config;
00257   *(_config) = *(config);
00258   die_wrapper(false,"reconfigure[neugen_config*]"); 
00259 }

float neugen_wrapper::reweight ( TLorentzVector *  pnu,
TLorentzVector *  pnucleon,
kinematic_variable_t  kvid1,
float  kv1,
kinematic_variable_t  kvid2,
float  kv2,
interaction ni,
process_t  proc,
final_state fi,
neugen_config newconf,
double  stdXSec,
bool  load = true 
)

Definition at line 490 of file neugen_wrapper.cxx.

References offshell_diff_xsec(), reconfigure(), and neugen_cuts::setOneProcess().

00495 {
00496   if(proc==4||proc==5) return 1; // can't reweight coherent interactions at this time
00497  
00498   //Only reconfigure if ordered to explicitly otherwise assume stdXsec gives you 
00499   //   the denominator  
00500   if(load)    reconfigure(newconf);
00501                                                                                 
00502   neugen_cuts *cut = new neugen_cuts();
00503   cut->setOneProcess(proc);
00504                                                                                 
00505   float xsec_old = stdXSec;
00506                                                                                 
00507   float xsec_new = offshell_diff_xsec(pnu, pnucleon,
00508                                       ni, proc, fi,
00509                                       kvid1, kv1, kvid2, kv2);
00510                                                                                 
00511   delete cut;  // delete above local new'd neugen_cuts
00512                                                                                 
00513   if(stdXSec>0) return xsec_new/stdXSec;
00514   if(xsec_old==0) return 1;
00515   return xsec_new/xsec_old;
00516 }

float neugen_wrapper::reweight ( TLorentzVector *  pnu,
TLorentzVector *  pnucleon,
kinematic_variable_t  kvid1,
float  kv1,
kinematic_variable_t  kvid2,
float  kv2,
interaction ni,
process_t  proc,
final_state fi,
neugen_config newconf,
neugen_config oldconf = 0,
double  stdXSec = 0 
)
float neugen_wrapper::reweight ( TLorentzVector *  pnu,
TLorentzVector *  pnucleon,
kinematic_variable_t  kvid1,
float  kv1,
kinematic_variable_t  kvid2,
float  kv2,
interaction ni,
process_t  proc,
final_state fi,
neugen_config newconf,
neugen_config oldconf = 0,
double  stdXSec = 0 
)

Definition at line 319 of file neugen3_dummy.cxx.

References die_wrapper().

Referenced by NeugenWeightCalculator::GetWeight().

00331 {
00332   die_wrapper(true,"reweight"); 
00333   return 0;
00334 }

void neugen_wrapper::set_cuts ( neugen_cuts cuts  ) 
void neugen_wrapper::set_cuts ( neugen_cuts cuts  ) 

Definition at line 261 of file neugen3_dummy.cxx.

References die_wrapper().

00262 {
00263   die_wrapper(false,"set_cuts[neugen_cuts*]"); 
00264 }

void neugen_wrapper::set_default_config ( void   ) 
void neugen_wrapper::set_default_config ( void   ) 

Definition at line 249 of file neugen3_dummy.cxx.

References die_wrapper().

00250 {
00251   die_wrapper(false,"set_default_config"); 
00252 }

float neugen_wrapper::xsec ( float  e,
interaction ni,
neugen_cuts cuts = 0 
)
float neugen_wrapper::xsec ( float  e,
interaction ni,
neugen_cuts cuts = 0 
)

Definition at line 281 of file neugen3_dummy.cxx.

References die_wrapper().

Referenced by NuSystematic::NeugenXSecShiftScale(), NuSystematic::QELXSecShiftScale(), and NuSystematic::ResXSecShiftScale().

00284 {
00285   die_wrapper(true,"xsec"); 
00286   return 0;
00287 }

xsec_vs_energy* neugen_wrapper::xsec_spline ( float  emin,
float  emax,
int  nbins,
interaction ni,
neugen_cuts cuts = 0 
)
xsec_vs_energy * neugen_wrapper::xsec_spline ( float  emin,
float  emax,
int  nbins,
interaction ni,
neugen_cuts cuts = 0 
)

Definition at line 350 of file neugen3_dummy.cxx.

References die_wrapper().

00355 {
00356   die_wrapper(true,"xsec_spline"); 
00357   return 0;
00358 }


Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const neugen_wrapper conf 
) [friend]
ostream& operator<< ( ostream &  stream,
const neugen_wrapper conf 
) [friend]

Member Data Documentation

Definition at line 245 of file neugen3_dummy.h.

Referenced by neugen_wrapper(), print(), and reconfigure().

string neugen_wrapper::_name [private]

Definition at line 244 of file neugen3_dummy.h.

Referenced by name(), neugen_wrapper(), and print().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1