1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
9 // *** Class AliRsnEvent ***
11 // A container for a collection of AliRsnDaughter objects from an event.
12 // Contains also the primary vertex, useful for some cuts.
13 // In order to retrieve easily the tracks which have been identified
14 // as a specific type and charge, there is an array of indexes which
15 // allows to avoid to loop on all tracks and have only the neede ones.
17 // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
18 // M. Vala (email: martin.vala@cern.ch)
26 #include <TClonesArray.h>
28 #include "AliRsnPID.h"
29 #include "AliRsnPIDIndex.h"
30 #include "AliRsnDaughter.h"
32 class AliRsnEvent : public TNamed
37 AliRsnEvent(const AliRsnEvent& copy);
38 AliRsnEvent& operator= (const AliRsnEvent& copy);
39 virtual ~AliRsnEvent();
43 void Clear(Option_t *option = "");
44 AliRsnDaughter* AddTrack(AliRsnDaughter track);
45 AliRsnDaughter* GetTrack(Int_t index);
46 AliRsnDaughter* GetLeadingParticle(Double_t ptMin = 0.0, AliRsnPID::EType type = AliRsnPID::kUnknown, Bool_t realistic = kTRUE);
47 Int_t GetLastFastTrack(Double_t ptMin, AliRsnPID::EType type = AliRsnPID::kUnknown, Bool_t realistic = kTRUE);
48 TClonesArray* GetTracks() {return fTracks;}
49 TArrayI* GetCharged(Char_t sign);
50 TArrayI* GetTracksArray(AliRsnDaughter::EPIDMethod method, Char_t sign, AliRsnPID::EType type);
52 void SortTracks() {fTracks->Sort();}
53 void Print(Option_t *option = "") const;
56 Double_t GetPrimaryVertexX() const {return fPVx;}
57 Double_t GetPrimaryVertexY() const {return fPVy;}
58 Double_t GetPrimaryVertexZ() const {return fPVz;}
59 void GetPrimaryVertex(Double_t &x, Double_t &y, Double_t &z) const {x=fPVx;y=fPVy;z=fPVz;}
60 void SetPrimaryVertexX(Double_t value) {fPVx = value;}
61 void SetPrimaryVertexY(Double_t value) {fPVy = value;}
62 void SetPrimaryVertexZ(Double_t value) {fPVz = value;}
63 void SetPrimaryVertex(Double_t x, Double_t y, Double_t z) {fPVx=x;fPVy=y;fPVz=z;}
64 void CorrectByPrimaryVertex();
67 Int_t GetMultiplicity() const;
68 Int_t GetNCharged(Char_t sign);
72 Int_t ChargeIndex(Char_t sign) const;
73 Int_t Fill(TObjArray *array);
75 Double_t fPVx; // position of
76 Double_t fPVy; // primary
77 Double_t fPVz; // vertex
79 TClonesArray *fTracks; // collection of particles
81 AliRsnPIDIndex *fNoPID; // array index only for charged tracks
82 AliRsnPIDIndex *fPerfectPID; // array index for perfect PID
83 AliRsnPIDIndex *fRealisticPID; // array index for realistic PID (largest prob)
85 ClassDef(AliRsnEvent, 2);