]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/UNICOR/AliUnicorEventAliceESD.h
Adapted to pp collision data.
[u/mrichter/AliRoot.git] / PWG2 / UNICOR / AliUnicorEventAliceESD.h
1 #ifndef ALIUNICOREVENTALICEESD_H
2 #define ALIUNICOREVENTALICEESD_H
3
4 /* Copyright(c) 1998-2048, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 /* $Id$ */
7
8 // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2008
9
10 #include <cmath>
11 #include "TVector2.h"
12 #include "AliESDEvent.h"
13 #include "AliUnicorEvent.h"
14
15 //=============================================================================
16 class AliUnicorEventAliceESD : public AliUnicorEvent {
17
18  public:
19               AliUnicorEventAliceESD(AliESDEvent *esd=0);
20               AliUnicorEventAliceESD(const AliUnicorEventAliceESD &ev): AliUnicorEvent(ev), fESD(ev.fESD) {}
21   virtual     ~AliUnicorEventAliceESD();
22   AliUnicorEventAliceESD &operator=(const AliUnicorEventAliceESD &source) {fESD = source.fESD; return *this;}
23   Double_t    Etamin() const {return -0.75;}
24   Double_t    Etamax() const {return  0.75;}
25   void        AttachTree(TTree *tr) {fESD->ReadFromTree(tr);}
26   Bool_t      Good() const;
27   Double_t    Centrality() const {return 0.9999*exp(-NParticles()/20.0);} // OK for pp
28   void        RP(Double_t &qx, Double_t &qy) const {AliUnicorEvent::RP(qx,qy,2);}
29   Double_t    RPphi() const {Double_t qx,qy; RP(qx,qy); return atan2(qy,qx);}
30   Double_t    Zver() const {return fESD->GetPrimaryVertexTPC()->GetZv()/10.0;}
31   Int_t       NParticles() const {return fESD->GetNumberOfTracks();}
32
33   Bool_t      ParticleGood(Int_t i, Int_t pidi=0) const;
34   Double_t    ParticleP(Int_t i)     const {return fESD->GetTrack(i)->GetTPCInnerParam()->P();}
35   Double_t    ParticleTheta(Int_t i) const {return fESD->GetTrack(i)->GetTPCInnerParam()->Theta();}
36   Double_t    ParticlePhi(Int_t i)   const {return TVector2::Phi_mpi_pi(fESD->GetTrack(i)->GetTPCInnerParam()->Phi());}
37   Double_t    ParticleDedx(Int_t i)  const {return fESD->GetTrack(i)->GetTPCsignal()/50.0;}
38   Bool_t      PairGood(Double_t p0, Double_t the0, Double_t phi0, 
39                        Double_t p1, Double_t the1, Double_t phi1) const;
40   // alternative: GetConstrainedParam, GetInnerParam, GetTPCInnerParam 
41   void        SetESD(AliESDEvent * const esd) {fESD = esd;}
42   AliESDEvent *GetESD() const {return fESD;}
43
44  protected:
45   AliESDEvent *fESD;   //! pointer to the actual source of data
46
47   ClassDef(AliUnicorEventAliceESD,0)
48 };
49 #endif 
50 //=============================================================================