]>
Commit | Line | Data |
---|---|---|
94b94be0 | 1 | #ifndef ALITRDRECOTASK_H\r |
2 | #define ALITRDRECOTASK_H\r | |
3 | \r | |
4 | ///////////////////////////////////////////////////////\r | |
5 | //\r | |
6 | // Basic class for Performance/Calibration TRD tasks\r | |
7 | //\r | |
8 | // Author: Alexandru Bercuci, 10/09/2008\r | |
9 | //\r | |
10 | //////////////////////////////////////////////////\r | |
11 | \r | |
12 | #ifndef ALIANALYSISTASKSE_H\r | |
13 | #include "AliAnalysisTaskSE.h"\r | |
14 | #endif\r | |
15 | \r | |
16 | #ifndef ALITRDTRACKINFO_H\r | |
17 | #include "info/AliTRDtrackInfo.h"\r | |
18 | #endif\r | |
19 | \r | |
8a3dd7a0 | 20 | #ifndef ALITRDEVENTINFO_H\r |
21 | #include "info/AliTRDeventInfo.h"\r | |
22 | #endif\r | |
23 | \r | |
eb05d549 | 24 | class TAxis;\r |
94b94be0 | 25 | class TH1;\r |
eb05d549 | 26 | class TH2;\r |
27 | class TH3;\r | |
94b94be0 | 28 | class TF1;\r |
29 | class TList;\r | |
30 | class TObjArray;\r | |
31 | class TTreeSRedirector;\r | |
32 | class AliTRDtrackV1;\r | |
dffc3357 | 33 | class AliTRDrecoTask : public AliAnalysisTaskSE\r |
94b94be0 | 34 | {\r |
b05a637a | 35 | friend class AliEveTRDTrackList;\r |
94b94be0 | 36 | public:\r |
37 | enum AliTRDrecoSteeringBits{\r | |
eb05d549 | 38 | kMCdata = BIT(18)\r |
94b94be0 | 39 | ,kFriends = BIT(19)\r |
40 | ,kPostProcess = BIT(20)\r | |
eb05d549 | 41 | ,kHeavyIon = BIT(21)\r |
94b94be0 | 42 | };\r |
43 | \r | |
eb05d549 | 44 | class AliTRDrecoProjection : public TNamed\r |
45 | {\r | |
46 | public:\r | |
47 | AliTRDrecoProjection();\r | |
48 | virtual ~AliTRDrecoProjection();\r | |
49 | AliTRDrecoProjection& operator+=(const AliTRDrecoProjection& other);\r | |
50 | AliTRDrecoProjection& operator=(const AliTRDrecoProjection& other);\r | |
668a0654 | 51 | void Build(const Char_t *n, const Char_t *t, Int_t ix, Int_t iy, Int_t iz, TAxis *aa[]);\r |
52 | Double_t GetTrendValue(const Int_t mid=0, Double_t *m=NULL, Double_t *s=NULL) const;\r | |
53 | TH3* H() const { return fH;}\r | |
54 | void Increment(Int_t bin[], Double_t v);\r | |
55 | TH2* Projection2D(const Int_t nstat, const Int_t ncol, const Int_t mid=0, Bool_t del=kTRUE);\r | |
5047978d | 56 | TH2* Projection2Dbin(Int_t ibin=-1);\r |
668a0654 | 57 | void SetRebinStrategy(Int_t n, Int_t rebx[], Int_t reby[]);\r |
58 | void SetShowRange(Float_t zm, Float_t zM, Float_t em=0., Float_t eM=0.) {fRange[0] = zm; fRange[1] = zM; fRange[2] = em; fRange[3] = eM;}\r | |
eb05d549 | 59 | private:\r |
60 | AliTRDrecoProjection(const AliTRDrecoProjection&);\r | |
61 | protected:\r | |
62 | TH3 *fH; // data container\r | |
63 | Int_t fAx[3]; // projection axes\r | |
64 | Int_t fNrebin; // no. of rebinning steps\r | |
65 | Int_t *fRebinX; //[fNrebin] rebinning of the X axis\r | |
66 | Int_t *fRebinY; //[fNrebin] rebinning of the Y axis\r | |
67 | Float_t fRange[4]; //show range of the z processed\r | |
68 | \r | |
69 | ClassDef(AliTRDrecoProjection, 2) // wrapper for a projection container THnSparse -> TH3\r | |
70 | };\r | |
71 | \r | |
94b94be0 | 72 | AliTRDrecoTask();\r |
73 | AliTRDrecoTask(const char *name, const char *title);\r | |
74 | virtual ~AliTRDrecoTask();\r | |
75 | \r | |
76 | \r | |
77 | virtual void UserCreateOutputObjects();\r | |
78 | virtual void UserExec(Option_t *opt);\r | |
79 | virtual void SetDebugLevel(Int_t level);\r | |
80 | \r | |
81 | \r | |
eb05d549 | 82 | static Float_t GetMeanStat(TH1 *h, Float_t cut=0., Option_t *opt="");\r |
94b94be0 | 83 | Int_t GetNRefFigures() const; \r |
84 | const Char_t* GetNameId() const { return fNameId;}\r | |
85 | TList* GetPlotFunctors() const { return fPlotFuncList;}\r | |
0f2c4c4f | 86 | Int_t GetPtBin(Float_t pt);\r |
94b94be0 | 87 | virtual Bool_t GetRefFigure(Int_t ifig);\r |
88 | virtual void MakeSummary();\r | |
5591f3d6 | 89 | void MakeDetectorPlot(Int_t ly=0, const Option_t *opt="eta");\r |
dffc3357 | 90 | void MakeDetectorPlotOLD(Int_t ly=0, const Option_t *opt="eta");\r |
94b94be0 | 91 | Bool_t IsHeavyIon() const { return TestBit(kHeavyIon);};\r |
92 | Bool_t IsPP() const { return !TestBit(kHeavyIon);};\r | |
93 | Bool_t HasFriends() const { return TestBit(kFriends);};\r | |
94 | Bool_t HasMCdata() const { return TestBit(kMCdata);};\r | |
95 | Bool_t HasPostProcess() const { return TestBit(kPostProcess);};\r | |
96 | Bool_t HasRunTerminate() const { return fRunTerminate; }\r | |
97 | virtual TObjArray* Histos() { return fContainer;}\r | |
98 | \r | |
99 | virtual Bool_t Load(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");\r | |
82e6e5dc | 100 | virtual Bool_t LoadDetectorMap(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");\r |
94b94be0 | 101 | virtual Bool_t Save(TObjArray * const res);\r |
102 | virtual Bool_t PostProcess();\r | |
847569f2 | 103 | virtual Bool_t PutTrendValue(const Char_t *name, Double_t val, Double_t err=0);\r |
94b94be0 | 104 | virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}\r |
105 | virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}\r | |
106 | virtual void SetNameId(const Char_t *nid) {snprintf(fNameId, 10, "%s", nid);}\r | |
107 | virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}\r | |
cc98ff07 | 108 | static Float_t SetNormZ(TH2 *h2, Int_t bxmin=1, Int_t bxmax=-1, Int_t bymin=1, Int_t bymax=-1, Float_t thr=0.);\r |
eb05d549 | 109 | static void SetRangeZ(TH2 *h2, Float_t m, Float_t M, Float_t thr=0.);\r |
0f2c4c4f | 110 | void SetRunTerminate(Bool_t runTerminate = kTRUE) { fRunTerminate = runTerminate; }\r |
dffc3357 | 111 | void SetTriggerList(const Char_t *tl);\r |
94b94be0 | 112 | virtual void Terminate(Option_t *);\r |
113 | \r | |
114 | protected:\r | |
115 | static TTreeSRedirector* DebugStream() { return fgDebugStream;}\r | |
b05a637a | 116 | virtual void InitFunctorList();\r |
94b94be0 | 117 | Bool_t HasFunctorList() const { return fPlotFuncList != NULL; }\r |
0f2c4c4f | 118 | Bool_t MakeMomSegmentation();\r |
eb05d549 | 119 | \r |
82e6e5dc | 120 | Char_t fNameId[10]; // unique identifier of task particularity\r |
121 | UChar_t fNRefFigures; // no of reference figures reported by task\r | |
33056e04 | 122 | TObjArray *fDets; //! OLD container to store detector position and status support should be discontinued \r |
dffc3357 | 123 | TObjArray *fDetsV; //! NEW container to store detector position and status\r |
82e6e5dc | 124 | TObjArray *fContainer; //! container to store results\r |
125 | AliTRDeventInfo *fEvent; //! Event Info\r | |
126 | TObjArray *fTracks; //! Array of tracks\r | |
f073d500 | 127 | TObjArray *fClusters; //! Array of clusters\r |
128 | const TObjArray *fkClusters; //! current detector clusters array\r | |
3ceb45ae | 129 | const AliTRDtrackV1 *fkTrack; //! current track\r |
94b94be0 | 130 | const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info\r |
131 | const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info\r | |
3ceb45ae | 132 | Char_t fSpecies; //! species index +1 with charge sign\r |
dffc3357 | 133 | Char_t fTriggerSlot; //! selected triggers map (if requested)\r |
3ceb45ae | 134 | Float_t fPt; //! p_t of the track being analyzed\r |
135 | Float_t fPhi; //! phi of the track being analyzed\r | |
136 | Float_t fEta; //! eta of the track being analyzed\r | |
0f2c4c4f | 137 | Int_t fNpt; // no of pt/p bins actually used\r |
dffc3357 | 138 | TObjArray *fTriggerList; //! optional trigger list to be monitored\r |
94b94be0 | 139 | \r |
140 | private:\r | |
141 | AliTRDrecoTask(const AliTRDrecoTask&);\r | |
142 | AliTRDrecoTask& operator=(const AliTRDrecoTask&);\r | |
143 | \r | |
f073d500 | 144 | TList *fPlotFuncList; //! track functors list\r |
145 | TList *fDetFuncList; //! detector functors list\r | |
0f2c4c4f | 146 | Bool_t fRunTerminate; // Switch for Terminate Function\r |
f073d500 | 147 | static TTreeSRedirector *fgDebugStream; //! Debug stream\r |
0f2c4c4f | 148 | static const Int_t fgNPt = 25; //! No of debug pt bins\r |
149 | protected:\r | |
150 | static Float_t fgPt[fgNPt]; //! Array with limits for debug pt bins\r | |
94b94be0 | 151 | \r |
82e6e5dc | 152 | ClassDef(AliTRDrecoTask, 5) // base TRD reconstruction task\r |
94b94be0 | 153 | };\r |
154 | \r | |
155 | #endif\r | |
156 | \r |