Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPHash Class Reference

#include <G4ParticleHPHash.hh>

Public Member Functions

 G4ParticleHPHash ()
 
 ~G4ParticleHPHash ()
 
 G4ParticleHPHash (const G4ParticleHPHash &aHash)
 
G4ParticleHPHashoperator= (const G4ParticleHPHash &aHash)
 
void Clear ()
 
G4bool Prepared () const
 
void SetData (G4int index, G4double x, G4double y)
 
G4int GetMinIndex (G4double e) const
 

Detailed Description

Definition at line 35 of file G4ParticleHPHash.hh.

Constructor & Destructor Documentation

G4ParticleHPHash::G4ParticleHPHash ( )
inline

Definition at line 38 of file G4ParticleHPHash.hh.

39  {
40  theUpper = 0;
41  prepared = false;
42  }

Here is the caller graph for this function:

G4ParticleHPHash::~G4ParticleHPHash ( )
inline

Definition at line 44 of file G4ParticleHPHash.hh.

45  {
46  if(theUpper) delete theUpper;
47  }
G4ParticleHPHash::G4ParticleHPHash ( const G4ParticleHPHash aHash)
inline

Definition at line 49 of file G4ParticleHPHash.hh.

50  {
51  theIndex = aHash.theIndex;
52  theData = aHash.theData;
53  prepared = aHash.prepared;
54  if(aHash.theUpper != 0)
55  {
56  theUpper = new G4ParticleHPHash(*(aHash.theUpper));
57  }
58  else
59  {
60  theUpper = 0;
61  }
62  }

Here is the call graph for this function:

Member Function Documentation

void G4ParticleHPHash::Clear ( )
inline

Definition at line 82 of file G4ParticleHPHash.hh.

83  {
84  if(theUpper)
85  {
86  theUpper->Clear();
87  delete theUpper;
88  theUpper = 0;
89  }
90  theIndex.clear();
91  theData.clear();
92  prepared = false;
93  }

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4ParticleHPHash::GetMinIndex ( G4double  e) const
inline

Definition at line 110 of file G4ParticleHPHash.hh.

111  {
112  G4int result=-1;
113  if(theData.size() == 0) return 0;
114  if(theData[0].GetX()>e) return 0;
115 
116  G4int lower=0;
117  if(theUpper != 0)
118  {
119  lower = theUpper->GetMinIndex(e);
120  }
121  unsigned int i;
122  for(i=lower; i<theData.size(); i++)
123  {
124  if(theData[i].GetX()>e)
125  {
126  result = theIndex[i-1];
127  break;
128  }
129  }
130  if(result == -1) result = theIndex[theIndex.size()-1];
131  return result;
132  }
G4double G4ParticleHPJENDLHEData::G4double result
int G4int
Definition: G4Types.hh:78
G4int GetMinIndex(G4double e) const

Here is the call graph for this function:

Here is the caller graph for this function:

G4ParticleHPHash& G4ParticleHPHash::operator= ( const G4ParticleHPHash aHash)
inline

Definition at line 64 of file G4ParticleHPHash.hh.

65  {
66  if(&aHash != this)
67  {
68  theIndex = aHash.theIndex;
69  theData = aHash.theData;
70  if(aHash.theUpper != 0)
71  {
72  theUpper = new G4ParticleHPHash(*(aHash.theUpper));
73  }
74  else
75  {
76  theUpper = 0;
77  }
78  }
79  return *this;
80  }

Here is the call graph for this function:

G4bool G4ParticleHPHash::Prepared ( ) const
inline

Definition at line 95 of file G4ParticleHPHash.hh.

95 {return prepared;}

Here is the caller graph for this function:

void G4ParticleHPHash::SetData ( G4int  index,
G4double  x,
G4double  y 
)
inline

Definition at line 96 of file G4ParticleHPHash.hh.

97  {
98  prepared = true;
99  G4ParticleHPDataPoint aPoint;
100  aPoint.SetData(x, y);
101  theData.push_back(aPoint);
102  theIndex.push_back(index);
103  if(0 == theData.size()%10 && 0!=theData.size())
104  {
105  if(0 == theUpper) theUpper = new G4ParticleHPHash();
106  theUpper->SetData(theData.size()-1, x, y);
107  }
108  }
void SetData(G4double e, G4double x)
void SetData(G4int index, G4double x, G4double y)

Here is the call graph for this function:

Here is the caller graph for this function:


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