Public Member Functions | Private Attributes | Friends | List of all members
genie::AxialFormFactor Class Reference

A class holding the Axial Form Factor. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Physics/QuasiElastic/XSection/AxialFormFactor.h"

Public Member Functions

 AxialFormFactor ()
 
 AxialFormFactor (const AxialFormFactor &form_factors)
 
virtual ~AxialFormFactor ()
 
void SetModel (const AxialFormFactorModelI *model)
 Attach an algorithm. More...
 
void Calculate (const Interaction *interaction)
 Calculate the form factors for the input interaction using the attached algorithm. More...
 
double FA (void) const
 Get the computed axial form factor. More...
 
const AxialFormFactorModelIModel (void) const
 Get the attached model. More...
 
void Reset (Option_t *opt="")
 
void Copy (const AxialFormFactor &ff)
 
bool Compare (const AxialFormFactor &ff) const
 
void Print (ostream &stream) const
 
bool operator== (const AxialFormFactor &ff) const
 
AxialFormFactoroperator= (const AxialFormFactor &ff)
 

Private Attributes

double fFA
 
const AxialFormFactorModelIfModel
 

Friends

ostream & operator<< (ostream &stream, const AxialFormFactor &ff)
 

Detailed Description

A class holding the Axial Form Factor.

This class is using the Strategy Pattern.

Author
Aaron Meyer <asmeyer2012 uchicago.edu> based off AxialFormFactorModelI by Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> STFC, Rutherford Appleton Laboratory

August 19, 2013

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

Definition at line 38 of file AxialFormFactor.h.

Constructor & Destructor Documentation

AxialFormFactor::AxialFormFactor ( )

Definition at line 40 of file AxialFormFactor.cxx.

References slidt::Reset().

41 {
42  this->Reset();
43 }
void Reset(Option_t *opt="")
AxialFormFactor::AxialFormFactor ( const AxialFormFactor form_factors)

Definition at line 45 of file AxialFormFactor.cxx.

46 {
47  this->Copy(ff);
48 }
void Copy(const AxialFormFactor &ff)
TFile ff[ntarg]
Definition: Style.C:26
virtual genie::AxialFormFactor::~AxialFormFactor ( )
inlinevirtual

Definition at line 43 of file AxialFormFactor.h.

References Calculate(), and SetModel().

43 { }

Member Function Documentation

void AxialFormFactor::Calculate ( const Interaction interaction)

Calculate the form factors for the input interaction using the attached algorithm.

Definition at line 56 of file AxialFormFactor.cxx.

References ana::fModel, LOG, pERROR, and slidt::Reset().

Referenced by CalculateFormFactor(), genie::LwlynSmithFF::FA(), genie::LwlynSmithFF::StrangeFA(), and ~AxialFormFactor().

57 {
58  if(!this->fModel)
59  {
60  LOG("AxialFormFactor", pERROR)
61  << "No AxialFormFactorModelI algorithm was defined!";
62  this->Reset("D");
63  }
64  else {
65  this->fFA = this->fModel->FA(interaction);
66  }
67 }
#define pERROR
Definition: Messenger.h:60
const AxialFormFactorModelI * fModel
virtual double FA(const Interaction *interaction) const =0
Compute the axial form factor.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
void Reset(Option_t *opt="")
bool AxialFormFactor::Compare ( const AxialFormFactor ff) const

Definition at line 86 of file AxialFormFactor.cxx.

References genie::utils::math::AreEqual(), and fFA.

Referenced by Model().

87 {
88  return math::AreEqual(this->fFA, ff.fFA);
89 }
bool AreEqual(double x1, double x2)
Definition: MathUtils.cxx:243
void AxialFormFactor::Copy ( const AxialFormFactor ff)

Definition at line 80 of file AxialFormFactor.cxx.

References fFA, fModel, and ana::fModel.

Referenced by Model().

81 {
82  this->fModel = ff.fModel;
83  this->fFA = ff.fFA;
84 }
const AxialFormFactorModelI * fModel
double genie::AxialFormFactor::FA ( void  ) const
inline

Get the computed axial form factor.

Definition at line 52 of file AxialFormFactor.h.

References fFA.

Referenced by CalculateFormFactor(), genie::LwlynSmithFF::FA(), and genie::LwlynSmithFF::StrangeFA().

52 { return fFA; }
const AxialFormFactorModelI* genie::AxialFormFactor::Model ( void  ) const
inline

Get the attached model.

Definition at line 55 of file AxialFormFactor.h.

References Compare(), Copy(), ff, fModel, operator<<, operator=(), operator==(), MECModelEnuComparisons::opt, Print(), Reset(), and runNovaSAM::stream.

55 {return fModel;}
const AxialFormFactorModelI * fModel
AxialFormFactor & AxialFormFactor::operator= ( const AxialFormFactor ff)

Definition at line 102 of file AxialFormFactor.cxx.

Referenced by Model().

103 {
104  this->Copy(ff);
105  return (*this);
106 }
void Copy(const AxialFormFactor &ff)
bool AxialFormFactor::operator== ( const AxialFormFactor ff) const

Definition at line 97 of file AxialFormFactor.cxx.

References Compare().

Referenced by Model().

98 {
99  return this->Compare(ff);
100 }
bool Compare(const AxialFormFactor &ff) const
void AxialFormFactor::Print ( ostream &  stream) const

Definition at line 91 of file AxialFormFactor.cxx.

References allTimeWatchdog::endl.

Referenced by Model(), and genie::operator<<().

92 {
93  stream<< endl;
94  stream<< "(FA = " << this->fFA << ") "<< endl;
95 }
void AxialFormFactor::Reset ( Option_t *  opt = "")

Definition at line 69 of file AxialFormFactor.cxx.

References ana::fModel.

Referenced by Model().

70 {
71 // Reset the AxialFormFactor object (data & attached model). If the input
72 // option = D it resets the data only and not the attached model.
73 
74  this->fFA = 0.;
75 
76  string option(opt);
77  if(option.find("D") == string::npos) {this->fModel = 0;}
78 }
const AxialFormFactorModelI * fModel
void AxialFormFactor::SetModel ( const AxialFormFactorModelI model)

Attach an algorithm.

Definition at line 50 of file AxialFormFactor.cxx.

References ana::fModel, and slidt::Reset().

Referenced by CalculateFormFactor(), genie::LwlynSmithFF::LoadConfig(), and ~AxialFormFactor().

51 {
52  this->Reset();
53  this->fModel = model;
54 }
const AxialFormFactorModelI * fModel
void Reset(Option_t *opt="")
const XML_Char XML_Content * model
Definition: expat.h:151

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const AxialFormFactor ff 
)
friend

Definition at line 33 of file AxialFormFactor.cxx.

Referenced by Model().

34  {
35  ff.Print(stream);
36  return stream;
37  }
void Print(ostream &stream) const

Member Data Documentation

double genie::AxialFormFactor::fFA
private

Definition at line 68 of file AxialFormFactor.h.

Referenced by Compare(), Copy(), and FA().

const AxialFormFactorModelI* genie::AxialFormFactor::fModel
private

Definition at line 70 of file AxialFormFactor.h.

Referenced by Copy(), and Model().


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