]>
Commit | Line | Data |
---|---|---|
0dffcc8a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * See cxx source for full Copyright notice * | |
4 | **************************************************************************/ | |
5 | ||
d51554df | 6 | /* $Id$ */ |
7 | ||
06351446 | 8 | // |
9 | // *** Class AliRsnEvent *** | |
10 | // | |
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. | |
16 | // | |
17 | // authors: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it) | |
18 | // M. Vala (email: martin.vala@cern.ch) | |
19 | // | |
0dffcc8a | 20 | |
21 | #ifndef ALIRSNEVENT_H | |
22 | #define ALIRSNEVENT_H | |
23 | ||
06351446 | 24 | #include <TNamed.h> |
25 | #include <TArrayI.h> | |
26 | #include <TClonesArray.h> | |
e2bafbbc | 27 | |
7c2974c8 | 28 | #include "AliRsnPID.h" |
06351446 | 29 | #include "AliRsnPIDIndex.h" |
e2bafbbc | 30 | #include "AliRsnDaughter.h" |
7c2974c8 | 31 | |
06351446 | 32 | class AliRsnEvent : public TNamed |
0dffcc8a | 33 | { |
06351446 | 34 | public: |
35 | ||
7c2974c8 | 36 | AliRsnEvent(); |
aec0ec32 | 37 | AliRsnEvent(const AliRsnEvent& copy); |
06351446 | 38 | AliRsnEvent& operator= (const AliRsnEvent& copy); |
7c2974c8 | 39 | virtual ~AliRsnEvent(); |
40 | ||
41 | // Array management | |
42 | void Init(); | |
aec0ec32 | 43 | void Clear(Option_t *option = ""); |
44 | AliRsnDaughter* AddTrack(AliRsnDaughter track); | |
45 | AliRsnDaughter* GetTrack(Int_t index); | |
e2bafbbc | 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); | |
06351446 | 48 | TClonesArray* GetTracks() {return fTracks;} |
aec0ec32 | 49 | TArrayI* GetCharged(Char_t sign); |
50 | TArrayI* GetTracksArray(AliRsnDaughter::EPIDMethod method, Char_t sign, AliRsnPID::EType type); | |
7c2974c8 | 51 | void FillPIDArrays(); |
e2bafbbc | 52 | void SortTracks() {fTracks->Sort();} |
aec0ec32 | 53 | void Print(Option_t *option = "") const; |
0dffcc8a | 54 | |
7c2974c8 | 55 | // Primary vertex |
56 | Double_t GetPrimaryVertexX() const {return fPVx;} | |
06351446 | 57 | Double_t GetPrimaryVertexY() const {return fPVy;} |
58 | Double_t GetPrimaryVertexZ() const {return fPVz;} | |
aec0ec32 | 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(); | |
7c2974c8 | 65 | |
66 | // Multiplicity | |
67 | Int_t GetMultiplicity() const; | |
aec0ec32 | 68 | Int_t GetNCharged(Char_t sign); |
06351446 | 69 | |
70 | private: | |
71 | ||
aec0ec32 | 72 | Int_t ChargeIndex(Char_t sign) const; |
73 | Int_t Fill(TObjArray *array); | |
06351446 | 74 | |
75 | Double_t fPVx; // position of | |
76 | Double_t fPVy; // primary | |
77 | Double_t fPVz; // vertex | |
78 | ||
79 | TClonesArray *fTracks; // collection of particles | |
80 | ||
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) | |
84 | ||
aec0ec32 | 85 | ClassDef(AliRsnEvent, 2); |
0dffcc8a | 86 | }; |
87 | ||
88 | #endif |