Logo ROOT  
Reference Guide
TPrimary.h
Go to the documentation of this file.
1 // @(#)root/eg:$Id$
2 // Author: Ola Nordmann 21/09/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 //////////////////////////////////////////////////////////////////////////
14 // //
15 // TPrimary //
16 // Is a small class in order to define the particles at the production //
17 // vertex. //
18 // //
19 //////////////////////////////////////////////////////////////////////////
20 
21 #ifndef ROOT_TPrimary
22 #define ROOT_TPrimary
23 
24 #include "TNamed.h"
25 #include "TAttLine.h"
26 #include "TAtt3D.h"
27 #include "X3DBuffer.h"
28 
29 class TAttParticle;
30 
31 class TPrimary : public TObject, public TAttLine, public TAtt3D {
32 
33 protected:
34  Int_t fPart; //Particle id produced
35  Int_t fFirstMother; //Index of the first mother particle
36  Int_t fSecondMother; //Index of the second mother particle(if any)
37  Int_t fGeneration; //Generation flag: last gen. (0) or not (1) or ghost (2)
38  Double_t fPx; //Momentum in x direction in GeV/c
39  Double_t fPy; //Momentum in y direction in GeV/c
40  Double_t fPz; //Momentum in z direction in GeV/c
41  Double_t fEtot; //Total energy in GeV
42  Double_t fVx; //Production vertex x position in user units
43  Double_t fVy; //Production vertex y position in user units
44  Double_t fVz; //Production vertex z position in user units
45  Double_t fTime; //Time of particle production in user units
46  Double_t fTimeEnd; //Time of particle destruction (always in the pp-cms!)
47  TString fType; //Indicator of primary type
48 
49 public:
50  TPrimary();
51  TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener,
52  Double_t px, Double_t py, Double_t pz,
53  Double_t etot, Double_t vx, Double_t vy, Double_t vz,
54  Double_t time, Double_t timend, const char *type = "");
55  virtual ~TPrimary();
56  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
57  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
58  virtual const TAttParticle *GetParticle() const;
59  virtual const char *GetName() const;
60  virtual const char *GetTitle() const;
61  virtual Int_t GetFirstMother() const { return fFirstMother; }
62  virtual Int_t GetSecondMother() const { return fSecondMother; }
63  virtual Int_t GetGeneration() const { return fGeneration; }
64  virtual Double_t GetXMomentum() const { return fPx; }
65  virtual Double_t GetYMomentum() const { return fPy; }
66  virtual Double_t GetZMomentum() const { return fPz; }
67  virtual Double_t GetTotalEnergy() const { return fEtot; }
68  virtual Double_t GetXPosition() const { return fVx; }
69  virtual Double_t GetYPosition() const { return fVy; }
70  virtual Double_t GetZPosition() const { return fVz; }
71  virtual Double_t GetTime() const { return fTime; }
72  virtual Double_t GetTimeEnd() const { return fTimeEnd; }
73  virtual const char *GetType() const { return fType.Data(); }
74  virtual void Paint(Option_t *option = "");
75  virtual void Print(Option_t *option = "") const;
76  virtual void Sizeof3D() const;
77 
78  ClassDef(TPrimary,1) //TPrimary vertex particle information
79 };
80 
81 #endif
TPrimary::GetTotalEnergy
virtual Double_t GetTotalEnergy() const
Definition: TPrimary.h:67
first
Definition: first.py:1
Option_t
const char Option_t
Definition: RtypesCore.h:66
TPrimary::Print
virtual void Print(Option_t *option="") const
Print the internals of the primary vertex particle.
Definition: TPrimary.cxx:209
TPrimary::fTimeEnd
Double_t fTimeEnd
Definition: TPrimary.h:46
TString::Data
const char * Data() const
Definition: TString.h:369
TPrimary::GetYMomentum
virtual Double_t GetYMomentum() const
Definition: TPrimary.h:65
TNamed.h
TPrimary
Old version of a dynamic particle class created by event generators.
Definition: TPrimary.h:31
TPrimary::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TPrimary.cxx:137
TPrimary::GetXPosition
virtual Double_t GetXPosition() const
Definition: TPrimary.h:68
TPrimary::GetFirstMother
virtual Int_t GetFirstMother() const
Definition: TPrimary.h:61
TPrimary::GetXMomentum
virtual Double_t GetXMomentum() const
Definition: TPrimary.h:64
TPrimary::GetZMomentum
virtual Double_t GetZMomentum() const
Definition: TPrimary.h:66
TPrimary::TPrimary
TPrimary()
Primary vertex particle default constructor.
Definition: TPrimary.cxx:38
TPrimary::fPy
Double_t fPy
Definition: TPrimary.h:39
TPrimary::fGeneration
Int_t fGeneration
Definition: TPrimary.h:37
TString
Basic string class.
Definition: TString.h:136
TAtt3D
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
TPrimary::fVy
Double_t fVy
Definition: TPrimary.h:43
TPrimary::GetSecondMother
virtual Int_t GetSecondMother() const
Definition: TPrimary.h:62
TPrimary::GetTitle
virtual const char * GetTitle() const
Return title of primary particle.
Definition: TPrimary.cxx:167
TAttLine.h
TPrimary::fPx
Double_t fPx
Definition: TPrimary.h:38
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
TPrimary::Paint
virtual void Paint(Option_t *option="")
Paint a primary track.
Definition: TPrimary.cxx:180
TAtt3D.h
TPrimary::~TPrimary
virtual ~TPrimary()
Primaray vertex particle default destructor.
Definition: TPrimary.cxx:89
X3DBuffer.h
TPrimary::fVz
Double_t fVz
Definition: TPrimary.h:44
TPrimary::fEtot
Double_t fEtot
Definition: TPrimary.h:41
TPrimary::fTime
Double_t fTime
Definition: TPrimary.h:45
TPrimary::fPz
Double_t fPz
Definition: TPrimary.h:40
TPrimary::GetZPosition
virtual Double_t GetZPosition() const
Definition: TPrimary.h:70
TAttParticle
Particle definition, partly based on GEANT3 particle definition.
Definition: TAttParticle.h:30
Double_t
double Double_t
Definition: RtypesCore.h:59
TPrimary::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a primary track.
Definition: TPrimary.cxx:103
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TPrimary::GetType
virtual const char * GetType() const
Definition: TPrimary.h:73
TPrimary::fSecondMother
Int_t fSecondMother
Definition: TPrimary.h:36
TPrimary::fType
TString fType
Definition: TPrimary.h:47
TPrimary::fPart
Int_t fPart
Definition: TPrimary.h:34
type
int type
Definition: TGX11.cxx:121
TPrimary::GetYPosition
virtual Double_t GetYPosition() const
Definition: TPrimary.h:69
TPrimary::GetParticle
virtual const TAttParticle * GetParticle() const
Returning a pointer to the particle attributes.
Definition: TPrimary.cxx:158
TPrimary::Sizeof3D
virtual void Sizeof3D() const
Return total X3D size of this primary.
Definition: TPrimary.cxx:225
TGeant4Unit::second
static constexpr double second
Definition: TGeant4SystemOfUnits.h:151
TPrimary::fFirstMother
Int_t fFirstMother
Definition: TPrimary.h:35
TPrimary::GetGeneration
virtual Int_t GetGeneration() const
Definition: TPrimary.h:63
TPrimary::GetTime
virtual Double_t GetTime() const
Definition: TPrimary.h:71
TPrimary::GetName
virtual const char * GetName() const
Return name of primary particle.
Definition: TPrimary.cxx:145
TPrimary::GetTimeEnd
virtual Double_t GetTimeEnd() const
Definition: TPrimary.h:72
int
TPrimary::fVx
Double_t fVx
Definition: TPrimary.h:42