TPrimary.h

Go to the documentation of this file.
00001 // @(#)root/eg:$Id: TPrimary.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Ola Nordmann   21/09/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 
00013 //////////////////////////////////////////////////////////////////////////
00014 //                                                                      //
00015 // TPrimary                                                             //
00016 // Is a small class in order to define the particles at the production  //
00017 // vertex.                                                              //
00018 //                                                                      //
00019 //////////////////////////////////////////////////////////////////////////
00020 
00021 #ifndef ROOT_TPrimary
00022 #define ROOT_TPrimary
00023 
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027 #ifndef ROOT_TAttLine
00028 #include "TAttLine.h"
00029 #endif
00030 #ifndef ROOT_TAtt3D
00031 #include "TAtt3D.h"
00032 #endif
00033 #ifndef ROOT_X3DBuffer
00034 #include "X3DBuffer.h"
00035 #endif
00036 
00037 class TAttParticle;
00038 
00039 class TPrimary : public TObject, public TAttLine, public TAtt3D {
00040 
00041 protected:
00042         Int_t         fPart;         //Particle id produced
00043         Int_t         fFirstMother;  //Index of the first mother particle
00044         Int_t         fSecondMother; //Index of the second mother particle(if any)
00045         Int_t         fGeneration;   //Generation flag: last gen. (0) or not (1) or ghost (2)
00046         Double_t      fPx;           //Momentum in x direction in GeV/c
00047         Double_t      fPy;           //Momentum in y direction in GeV/c
00048         Double_t      fPz;           //Momentum in z direction in GeV/c
00049         Double_t      fEtot;         //Total energy in GeV
00050         Double_t      fVx;           //Production vertex x position in user units
00051         Double_t      fVy;           //Production vertex y position in user units
00052         Double_t      fVz;           //Production vertex z position in user units
00053         Double_t      fTime;         //Time of particle production in user units
00054         Double_t      fTimeEnd;      //Time of particle destruction (always in the pp-cms!)
00055         TString       fType;         //Indicator of primary type
00056 
00057 public:
00058    TPrimary();
00059    TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener,
00060             Double_t px, Double_t py, Double_t pz,
00061             Double_t etot, Double_t vx, Double_t vy, Double_t vz,
00062             Double_t time, Double_t timend, const char *type = "");
00063    virtual ~TPrimary();
00064    virtual Int_t         DistancetoPrimitive(Int_t px, Int_t py);
00065    virtual void          ExecuteEvent(Int_t event, Int_t px, Int_t py);
00066    virtual const TAttParticle  *GetParticle() const;
00067    virtual const char   *GetName() const;
00068    virtual const char   *GetTitle() const;
00069    virtual Int_t         GetFirstMother() const { return fFirstMother; }
00070    virtual Int_t         GetSecondMother() const { return fSecondMother; }
00071    virtual Int_t         GetGeneration() const { return fGeneration; }
00072    virtual Double_t      GetXMomentum() const { return fPx; }
00073    virtual Double_t      GetYMomentum() const { return fPy; }
00074    virtual Double_t      GetZMomentum() const { return fPz; }
00075    virtual Double_t      GetTotalEnergy() const { return fEtot; }
00076    virtual Double_t      GetXPosition() const { return fVx; }
00077    virtual Double_t      GetYPosition() const { return fVy; }
00078    virtual Double_t      GetZPosition() const { return fVz; }
00079    virtual Double_t      GetTime() const { return fTime; }
00080    virtual Double_t      GetTimeEnd() const { return fTimeEnd; }
00081    virtual const char   *GetType() const { return fType.Data(); }
00082    virtual void          Paint(Option_t *option = "");
00083    virtual void          Print(Option_t *option = "") const;
00084    virtual void          Sizeof3D() const;
00085 
00086    ClassDef(TPrimary,1)  //TPrimary vertex particle information
00087 };
00088 
00089 #endif

Generated on Tue Jul 5 14:27:56 2011 for ROOT_528-00b_version by  doxygen 1.5.1