]>
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 | |
da27d983 | 23 | #include "Cal/AliTRDCalPID.h" |
1ee39b3a | 24 | #endif |
25 | #ifndef ALITRDGEOMETRY_H | |
da27d983 | 26 | #include "AliTRDgeometry.h" |
1ee39b3a | 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 | ||
705f8b0a | 79 | AliTRDpidRefMaker(); |
80 | AliTRDpidRefMaker(const char *name, const char *title); | |
1ee39b3a | 81 | |
82 | virtual ~AliTRDpidRefMaker(); | |
83 | ||
84 | void ConnectInputData(Option_t *opt); | |
f8f46e4d | 85 | void UserCreateOutputObjects(); |
86 | void UserExec(Option_t *option); | |
1ee39b3a | 87 | Float_t GetPthreshold() const { return fPthreshold;} |
88 | ||
89 | void SetAbundance(Float_t train); | |
90 | void SetPthreshold(Float_t t) { fPthreshold = t;} | |
91 | void SetRefPID(ETRDpidRefMakerSource select, void *source, Float_t *pid); | |
92 | void SetSource(ETRDpidRefMakerSource pid, ETRDpidRefMakerSource momentum) {fRefPID = pid; fRefP = momentum;} | |
93 | ||
94 | ||
95 | protected: | |
96 | virtual Bool_t CheckQuality(AliTRDseedV1* trklt); | |
97 | virtual Float_t* CookdEdx(AliTRDseedV1* trklt); | |
98 | virtual void LinkPIDdata(); | |
99 | virtual void Fill(); | |
100 | ||
101 | AliTRDReconstructor *fReconstructor; //! reconstructor needed for recalculation the PID | |
102 | TObjArray *fV0s; //! v0 array | |
103 | TTree *fData; //! dEdx-P data | |
b91fdd71 | 104 | TObjArray *fInfo; //! list of PID info |
1ee39b3a | 105 | AliTRDpidRefDataArray *fPIDdataArray; //! pid data array |
106 | ETRDpidRefMakerSource fRefPID; // reference PID source | |
107 | ETRDpidRefMakerSource fRefP; // reference momentum source | |
108 | UChar_t fPIDbin; //! species bin | |
109 | Float_t fFreq; //! training sample relative abundance | |
110 | Float_t fP; //! momentum | |
111 | Float_t fdEdx[8]; //! dEdx array | |
112 | Float_t fPID[AliPID::kSPECIES]; //! pid from v0s | |
113 | ||
114 | private: | |
115 | AliTRDpidRefMaker(const AliTRDpidRefMaker&); // not implemented | |
116 | AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&); // not implemented | |
117 | ||
118 | Float_t fPthreshold; // momentum threshold [GeV/c] | |
119 | ||
120 | ClassDef(AliTRDpidRefMaker, 3); // TRD PID reference maker base class | |
121 | }; | |
122 | ||
123 | #endif |