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

#include <G4CollisionInitialState.hh>

Public Member Functions

 G4CollisionInitialState ()
 
 G4CollisionInitialState (G4double time, G4KineticTrack *aPrimary, G4KineticTrack *aTarget)
 
 G4CollisionInitialState (G4double time, G4KineticTrack *aPrimary, const G4KineticTrackVector &aTarget, G4BCAction *aFSGenerator)
 
 ~G4CollisionInitialState ()
 
 G4CollisionInitialState (const G4CollisionInitialState &right)
 
G4CollisionInitialStateoperator= (const G4CollisionInitialState &right)
 
int operator< (const G4CollisionInitialState &right) const
 
int operator== (const G4CollisionInitialState &right) const
 
G4KineticTrackGetPrimary (void)
 
void SetPrimary (G4KineticTrack *aPrimary)
 
G4KineticTrackGetTarget (void)
 
void SetTarget (G4KineticTrack *aTarget)
 
void AddTarget (G4KineticTrack *aTarget)
 
G4KineticTrackVectorGetTargetCollection (void)
 
G4KineticTrackVectorGetFinalState ()
 
G4int GetTargetBaryonNumber ()
 
G4int GetTargetCharge ()
 
G4double GetCollisionTime (void)
 
void SetCollisionTime (G4double value)
 
const G4BCActionGetGenerator ()
 
void Print () const
 

Detailed Description

Definition at line 46 of file G4CollisionInitialState.hh.

Constructor & Destructor Documentation

G4CollisionInitialState::G4CollisionInitialState ( )

Definition at line 38 of file G4CollisionInitialState.cc.

38  :
39  theCollisionTime(DBL_MAX), thePrimary(0), theTarget(0), theFSGenerator(0)
40 {
41 }
#define DBL_MAX
Definition: templates.hh:83
G4CollisionInitialState::G4CollisionInitialState ( G4double  time,
G4KineticTrack aPrimary,
G4KineticTrack aTarget 
)

Definition at line 44 of file G4CollisionInitialState.cc.

46 {
47  theCollisionTime = time;
48  thePrimary = aPrimary;
49  theTarget = aTarget;
50  theTs.clear();
51  theFSGenerator = 0;
52 }
G4CollisionInitialState::G4CollisionInitialState ( G4double  time,
G4KineticTrack aPrimary,
const G4KineticTrackVector aTarget,
G4BCAction aFSGenerator 
)

Definition at line 55 of file G4CollisionInitialState.cc.

58 {
59  theCollisionTime = time;
60  thePrimary = aPrimary;
61  theTarget = 0;
62  for (size_t i=0; i<aTarget.size(); i++) theTs.push_back(aTarget[i]);
63  theFSGenerator = aFSGenerator;
64 }
G4CollisionInitialState::~G4CollisionInitialState ( )
inline

Definition at line 57 of file G4CollisionInitialState.hh.

57 { }
G4CollisionInitialState::G4CollisionInitialState ( const G4CollisionInitialState right)

Definition at line 68 of file G4CollisionInitialState.cc.

69 {
70  theCollisionTime = right.theCollisionTime;
71  thePrimary = right.thePrimary;
72  theTarget = right.theTarget;
73  for (size_t i=0; i<right.theTs.size(); i++) theTs.push_back(right.theTs[i]);
74  theFSGenerator = right.theFSGenerator;
75 }

Member Function Documentation

void G4CollisionInitialState::AddTarget ( G4KineticTrack aTarget)
inline

Definition at line 79 of file G4CollisionInitialState.hh.

80  {theTs.push_back(aTarget);}
G4double G4CollisionInitialState::GetCollisionTime ( void  )
inline

Definition at line 105 of file G4CollisionInitialState.hh.

106  {return theCollisionTime;}

Here is the caller graph for this function:

G4KineticTrackVector * G4CollisionInitialState::GetFinalState ( )

Definition at line 95 of file G4CollisionInitialState.cc.

96  {
97 // G4cerr << "what is the FS generator? "
98 // << typeid(*theFSGenerator).name()
99 // <<G4endl;
100  return theFSGenerator->GetFinalState(thePrimary, theTs);
101  }
virtual G4KineticTrackVector * GetFinalState(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &theTargets)=0

