]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/JCORRAN/AliJMCTrack.h
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJMCTrack.h
1 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3
4 // Short comment describing what this class does needed!
5
6 // $Id: AliJMCTrack.h,v 1.3 2008/05/08 15:19:52 djkim Exp $
7
8 ////////////////////////////////////////////////////
9 /*!
10   \file AliJMCTrack.h
11   \brief
12   \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
13   \email: djkim@jyu.fi
14   \version $Revision: 1.3 $
15   \date $Date: 2008/05/08 15:19:52 $
16   */
17 ////////////////////////////////////////////////////
18
19 #ifndef ALIJMCTRACK_H
20 #define ALIJMCTRACK_H
21
22 // include ROOT lib
23 #ifndef ROOT_TObject
24 #include <TObject.h>
25 #endif
26 #include <TDatabasePDG.h>
27
28 // include Inharitance
29 #include "AliJBaseTrack.h"
30
31 class AliJMCTrack : public AliJBaseTrack {
32
33  public:
34   enum { kPrimary=AliJBaseTrack::kNFlag, kPHOS, kEMCAL, kTPC, kInjected, kNFlag };//For ALICE
35   enum { kFinal=AliJBaseTrack::kNFlag };// for MC
36   //usage : this->SetFlag( kPrimary, kTRUE );
37   //usage : this->IsTrue( kFinal );
38
39   AliJMCTrack();      //default constructor
40   AliJMCTrack(const AliJMCTrack& a);  //copy constructor
41
42   ~AliJMCTrack(){;}    //destructor
43
44   Int_t  GetPdgCode()    const {return fPdgCode;}
45   Int_t  GetMother  (Int_t i) const {return fMother[i];}
46   Int_t  GetDaughter(Int_t i) const {return fDaughter[i];}
47   Double32_t GetVx()    const{return fVx;}
48   Double32_t  GetVy()    const{return fVy;}
49   Double32_t  GetVz()    const{return fVz;}
50
51   const TParticlePDG& GetPDGData() const ;
52   void SetPdgCode(Int_t icode);// Set PDG and E,charge
53   void SetMother  (int m0, int m1){ fMother[0] = m0;fMother[1]=m1; }
54   void SetDaughter(int d0, int d1){ fDaughter[0]=d0;fDaughter[1]=d1; }
55   void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz)
56   {fVx=vx; fVy=vy; fVz=vz;}
57
58
59   AliJMCTrack& operator=(const AliJMCTrack& trk);
60
61
62   //Extra
63   Bool_t IsFinal() const { return IsTrue( kFinal ); }
64   void  SetIsFinal(Bool_t t){ SetFlag( kFinal, t );}
65   //TODO
66   Bool_t IsHadron() const;
67   Bool_t IsCharged() const { return GetCharge(); }
68   Bool_t IsParton()  const {return ( fPdgCode > -7 && fPdgCode < 7 && fPdgCode !=0 );}
69
70  private:
71
72   Short_t         fPdgCode;              // PDG code of the particle
73   Short_t         fMother[2];            // Index of the mother particles
74   Short_t         fDaughter[2];          // Indices of the daughter particles
75
76   Double32_t      fVx;                   //[0.,0.,12] x of production vertex
77   Double32_t      fVy;                   //[0.,0.,12] y of production vertex
78   Double32_t      fVz;                   //[0.,0.,12] z of production vertex
79
80   ClassDef(AliJMCTrack,2)
81 };
82
83 #endif