library: libEG #include "TPrimary.h"

# TPrimary

class description - source file - inheritance tree (.pdf)

## class TPrimary : public TObject, public TAttLine, public TAtt3D

| Inheritance Chart:

`TObject`

`TAttLine`

`TAtt3D`

<-

`TPrimary`

        public:

                                      TPrimary()
                                      TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener, Double_t px, Double_t py, Double_t pz, Double_t etot, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t timend, const char* type = "")
                                      TPrimary(const TPrimary&)
                              virtual ~TPrimary()
                       static TClass* Class()
                        virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
                         virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
                        virtual Int_t GetFirstMother() const
                        virtual Int_t GetGeneration() const
                  virtual const char* GetName() const
          virtual const TAttParticle* GetParticle() const
                        virtual Int_t GetSecondMother() const
                     virtual Double_t GetTime() const
                     virtual Double_t GetTimeEnd() const
                  virtual const char* GetTitle() const
                     virtual Double_t GetTotalEnergy() const
                  virtual const char* GetType() const
                     virtual Double_t GetXMomentum() const
                     virtual Double_t GetXPosition() const
                     virtual Double_t GetYMomentum() const
                     virtual Double_t GetYPosition() const
                     virtual Double_t GetZMomentum() const
                     virtual Double_t GetZPosition() const
                      virtual TClass* IsA() const
                            TPrimary& operator=(const TPrimary&)
                         virtual void Paint(Option_t* option = "")
                         virtual void Print(Option_t* option = "") const
                         virtual void ShowMembers(TMemberInspector& insp, char* parent)
                         virtual void Sizeof3D() const
                         virtual void Streamer(TBuffer& b)
                                 void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

             Int_t fPart          Particle id produced
             Int_t fFirstMother   Index of the first mother particle
             Int_t fSecondMother  Index of the second mother particle(if any)
             Int_t fGeneration    Generation flag: last gen. (0) or not (1) or ghost (2)
          Double_t fPx            Momentum in x direction in GeV/c
          Double_t fPy            Momentum in y direction in GeV/c
          Double_t fPz            Momentum in z direction in GeV/c
          Double_t fEtot          Total energy in GeV
          Double_t fVx            Production vertex x position in user units
          Double_t fVy            Production vertex y position in user units
          Double_t fVz            Production vertex z position in user units
          Double_t fTime          Time of particle production in user units
          Double_t fTimeEnd       Time of particle destruction (always in the pp-cms!)
           TString fType          Indicator of primary type

## Class Description

TPrimary()

      Primary vertex particle default constructor

TPrimary(Int_t part, Int_t first, Int_t second, Int_t gener, Double_t px, Double_t py, Double_t pz, Double_t etot, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t timend, const char *type)

      TPrimary vertex particle normal constructor

~TPrimary()

       Primaray vertex particle default destructor

Int_t DistancetoPrimitive(Int_t px, Int_t py)

    *-*-*-*-*-*-*-*Compute distance from point px,py to a primary track*-*-*-*
    *-*            ====================================================
    *-*
    *-*  Compute the closest distance of approach from point px,py to each segment
    *-*  of a track.
    *-*  The distance is computed in pixels units.
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void ExecuteEvent(Int_t, Int_t, Int_t)

    *-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
    *-*                  =========================================

const char* GetName() const

const TAttParticle* GetParticle() const

      returning a pointer to the particle attributes

const char* GetTitle() const

void Paint(Option_t *option)

      Paint a primary track

void Print(Option_t *) const

      Print the internals of the primary vertex particle

void Sizeof3D() const

    *-*-*-*-*-*Return total X3D size of this primary*-*-*-*-*-*-*
    *-*        =====================================

### Inline Functions

                  Int_t GetFirstMother() const
                  Int_t GetSecondMother() const
                  Int_t GetGeneration() const
               Double_t GetXMomentum() const
               Double_t GetYMomentum() const
               Double_t GetZMomentum() const
               Double_t GetTotalEnergy() const
               Double_t GetXPosition() const
               Double_t GetYPosition() const
               Double_t GetZPosition() const
               Double_t GetTime() const
               Double_t GetTimeEnd() const
            const char* GetType() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
               TPrimary TPrimary(const TPrimary&)
              TPrimary& operator=(const TPrimary&)

Author: Ola Nordmann 21/09/95
Last update: root/eg:$Name: $:$Id: TPrimary.cxx,v 1.2 2000/12/13 15:13:46 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *