]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/AliTRDpidRefMaker.h
fixing bug in the HLT TRD offline running mode due to parameter propagation in DoInit...
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDpidRefMaker.h
CommitLineData
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
29class TTree;
30class TObjArray;
31class AliTRDReconstructor;
32class AliTRDseedV1;
3d19c1b0 33class AliTRDtrackInfo;
a5a3321d 34class AliTRDpidInfo;
1ee39b3a 35class AliTRDpidRefMaker : public AliTRDrecoTask
36{
37public:
38 enum ETRDpidRefMakerPBins {
39 k006 = 0
40 ,k008 = 1
41 ,k010 = 2
42 ,k015 = 3
43 ,k020 = 4
44 ,k030 = 5
45 ,k040 = 6
46 ,k050 = 7
47 ,k060 = 8
48 ,k080 = 9
49 ,k100 = 10
50 ,kAll = 11
51 };
52 enum ETRDpidRefMakerSource {
53 kV0 = 0 // use V0 as reference
54 ,kMC = 1 // use MC as reference
55 ,kRec= 2 // use Reconstructed PID as reference
56 };
57
705f8b0a 58 AliTRDpidRefMaker();
59 AliTRDpidRefMaker(const char *name, const char *title);
1ee39b3a 60
61 virtual ~AliTRDpidRefMaker();
62
f8f46e4d 63 void UserCreateOutputObjects();
64 void UserExec(Option_t *option);
1ee39b3a 65 Float_t GetPthreshold() const { return fPthreshold;}
66
67 void SetAbundance(Float_t train);
68 void SetPthreshold(Float_t t) { fPthreshold = t;}
3d19c1b0 69 void SetRefPID(ETRDpidRefMakerSource select, AliTRDtrackInfo *t, Float_t *pid);
1ee39b3a 70 void SetSource(ETRDpidRefMakerSource pid, ETRDpidRefMakerSource momentum) {fRefPID = pid; fRefP = momentum;}
71
72
73protected:
74 virtual Bool_t CheckQuality(AliTRDseedV1* trklt);
75 virtual Float_t* CookdEdx(AliTRDseedV1* trklt);
76 virtual void LinkPIDdata();
77 virtual void Fill();
78
5935a6da 79 AliTRDReconstructor *fReconstructor; // reconstructor needed for recalculation the PID
1ee39b3a 80 TObjArray *fV0s; //! v0 array
81 TTree *fData; //! dEdx-P data
b91fdd71 82 TObjArray *fInfo; //! list of PID info
a5a3321d 83 AliTRDpidInfo *fPIDdataArray; //! pid data array
1ee39b3a 84 ETRDpidRefMakerSource fRefPID; // reference PID source
85 ETRDpidRefMakerSource fRefP; // reference momentum source
5935a6da 86 Float_t fFreq; // training sample relative abundance
87 Float_t fP; // momentum
88 Float_t fdEdx[8]; // dEdx array
89 Float_t fPID[AliPID::kSPECIES]; // pid from v0s
1ee39b3a 90
91private:
92 AliTRDpidRefMaker(const AliTRDpidRefMaker&); // not implemented
93 AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&); // not implemented
94
95 Float_t fPthreshold; // momentum threshold [GeV/c]
96
97 ClassDef(AliTRDpidRefMaker, 3); // TRD PID reference maker base class
98};
99
100#endif