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

#include <G4MCTEvent.hh>

Collaboration diagram for G4MCTEvent:

Public Types

typedef
MCTGen2SimParticleMap::const_iterator 
genprimary_const_iterator
 
typedef
MCTSim2GenParticleMap::const_iterator 
simprimary_const_iterator
 

Public Member Functions

 G4MCTEvent ()
 
virtual ~G4MCTEvent ()
 
 G4MCTEvent (const G4MCTEvent &right)
 
const G4MCTEventoperator= (const G4MCTEvent &right)
 
void SetEventNumber (int n)
 
int GetEventNumber () const
 
G4MCTGenEventGetGenEvent () const
 
G4MCTSimEventGetSimEvent () const
 
int GetNofPrimaries () const
 
G4MCTSimParticleGetSimParticle (const G4MCTGenParticle &genpart) const
 
G4MCTGenParticle GetGenParticle (const G4MCTSimParticle *simpart) const
 
int AddPrimaryPair (const G4MCTGenParticle &genp, const G4MCTSimParticle *simp)
 
void ClearEvent ()
 
void Print (std::ostream &ostr=std::cout) const
 
genprimary_const_iterator genprimaries_begin () const
 
genprimary_const_iterator genprimaries_end () const
 
simprimary_const_iterator simprimaries_begin () const
 
simprimary_const_iterator simprimaries_end () const
 

Protected Attributes

int eventNumber
 
G4MCTGenEventgenEvent
 
G4MCTSimEventsimEvent
 
MCTGen2SimParticleMap gen2simParticleMap
 
MCTSim2GenParticleMap sim2genParticleMap
 

Detailed Description

Definition at line 49 of file G4MCTEvent.hh.

Member Typedef Documentation

typedef MCTGen2SimParticleMap::const_iterator G4MCTEvent::genprimary_const_iterator

Definition at line 84 of file G4MCTEvent.hh.

typedef MCTSim2GenParticleMap::const_iterator G4MCTEvent::simprimary_const_iterator

Definition at line 88 of file G4MCTEvent.hh.

Constructor & Destructor Documentation

G4MCTEvent::G4MCTEvent ( )

Definition at line 43 of file G4MCTEvent.cc.

44  : eventNumber(0)
46 {
47  genEvent= new G4MCTGenEvent(); // will be reused.
48  simEvent= new G4MCTSimEvent();
49 }
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
G4MCTGenEvent * genEvent
Definition: G4MCTEvent.hh:52
int eventNumber
Definition: G4MCTEvent.hh:51
G4MCTEvent::~G4MCTEvent ( )
virtual

Definition at line 52 of file G4MCTEvent.cc.

54 {
55  delete genEvent;
56  delete simEvent;
57 }
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
G4MCTGenEvent * genEvent
Definition: G4MCTEvent.hh:52
G4MCTEvent::G4MCTEvent ( const G4MCTEvent right)
inline

Definition at line 97 of file G4MCTEvent.hh.

98 {
99  *this= right;
100 }

Member Function Documentation

int G4MCTEvent::AddPrimaryPair ( const G4MCTGenParticle genp,
const G4MCTSimParticle simp 
)

Definition at line 87 of file G4MCTEvent.cc.

90 {
91  gen2simParticleMap.insert(std::make_pair(const_cast<G4MCTGenParticle&>(genp),
92  const_cast<G4MCTSimParticle*>(simp)));
93  sim2genParticleMap.insert(std::make_pair(const_cast<G4MCTSimParticle*>(simp),
94  const_cast<G4MCTGenParticle&>(genp)));
95 
96  return gen2simParticleMap.size();
97 }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
void G4MCTEvent::ClearEvent ( )

Definition at line 100 of file G4MCTEvent.cc.

102 {
103  gen2simParticleMap.clear();
104  sim2genParticleMap.clear();
105 
106  genEvent-> ClearEvent();
107  simEvent-> ClearEvent();
108 }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57
void ClearEvent()
Definition: G4MCTEvent.cc:100
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
G4MCTGenEvent * genEvent
Definition: G4MCTEvent.hh:52
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
G4MCTEvent::genprimary_const_iterator G4MCTEvent::genprimaries_begin ( ) const
inline

Definition at line 124 of file G4MCTEvent.hh.

125 { return gen2simParticleMap.begin(); }
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
G4MCTEvent::genprimary_const_iterator G4MCTEvent::genprimaries_end ( ) const
inline

Definition at line 127 of file G4MCTEvent.hh.

128 { return gen2simParticleMap.end(); }
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
int G4MCTEvent::GetEventNumber ( ) const
inline