Here is the call graph for this function:

const G4BCAction* G4CollisionInitialState::GetGenerator ( )
inline

Definition at line 111 of file G4CollisionInitialState.hh.

112  {
113  return theFSGenerator;
114  }

Here is the caller graph for this function:

G4KineticTrack* G4CollisionInitialState::GetPrimary ( void  )
inline

Definition at line 69 of file G4CollisionInitialState.hh.

70  {return thePrimary;}

Here is the caller graph for this function:

G4KineticTrack* G4CollisionInitialState::GetTarget ( void  )
inline

Definition at line 74 of file G4CollisionInitialState.hh.

75  {return theTarget;}

Here is the caller graph for this function:

G4int G4CollisionInitialState::GetTargetBaryonNumber ( )
inline

Definition at line 84 of file G4CollisionInitialState.hh.

85  {
86  G4double result=0;
87  for(size_t i=0; i<theTs.size(); i++)
88  {
89  result += theTs[i]->GetDefinition()->GetBaryonNumber();
90  }
91  return G4lrint(result);
92  }
G4double G4ParticleHPJENDLHEData::G4double result
int G4lrint(double ad)
Definition: templates.hh:163
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4int G4CollisionInitialState::GetTargetCharge ( )
inline

Definition at line 93 of file G4CollisionInitialState.hh.

94  {
95  G4double result=0;
96  for(size_t i=0; i<theTs.size(); i++)
97  {
98  result += theTs[i]->GetDefinition()->GetPDGCharge();
99  }
100  return G4lrint(result);
101  }
G4double G4ParticleHPJENDLHEData::G4double result
int G4lrint(double ad)
Definition: templates.hh:163
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4KineticTrackVector& G4CollisionInitialState::GetTargetCollection ( void  )
inline

Definition at line 81 of file G4CollisionInitialState.hh.

82  {return theTs;}

Here is the caller graph for this function:

int G4CollisionInitialState::operator< ( const G4CollisionInitialState right) const
inline

Definition at line 62 of file G4CollisionInitialState.hh.

63  {return (theCollisionTime < right.theCollisionTime);}
G4CollisionInitialState & G4CollisionInitialState::operator= ( const G4CollisionInitialState right)

Definition at line 77 of file G4CollisionInitialState.cc.

78 {
79  if (this != &right)
80  {
81  theCollisionTime = right.theCollisionTime;
82  thePrimary = right.thePrimary;
83  theTarget = right.theTarget;
84  for (size_t i=0; i<right.theTs.size(); i++)
85  theTs.push_back(right.theTs[i]);
86  theFSGenerator = right.theFSGenerator;
87  }
88 
89  return *this;
90 }
int G4CollisionInitialState::operator== ( const G4CollisionInitialState right) const
inline

Definition at line 65 of file G4CollisionInitialState.hh.

66  {return (theCollisionTime == right.theCollisionTime);}
void G4CollisionInitialState::Print ( ) const

Definition at line 105 of file G4CollisionInitialState.cc.

106 {
107  G4int tgtPdg=theTarget ?
108  theTarget->GetDefinition()->GetPDGEncoding() : 0;
109  G4cout << " collision " << this << " time: "
110  << theCollisionTime/second << " proj: "
111  << thePrimary << "/pdg=" << thePrimary->GetDefinition()->GetPDGEncoding()
112  << " tgt: " << theTarget << "/pdg=" << tgtPdg
113  << " Collision type: "<< typeid(*theFSGenerator).name();
114 
115 }
static constexpr double second
Definition: G4SIunits.hh:157
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const

Here is the call graph for this function:

void G4CollisionInitialState::SetCollisionTime ( G4double  value)
inline

Definition at line 107 of file G4CollisionInitialState.hh.

108  {theCollisionTime = value;}
const XML_Char int const XML_Char * value
Definition: expat.h:331
void G4CollisionInitialState::SetPrimary ( G4KineticTrack aPrimary)
inline

Definition at line 71 of file G4CollisionInitialState.hh.

72  {thePrimary = aPrimary;}
void G4CollisionInitialState::SetTarget ( G4KineticTrack aTarget)
inline

Definition at line 76 of file G4CollisionInitialState.hh.

77  {theTarget = aTarget;}

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