]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add ptr to original AliVTrack.
authorloizides <cloizides@lbl.gov>
Sat, 18 Jan 2014 21:04:53 +0000 (22:04 +0100)
committerloizides <cloizides@lbl.gov>
Sat, 18 Jan 2014 21:18:02 +0000 (22:18 +0100)
PWG/EMCAL/AliPicoTrack.cxx
PWG/EMCAL/AliPicoTrack.h

index a186b854cfb771f773a24c3b9e73e2827ef58c87..f9a0518ee55e9cbb53d7582d5d2c725c258c408a 100644 (file)
@@ -12,7 +12,8 @@
 //_________________________________________________________________________________________________
 AliPicoTrack::AliPicoTrack() :
   AliVTrack(),
-  fPt(0), fEta(0), fPhi(0), fM(0.13957), fQ(0), fLabel(-1), fTrackType(0), fEtaEmc(0), fPhiEmc(0), fPtEmc(0), fEmcal(0), fClusId(-1)
+  fPt(0), fEta(0), fPhi(0), fM(0.13957), fQ(0), fLabel(-1), fTrackType(0), 
+  fEtaEmc(0), fPhiEmc(0), fPtEmc(0), fEmcal(0), fClusId(-1), fOrig(0)
 {
   // Default constructor.
 }
@@ -22,7 +23,7 @@ AliPicoTrack::AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, In
                            Double_t etaemc, Double_t phiemc, Double_t ptemc, Bool_t ise, Double_t mass) :
   AliVTrack(),
   fPt(pt), fEta(eta), fPhi(phi), fM(mass), fQ(q), fLabel(lab), fTrackType(type), 
-  fEtaEmc(etaemc), fPhiEmc(phiemc), fPtEmc(ptemc), fEmcal(ise), fClusId(-1)
+  fEtaEmc(etaemc), fPhiEmc(phiemc), fPtEmc(ptemc), fEmcal(ise), fClusId(-1), fOrig(0)
 {
   // Constructor.
 }
@@ -33,7 +34,7 @@ AliPicoTrack::AliPicoTrack(const AliPicoTrack &pc) :
   fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi), fM(pc.fM),
   fQ(pc.fQ), fLabel(pc.fLabel), fTrackType(pc.fTrackType),  
   fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fPtEmc(pc.fPtEmc), fEmcal(pc.fEmcal),
-  fClusId(pc.fClusId)
+  fClusId(pc.fClusId), fOrig(pc.fOrig)
 {
   // Constructor.
 }
@@ -57,6 +58,7 @@ AliPicoTrack &AliPicoTrack::operator=(const AliPicoTrack &pc)
     fPtEmc  = pc.fPtEmc;
     fEmcal  = pc.fEmcal;
     fClusId = pc.fClusId;
+    fOrig = pc.fOrig;
   }
 
   return *this;
index 61e2413eed703a0e82aec2decc8d2154c505649b..231342e754f6e7e41b6c1a098d71740019d3728e 100644 (file)
@@ -12,72 +12,75 @@ class AliPicoTrack: public AliVTrack {
   AliPicoTrack();
   AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Int_t label, Byte_t type,
                Double_t etaemc=0, Double_t phiemc=0, Double_t ptemc=0, Bool_t ise=0, Double_t mass=0.13957);
-  ~AliPicoTrack() {;}
   AliPicoTrack(const AliPicoTrack &pc); 
   AliPicoTrack &operator=(const AliPicoTrack &pc);
 
-  Double_t Px()                        const { return fPt*TMath::Cos(fPhi);  }
-  Double_t Py()                        const { return fPt*TMath::Sin(fPhi);  }
-  Double_t Pz()                        const { return fPt*TMath::SinH(fEta); }
-  Double_t Pt()                        const { return fPt;                   }
-  Double_t P()                         const { return fPt*TMath::CosH(fEta); }
-  Bool_t   PxPyPz(Double_t p[3])       const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1;         }
-  Bool_t   GetPxPyPz(Double_t p[3])    const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1;         }
-  Double_t Xv()                        const { return 0.;      }
-  Double_t Yv()                        const { return 0.;      }
-  Double_t Zv()                        const { return 0.;      }
-  Bool_t   XvYvZv(Double_t x[3])       const { x[0]=0;x[1]=0;x[2]=0; return 1;                  }
-  Double_t OneOverPt()                 const { return 1./fPt;  }
-  Double_t Phi()                       const { return fPhi;    }
-  Double_t Theta()                     const { return 2*TMath::ATan(TMath::Exp(-fEta));         }
-  Double_t E()                         const { Double_t p=P(); return TMath::Sqrt(M()*M()+p*p); }
-  Double_t M()                         const { return fM; }
-  Double_t Eta()                       const { return fEta;    }
-  Double_t Y()                         const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz()));  }
-  Short_t  Charge()                    const { return (char)fQ;}
-  Int_t    GetLabel()                  const { return fLabel;  }
-  void     SetLabel(Int_t label)             { fLabel = label; }
-  Byte_t   GetTrackType()              const { return fTrackType;}
-  void     SetTrackType(Byte_t type)         { fTrackType = type;}
-  Int_t    PdgCode()                   const { return 0;       }
+  Double_t        Px()                        const { return fPt*TMath::Cos(fPhi);  }
+  Double_t        Py()                        const { return fPt*TMath::Sin(fPhi);  }
+  Double_t        Pz()                        const { return fPt*TMath::SinH(fEta); }
+  Double_t        Pt()                        const { return fPt;                   }
+  Double_t        P()                         const { return fPt*TMath::CosH(fEta); }
+  Bool_t          PxPyPz(Double_t p[3])       const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1;         }
+  Bool_t          GetPxPyPz(Double_t p[3])    const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1;         }
+  Double_t        Xv()                        const { return 0.;      }
+  Double_t        Yv()                        const { return 0.;      }
+  Double_t        Zv()                        const { return 0.;      }
+  Bool_t          XvYvZv(Double_t x[3])       const { x[0]=0;x[1]=0;x[2]=0; return 1;                  }
+  Double_t        OneOverPt()                 const { return 1./fPt;  }
+  Double_t        Phi()                       const { return fPhi;    }
+  Double_t        Theta()                     const { return 2*TMath::ATan(TMath::Exp(-fEta));         }
+  Double_t        E()                         const { Double_t p=P(); return TMath::Sqrt(M()*M()+p*p); }
+  Double_t        M()                         const { return fM; }
+  Double_t        Eta()                       const { return fEta;    }
+  Double_t        Y()                         const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz()));  }
+  Short_t         Charge()                    const { return (char)fQ;}
+  Int_t           GetLabel()                  const { return fLabel;  }
+  void            SetLabel(Int_t label)             { fLabel = label; }
+  Byte_t          GetTrackType()              const { return fTrackType;}
+  void            SetTrackType(Byte_t type)         { fTrackType = type;}
+  Int_t           PdgCode()                   const { return 0;       }
   const Double_t *PID()                const { return 0;       }