Definition at line 116 of file G4MCTEvent.hh.

116 { return eventNumber; }
int eventNumber
Definition: G4MCTEvent.hh:51

Here is the caller graph for this function:

G4MCTGenEvent * G4MCTEvent::GetGenEvent ( ) const
inline

Definition at line 121 of file G4MCTEvent.hh.

121 { return genEvent; }
G4MCTGenEvent * genEvent
Definition: G4MCTEvent.hh:52
G4MCTGenParticle G4MCTEvent::GetGenParticle ( const G4MCTSimParticle simpart) const

Definition at line 74 of file G4MCTEvent.cc.

76 {
77  MCTSim2GenParticleMap::const_iterator
78  pos= sim2genParticleMap.find(const_cast<G4MCTSimParticle*>(simpart));
79  if(pos != sim2genParticleMap.end()) {
80  return pos-> second;
81  } else {
82  return G4MCTGenParticle((void*)0,(void*)0);
83  }
84 }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57
static constexpr double second
Definition: G4SIunits.hh:157
std::pair< void *, void * > G4MCTGenParticle
static const G4double pos
int G4MCTEvent::GetNofPrimaries ( ) const
inline

Definition at line 118 of file G4MCTEvent.hh.

119  { return gen2simParticleMap.size(); }
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
G4MCTSimEvent * G4MCTEvent::GetSimEvent ( ) const
inline

Definition at line 120 of file G4MCTEvent.hh.

120 { return simEvent; }
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
G4MCTSimParticle * G4MCTEvent::GetSimParticle ( const G4MCTGenParticle genpart) const

Definition at line 61 of file G4MCTEvent.cc.

63 {
64  MCTGen2SimParticleMap::const_iterator pos= gen2simParticleMap.find(genpart);
65  if(pos != gen2simParticleMap.end()) {
66  return pos-> second;
67  } else {
68  return 0;
69  }
70 }
static constexpr double second
Definition: G4SIunits.hh:157
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
static const G4double pos
const G4MCTEvent & G4MCTEvent::operator= ( const G4MCTEvent right)
inline

Definition at line 102 of file G4MCTEvent.hh.

103 {
104  eventNumber= right.eventNumber;
105 
106  simEvent= right.simEvent; // shallow copy...
107  genEvent= right.genEvent;
108 
111 
112  return *this;
113 }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
G4MCTGenEvent * genEvent
Definition: G4MCTEvent.hh:52
MCTGen2SimParticleMap gen2simParticleMap
Definition: G4MCTEvent.hh:56
int eventNumber
Definition: G4MCTEvent.hh:51
void G4MCTEvent::Print ( std::ostream &  ostr = std::cout) const

Definition at line 111 of file G4MCTEvent.cc.

113 {
114  ostr << "Event#:" << eventNumber << G4endl;
115  simEvent-> Print(ostr);
116 }
G4MCTSimEvent * simEvent
Definition: G4MCTEvent.hh:53
void Print(std::ostream &ostr=std::cout) const
Definition: G4MCTEvent.cc:111
#define G4endl
Definition: G4ios.hh:61
int eventNumber
Definition: G4MCTEvent.hh:51

Here is the call graph for this function:

void G4MCTEvent::SetEventNumber ( int  n)
inline

Definition at line 115 of file G4MCTEvent.hh.

115 { eventNumber= n; }
const G4int n
int eventNumber
Definition: G4MCTEvent.hh:51
G4MCTEvent::simprimary_const_iterator G4MCTEvent::simprimaries_begin ( ) const
inline

Definition at line 130 of file G4MCTEvent.hh.

131 { return sim2genParticleMap.begin(); }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57
G4MCTEvent::simprimary_const_iterator G4MCTEvent::simprimaries_end ( ) const
inline

Definition at line 133 of file G4MCTEvent.hh.

134 { return sim2genParticleMap.end(); }
MCTSim2GenParticleMap sim2genParticleMap
Definition: G4MCTEvent.hh:57

Member Data Documentation

int G4MCTEvent::eventNumber
protected

Definition at line 51 of file G4MCTEvent.hh.

MCTGen2SimParticleMap G4MCTEvent::gen2simParticleMap
protected

Definition at line 56 of file G4MCTEvent.hh.

G4MCTGenEvent* G4MCTEvent::genEvent
protected

Definition at line 52 of file G4MCTEvent.hh.

MCTSim2GenParticleMap G4MCTEvent::sim2genParticleMap
protected

Definition at line 57 of file G4MCTEvent.hh.

G4MCTSimEvent* G4MCTEvent::simEvent
protected

Definition at line 53 of file G4MCTEvent.hh.


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