]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALITRDRECONSTRUCTOR_H | |
2 | #define ALITRDRECONSTRUCTOR_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Class for TRD reconstruction // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "AliReconstructor.h" | |
15 | #include "AliRecoParam.h" | |
16 | #include "AliDetectorRecoParam.h" | |
17 | #include "AliTRDpidUtil.h" | |
18 | #include "AliTRDrecoParam.h" | |
19 | #include "AliTRDdigitsParam.h" | |
20 | ||
21 | class TClonesArray; | |
22 | class TTreeSRedirector; | |
23 | class AliRawReader; | |
24 | class AliTRDclusterizer; | |
25 | class AliTRDReconstructor: public AliReconstructor | |
26 | { | |
27 | public: | |
28 | enum ETRDReconstructorSteer { | |
29 | kDigitsConversion= BIT(0) | |
30 | ,kWriteClusters = BIT(1) | |
31 | ,kWriteTracklets = BIT(2) | |
32 | ,kSeeding = BIT(3) | |
33 | ,kHLT = BIT(4) | |
34 | ,kProcTracklets = BIT(5) // process online tracklets | |
35 | ,kDebug = BIT(6) | |
36 | ,kClRadialCorr = BIT(7) // toggle radial correction in clusters | |
37 | ,kOwner = BIT(8) | |
38 | ,kNsteer = 8 // number of tasks | |
39 | }; | |
40 | AliTRDReconstructor(); | |
41 | virtual ~AliTRDReconstructor(); | |
42 | ||
43 | virtual void Init(); | |
44 | ||
45 | virtual void ConvertDigits(AliRawReader *rawReader, TTree *digitsTree) const; | |
46 | virtual AliTracker* CreateTracker() const; | |
47 | TTreeSRedirector* GetDebugStream(AliTRDrecoParam::ETRDReconstructionTask task) const { return task < AliTRDrecoParam::kTRDreconstructionTasks ? fDebugStream[task] : NULL; } | |
48 | ||
49 | virtual void FillESD(AliRawReader *, TTree *clusterTree, AliESDEvent *esd) const { FillESD((TTree * )NULL, clusterTree, esd); } | |
50 | virtual void FillESD(TTree *digitsTree, TTree *clusterTree, AliESDEvent *esd) const; | |
51 | static TClonesArray* GetClusters() {return fgClusters;} | |
52 | static TClonesArray* GetTracklets() { return fgTracklets;} | |
53 | static Int_t GetNTimeBins() { return fgNTimeBins;} | |
54 | Int_t GetNdEdxSlices() const { return (Int_t)AliTRDpidUtil::GetNdEdxSlices(GetPIDMethod());} | |
55 | AliTRDpidUtil::ETRDPIDMethod GetPIDMethod() const { return GetRecoParam()->IsPIDNeuralNetwork() ? AliTRDpidUtil::kNN : AliTRDpidUtil::kLQ;} | |
56 | static const AliTRDrecoParam* GetRecoParam() { return dynamic_cast<const AliTRDrecoParam*>(AliReconstructor::GetRecoParam(2)); } | |
57 | static Float_t GetMinClustersInTrack() { return fgkMinClustersInTrack;} | |
58 | static Float_t GetLabelFraction() { return fgkLabelFraction;} | |
59 | static Double_t GetMaxChi2() { return fgkMaxChi2;} | |
60 | static Double_t GetMaxSnp() { return fgkMaxSnp;} | |
61 | static Double_t GetMaxStep() { return fgkMaxStep;} | |
62 | static Double_t GetEpsilon() { return fgkEpsilon;} | |
63 | ||
64 | virtual Bool_t HasDigitConversion() const { return fSteerParam&kDigitsConversion; }; | |
65 | Bool_t IsCosmic() const { return GetRecoParam()->GetEventSpecie() & AliRecoParam::kCosmic;} | |
66 | Bool_t IsWritingClusters() const { return fSteerParam&kWriteClusters;} | |
67 | Bool_t IsWritingTracklets() const { return fSteerParam&kWriteTracklets;} | |
68 | Bool_t IsHLT() const { return fSteerParam&kHLT;} | |
69 | Bool_t IsSeeding() const { return fSteerParam&kSeeding;} | |
70 | Bool_t IsProcessingTracklets() const { return fSteerParam&kProcTracklets;} | |
71 | Bool_t IsDebugStreaming() const { return fSteerParam&kDebug;} | |
72 | Bool_t UseClusterRadialCorrection() const { return fSteerParam&kClRadialCorr;} | |
73 | ||
74 | static void Options(UInt_t steer=0); | |
75 | virtual void Reconstruct(AliRawReader *rawReader, TTree *clusterTree) const; | |
76 | virtual void Reconstruct(TTree *digitsTree, TTree *clusterTree) const; | |
77 | ||
78 | static void SetClusters(TClonesArray *clusters) { fgClusters = clusters;} | |
79 | static void SetTracklets(TClonesArray *tracklets) { fgTracklets = tracklets;} | |
80 | void SetOption(Option_t *opt); | |
81 | ||
82 | private: | |
83 | AliTRDReconstructor(const AliTRDReconstructor &r); //Not implemented | |
84 | AliTRDReconstructor& operator = (const AliTRDReconstructor&); //Not implemented | |
85 | ||
86 | static Char_t const *fgSteerNames[kNsteer];//! steering names | |
87 | static Char_t const *fgSteerFlags[kNsteer];//! steering flags | |
88 | static Char_t const *fgTaskNames[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks names | |
89 | static Char_t const *fgTaskFlags[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks flags | |
90 | UInt_t fSteerParam; // steering bits | |
91 | // configuration vars for tracking | |
92 | static const Double_t fgkMaxChi2; // Max increment in track chi2 | |
93 | static const Float_t fgkMinClustersInTrack; // Min number of clusters in track | |
94 | static const Float_t fgkLabelFraction; // Min fraction of same label | |
95 | static const Double_t fgkMaxSnp; // Maximal snp for tracking | |
96 | static const Double_t fgkMaxStep; // Maximal step for tracking | |
97 | static const Double_t fgkEpsilon; // Precision of radial coordinate | |
98 | ||
99 | TTreeSRedirector *fDebugStream[AliTRDrecoParam::kTRDreconstructionTasks];// Debug Streamer container; | |
100 | ||
101 | static TClonesArray *fgClusters; // list of clusters for local reconstructor | |
102 | static TClonesArray *fgTracklets; // list of online tracklets for local reconstructor | |
103 | static Int_t fgNTimeBins; // number of time bins as given by the clusterizer | |
104 | AliTRDclusterizer *fClusterizer; //! instance of TRD clusterizer | |
105 | ||
106 | ClassDef(AliTRDReconstructor, 4) // Class for the TRD reconstruction | |
107 | ||
108 | }; | |
109 | ||
110 | ||
111 | ||
112 | #endif | |
113 |