Logo ROOT   6.14/05
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
Double_t fPz
Definition: TPrimary.h:40
virtual const TAttParticle * GetParticle() const
Returning a pointer to the particle attributes.
Definition: TPrimary.cxx:157
virtual void Sizeof3D() const
Return total X3D size of this primary.
Definition: TPrimary.cxx:224
virtual Int_t GetGeneration() const
Definition: TPrimary.h:63
virtual void Paint(Option_t *option="")
Paint a primary track.
Definition: TPrimary.cxx:179
const char Option_t
Definition: RtypesCore.h:62
Double_t fEtot
Definition: TPrimary.h:41
Int_t fFirstMother
Definition: TPrimary.h:35
Int_t fSecondMother
Definition: TPrimary.h:36
Double_t fTime
Definition: TPrimary.h:45
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
virtual Double_t GetYMomentum() const
Definition: TPrimary.h:65
virtual const char * GetType() const
Definition: TPrimary.h:73
virtual Double_t GetYPosition() const
Definition: TPrimary.h:69
Basic string class.
Definition: TString.h:131
int Int_t
Definition: RtypesCore.h:41
virtual Int_t GetSecondMother() const
Definition: TPrimary.h:62
virtual const char * GetName() const
Return name of primary particle.
Definition: TPrimary.cxx:144
Double_t fVx
Definition: TPrimary.h:42
Int_t fPart
Definition: TPrimary.h:34
virtual Double_t GetZPosition() const
Definition: TPrimary.h:70
#define ClassDef(name, id)
Definition: Rtypes.h:320
TString fType
Definition: TPrimary.h:47
virtual void Print(Option_t *option="") const
Print the internals of the primary vertex particle.
Definition: TPrimary.cxx:208
static constexpr double second
virtual Double_t GetXPosition() const
Definition: TPrimary.h:68
Int_t fGeneration
Definition: TPrimary.h:37
virtual Double_t GetXMomentum() const
Definition: TPrimary.h:64
virtual Double_t GetTimeEnd() const
Definition: TPrimary.h:72
virtual const char * GetTitle() const
Return title of primary particle.
Definition: TPrimary.cxx:166
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a primary track.
Definition: TPrimary.cxx:102
Particle definition, partly based on GEANT3 particle definition.
Definition: TAttParticle.h:30
Old version of a dynamic particle class created by event generators.
Definition: TPrimary.h:31
Double_t fVy
Definition: TPrimary.h:43
Double_t fPy
Definition: TPrimary.h:39
virtual Double_t GetTime() const
Definition: TPrimary.h:71
virtual Double_t GetZMomentum() const
Definition: TPrimary.h:66
double Double_t
Definition: RtypesCore.h:55
int type
Definition: TGX11.cxx:120
virtual Double_t GetTotalEnergy() const
Definition: TPrimary.h:67
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Int_t GetFirstMother() const
Definition: TPrimary.h:61
Double_t fPx
Definition: TPrimary.h:38
Definition: first.py:1
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TPrimary.cxx:136
virtual ~TPrimary()
Primaray vertex particle default destructor.
Definition: TPrimary.cxx:88
Double_t fTimeEnd
Definition: TPrimary.h:46
Line Attributes class.
Definition: TAttLine.h:18
TPrimary()
Primary vertex particle default constructor.
Definition: TPrimary.cxx:37
const char * Data() const
Definition: TString.h:364
Double_t fVz
Definition: TPrimary.h:44