ROOT  6.06/09
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 #ifndef ROOT_TNamed
25 #include "TNamed.h"
26 #endif
27 #ifndef ROOT_TAttLine
28 #include "TAttLine.h"
29 #endif
30 #ifndef ROOT_TAtt3D
31 #include "TAtt3D.h"
32 #endif
33 #ifndef ROOT_X3DBuffer
34 #include "X3DBuffer.h"
35 #endif
36 
37 class TAttParticle;
38 
39 class TPrimary : public TObject, public TAttLine, public TAtt3D {
40 
41 protected:
42  Int_t fPart; //Particle id produced
43  Int_t fFirstMother; //Index of the first mother particle
44  Int_t fSecondMother; //Index of the second mother particle(if any)
45  Int_t fGeneration; //Generation flag: last gen. (0) or not (1) or ghost (2)
46  Double_t fPx; //Momentum in x direction in GeV/c
47  Double_t fPy; //Momentum in y direction in GeV/c
48  Double_t fPz; //Momentum in z direction in GeV/c
49  Double_t fEtot; //Total energy in GeV
50  Double_t fVx; //Production vertex x position in user units
51  Double_t fVy; //Production vertex y position in user units
52  Double_t fVz; //Production vertex z position in user units
53  Double_t fTime; //Time of particle production in user units
54  Double_t fTimeEnd; //Time of particle destruction (always in the pp-cms!)
55  TString fType; //Indicator of primary type
56 
57 public:
58  TPrimary();
59  TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener,
60  Double_t px, Double_t py, Double_t pz,
61  Double_t etot, Double_t vx, Double_t vy, Double_t vz,
62  Double_t time, Double_t timend, const char *type = "");
63  virtual ~TPrimary();
64  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
65  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
66  virtual const TAttParticle *GetParticle() const;
67  virtual const char *GetName() const;
68  virtual const char *GetTitle() const;
69  virtual Int_t GetFirstMother() const { return fFirstMother; }
70  virtual Int_t GetSecondMother() const { return fSecondMother; }
71  virtual Int_t GetGeneration() const { return fGeneration; }
72  virtual Double_t GetXMomentum() const { return fPx; }
73  virtual Double_t GetYMomentum() const { return fPy; }
74  virtual Double_t GetZMomentum() const { return fPz; }
75  virtual Double_t GetTotalEnergy() const { return fEtot; }
76  virtual Double_t GetXPosition() const { return fVx; }
77  virtual Double_t GetYPosition() const { return fVy; }
78  virtual Double_t GetZPosition() const { return fVz; }
79  virtual Double_t GetTime() const { return fTime; }
80  virtual Double_t GetTimeEnd() const { return fTimeEnd; }
81  virtual const char *GetType() const { return fType.Data(); }
82  virtual void Paint(Option_t *option = "");
83  virtual void Print(Option_t *option = "") const;
84  virtual void Sizeof3D() const;
85 
86  ClassDef(TPrimary,1) //TPrimary vertex particle information
87 };
88 
89 #endif
Double_t fPz
Definition: TPrimary.h:48
virtual Double_t GetYPosition() const
Definition: TPrimary.h:77
virtual void Paint(Option_t *option="")
Paint a primary track.
Definition: TPrimary.cxx:177
const char Option_t
Definition: RtypesCore.h:62
Double_t fEtot
Definition: TPrimary.h:49
Int_t fFirstMother
Definition: TPrimary.h:43
Int_t fSecondMother
Definition: TPrimary.h:44
Double_t fTime
Definition: TPrimary.h:53
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:29
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
virtual const char * GetName() const
return name of primary particle
Definition: TPrimary.cxx:142
Double_t fVx
Definition: TPrimary.h:50
const char * Data() const
Definition: TString.h:349
Int_t fPart
Definition: TPrimary.h:42
ClassDef(TAttLine, 2)
TString fType
Definition: TPrimary.h:55
virtual Int_t GetFirstMother() const
Definition: TPrimary.h:69
virtual Double_t GetTotalEnergy() const
Definition: TPrimary.h:75
Int_t fGeneration
Definition: TPrimary.h:45
virtual Double_t GetYMomentum() const
Definition: TPrimary.h:73
virtual Double_t GetTime() const
Definition: TPrimary.h:79
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*Compute distance from point px,py to a primary track*-*-*-* *-* ======================...
Definition: TPrimary.cxx:100
virtual Double_t GetXMomentum() const
Definition: TPrimary.h:72
virtual const char * GetType() const
Definition: TPrimary.h:81
Double_t fVy
Definition: TPrimary.h:51
Double_t fPy
Definition: TPrimary.h:47
virtual Int_t GetGeneration() const
Definition: TPrimary.h:71
double Double_t
Definition: RtypesCore.h:55
virtual void Print(Option_t *option="") const
Print the internals of the primary vertex particle.
Definition: TPrimary.cxx:206
int type
Definition: TGX11.cxx:120
virtual const char * GetTitle() const
return title of primary particle
Definition: TPrimary.cxx:164
Mother of all ROOT objects.
Definition: TObject.h:58
virtual Double_t GetZPosition() const
Definition: TPrimary.h:78
virtual const TAttParticle * GetParticle() const
returning a pointer to the particle attributes
Definition: TPrimary.cxx:155
virtual Double_t GetZMomentum() const
Definition: TPrimary.h:74
Double_t fPx
Definition: TPrimary.h:46
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-* *-* ===========================...
Definition: TPrimary.cxx:134
virtual ~TPrimary()
Primaray vertex particle default destructor.
Definition: TPrimary.cxx:85
Double_t fTimeEnd
Definition: TPrimary.h:54
Line Attributes class.
Definition: TAttLine.h:32
virtual Int_t GetSecondMother() const
Definition: TPrimary.h:70
virtual Double_t GetTimeEnd() const
Definition: TPrimary.h:80
virtual Double_t GetXPosition() const
Definition: TPrimary.h:76
virtual void Sizeof3D() const
*-*-*-*-*-*Return total X3D size of this primary*-*-*-*-*-*-* *-* ===================================...
Definition: TPrimary.cxx:222
Double_t fVz
Definition: TPrimary.h:52