Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
29class TAttParticle;
30
31class TPrimary : public TObject, public TAttLine, public TAtt3D {
32
33protected:
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
49public:
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 ~TPrimary() override;
56 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
57 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
58 virtual const TAttParticle *GetParticle() const;
59 const char *GetName() const override;
60 const char *GetTitle() const override;
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 void Paint(Option_t *option = "") override;
75 void Print(Option_t *option = "") const override;
76 void Sizeof3D() const override;
77
78 ClassDefOverride(TPrimary,1); //TPrimary vertex particle information
79};
80
81#endif
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Use this attribute class when an object should have 3D capabilities.
Definition TAtt3D.h:19
Line Attributes class.
Definition TAttLine.h:18
Particle definition, partly based on GEANT3 particle definition.
Mother of all ROOT objects.
Definition TObject.h:41
Old version of a dynamic particle class created by event generators.
Definition TPrimary.h:31
virtual Double_t GetTimeEnd() const
Definition TPrimary.h:72
~TPrimary() override
Primaray vertex particle default destructor.
Definition TPrimary.cxx:89
const char * GetTitle() const override
Return title of primary particle.
Definition TPrimary.cxx:167
virtual Int_t GetSecondMother() const
Definition TPrimary.h:62
const char * GetName() const override
Return name of primary particle.
Definition TPrimary.cxx:145
TString fType
Definition TPrimary.h:47
virtual Double_t GetXMomentum() const
Definition TPrimary.h:64
Double_t fVy
Definition TPrimary.h:43
virtual Int_t GetGeneration() const
Definition TPrimary.h:63
TPrimary()
Primary vertex particle default constructor.
Definition TPrimary.cxx:38
virtual Double_t GetTime() const
Definition TPrimary.h:71
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TPrimary.cxx:137
Int_t fFirstMother
Definition TPrimary.h:35
Double_t fVx
Definition TPrimary.h:42
Double_t fPx
Definition TPrimary.h:38
void Paint(Option_t *option="") override
Paint a primary track.
Definition TPrimary.cxx:180
Double_t fPy
Definition TPrimary.h:39
void Print(Option_t *option="") const override
Print the internals of the primary vertex particle.
Definition TPrimary.cxx:209
virtual Int_t GetFirstMother() const
Definition TPrimary.h:61
virtual Double_t GetZMomentum() const
Definition TPrimary.h:66
Double_t fVz
Definition TPrimary.h:44
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a primary track.
Definition TPrimary.cxx:103
virtual const char * GetType() const
Definition TPrimary.h:73
virtual Double_t GetYPosition() const
Definition TPrimary.h:69
Int_t fGeneration
Definition TPrimary.h:37
Int_t fSecondMother
Definition TPrimary.h:36
virtual const TAttParticle * GetParticle() const
Returning a pointer to the particle attributes.
Definition TPrimary.cxx:158
Double_t fPz
Definition TPrimary.h:40
Double_t fTimeEnd
Definition TPrimary.h:46
Double_t fEtot
Definition TPrimary.h:41
virtual Double_t GetTotalEnergy() const
Definition TPrimary.h:67
Double_t fTime
Definition TPrimary.h:45
virtual Double_t GetXPosition() const
Definition TPrimary.h:68
Int_t fPart
Definition TPrimary.h:34
void Sizeof3D() const override
Return total X3D size of this primary.
Definition TPrimary.cxx:225
virtual Double_t GetYMomentum() const
Definition TPrimary.h:65
virtual Double_t GetZPosition() const
Definition TPrimary.h:70
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376