Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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