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

A class holding Deep Inelastic Scattering (DIS) Form Factors (invariant structure funstions) More...

#include <DISStructureFunc.h>

Collaboration diagram for genie::DISStructureFunc:
[legend]

Public Member Functions

 DISStructureFunc ()
 DISStructureFunc (const DISStructureFunc &form_factors)
virtual ~DISStructureFunc ()
void SetModel (const DISStructureFuncModelI *model)
 Attach an algorithm.
void Calculate (const Interaction *interaction)
 Calculate the S/F's for the input interaction using the attached algorithm.
double F1 (void) const
 Get the computed structure function F1.
double F2 (void) const
 Get the computed structure function F2.
double F3 (void) const
 Get the computed structure function F3.
double F4 (void) const
 Get the computed structure function F4.
double F5 (void) const
 Get the computed structure function F5.
double F6 (void) const
 Get the computed structure function F6.
const DISStructureFuncModelIModel (void) const
 Get the attached model.
void Reset (Option_t *opt="")
void Copy (const DISStructureFunc &sf)
bool Compare (const DISStructureFunc &sf) const
void Print (ostream &stream) const
bool operator== (const DISStructureFunc &sf) const
DISStructureFuncoperator= (const DISStructureFunc &sf)

Private Attributes

double fF1
double fF2
double fF3
double fF4
double fF5
double fF6
const DISStructureFuncModelIfModel

Friends

ostream & operator<< (ostream &stream, const DISStructureFunc &sf)

Detailed Description

A class holding Deep Inelastic Scattering (DIS) Form Factors (invariant structure funstions)

This class is using the Strategy Pattern.
It can accept requests to calculate itself, for a given interaction, that it then delegates to the algorithmic object, implementing the DISStructureFuncModelI interface, that it finds attached to itself.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n May 05, 2004
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 39 of file DISStructureFunc.h.

Constructor & Destructor Documentation

◆ DISStructureFunc() [1/2]

DISStructureFunc::DISStructureFunc ( )

Definition at line 33 of file DISStructureFunc.cxx.

34{
35 this->Reset();
36}
void Reset(Option_t *opt="")

References Reset().

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

◆ DISStructureFunc() [2/2]

DISStructureFunc::DISStructureFunc ( const DISStructureFunc & form_factors)

Definition at line 38 of file DISStructureFunc.cxx.

39{
40 this->Copy(sf);
41}
void Copy(const DISStructureFunc &sf)

References Copy(), and DISStructureFunc().

◆ ~DISStructureFunc()

virtual genie::DISStructureFunc::~DISStructureFunc ( )
inlinevirtual

Definition at line 44 of file DISStructureFunc.h.

44{ }

Member Function Documentation

◆ Calculate()

void DISStructureFunc::Calculate ( const Interaction * interaction)

Calculate the S/F's for the input interaction using the attached algorithm.

Definition at line 49 of file DISStructureFunc.cxx.

50{
51 if(!this->fModel) {
52 LOG("DISSF",pERROR)
53 << "No DISStructureFuncModelI attached. Can not calculate SF's";
54 this->Reset("D");
55 return;
56 }
57
58 fModel->Calculate(interaction);
59
60 this->fF1 = fModel->F1();
61 this->fF2 = fModel->F2();
62 this->fF3 = fModel->F3();
63 this->fF4 = fModel->F4();
64 this->fF5 = fModel->F5();
65 this->fF6 = fModel->F6();
66}
#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 DISStructureFuncModelI * fModel

References fF1, fF2, fF3, fF4, fF5, fF6, fModel, LOG, pERROR, and Reset().

Referenced by BuildStdNtuple(), MakePlots(), and VerticalSlice().

◆ Compare()

bool DISStructureFunc::Compare ( const DISStructureFunc & sf) const

Definition at line 96 of file DISStructureFunc.cxx.

97{
98 bool equal =
99 math::AreEqual(this->fF1, sf.fF1) &&
100 math::AreEqual(this->fF2, sf.fF2) &&
101 math::AreEqual(this->fF3, sf.fF3) &&
102 math::AreEqual(this->fF4, sf.fF4) &&
103 math::AreEqual(this->fF5, sf.fF5) &&
104 math::AreEqual(this->fF6, sf.fF6);
105 return equal;
106}
bool AreEqual(double x1, double x2)

References genie::utils::math::AreEqual(), DISStructureFunc(), fF1, fF2, fF3, fF4, fF5, and fF6.

Referenced by operator==().

◆ Copy()

void DISStructureFunc::Copy ( const DISStructureFunc & sf)

Definition at line 84 of file DISStructureFunc.cxx.

85{
86 this->fF1 = sf.fF1;
87 this->fF2 = sf.fF2;
88 this->fF3 = sf.fF3;
89 this->fF4 = sf.fF4;
90 this->fF5 = sf.fF5;
91 this->fF6 = sf.fF6;
92
93 this->fModel = sf.fModel;
94}

References DISStructureFunc(), fF1, fF2, fF3, fF4, fF5, fF6, and fModel.

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

◆ F1()

double genie::DISStructureFunc::F1 ( void ) const
inline

Get the computed structure function F1.

Definition at line 53 of file DISStructureFunc.h.

53{ return fF1; }

References fF1.

