VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E01
include
Ex01MCStack.h
Go to the documentation of this file.
1
#ifndef Ex01_STACK_H
2
#define Ex01_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 Ex01MCStack.h
14
/// \brief Definition of the Ex01MCStack class
15
///
16
/// Geant4 ExampleN01 adapted to Virtual Monte Carlo
17
///
18
/// \author I. Hrivnacova; IPN, Orsay
19
20
#include "
Ex01Particle.h
"
21
22
#include <TVirtualMCStack.h>
23
24
#include <stack>
25
26
/// \ingroup E01
27
/// \brief Implementation of the TVirtualMCStack interface
28
///
29
/// \date 05/04/2002
30
/// \author I. Hrivnacova; IPN, Orsay
31
32
class
Ex01MCStack
:
public
TVirtualMCStack
33
{
34
public
:
35
Ex01MCStack
(Int_t size);
36
Ex01MCStack
();
37
virtual
~Ex01MCStack
();
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& itrack);
45
virtual
TParticle*
PopPrimaryForTracking
(Int_t i);
46
47
// set methods
48
virtual
void
SetCurrentTrack
(Int_t itrack);
49
50
// get methods
51
virtual
Int_t
GetNtrack
()
const
;
52
virtual
Int_t
GetNprimary
()
const
;
53
virtual
TParticle*
GetCurrentTrack
()
const
;
54
virtual
Int_t
GetCurrentTrackNumber
()
const
;
55
virtual
Int_t
GetCurrentParentTrackNumber
()
const
;
56
57
private
:
58
// methods
59
Ex01Particle
*
GetParticle
(Int_t
id
)
const
;
60
61
// data members
62
std::stack<Ex01Particle*>
fStack
;
//!< The stack of particles (transient)
63
TObjArray*
fParticles
;
///< The array of particle (persistent)
64
Int_t
fCurrentTrack
;
///< The current track number
65
Int_t
fNPrimary
;
///< The number of primaries
66
67
ClassDef(
Ex01MCStack
, 1)
// Ex01MCStack
68
};
69
70
#endif
// Ex01_STACK_H
Ex01Particle.h
Definition of the Ex01Particle class.
Ex01MCStack::PopPrimaryForTracking
virtual TParticle * PopPrimaryForTracking(Int_t i)
Definition
Ex01MCStack.cxx:144
Ex01MCStack::SetCurrentTrack
virtual void SetCurrentTrack(Int_t itrack)
Definition
Ex01MCStack.cxx:157
Ex01MCStack::GetCurrentTrackNumber
virtual Int_t GetCurrentTrackNumber() const
Definition
Ex01MCStack.cxx:195
Ex01MCStack::fParticles
TObjArray * fParticles
The array of particle (persistent).
Definition
Ex01MCStack.h:63
Ex01MCStack::GetNtrack
virtual Int_t GetNtrack() const
Definition
Ex01MCStack.cxx:166
Ex01MCStack::Ex01MCStack
Ex01MCStack()
Definition
Ex01MCStack.cxx:39
Ex01MCStack::fNPrimary
Int_t fNPrimary
The number of primaries.
Definition
Ex01MCStack.h:65
Ex01MCStack::GetParticle
Ex01Particle * GetParticle(Int_t id) const
Definition
Ex01MCStack.cxx:56
Ex01MCStack::Ex01MCStack
Ex01MCStack(Int_t size)
Definition
Ex01MCStack.cxx:29
Ex01MCStack::fCurrentTrack
Int_t fCurrentTrack
The current track number.
Definition
Ex01MCStack.h:64
Ex01MCStack::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
Ex01MCStack.cxx:70
Ex01MCStack::fStack
std::stack< Ex01Particle * > fStack
The stack of particles (transient).
Definition
Ex01MCStack.h:62
Ex01MCStack::GetCurrentParentTrackNumber
virtual Int_t GetCurrentParentTrackNumber() const
Definition
Ex01MCStack.cxx:202
Ex01MCStack::GetCurrentTrack
virtual TParticle * GetCurrentTrack() const
Definition
Ex01MCStack.cxx:182
Ex01MCStack::GetNprimary
virtual Int_t GetNprimary() const
Definition
Ex01MCStack.cxx:174
Ex01MCStack::PopNextTrack
virtual TParticle * PopNextTrack(Int_t &itrack)
Definition
Ex01MCStack.cxx:123
Ex01MCStack::~Ex01MCStack
virtual ~Ex01MCStack()
Definition
Ex01MCStack.cxx:45
Ex01Particle
Extended TParticle with pointers to mother and daughter particles.
Definition
Ex01Particle.h:32
TVirtualMCStack
Generated on
for VMC Examples by
1.17.0