Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XrayFluoDataSet Class Reference

#include <XrayFluoDataSet.hh>

Inheritance diagram for XrayFluoDataSet:
Collaboration diagram for XrayFluoDataSet:

Public Member Functions

 XrayFluoDataSet (G4int Z, G4DataVector *points, G4DataVector *values, const G4VDataSetAlgorithm *interpolation, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn)
 
 XrayFluoDataSet (G4int Z, const G4String &dataFile, const G4VDataSetAlgorithm *interpolation, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn)
 
 ~XrayFluoDataSet ()
 
G4double FindValue (G4double e, G4int) const
 
virtual const G4VEMDataSetGetComponent (G4int) const
 
virtual void AddComponent (G4VEMDataSet *)
 
virtual size_t NumberOfComponents () const
 
virtual void SetEnergiesData (G4DataVector *, G4DataVector *, int=0)
 
virtual G4bool SaveData (const G4String &) const
 
virtual G4double RandomSelect (int=0) const
 
void PrintData () const
 
const G4DataVectorGetEnergies (G4int) const
 
const G4DataVectorGetData (G4int) const
 
virtual const G4DataVectorGetLogEnergies (G4int) const
 
virtual const G4DataVectorGetLogData (G4int) const
 
virtual void SetLogEnergiesData (G4DataVector *, G4DataVector *, G4DataVector *, G4DataVector *, G4int)
 
virtual G4bool LoadNonLogData (const G4String &)
 
- Public Member Functions inherited from G4VEMDataSet
 G4VEMDataSet ()
 
virtual ~G4VEMDataSet ()
 

Detailed Description

Definition at line 51 of file XrayFluoDataSet.hh.

Constructor & Destructor Documentation

XrayFluoDataSet::XrayFluoDataSet ( G4int  Z,
G4DataVector points,
G4DataVector values,
const G4VDataSetAlgorithm interpolation,
G4double  unitE = CLHEP::MeV,
G4double  unitData = CLHEP::barn 
)

Definition at line 42 of file XrayFluoDataSet.cc.

47  :energies(points), data(values), algorithm(interpolation)
48 {
49  numberOfBins = energies->size();
50  unit1 = unitE;
51  unit2 = unitData;
52 }
const XML_Char const XML_Char * data
Definition: expat.h:268
XrayFluoDataSet::XrayFluoDataSet ( G4int  Z,
const G4String dataFile,
const G4VDataSetAlgorithm interpolation,
G4double  unitE = CLHEP::MeV,
G4double  unitData = CLHEP::barn 
)

Definition at line 56 of file XrayFluoDataSet.cc.

60  : algorithm(interpolation)
61 {
62  energies = new G4DataVector;
63  data = new G4DataVector;
64  unit1 = unitE;
65  unit2 = unitData;
66  LoadData(dataFile);
67  numberOfBins = energies->size();
68 }
const XML_Char const XML_Char * data
Definition: expat.h:268
XrayFluoDataSet::~XrayFluoDataSet ( )

Definition at line 73 of file XrayFluoDataSet.cc.

74 {
75  delete energies;
76  delete data;
77 }
const XML_Char const XML_Char * data
Definition: expat.h:268

Member Function Documentation

virtual void XrayFluoDataSet::AddComponent ( G4VEMDataSet )
inlinevirtual

Implements G4VEMDataSet.

Definition at line 74 of file XrayFluoDataSet.hh.

74 { }
G4double XrayFluoDataSet::FindValue ( G4double  e,
G4int   
) const
virtual

Implements G4VEMDataSet.

Definition at line 81 of file XrayFluoDataSet.cc.

82 {
84  G4double e0 = (*energies)[0];
85  // Protections
86  size_t bin = FindBinLocation(e);
87  if (bin == numberOfBins)
88  {
89 
90  value = (*data)[bin];
91  }
92  else if (e <= e0)
93  {
94 
95  value = (*data)[0];
96  }
97  else
98  {
99  value = algorithm->Calculate(e,bin,*energies,*data);
100  }
101 
102  return value;
103 }
tuple bin
Definition: plottest35.py:22
virtual G4double Calculate(G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data) const =0
const XML_Char const XML_Char * data
Definition: expat.h:268
const XML_Char int const XML_Char * value
Definition: expat.h:331
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const G4VEMDataSet* XrayFluoDataSet::GetComponent ( G4int  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 72 of file XrayFluoDataSet.hh.

72 { return 0;}
const G4DataVector& XrayFluoDataSet::GetData ( G4int  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 88 of file XrayFluoDataSet.hh.

88 { return *data; }
const XML_Char const XML_Char * data
Definition: expat.h:268
const G4DataVector& XrayFluoDataSet::GetEnergies ( G4int  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 87 of file XrayFluoDataSet.hh.

87 { return *energies; }
virtual const G4DataVector& XrayFluoDataSet::GetLogData ( G4int  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 91 of file XrayFluoDataSet.hh.

91 { return *data; }
const XML_Char const XML_Char * data
Definition: expat.h:268
virtual const G4DataVector& XrayFluoDataSet::GetLogEnergies ( G4int  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 90 of file XrayFluoDataSet.hh.

90 { return *energies; }
virtual G4bool XrayFluoDataSet::LoadNonLogData ( const G4String )
inlinevirtual

Implements G4VEMDataSet.

Definition at line 100 of file XrayFluoDataSet.hh.

100 {return false;}
virtual size_t XrayFluoDataSet::NumberOfComponents ( void  ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 76 of file XrayFluoDataSet.hh.

76 { return 0; }
void XrayFluoDataSet::PrintData ( void  ) const
virtual

Implements G4VEMDataSet.

Definition at line 206 of file XrayFluoDataSet.cc.

207 {
208  size_t size = numberOfBins;
209  for (size_t i=0; i<size; i++)
210  {
211  G4double e = (*energies)[i] / unit1;
212  G4double sigma = (*data)[i] / unit2 ;
213  G4cout << "Point: "
214  << e
215  << " - Data value : "
216  << sigma
217  << G4endl;
218  }
219 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
virtual G4double XrayFluoDataSet::RandomSelect ( int  = 0) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 83 of file XrayFluoDataSet.hh.

83 {return 0;}
virtual G4bool XrayFluoDataSet::SaveData ( const G4String ) const
inlinevirtual

Implements G4VEMDataSet.

Definition at line 81 of file XrayFluoDataSet.hh.

81 {return true;}
virtual void XrayFluoDataSet::SetEnergiesData ( G4DataVector ,
G4DataVector ,
int  = 0 
)
inlinevirtual

Implements G4VEMDataSet.

Definition at line 78 of file XrayFluoDataSet.hh.

79  {}
virtual void XrayFluoDataSet::SetLogEnergiesData ( G4DataVector ,
G4DataVector ,
G4DataVector ,
G4DataVector ,
G4int   
)
inlinevirtual

Implements G4VEMDataSet.

Definition at line 94 of file XrayFluoDataSet.hh.

98  {;}

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