VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
A01
include
Ex03MCStack.h
Go to the documentation of this file.
1
#ifndef EX03_STACK_H
2
#define EX03_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 A01/include/Ex03MCStack.h
14
/// \brief Definition of the Ex03MCStack class
15
///
16
/// Geant4 example A01 adapted to Virtual Monte Carlo \n
17
/// The implementation of the Ex03MCStack taken from the E03 example.
18
///
19
/// \author I. Hrivnacova; IPN, Orsay
20
21
#include <TVirtualMCStack.h>
22
23
#include <stack>
24
25
class
TParticle;
26
class
TClonesArray;
27
28
/// \ingroup E03
29
/// \ingroup A01
30
/// \brief Implementation of the TVirtualMCStack interface
31
///
32
/// \date 06/03/2003
33
/// \author I. Hrivnacova; IPN, Orsay
34
35
class
Ex03MCStack
:
public
TVirtualMCStack
36
{
37
public
:
38
Ex03MCStack
(Int_t size);
39
Ex03MCStack
();
40
virtual
~Ex03MCStack
();
41
42
// methods
43
virtual
void
PushTrack
(Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px,
44
Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz,
45
Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech,
46
Int_t& ntr, Double_t weight, Int_t is);
47
virtual
TParticle*
PopNextTrack
(Int_t& track);
48
virtual
TParticle*
PopPrimaryForTracking
(Int_t i);
49
virtual
void
Print
(Option_t* option =
""
)
const
;
50
void
Reset
();
51
52
// set methods
53
virtual
void
SetCurrentTrack
(Int_t track);
54
55
// get methods
56
virtual
Int_t
GetNtrack
()
const
;
57
virtual
Int_t
GetNprimary
()
const
;
58
virtual
TParticle*
GetCurrentTrack
()
const
;
59
virtual
Int_t
GetCurrentTrackNumber
()
const
;
60
virtual
Int_t
GetCurrentParentTrackNumber
()
const
;
61
TParticle*
GetParticle
(Int_t
id
)
const
;
62
63
private
:
64
// data members
65
std::stack<TParticle*>
fStack
;
//!< The stack of particles (transient)
66
TClonesArray*
fParticles
;
///< The array of particle (persistent)
67
Int_t
fCurrentTrack
;
///< The current track number
68
Int_t
fNPrimary
;
///< The number of primaries
69
70
ClassDef(
Ex03MCStack
, 1)
// Ex03MCStack
71
};
72
73
#endif
// EX03_STACK_H
Ex03MCStack::PopNextTrack
virtual TParticle * PopNextTrack(Int_t &track)
Definition
Ex03MCStack.cxx:110
Ex03MCStack::Reset
void Reset()
Definition
Ex03MCStack.cxx:156
Ex03MCStack::SetCurrentTrack
virtual void SetCurrentTrack(Int_t track)
Definition
Ex03MCStack.cxx:166
Ex03MCStack::PopPrimaryForTracking
virtual TParticle * PopPrimaryForTracking(Int_t i)
Definition
Ex03MCStack.cxx:131
Ex03MCStack::GetCurrentTrack
virtual TParticle * GetCurrentTrack() const
Definition
Ex03MCStack.cxx:191
Ex03MCStack::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
Ex03MCStack.cxx:62
Ex03MCStack::GetNtrack
virtual Int_t GetNtrack() const
Definition
Ex03MCStack.cxx:175
Ex03MCStack::GetCurrentTrackNumber
virtual Int_t GetCurrentTrackNumber() const
Definition
Ex03MCStack.cxx:204
Ex03MCStack::Print
virtual void Print(Option_t *option="") const
Definition
Ex03MCStack.cxx:144
Ex03MCStack::fCurrentTrack
Int_t fCurrentTrack
The current track number.
Definition
Ex03MCStack.h:67
Ex03MCStack::fStack
std::stack< TParticle * > fStack
The stack of particles (transient).
Definition
Ex03MCStack.h:65
Ex03MCStack::~Ex03MCStack
virtual ~Ex03MCStack()
Definition
Ex03MCStack.cxx:49
Ex03MCStack::fParticles
TClonesArray * fParticles
The array of particle (persistent).
Definition
Ex03MCStack.h:66
Ex03MCStack::Ex03MCStack
Ex03MCStack()
Definition
Ex03MCStack.cxx:43
Ex03MCStack::Ex03MCStack
Ex03MCStack(Int_t size)
Definition
Ex03MCStack.cxx:33
Ex03MCStack::GetNprimary
virtual Int_t GetNprimary() const
Definition
Ex03MCStack.cxx:183
Ex03MCStack::GetCurrentParentTrackNumber
virtual Int_t GetCurrentParentTrackNumber() const
Definition
Ex03MCStack.cxx:212
Ex03MCStack::GetParticle
TParticle * GetParticle(Int_t id) const
Definition
Ex03MCStack.cxx:225
Ex03MCStack::fNPrimary
Int_t fNPrimary
The number of primaries.
Definition
Ex03MCStack.h:68
TVirtualMCStack
Generated on
for VMC Examples by
1.17.0