Logo ROOT   6.18/05
Reference Guide
TVirtualMCStack.h
Go to the documentation of this file.
1// @(#)root/vmc:$Id$
2// Authors: Ivana Hrivnacova 13/04/2002
3
4/*************************************************************************
5 * Copyright (C) 2006, Rene Brun and Fons Rademakers. *
6 * Copyright (C) 2002, ALICE Experiment at CERN. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
13#ifndef ROOT_TVirtualMCStack
14#define ROOT_TVirtualMCStack
15
16// Class TVirtualMCStack
17// ---------------------
18// Interface to a user defined particles stack.
19//
20
21#include "TObject.h"
22#include "TMCProcess.h"
23
24class TParticle;
25
26class TVirtualMCStack : public TObject {
27
28public:
29 // Constructor
31
32 // Destructor
33 virtual ~TVirtualMCStack();
34
35 //
36 // Methods for stacking
37 //
38
39 /// Create a new particle and push into stack;
40 /// - toBeDone - 1 if particles should go to tracking, 0 otherwise
41 /// - parent - number of the parent track, -1 if track is primary
42 /// - pdg - PDG encoding
43 /// - px, py, pz - particle momentum [GeV/c]
44 /// - e - total energy [GeV]
45 /// - vx, vy, vz - position [cm]
46 /// - tof - time of flight [s]
47 /// - polx, poly, polz - polarization
48 /// - mech - creator process VMC code
49 /// - ntr - track number (is filled by the stack
50 /// - weight - particle weight
51 /// - is - generation status code
52 virtual void PushTrack(Int_t toBeDone, Int_t parent, Int_t pdg,
54 Double_t vx, Double_t vy, Double_t vz, Double_t tof,
55 Double_t polx, Double_t poly, Double_t polz,
56 TMCProcess mech, Int_t& ntr, Double_t weight,
57 Int_t is) = 0;
58
59 /// The stack has to provide two pop mechanisms:
60 /// The first pop mechanism required.
61 /// Pop all particles with toBeDone = 1, both primaries and seconadies
62 virtual TParticle* PopNextTrack(Int_t& itrack) = 0;
63
64 /// The second pop mechanism required.
65 /// Pop only primary particles with toBeDone = 1, stacking of secondaries
66 /// is done by MC
68
69 //
70 // Set methods
71 //
72
73 /// Set the current track number
74 virtual void SetCurrentTrack(Int_t trackNumber) = 0;
75
76 //
77 // Get methods
78 //
79
80 /// Total number of tracks
81 virtual Int_t GetNtrack() const = 0;
82
83 /// Total number of primary tracks
84 virtual Int_t GetNprimary() const = 0;
85
86 /// Current track particle
87 virtual TParticle* GetCurrentTrack() const= 0;
88
89 /// Current track number
90 virtual Int_t GetCurrentTrackNumber() const = 0;
91
92 /// Number of the parent of the current track
94
95 ClassDef(TVirtualMCStack,1) //Interface to a particles stack
96};
97
98#endif //ROOT_TVirtualMCStack
#define e(i)
Definition: RSha256.hxx:103
int Int_t
Definition: RtypesCore.h:41
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
TMCProcess
VMC physics process codes.
Definition: TMCProcess.h:24
Mother of all ROOT objects.
Definition: TObject.h:37
Description of the dynamic properties of a particle.
Definition: TParticle.h:26
Interface to a user defined particles stack.
virtual ~TVirtualMCStack()
Destructor.
virtual TParticle * PopNextTrack(Int_t &itrack)=0
The stack has to provide two pop mechanisms: The first pop mechanism required.
TVirtualMCStack()
Default constructor.
virtual Int_t GetNprimary() const =0
Total number of primary tracks.
virtual Int_t GetCurrentTrackNumber() const =0
Current track number.
virtual TParticle * GetCurrentTrack() const =0
Current track particle.
virtual Int_t GetNtrack() const =0
Total number of tracks.
virtual void SetCurrentTrack(Int_t trackNumber)=0
Set the current track number.
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)=0
Create a new particle and push into stack;.
virtual TParticle * PopPrimaryForTracking(Int_t i)=0
The second pop mechanism required.
virtual Int_t GetCurrentParentTrackNumber() const =0
Number of the parent of the current track.