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)
28 #include <TClonesArray.h>
29 #include "AliRsnPID.h"
30 #include "AliRsnPIDIndex.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 TClonesArray* GetTracks() {return fTracks;}
47 TArrayI* GetCharged (Char_t sign);
48 TArrayI* GetTracksArray (AliRsnPID::EMethod pidtype, Char_t sign, AliRsnPID::EType type);
50 void Print (Option_t *option = "") const;
53 Double_t GetPrimaryVertexX() const {return fPVx;}
54 Double_t GetPrimaryVertexY() const {return fPVy;}
55 Double_t GetPrimaryVertexZ() const {return fPVz;}
56 void GetPrimaryVertex (Double_t &x, Double_t &y, Double_t &z) const {x=fPVx;y=fPVy;z=fPVz;}
57 void SetPrimaryVertexX (Double_t value) {fPVx = value;}
58 void SetPrimaryVertexY (Double_t value) {fPVy = value;}
59 void SetPrimaryVertexZ (Double_t value) {fPVz = value;}
60 void SetPrimaryVertex (Double_t x, Double_t y, Double_t z) {fPVx=x;fPVy=y;fPVz=z;}
63 Int_t GetMultiplicity() const;
64 Int_t GetNCharged (Char_t sign);
68 Int_t ChargeIndex (Char_t sign) const;
69 Int_t Fill (TObjArray *array);
71 Double_t fPVx; // position of
72 Double_t fPVy; // primary
73 Double_t fPVz; // vertex
75 TClonesArray *fTracks; // collection of particles
77 AliRsnPIDIndex *fNoPID; // array index only for charged tracks
78 AliRsnPIDIndex *fPerfectPID; // array index for perfect PID
79 AliRsnPIDIndex *fRealisticPID; // array index for realistic PID (largest prob)
81 ClassDef (AliRsnEvent, 2);