Referenced by BuildStdNtuple(), and MakePlots().

◆ F2()

double genie::DISStructureFunc::F2 ( void ) const
inline

Get the computed structure function F2.

Definition at line 56 of file DISStructureFunc.h.

56{ return fF2; }

References fF2.

Referenced by BuildStdNtuple(), and MakePlots().

◆ F3()

double genie::DISStructureFunc::F3 ( void ) const
inline

Get the computed structure function F3.

Definition at line 59 of file DISStructureFunc.h.

59{ return fF3; }

References fF3.

Referenced by BuildStdNtuple(), and MakePlots().

◆ F4()

double genie::DISStructureFunc::F4 ( void ) const
inline

Get the computed structure function F4.

Definition at line 62 of file DISStructureFunc.h.

62{ return fF4; }

References fF4.

Referenced by BuildStdNtuple(), and MakePlots().

◆ F5()

double genie::DISStructureFunc::F5 ( void ) const
inline

Get the computed structure function F5.

Definition at line 65 of file DISStructureFunc.h.

65{ return fF5; }

References fF5.

Referenced by BuildStdNtuple(), and MakePlots().

◆ F6()

double genie::DISStructureFunc::F6 ( void ) const
inline

Get the computed structure function F6.

Definition at line 68 of file DISStructureFunc.h.

68{ return fF6; }

References fF6.

Referenced by MakePlots().

◆ Model()

const DISStructureFuncModelI * genie::DISStructureFunc::Model ( void ) const
inline

Get the attached model.

Definition at line 71 of file DISStructureFunc.h.

71{return fModel;}

References fModel.

◆ operator=()

DISStructureFunc & DISStructureFunc::operator= ( const DISStructureFunc & sf)

Definition at line 129 of file DISStructureFunc.cxx.

130{
131 this->Copy(sf);
132 return (*this);
133}

References Copy(), and DISStructureFunc().

◆ operator==()

bool DISStructureFunc::operator== ( const DISStructureFunc & sf) const

Definition at line 124 of file DISStructureFunc.cxx.

125{
126 return this->Compare(sf);
127}
bool Compare(const DISStructureFunc &sf) const

References Compare(), and DISStructureFunc().

◆ Print()

void DISStructureFunc::Print ( ostream & stream) const

Definition at line 108 of file DISStructureFunc.cxx.

109{
110 stream << "(F1-F6) = ("
111 << this->fF1 << ", " << this->fF2 << ", "
112 << this->fF3 << ", " << this->fF4 << ", "
113 << this->fF5 << ", " << this->fF6 << ")" << endl;
114/*
115 stream << "F1 = " << this->fF1 << endl;
116 stream << "F2 = " << this->fF2 << endl;
117 stream << "F3 = " << this->fF3 << endl;
118 stream << "F4 = " << this->fF4 << endl;
119 stream << "F5 = " << this->fF5 << endl;
120 stream << "F6 = " << this->fF6 << endl;
121*/
122}

References fF1, fF2, fF3, fF4, fF5, and fF6.

Referenced by operator<<.

◆ Reset()

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

Definition at line 68 of file DISStructureFunc.cxx.

69{
70// Reset the DISStructureFunc object (data & attached model). If the input
71// option = D it resets the data only and not the attached model.
72
73 this->fF1 = 0.0;
74 this->fF2 = 0.0;
75 this->fF3 = 0.0;
76 this->fF4 = 0.0;
77 this->fF5 = 0.0;
78 this->fF6 = 0.0;
79
80 string option(opt);
81 if(option.find("D") == string::npos) {this->fModel = 0;}
82}

References fF1, fF2, fF3, fF4, fF5, fF6, and fModel.

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

◆ SetModel()

void DISStructureFunc::SetModel ( const DISStructureFuncModelI * model)

Attach an algorithm.

Definition at line 43 of file DISStructureFunc.cxx.

44{
45 this->Reset();
46 this->fModel = model;
47}

References fModel, and Reset().

Referenced by BuildStdNtuple(), MakePlots(), and VerticalSlice().

◆ operator<<

ostream & operator<< ( ostream & stream,
const DISStructureFunc & sf )
friend

Definition at line 26 of file DISStructureFunc.cxx.

27 {
28 ff.Print(stream);
29 return stream;
30 }

References DISStructureFunc(), and Print().

Member Data Documentation

◆ fF1

double genie::DISStructureFunc::fF1
private

Definition at line 84 of file DISStructureFunc.h.

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

◆ fF2

double genie::DISStructureFunc::fF2
private

Definition at line 85 of file DISStructureFunc.h.

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

◆ fF3

double genie::DISStructureFunc::fF3
private

Definition at line 86 of file DISStructureFunc.h.

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

◆ fF4

double genie::DISStructureFunc::fF4
private

Definition at line 87 of file DISStructureFunc.h.

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

◆ fF5

double genie::DISStructureFunc::fF5
private

Definition at line 88 of file DISStructureFunc.h.

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

◆ fF6

double genie::DISStructureFunc::fF6
private

Definition at line 89 of file DISStructureFunc.h.

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

◆ fModel

const DISStructureFuncModelI* genie::DISStructureFunc::fModel
private

Definition at line 91 of file DISStructureFunc.h.

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


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