]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #ifndef ALITRDPIDREFMAKER_H |
2 | #define ALITRDPIDREFMAKER_H | |
3 | ||
4 | //////////////////////////////////////////////////////////// | |
5 | // | |
6 | // Base class for the Task to build TRD-PID reference data | |
7 | // For the actual implementation please check the classes | |
8 | // - AliTRDpidRefMakerNN (Neural Networks) | |
9 | // - AliTRDpidRefMakerLQ (Multidimensional Likelihood) | |
10 | // | |
11 | // Authors: Alex Bercuci <A.Bercuci@gsi.de> | |
12 | // Alex Wilk <wilka@uni-muenster.de> | |
13 | // | |
14 | ///////////////////////////////////////////////////////////// | |
15 | ||
16 | #ifndef ALITRDRECOTASK_H | |
17 | #include "AliTRDrecoTask.h" | |
18 | #endif | |
19 | #ifndef ALIPID_H | |
20 | #include "AliPID.h" | |
21 | #endif | |
22 | #ifndef ALITRDCALPID_H | |
23 | #include "../Cal/AliTRDCalPID.h" | |
24 | #endif | |
25 | #ifndef ALITRDGEOMETRY_H | |
26 | #include "../AliTRDgeometry.h" | |
27 | #endif | |
28 | ||
29 | class TTree; | |
30 | class TObjArray; | |
31 | class AliTRDReconstructor; | |
32 | class AliTRDseedV1; | |
33 | class AliTRDpidRefMaker : public AliTRDrecoTask | |
34 | { | |
35 | public: | |
36 | enum ETRDpidRefMakerPBins { | |
37 | k006 = 0 | |
38 | ,k008 = 1 | |
39 | ,k010 = 2 | |
40 | ,k015 = 3 | |
41 | ,k020 = 4 | |
42 | ,k030 = 5 | |
43 | ,k040 = 6 | |
44 | ,k050 = 7 | |
45 | ,k060 = 8 | |
46 | ,k080 = 9 | |
47 | ,k100 = 10 | |
48 | ,kAll = 11 | |
49 | }; | |
50 | enum ETRDpidRefMakerSource { | |
51 | kV0 = 0 // use V0 as reference | |
52 | ,kMC = 1 // use MC as reference | |
53 | ,kRec= 2 // use Reconstructed PID as reference | |
54 | }; | |
55 | ||
56 | struct AliTRDpidRefData { | |
57 | AliTRDpidRefData() : fPLbin(0xff) { | |
58 | memset(fdEdx, 0, 8*sizeof(Float_t)); | |
59 | } | |
60 | virtual ~AliTRDpidRefData(){} | |
61 | UChar_t fPLbin; // momentum / layer bin | |
62 | Float_t fdEdx[8]; // dEdx array | |
63 | ClassDef(AliTRDpidRefData, 1) // PID data representation | |
64 | }; | |
65 | struct AliTRDpidRefDataArray { | |
66 | AliTRDpidRefDataArray(); | |
67 | virtual ~AliTRDpidRefDataArray(); | |
68 | void PushBack(Int_t ly, Int_t p, Float_t *dedx); | |
69 | void Reset(); | |
70 | ||
71 | Int_t fNtracklets; // number of tracklets | |
72 | AliTRDpidRefData *fData; //[fNtracklets] PID data array | |
73 | private: | |
74 | AliTRDpidRefDataArray(const AliTRDpidRefMaker::AliTRDpidRefDataArray& ref); | |
75 | AliTRDpidRefDataArray& operator=(const AliTRDpidRefMaker::AliTRDpidRefDataArray& ref); | |
76 | ClassDef(AliTRDpidRefDataArray, 1) // track PID data representation | |
77 | }; | |
78 | ||
79 | AliTRDpidRefMaker(const char *name="PIDrefMaker", const char *title="PID Reference Maker"); | |
80 | ||
81 | virtual ~AliTRDpidRefMaker(); | |
82 | ||
83 | void ConnectInputData(Option_t *opt); | |
84 | void CreateOutputObjects(); | |
85 | void Exec(Option_t *option); | |
86 | Float_t GetPthreshold() const { return fPthreshold;} | |
87 | ||
88 | void SetAbundance(Float_t train); | |
89 | void SetPthreshold(Float_t t) { fPthreshold = t;} | |
90 | void SetRefPID(ETRDpidRefMakerSource select, void *source, Float_t *pid); | |
91 | void SetSource(ETRDpidRefMakerSource pid, ETRDpidRefMakerSource momentum) {fRefPID = pid; fRefP = momentum;} | |
92 | ||
93 | ||
94 | protected: | |
95 | virtual Bool_t CheckQuality(AliTRDseedV1* trklt); | |
96 | virtual Float_t* CookdEdx(AliTRDseedV1* trklt); | |
97 | virtual void LinkPIDdata(); | |
98 | virtual void Fill(); | |
99 | ||
100 | AliTRDReconstructor *fReconstructor; //! reconstructor needed for recalculation the PID | |
101 | TObjArray *fV0s; //! v0 array | |
102 | TTree *fData; //! dEdx-P data | |
103 | AliTRDpidRefDataArray *fPIDdataArray; //! pid data array | |
104 | ETRDpidRefMakerSource fRefPID; // reference PID source | |
105 | ETRDpidRefMakerSource fRefP; // reference momentum source | |
106 | UChar_t fPIDbin; //! species bin | |
107 | Float_t fFreq; //! training sample relative abundance | |
108 | Float_t fP; //! momentum | |
109 | Float_t fdEdx[8]; //! dEdx array | |
110 | Float_t fPID[AliPID::kSPECIES]; //! pid from v0s | |
111 | ||
112 | private: | |
113 | AliTRDpidRefMaker(const AliTRDpidRefMaker&); // not implemented | |
114 | AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&); // not implemented | |
115 | ||
116 | Float_t fPthreshold; // momentum threshold [GeV/c] | |
117 | ||
118 | ClassDef(AliTRDpidRefMaker, 3); // TRD PID reference maker base class | |
119 | }; | |
120 | ||
121 | #endif |