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 // authors: Martin Vala (martin.vala@cern.ch)
8 // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
11 #ifndef ALIRSNPIDINDEX_H
12 #define ALIRSNPIDINDEX_H
16 #include "AliRsnDaughter.h"
17 #include "AliRsnPIDDefESD.h"
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*const event = 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);
45 Int_t ChargeIndex(Char_t sign) const;
46 Char_t IndexCharge(Short_t sign) const;
48 TArrayI fIndex[AliRsnDaughter::kMethods][2][AliPID::kSPECIES + 1]; // index arrays of pos/neg particles of each PID
49 Int_t fNumOfIndex[AliRsnDaughter::kMethods][2][AliPID::kSPECIES + 1]; //! array size
51 ClassDef(AliRsnPIDIndex, 1);