2 // Class AliRsnPIDIndex
4 // It sorts the indexes of all tracks in an AliRsnEvent
5 // for a fast retrieval of them according to charge and PID.
7 // author: M. Vala (email: martin.vala@cern.ch)
10 #ifndef AliRsnPIDIndex_h
11 #define AliRsnPIDIndex_h
15 #include "AliRsnEvent.h"
16 #include "AliAODTrack.h"
17 #include "AliRsnDaughter.h"
18 #include "AliRsnPIDDefESD.h"
20 class AliESDtrackCuts;
22 class AliRsnPIDIndex : public TObject
26 AliRsnPIDIndex(Int_t num = 1000);
27 AliRsnPIDIndex(const AliRsnPIDIndex ©);
28 AliRsnPIDIndex& operator= (const AliRsnPIDIndex& copy);
30 virtual ~AliRsnPIDIndex();
32 void Print(Option_t *option = "") const;
33 void ResetAll(Int_t num=1000);
35 void FillFromEvent(AliRsnEvent *event = 0, AliESDtrackCuts *cuts = 0);
37 void AddIndex(const Int_t index, AliRsnDaughter::EPIDMethod meth, Char_t sign, AliPID::EParticleType type);
38 void SetCorrectIndexSize();
40 TArrayI* GetTracksArray(AliRsnDaughter::EPIDMethod meth, Char_t sign, AliPID::EParticleType type);
41 TArrayI* GetCharged(Char_t sign);
44 void SetPriorProbability(AliPID::EParticleType type, Double_t p);
45 void SetPriorProbability(Double_t *out);
47 void GetPriorProbability(Double_t *out);
49 AliRsnPIDDefESD* GetPIDDef() {return &fPIDDef;}
53 Int_t ChargeIndex(Char_t sign) const;
54 Char_t IndexCharge(Short_t sign) const;
56 TArrayI fIndex[AliRsnDaughter::kMethods][2][AliPID::kSPECIES + 1]; // index arrays of pos/neg particles of each PID
57 Int_t fNumOfIndex[AliRsnDaughter::kMethods][2][AliPID::kSPECIES + 1]; //! array size
59 Double_t fPrior[AliPID::kSPECIES]; // prior probabilities
60 AliRsnPIDDefESD fPIDDef; // customization of weights
62 ClassDef(AliRsnPIDIndex, 1);