Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TPrimary.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eg:$Id$
0002 // Author: Ola Nordmann   21/09/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 
0013 //////////////////////////////////////////////////////////////////////////
0014 //                                                                      //
0015 // TPrimary                                                             //
0016 // Is a small class in order to define the particles at the production  //
0017 // vertex.                                                              //
0018 //                                                                      //
0019 //////////////////////////////////////////////////////////////////////////
0020 
0021 #ifndef ROOT_TPrimary
0022 #define ROOT_TPrimary
0023 
0024 #include "TNamed.h"
0025 #include "TAttLine.h"
0026 #include "TAtt3D.h"
0027 #include "X3DBuffer.h"
0028 
0029 class TAttParticle;
0030 
0031 class TPrimary : public TObject, public TAttLine, public TAtt3D {
0032 
0033 protected:
0034         Int_t         fPart;         //Particle id produced
0035         Int_t         fFirstMother;  //Index of the first mother particle
0036         Int_t         fSecondMother; //Index of the second mother particle(if any)
0037         Int_t         fGeneration;   //Generation flag: last gen. (0) or not (1) or ghost (2)
0038         Double_t      fPx;           //Momentum in x direction in GeV/c
0039         Double_t      fPy;           //Momentum in y direction in GeV/c
0040         Double_t      fPz;           //Momentum in z direction in GeV/c
0041         Double_t      fEtot;         //Total energy in GeV
0042         Double_t      fVx;           //Production vertex x position in user units
0043         Double_t      fVy;           //Production vertex y position in user units
0044         Double_t      fVz;           //Production vertex z position in user units
0045         Double_t      fTime;         //Time of particle production in user units
0046         Double_t      fTimeEnd;      //Time of particle destruction (always in the pp-cms!)
0047         TString       fType;         //Indicator of primary type
0048 
0049 public:
0050    TPrimary();
0051    TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener,
0052             Double_t px, Double_t py, Double_t pz,
0053             Double_t etot, Double_t vx, Double_t vy, Double_t vz,
0054             Double_t time, Double_t timend, const char *type = "");
0055    ~TPrimary() override;
0056            Int_t         DistancetoPrimitive(Int_t px, Int_t py) override;
0057            void          ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0058    virtual const TAttParticle  *GetParticle() const;
0059            const char   *GetName() const override;
0060            const char   *GetTitle() const override;
0061    virtual Int_t         GetFirstMother() const { return fFirstMother; }
0062    virtual Int_t         GetSecondMother() const { return fSecondMother; }
0063    virtual Int_t         GetGeneration() const { return fGeneration; }
0064    virtual Double_t      GetXMomentum() const { return fPx; }
0065    virtual Double_t      GetYMomentum() const { return fPy; }
0066    virtual Double_t      GetZMomentum() const { return fPz; }
0067    virtual Double_t      GetTotalEnergy() const { return fEtot; }
0068    virtual Double_t      GetXPosition() const { return fVx; }
0069    virtual Double_t      GetYPosition() const { return fVy; }
0070    virtual Double_t      GetZPosition() const { return fVz; }
0071    virtual Double_t      GetTime() const { return fTime; }
0072    virtual Double_t      GetTimeEnd() const { return fTimeEnd; }
0073    virtual const char   *GetType() const { return fType.Data(); }
0074            void          Paint(Option_t *option = "") override;
0075            void          Print(Option_t *option = "") const override;
0076            void          Sizeof3D() const override;
0077 
0078    ClassDefOverride(TPrimary,1); //TPrimary vertex particle information
0079 };
0080 
0081 #endif