-  Int_t    GetID()                     const { return 0;       }
-  UChar_t  GetITSClusterMap()          const { return 0;       }
-  Int_t    GetEMCALcluster()           const { return fClusId; }
-  Double_t GetEtaEmc()                 const { return GetTrackEtaOnEMCal(); }
-  Double_t GetPhiEmc()                 const { return GetTrackPhiOnEMCal(); }
-  Bool_t   IsEMCAL()                   const { return fEmcal;  }
-  ULong_t  GetStatus()                 const { return 0;       }
-  Bool_t   GetXYZ(Double_t *v)         const { v[0]=0; v[1]=0; v[2]=0; return 0; }
-  Double_t GetBz()                     const { return 0;       }
-  void     GetBxByBz(Double_t b[3])    const { b[0]=0;b[1]=0;b[2]=0; }
-  Bool_t   GetCovarianceXYZPxPyPz(Double_t /*cv*/[21]) const { return 0; }
-  Double_t GetTrackPhiOnEMCal()        const { return fPhiEmc ; }
-  Double_t GetTrackEtaOnEMCal()        const { return fEtaEmc ; }
-  Double_t GetTrackPtOnEMCal()         const { return fPtEmc  ; }
-  Double_t GetTrackPOnEMCal()          const { return fPtEmc*TMath::CosH(fEtaEmc);}
-  void     SetTrackPhiEtaPtOnEMCal(Double_t eta, Double_t phi, Double_t pt) { fEtaEmc = eta; fPhiEmc = phi; fPtEmc = pt;}
-  Int_t    Compare(const TObject* obj) const;
-  Bool_t   PropagateToDCA(const AliVVertex *, Double_t, Double_t, Double_t *, Double_t *) { return 0; }
-  void     SetEMCALcluster(Int_t id)         { fClusId = id;   }
+  Int_t           GetID()                     const { return 0;       }
+  UChar_t         GetITSClusterMap()          const { return 0;       }
+  Int_t           GetEMCALcluster()           const { return fClusId; }
+  void            SetEMCALcluster(Int_t id)         { fClusId = id;   }
+  Double_t        GetEtaEmc()                 const { return GetTrackEtaOnEMCal(); }
+  Double_t        GetPhiEmc()                 const { return GetTrackPhiOnEMCal(); }
+  Bool_t          IsEMCAL()                   const { return fEmcal;  }
+  ULong_t         GetStatus()                 const { return 0;       }
+  Bool_t          GetXYZ(Double_t *v)         const { v[0]=0; v[1]=0; v[2]=0; return 0; }
+  Double_t        GetBz()                     const { return 0;       }
+  void            GetBxByBz(Double_t b[3])    const { b[0]=0;b[1]=0;b[2]=0; }
+  Bool_t          GetCovarianceXYZPxPyPz(Double_t /*cv*/[21]) const { return 0; }
+  AliVTrack      *GetTrack()                  const { return fOrig;   }
+  void            SetTrack(AliVTrack *t)            { fOrig = t;      }
+  Double_t        GetTrackPhiOnEMCal()        const { return fPhiEmc ; }
+  Double_t        GetTrackEtaOnEMCal()        const { return fEtaEmc ; }
+  Double_t        GetTrackPtOnEMCal()         const { return fPtEmc  ; }
+  Double_t        GetTrackPOnEMCal()          const { return fPtEmc*TMath::CosH(fEtaEmc);}
+  void            SetTrackPhiEtaPtOnEMCal(Double_t eta, Double_t phi, Double_t pt) { fEtaEmc = eta; fPhiEmc = phi; fPtEmc = pt;}
+  void            Clear(Option_t * /*option*/ ="")  { fClusId = -1; fOrig = 0; } 
+  Int_t           Compare(const TObject* obj) const;
+  Bool_t          PropagateToDCA(const AliVVertex *, Double_t, Double_t, Double_t *, Double_t *) { return 0; }
 
-  static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff);
-  static Byte_t GetTrackType(const AliVTrack *t);
+  static void     GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff);
+  static Byte_t   GetTrackType(const AliVTrack *t);
 
  protected:
-  Double32_t       fPt;       //[0,0,12]   pt at vertex
-  Double32_t       fEta;      //[-1,1,12]  eta at vertex
-  Double32_t       fPhi;      //[0,6.3,12] phi at vertex
-  Double32_t       fM;        //           mass
-  Byte_t           fQ;        //           charge
-  Int_t            fLabel;    //           label  
-  Byte_t           fTrackType;//           0=global track; 1=w/o SPD, w/ ITS refit; 2=w/o SPD, w/o ITS refit
-  Double32_t       fEtaEmc;   //[-1,1,12]  eta at emcal surface
-  Double32_t       fPhiEmc;   //[0,6.3,12] phi at emcal surface
-  Double32_t       fPtEmc;    //[0,0,12]   pt at emcal surface
-  Bool_t           fEmcal;    //           is true if track propagated to emcal
-  Short_t          fClusId;   //!          cluster id of matched cluster; -1 if not set
+  Double32_t      fPt;       //[0,0,12]   pt at vertex
+  Double32_t      fEta;      //[-1,1,12]  eta at vertex
+  Double32_t      fPhi;      //[0,6.3,12] phi at vertex
+  Double32_t      fM;        //           mass
+  Byte_t          fQ;        //           charge
+  Int_t           fLabel;    //           label  
+  Byte_t          fTrackType;//           0=global track; 1=w/o SPD, w/ ITS refit; 2=w/o SPD, w/o ITS refit
+  Double32_t      fEtaEmc;   //[-1,1,12]  eta at emcal surface
+  Double32_t      fPhiEmc;   //[0,6.3,12] phi at emcal surface
+  Double32_t      fPtEmc;    //[0,0,12]   pt at emcal surface
+  Bool_t          fEmcal;    //           is true if track propagated to emcal
+  Short_t         fClusId;   //!          cluster id of matched cluster; -1 if not set
+  AliVTrack      *fOrig;     //!          ptr to original track
 
-  ClassDef(AliPicoTrack, 6) // Pico track class
+  ClassDef(AliPicoTrack, 7) // Pico track class
 };
 #endif