VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
E03c
include
Ex03cMCStack.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) 2014 - 2018 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 Ex03cMCStack.h
14
/// \brief Definition of the Ex03cMCStack class
15
///
16
/// Geant4 ExampleN03 adapted to Virtual Monte Carlo
17
///
18
/// \author Benedikt Volkel, CERN
19
20
#include <TVirtualMCStack.h>
21
22
#include <stack>
23
24
class
TParticle;
25
class
TClonesArray;
26
27
/// \ingroup E03
28
/// \brief Implementation of the TVirtualMCStack interface
29
///
30
/// A variant of the Ex03CalorimeterSD class
31
/// updated for multiple engine runs.
32
///
33
/// \date 21/08/2019
34
/// \author Benedikt Volkel, CERN
35
36
class
Ex03cMCStack
:
public
TVirtualMCStack
37
{
38
public
:
39
Ex03cMCStack
(Int_t size);
40
Ex03cMCStack
();
41
virtual
~Ex03cMCStack
();
42
43
// methods
44
virtual
void
PushTrack
(Int_t toBeDone, Int_t parent, Int_t pdg, Double_t px,
45
Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz,
46
Double_t tof, Double_t polx, Double_t poly, Double_t polz, TMCProcess mech,
47
Int_t& ntr, Double_t weight, Int_t is);
48
virtual
TParticle*
PopNextTrack
(Int_t& track);
49
virtual
TParticle*
PopPrimaryForTracking
(Int_t i);
50
virtual
void
Print
(Option_t* option =
""
)
const
;
51
void
Reset
();
52
53
// set methods
54
virtual
void
SetCurrentTrack
(Int_t track);
55
56
// get methods
57
virtual
Int_t
GetNtrack
()
const
;
58
virtual
Int_t
GetNprimary
()
const
;
59
virtual
TParticle*
GetCurrentTrack
()
const
;
60
virtual
Int_t
GetCurrentTrackNumber
()
const
;
61
virtual
Int_t
GetCurrentParentTrackNumber
()
const
;
62
TParticle*
GetParticle
(Int_t
id
)
const
;
63
64
private
:
65
// data members
66
std::stack<TParticle*>
fStack
;
//!< The stack of particles (transient)
67
TClonesArray*
fParticles
;
///< The array of particle (persistent)
68
Int_t
fCurrentTrack
;
///< The current track number
69
Int_t
fNPrimary
;
///< The number of primaries
70
71
ClassDef(
Ex03cMCStack
, 1)
// Ex03cMCStack
72
};
73
74
#endif
// EX03_STACK_H
Ex03cMCStack::fStack
std::stack< TParticle * > fStack
The stack of particles (transient).
Definition
Ex03cMCStack.h:66
Ex03cMCStack::GetCurrentTrack
virtual TParticle * GetCurrentTrack() const
Definition
Ex03cMCStack.cxx:198
Ex03cMCStack::Ex03cMCStack
Ex03cMCStack(Int_t size)
Definition
Ex03cMCStack.cxx:34
Ex03cMCStack::GetCurrentParentTrackNumber
virtual Int_t GetCurrentParentTrackNumber() const
Definition
Ex03cMCStack.cxx:219
Ex03cMCStack::fParticles
TClonesArray * fParticles
The array of particle (persistent).
Definition
Ex03cMCStack.h:67
Ex03cMCStack::GetCurrentTrackNumber
virtual Int_t GetCurrentTrackNumber() const
Definition
Ex03cMCStack.cxx:211
Ex03cMCStack::fCurrentTrack
Int_t fCurrentTrack
The current track number.
Definition
Ex03cMCStack.h:68
Ex03cMCStack::PopPrimaryForTracking
virtual TParticle * PopPrimaryForTracking(Int_t i)
Definition
Ex03cMCStack.cxx:138
Ex03cMCStack::SetCurrentTrack
virtual void SetCurrentTrack(Int_t track)
Definition
Ex03cMCStack.cxx:173
Ex03cMCStack::GetParticle
TParticle * GetParticle(Int_t id) const
Definition
Ex03cMCStack.cxx:232
Ex03cMCStack::Print
virtual void Print(Option_t *option="") const
Definition
Ex03cMCStack.cxx:151
Ex03cMCStack::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
Ex03cMCStack.cxx:63
Ex03cMCStack::fNPrimary
Int_t fNPrimary
The number of primaries.
Definition
Ex03cMCStack.h:69
Ex03cMCStack::GetNprimary
virtual Int_t GetNprimary() const
Definition
Ex03cMCStack.cxx:190
Ex03cMCStack::GetNtrack
virtual Int_t GetNtrack() const
Definition
Ex03cMCStack.cxx:182
Ex03cMCStack::Ex03cMCStack
Ex03cMCStack()
Definition
Ex03cMCStack.cxx:44
Ex03cMCStack::Reset
void Reset()
Definition
Ex03cMCStack.cxx:163
Ex03cMCStack::PopNextTrack
virtual TParticle * PopNextTrack(Int_t &track)
Definition
Ex03cMCStack.cxx:117
Ex03cMCStack::~Ex03cMCStack
virtual ~Ex03cMCStack()
Definition
Ex03cMCStack.cxx:50
TVirtualMCStack
Generated on
for VMC Examples by
1.17.0