VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E02
include
Ex02MCStack.h
Go to the documentation of this file.
1
#ifndef EX02_STACK_H
2
#define EX02_STACK_H
3
4
//------------------------------------------------
5
// The Virtual Monte Carlo examples
6
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7
// All rights reserved.
8
//
9
// For the licensing terms see geant4_vmc/LICENSE.
10
// Contact: root-vmc@cern.ch
11
//-------------------------------------------------
12
13
/// \file Ex02MCStack.h
14
/// \brief Definition of the Ex02MCStack class
15
///
16
/// Geant4 ExampleN02 adapted to Virtual Monte Carlo
17
///
18
/// \author I. Hrivnacova; IPN, Orsay
19
20
#include "
Ex02Particle.h
"
21
22
#include <TVirtualMCStack.h>
23
24
#include <stack>
25
26
/// \ingroup E02
27
/// \brief Implementation of the TVirtualMCStack interface
28
///
29
/// \date 05/04/2002
30
/// \author I. Hrivnacova; IPN, Orsay
31
32
class
Ex02MCStack
:
public
TVirtualMCStack
33
{
34
public
:
35
Ex02MCStack
(Int_t size);
36
Ex02MCStack
();
37
virtual
~Ex02MCStack
();
38
39
// methods
40
virtual
void
PushTrack
(Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px,
41
Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz,
42
Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech,
43
Int_t& ntr, Double_t weight, Int_t is);
44
virtual
TParticle*
PopNextTrack
(Int_t& track);
45
virtual
TParticle*
PopPrimaryForTracking
(Int_t i);
46
virtual
void
Print
(Option_t* option =
""
)
const
;
47
void
Reset
();
48
49
// set methods
50
virtual
void
SetCurrentTrack
(Int_t track);
51
void
SetObjectNumber
();
52
53
// get methods
54
virtual
Int_t
GetNtrack
()
const
;
55
virtual
Int_t
GetNprimary
()
const
;
56
virtual
TParticle*
GetCurrentTrack
()
const
;
57
virtual
Int_t
GetCurrentTrackNumber
()
const
;
58
virtual
Int_t
GetCurrentParentTrackNumber
()
const
;
59
Ex02Particle
*
GetParticle
(Int_t
id
)
const
;
60
61
private
:
62
// data members
63
std::stack<Ex02Particle*>
fStack
;
//!< The stack of particles (transient)
64
TObjArray*
fParticles
;
///< The array of particle (persistent)
65
Int_t
fCurrentTrack
;
///< The current track number
66
Int_t
fNPrimary
;
///< The number of primaries
67
Int_t
fObjectNumber
;
///< The Root object number counter
68
69
ClassDef(
Ex02MCStack
, 1)
// Ex02MCStack
70
};
71
72
#endif
// EX02_STACK_H
Ex02Particle.h
Definition of the Ex02Particle class.
Ex02MCStack::~Ex02MCStack
virtual ~Ex02MCStack()
Definition
Ex02MCStack.cxx:50
Ex02MCStack::Print
virtual void Print(Option_t *option="") const
Definition
Ex02MCStack.cxx:150
Ex02MCStack::Ex02MCStack
Ex02MCStack(Int_t size)
Definition
Ex02MCStack.cxx:33
Ex02MCStack::Reset
void Reset()
Definition
Ex02MCStack.cxx:165
Ex02MCStack::GetCurrentTrack
virtual TParticle * GetCurrentTrack() const
Definition
Ex02MCStack.cxx:217
Ex02MCStack::SetCurrentTrack
virtual void SetCurrentTrack(Int_t track)
Definition
Ex02MCStack.cxx:183
Ex02MCStack::fCurrentTrack
Int_t fCurrentTrack
The current track number.
Definition
Ex02MCStack.h:65
Ex02MCStack::PopPrimaryForTracking
virtual TParticle * PopPrimaryForTracking(Int_t i)
Definition
Ex02MCStack.cxx:137
Ex02MCStack::GetNtrack
virtual Int_t GetNtrack() const
Definition
Ex02MCStack.cxx:201
Ex02MCStack::PopNextTrack
virtual TParticle * PopNextTrack(Int_t &track)
Definition
Ex02MCStack.cxx:116
Ex02MCStack::PushTrack
virtual void PushTrack(Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech, Int_t &ntr, Double_t weight, Int_t is)
Definition
Ex02MCStack.cxx:63
Ex02MCStack::GetParticle
Ex02Particle * GetParticle(Int_t id) const
Definition
Ex02MCStack.cxx:254
Ex02MCStack::SetObjectNumber
void SetObjectNumber()
Definition
Ex02MCStack.cxx:192
Ex02MCStack::GetCurrentTrackNumber
virtual Int_t GetCurrentTrackNumber() const
Definition
Ex02MCStack.cxx:230
Ex02MCStack::fObjectNumber
Int_t fObjectNumber
The Root object number counter.
Definition
Ex02MCStack.h:67
Ex02MCStack::GetCurrentParentTrackNumber
virtual Int_t GetCurrentParentTrackNumber() const
Definition
Ex02MCStack.cxx:238
Ex02MCStack::GetNprimary
virtual Int_t GetNprimary() const
Definition
Ex02MCStack.cxx:209
Ex02MCStack::fStack
std::stack< Ex02Particle * > fStack
The stack of particles (transient).
Definition
Ex02MCStack.h:63
Ex02MCStack::Ex02MCStack
Ex02MCStack()
Definition
Ex02MCStack.cxx:43
Ex02MCStack::fNPrimary
Int_t fNPrimary
The number of primaries.
Definition
Ex02MCStack.h:66
Ex02MCStack::fParticles
TObjArray * fParticles
The array of particle (persistent).
Definition
Ex02MCStack.h:64
Ex02Particle
Extended TParticle with pointers to mother and daughter particles.
Definition
Ex02Particle.h:34
TVirtualMCStack
Generated on
for VMC Examples by
1.17.0