-#ifndef ALITRDRECOTASK_H\r
-#define ALITRDRECOTASK_H\r
-\r
-///////////////////////////////////////////////////////\r
-//\r
-// Basic class for Performance/Calibration TRD tasks\r
-//\r
-// Author: Alexandru Bercuci, 10/09/2008\r
-//\r
-//////////////////////////////////////////////////\r
-\r
-#ifndef ALIANALYSISTASKSE_H\r
-#include "AliAnalysisTaskSE.h"\r
-#endif\r
-\r
-#ifndef ALITRDTRACKINFO_H\r
-#include "info/AliTRDtrackInfo.h"\r
-#endif\r
-\r
-#ifndef ALITRDEVENTINFO_H\r
-#include "info/AliTRDeventInfo.h"\r
-#endif\r
-\r
-class TAxis;\r
-class TH1;\r
-class TH2;\r
-class TH3;\r
-class TF1;\r
-class TList;\r
-class TObjArray;\r
-class TTreeSRedirector;\r
-class AliTRDtrackV1;\r
-class AliTRDrecoTask : public AliAnalysisTaskSE\r
-{\r
-friend class AliEveTRDTrackList;\r
-public:\r
- enum AliTRDrecoSteeringBits{\r
- kMCdata = BIT(18)\r
- ,kFriends = BIT(19)\r
- ,kPostProcess = BIT(20)\r
- ,kHeavyIon = BIT(21)\r
- };\r
- \r
- class AliTRDrecoProjection : public TNamed\r
- {\r
- public:\r
- AliTRDrecoProjection();\r
- virtual ~AliTRDrecoProjection();\r
- AliTRDrecoProjection& operator+=(const AliTRDrecoProjection& other);\r
- AliTRDrecoProjection& operator=(const AliTRDrecoProjection& other);\r
- void Build(const Char_t *n, const Char_t *t, Int_t ix, Int_t iy, Int_t iz, TAxis *aa[]);\r
- Double_t GetTrendValue(const Int_t mid=0, Double_t *m=NULL, Double_t *s=NULL, Double_t *se=NULL) const;\r
- TH3* H() const { return fH;}\r
- void Increment(Int_t bin[], Double_t v);\r
- TH2* Projection2D(const Int_t nstat, const Int_t ncol, const Int_t mid=0, Bool_t del=kTRUE);\r
- TH2* Projection2Dbin(Int_t ibin=-1, Bool_t mc=kFALSE);\r
- void SetRebinStrategy(Int_t n, Int_t rebx[], Int_t reby[]);\r
- 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
- private:\r
- AliTRDrecoProjection(const AliTRDrecoProjection&);\r
- protected:\r
- TH3 *fH; // data container\r
- Int_t fAx[3]; // projection axes\r
- Int_t fNrebin; // no. of rebinning steps\r
- Int_t *fRebin[2]; //[fNrebin] rebinning of the X nd Y axes\r
- Float_t fRange[4]; //show range of the z processed\r
-\r
- ClassDef(AliTRDrecoProjection, 2) // wrapper for a projection container THnSparse -> TH3\r
- };\r
-\r
- AliTRDrecoTask();\r
- AliTRDrecoTask(const char *name, const char *title);\r
- virtual ~AliTRDrecoTask();\r
- \r
- \r
- virtual void UserCreateOutputObjects();\r
- virtual void UserExec(Option_t *opt);\r
- virtual void SetDebugLevel(Int_t level);\r
- \r
- \r
- static Float_t GetMeanStat(TH1 *h, Float_t cut=0., Int_t opt=0, Float_t *sigma=NULL);\r
- Int_t GetNRefFigures() const; \r
- const Char_t* GetNameId() const { return fNameId;}\r
- TList* GetPlotFunctors() const { return fPlotFuncList;}\r
- Int_t GetPtBin(Float_t pt);\r
- virtual Bool_t GetRefFigure(Int_t ifig);\r
- virtual void MakeSummary();\r
- void MakeDetectorPlot(Int_t ly=0, const Option_t *opt="");\r
- void MakeDetectorPlotOLD(Int_t ly=0, const Option_t *opt="");\r
- Bool_t IsHeavyIon() const { return TestBit(kHeavyIon);};\r
- Bool_t IsPP() const { return !TestBit(kHeavyIon);};\r
- Bool_t HasFriends() const { return TestBit(kFriends);};\r
- Bool_t HasMCdata() const { return TestBit(kMCdata);};\r
- Bool_t HasPostProcess() const { return TestBit(kPostProcess);};\r
- Bool_t HasRunTerminate() const { return fRunTerminate; }\r
- virtual TObjArray* Histos() { return fContainer;}\r
-\r
- virtual Bool_t Load(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");\r
- virtual Bool_t LoadDetectorMap(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");\r
- virtual Bool_t Save(TObjArray * const res);\r
- virtual Bool_t PostProcess();\r
- virtual Bool_t PutTrendValue(const Char_t *name, Double_t val, Double_t err=0);\r
- static Int_t Rebin(TH2 *h, Int_t n, Int_t rebinX[], Int_t rebinY[], Int_t nstat);\r
- virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}\r
- virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}\r
- virtual void SetNameId(const Char_t *nid) {snprintf(fNameId, 10, "%s", nid);}\r
- virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}\r
- 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
- static void SetRangeZ(TH2 *h2, Float_t m, Float_t M, Float_t thr=0.);\r
- void SetRunTerminate(Bool_t runTerminate = kTRUE) { fRunTerminate = runTerminate; }\r
- void SetTriggerList(const Char_t *tl);\r
- virtual void Terminate(Option_t *);\r
-\r
-protected:\r
- static TTreeSRedirector* DebugStream() { return fgDebugStream;}\r
- virtual void InitFunctorList();\r
- Bool_t HasFunctorList() const { return fPlotFuncList != NULL; }\r
- Bool_t MakeMomSegmentation();\r
-\r
- Char_t fNameId[10]; // unique identifier of task particularity\r
- UChar_t fNRefFigures; // no of reference figures reported by task\r
- TObjArray *fDets; //! OLD container to store detector position and status support should be discontinued \r
- TObjArray *fDetsV; //! NEW container to store detector position and status\r
- TObjArray *fContainer; //! container to store results\r
- AliTRDeventInfo *fEvent; //! Event Info\r
- TObjArray *fTracks; //! Array of tracks\r
- TObjArray *fClusters; //! Array of clusters\r
- const TObjArray *fkClusters; //! current detector clusters array\r
- const AliTRDtrackV1 *fkTrack; //! current track\r
- const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info\r
- const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info\r
- Char_t fSpecies; //! species index +1 with charge sign\r
- Char_t fTriggerSlot; //! selected triggers map (if requested)\r
- Float_t fPt; //! p_t of the track being analyzed\r
- Float_t fPhi; //! phi of the track being analyzed\r
- Float_t fEta; //! eta of the track being analyzed\r
- Int_t fNpt; // no of pt/p bins actually used\r
- TObjArray *fTriggerList; //! optional trigger list to be monitored\r
-\r
-private:\r
- AliTRDrecoTask(const AliTRDrecoTask&);\r
- AliTRDrecoTask& operator=(const AliTRDrecoTask&);\r
-\r
- TList *fPlotFuncList; //! track functors list\r
- TList *fDetFuncList; //! detector functors list\r
- Bool_t fRunTerminate; // Switch for Terminate Function\r
- static TTreeSRedirector *fgDebugStream; //! Debug stream\r
- static TH1 *fgProjector; //! Projector histogram for Z statistics\r
-protected:\r
- static const Int_t fgNPt = 25; //! No of debug pt bins\r
- static Float_t fgPt[fgNPt+1]; //! Array with limits for debug pt bins\r
-\r
- ClassDef(AliTRDrecoTask, 5) // base TRD reconstruction task\r
-};\r
-\r
-#endif\r
-\r
+#ifndef ALITRDRECOTASK_H
+#define ALITRDRECOTASK_H
+
+///////////////////////////////////////////////////////
+//
+// Basic class for Performance/Calibration TRD tasks
+//
+// Author: Alexandru Bercuci, 10/09/2008
+//
+//////////////////////////////////////////////////
+
+#ifndef ALIANALYSISTASKSE_H
+#include "AliAnalysisTaskSE.h"
+#endif
+
+#ifndef ALITRDTRACKINFO_H
+#include "info/AliTRDtrackInfo.h"
+#endif
+
+#ifndef ALITRDEVENTINFO_H
+#include "info/AliTRDeventInfo.h"
+#endif
+
+class TAxis;
+class TH1;
+class TH2;
+class TH3;
+class TF1;
+class TList;
+class TObjArray;
+class TTreeSRedirector;
+class AliTRDtrackV1;
+class AliTRDrecoTask : public AliAnalysisTaskSE
+{
+friend class AliEveTRDTrackList;
+public:
+ enum AliTRDrecoSteeringBits{
+ kMCdata = BIT(18)
+ ,kFriends = BIT(19)
+ ,kPostProcess = BIT(20)
+ ,kHeavyIon = BIT(21)
+ };
+
+ class AliTRDrecoProjection : public TNamed
+ {
+ public:
+ AliTRDrecoProjection();
+ virtual ~AliTRDrecoProjection();
+ AliTRDrecoProjection& operator+=(const AliTRDrecoProjection& other);
+ AliTRDrecoProjection& operator=(const AliTRDrecoProjection& other);
+ void Build(const Char_t *n, const Char_t *t, Int_t ix, Int_t iy, Int_t iz, TAxis *aa[]);
+ Double_t GetTrendValue(const Int_t mid=0, Double_t *m=NULL, Double_t *s=NULL, Double_t *se=NULL) const;
+ TH3* H() const { return fH;}
+ void Increment(Int_t bin[], Double_t v);
+ TH2* Projection2D(const Int_t nstat, const Int_t ncol, const Int_t mid=0, Bool_t del=kTRUE);
+ TH2* Projection2Dbin(Int_t ibin=-1, Bool_t mc=kFALSE);
+ void SetRebinStrategy(Int_t n, Int_t rebx[], Int_t reby[]);
+ 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;}
+ private:
+ AliTRDrecoProjection(const AliTRDrecoProjection&);
+ protected:
+ TH3 *fH; // data container
+ Int_t fAx[3]; // projection axes
+ Int_t fNrebin; // no. of rebinning steps
+ Int_t *fRebin[2]; //[fNrebin] rebinning of the X nd Y axes
+ Float_t fRange[4]; //show range of the z processed
+
+ ClassDef(AliTRDrecoProjection, 2) // wrapper for a projection container THnSparse -> TH3
+ };
+
+ AliTRDrecoTask();
+ AliTRDrecoTask(const char *name, const char *title);
+ virtual ~AliTRDrecoTask();
+
+
+ virtual void UserCreateOutputObjects();
+ virtual void UserExec(Option_t *opt);
+ virtual void SetDebugLevel(Int_t level);
+
+
+ static Float_t GetMeanStat(TH1 *h, Float_t cut=0., Int_t opt=0, Float_t *sigma=NULL);
+ Int_t GetNRefFigures() const;
+ const Char_t* GetNameId() const { return fNameId;}
+ TList* GetPlotFunctors() const { return fPlotFuncList;}
+ Int_t GetPtBin(Float_t pt);
+ virtual Bool_t GetRefFigure(Int_t ifig);
+ virtual void MakeSummary();
+ void MakeDetectorPlot(Int_t ly=0, const Option_t *opt="");
+ void MakeDetectorPlotOLD(Int_t ly=0, const Option_t *opt="");
+ Bool_t IsHeavyIon() const { return TestBit(kHeavyIon);};
+ Bool_t IsPP() const { return !TestBit(kHeavyIon);};
+ Bool_t HasFriends() const { return TestBit(kFriends);};
+ Bool_t HasMCdata() const { return TestBit(kMCdata);};
+ Bool_t HasPostProcess() const { return TestBit(kPostProcess);};
+ Bool_t HasRunTerminate() const { return fRunTerminate; }
+ virtual TObjArray* Histos() { return fContainer;}
+
+ virtual Bool_t Load(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");
+ virtual Bool_t LoadDetectorMap(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");
+ virtual Bool_t Save(TObjArray * const res);
+ virtual Bool_t PostProcess();
+ virtual Bool_t PutTrendValue(const Char_t *name, Double_t val, Double_t err=0);
+ static Int_t Rebin(TH2 *h, Int_t n, Int_t rebinX[], Int_t rebinY[], Int_t nstat);
+ virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}
+ virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}
+ virtual void SetNameId(const Char_t *nid) {snprintf(fNameId, 10, "%s", nid);}
+ virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}
+ 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.);
+ static void SetRangeZ(TH2 *h2, Float_t m, Float_t M, Float_t thr=0.);
+ void SetRunTerminate(Bool_t runTerminate = kTRUE) { fRunTerminate = runTerminate; }
+ void SetTriggerList(const Char_t *tl);
+ virtual void Terminate(Option_t *);
+
+protected:
+ static TTreeSRedirector* DebugStream() { return fgDebugStream;}
+ virtual void InitFunctorList();
+ Bool_t HasFunctorList() const { return fPlotFuncList != NULL; }
+ Bool_t MakeMomSegmentation();
+
+ Char_t fNameId[10]; // unique identifier of task particularity
+ UChar_t fNRefFigures; // no of reference figures reported by task
+ TObjArray *fDets; //! OLD container to store detector position and status support should be discontinued
+ TObjArray *fDetsV; //! NEW container to store detector position and status
+ TObjArray *fContainer; //! container to store results
+ AliTRDeventInfo *fEvent; //! Event Info
+ TObjArray *fTracks; //! Array of tracks
+ TObjArray *fClusters; //! Array of clusters
+ const TObjArray *fkClusters; //! current detector clusters array
+ const AliTRDtrackV1 *fkTrack; //! current track
+ const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info
+ const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info
+ Char_t fSpecies; //! species index +1 with charge sign
+ Char_t fTriggerSlot; //! selected triggers map (if requested)
+ Float_t fPt; //! p_t of the track being analyzed
+ Float_t fPhi; //! phi of the track being analyzed
+ Float_t fEta; //! eta of the track being analyzed
+ Int_t fNpt; // no of pt/p bins actually used
+ TObjArray *fTriggerList; //! optional trigger list to be monitored
+
+private:
+ AliTRDrecoTask(const AliTRDrecoTask&);
+ AliTRDrecoTask& operator=(const AliTRDrecoTask&);
+
+ TList *fPlotFuncList; //! track functors list
+ TList *fDetFuncList; //! detector functors list
+ Bool_t fRunTerminate; // Switch for Terminate Function
+ static TTreeSRedirector *fgDebugStream; //! Debug stream
+ static TH1 *fgProjector; //! Projector histogram for Z statistics
+protected:
+ static const Int_t fgNPt = 25; //! No of debug pt bins
+ static Float_t fgPt[fgNPt+1]; //! Array with limits for debug pt bins
+
+ ClassDef(AliTRDrecoTask, 5) // base TRD reconstruction task
+};
+
+#endif
+