GENIEGenerator
Loading...
Searching...
No Matches
genie::AxialFormFactor Class Reference

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

#include <AxialFormFactor.h>

Collaboration diagram for genie::AxialFormFactor:
[legend]

Public Member Functions

 AxialFormFactor ()
 AxialFormFactor (const AxialFormFactor &form_factors)
virtual ~AxialFormFactor ()
void SetModel (const AxialFormFactorModelI *model)
 Attach an algorithm.
void Calculate (const Interaction *interaction)
 Calculate the form factors for the input interaction using the attached algorithm.
double FA (void) const
 Get the computed axial form factor.
const AxialFormFactorModelI * Model (void) const
 Get the attached model.
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
AxialFormFactor & operator= (const AxialFormFactor &ff)

Private Attributes

double fFA
const AxialFormFactorModelI * fModel

Friends

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

Detailed Description

A class holding the Axial Form Factor.

     This class is using the \b Strategy Pattern. \n
Author
Aaron Meyer <asmeyer2012 \at uchicago.edu>
      based off AxialFormFactor by
      Costas Andreopoulos <c.andreopoulos \at cern.ch>
      University of Liverpool
Created:\n August 19, 2013
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 38 of file AxialFormFactor.h.

Constructor & Destructor Documentation

◆ AxialFormFactor() [1/2]

AxialFormFactor::AxialFormFactor ( )

Definition at line 37 of file AxialFormFactor.cxx.

38{
39 this->Reset();
40}
void Reset(Option_t *opt="")

References Reset().

Referenced by AxialFormFactor(), Compare(), Copy(), operator<<, operator=(), and operator==().

◆ AxialFormFactor() [2/2]

AxialFormFactor::AxialFormFactor ( const AxialFormFactor & form_factors)

Definition at line 42 of file AxialFormFactor.cxx.

43{
44 this->Copy(ff);
45}
void Copy(const AxialFormFactor &ff)

References AxialFormFactor(), and Copy().

◆ ~AxialFormFactor()

virtual genie::AxialFormFactor::~AxialFormFactor ( )
inlinevirtual

Definition at line 43 of file AxialFormFactor.h.

43{ }

Member Function Documentation

◆ Calculate()

void AxialFormFactor::Calculate ( const Interaction * interaction)

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

Definition at line 53 of file AxialFormFactor.cxx.

54{
55 if(!this->fModel)
56 {
57 LOG("AxialFormFactor", pERROR)
58 << "No AxialFormFactorModelI algorithm was defined!";
59 this->Reset("D");
60 }
61 else {
62 this->fFA = this->fModel->FA(interaction);
63 }
64}
#define pERROR
Definition Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
const AxialFormFactorModelI * fModel

References fFA, fModel, LOG, pERROR, and Reset().

Referenced by CalculateFormFactor().

◆ Compare()

bool AxialFormFactor::Compare ( const AxialFormFactor & ff) const

Definition at line 83 of file AxialFormFactor.cxx.

84{
85 return math::AreEqual(this->fFA, ff.fFA);
86}
bool AreEqual(double x1, double x2)

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

Referenced by operator==().

◆ Copy()

void AxialFormFactor::Copy ( const AxialFormFactor & ff)

Definition at line 77 of file AxialFormFactor.cxx.

78{
79 this->fModel = ff.fModel;
80 this->fFA = ff.fFA;
81}

References AxialFormFactor(), fFA, and fModel.

Referenced by AxialFormFactor(), and operator=().

◆ FA()

double genie::AxialFormFactor::FA ( void ) const
inline

Get the computed axial form factor.

Definition at line 52 of file AxialFormFactor.h.

52{ return fFA; }

References fFA.

Referenced by CalculateFormFactor().

◆ Model()

const AxialFormFactorModelI * genie::AxialFormFactor::Model ( void ) const
inline

Get the attached model.

Definition at line 55 of file AxialFormFactor.h.

55{return fModel;}

References fModel.

◆ operator=()

AxialFormFactor & AxialFormFactor::operator= ( const AxialFormFactor & ff)

Definition at line 99 of file AxialFormFactor.cxx.

100{
101 this->Copy(ff);
102 return (*this);
103}

References AxialFormFactor(), and Copy().

◆ operator==()

bool AxialFormFactor::operator== ( const AxialFormFactor & ff) const

Definition at line 94 of file AxialFormFactor.cxx.

95{
96 return this->Compare(ff);
97}
bool Compare(const AxialFormFactor &ff) const

References AxialFormFactor(), and Compare().

◆ Print()

void AxialFormFactor::Print ( ostream & stream) const

Definition at line 88 of file AxialFormFactor.cxx.

89{
90 stream<< endl;
91 stream<< "(FA = " << this->fFA << ") "<< endl;
92}

References fFA.

Referenced by operator<<.

◆ Reset()

void AxialFormFactor::Reset ( Option_t * opt = "")

Definition at line 66 of file AxialFormFactor.cxx.

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

References fFA, and fModel.

Referenced by AxialFormFactor(), Calculate(), and SetModel().

◆ SetModel()

void AxialFormFactor::SetModel ( const AxialFormFactorModelI * model)

Attach an algorithm.

Definition at line 47 of file AxialFormFactor.cxx.

48{
49 this->Reset();
50 this->fModel = model;
51}

References fModel, and Reset().

Referenced by CalculateFormFactor().

◆ operator<<

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

Definition at line 30 of file AxialFormFactor.cxx.

31 {
32 ff.Print(stream);
33 return stream;
34 }
void Print(ostream &stream) const

References AxialFormFactor(), and Print().

Member Data Documentation

◆ fFA

double genie::AxialFormFactor::fFA
private

Definition at line 68 of file AxialFormFactor.h.

Referenced by Calculate(), Compare(), Copy(), FA(), Print(), and Reset().

◆ fModel

const AxialFormFactorModelI* genie::AxialFormFactor::fModel
private

Definition at line 70 of file AxialFormFactor.h.

Referenced by Calculate(), Copy(), Model(), Reset(), and SetModel().


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