]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPIDIndex.h
Modifications in analysis tasks for train
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPIDIndex.h
1 //
2 // Class AliRsnPIDIndex
3 //
4 // It sorts the indexes of all tracks in an AliRsnEvent
5 // for a fast retrieval of them according to charge and PID.
6 //
7 // authors: Martin Vala (martin.vala@cern.ch)
8 //          Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
9 //
10
11 #ifndef ALIRSNPIDINDEX_H
12 #define ALIRSNPIDINDEX_H
13
14 #include <TArrayI.h>
15
16 #include "AliRsnDaughter.h"
17 #include "AliRsnPIDDefESD.h"
18
19 class AliAODTrack;
20 class AliRsnEvent;
21
22 class AliRsnPIDIndex : public TObject
23 {
24   public:
25
26     AliRsnPIDIndex(Int_t num = 1000);
27     AliRsnPIDIndex(const AliRsnPIDIndex &copy);
28     AliRsnPIDIndex& operator= (const AliRsnPIDIndex& copy);
29
30     virtual  ~AliRsnPIDIndex();
31
32     void      Print(Option_t *option = "") const;
33     void      ResetAll(Int_t num = 1000);
34
35     void      FillFromEvent(AliRsnEvent*const event = 0);
36
37     void      AddIndex(const Int_t index, AliRsnDaughter::EPIDMethod meth, Char_t sign, AliPID::EParticleType type);
38     void      SetCorrectIndexSize();
39
40     TArrayI*  GetTracksArray(AliRsnDaughter::EPIDMethod meth, Char_t sign, AliPID::EParticleType type);
41     TArrayI*  GetCharged(Char_t sign);
42
43   private:
44
45     Int_t     ChargeIndex(Char_t sign) const;
46     Char_t    IndexCharge(Short_t sign) const;
47
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
50
51     ClassDef(AliRsnPIDIndex, 1);
52 };
53
54 #endif