using AliCDBConnect task in test train of TRD
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDcheckDET.h
CommitLineData
1ee39b3a 1#ifndef ALITRDCHECKDET_H
2#define ALITRDCHECKDET_H
3
4#ifndef ALITRDRECOTASK_H
5#include "AliTRDrecoTask.h"
6#endif
7////////////////////////////////////////////////////////////////////////////
8// Basic checks for tracking and detector performance //
9// //
10// Authors: //
11// Anton Andronic <A.Andronic@gsi.de> //
12// Alexandru Bercuci <A.Bercuci@gsi.de> //
13// Markus Fasel <M.Fasel@gsi.de> //
14////////////////////////////////////////////////////////////////////////////
15
16
17class TObjArray;
18class TH1;
4345681e 19class TH2;
1ee39b3a 20class TMap;
21class AliESDHeader;
44fd53ca 22class AliExternalTrackParam;
1ee39b3a 23class AliTRDcluster;
24class AliTRDseedV1;
25class AliTRDgeometry;
1ee39b3a 26class AliTRDcheckDET : public AliTRDrecoTask{
27public:
28 // The Histogram number
29 enum HistType_t {
30 kNclustersTrack = 0,
31 kNclustersTracklet = 1,
32 kNtrackletsTrack = 2,
33 kNtrackletsSTA = 3,
34 kNtrackletsBAR = 4,
35 kNtrackletsCross = 5,
36 kNtrackletsFindable = 6,
37 kNtracksEvent = 7,
38 kNtracksSector = 8,
39 kPH = 9,
40 kChi2 = 10,
41 kChargeCluster = 11,
42 kChargeTracklet = 12,
43 kNeventsTrigger = 13,
44 kNeventsTriggerTracks=14,
45 kTriggerPurity = 15,
46 kTrackStatus = 16,
0c76cfa4 47 kTrackletStatus = 17,
44fd53ca 48 kNTrackletsP = 18,
49 kNclustersLayer = 19
1ee39b3a 50 };
b795b480 51 enum FigureType_t{
52 kFigNclustersTrack,
53 kFigNclustersTracklet,
54 kFigNtrackletsTrack,
55 kFigNTrackletsP,
56 kFigNtrackletsCross,
57 kFigNtrackletsFindable,
58 kFigNtracksEvent,
59 kFigNtracksSector,
60 kFigTrackStatus,
61 kFigTrackletStatus,
62 kFigChi2,
63 kFigPH,
64 kFigChargeCluster,
65 kFigChargeTracklet,
66 kFigNeventsTrigger,
67 kFigNeventsTriggerTracks,
68 kFigTriggerPurity
69 };
70
1ee39b3a 71 AliTRDcheckDET();
f8f46e4d 72 AliTRDcheckDET(char* name);
1ee39b3a 73 virtual ~AliTRDcheckDET();
74
f8f46e4d 75 virtual void UserCreateOutputObjects();
76 virtual void UserExec(Option_t *opt);
1ee39b3a 77 virtual TObjArray *Histos();
78
79 // Plotting Functions:
80 TH1 *PlotTrackStatus(const AliTRDtrackV1 *track = 0x0);
81 TH1 *PlotTrackletStatus(const AliTRDtrackV1 *track = 0x0);
82 TH1 *PlotNClustersTracklet(const AliTRDtrackV1 *t = 0x0);
83 TH1 *PlotNClustersTrack(const AliTRDtrackV1 *t = 0x0);
84 TH1 *PlotNTrackletsTrack(const AliTRDtrackV1 *t = 0x0);
85 TH1 *PlotNTrackletsRowCross(const AliTRDtrackV1 *t = 0x0);
86 TH1 *PlotFindableTracklets(const AliTRDtrackV1 *track = 0x0);
87 TH1 *PlotNTracksSector(const AliTRDtrackV1 *t = 0x0);
88 TH1 *PlotPHt(const AliTRDtrackV1 *t = 0x0);
89 TH1 *PlotPHx(const AliTRDtrackV1 *track = 0x0);
90 TH1 *PlotChi2(const AliTRDtrackV1 *t = 0x0);
91 TH1 *PlotChargeCluster(const AliTRDtrackV1 *t = 0x0);
92 TH1 *PlotChargeTracklet(const AliTRDtrackV1 *t = 0x0);
93
94 virtual Bool_t PostProcess();
95 virtual Bool_t GetRefFigure(Int_t ifig);
b795b480 96 virtual void MakeSummary();
1ee39b3a 97
c732f879 98 Bool_t IsUsingClustersOutsideChamber() const {return TESTBIT(fFlags, kUseClustersOutsideChamber);}
99 void UseClustersOutsideChamber(Bool_t b = kTRUE) {if(b) SETBIT(fFlags, kUseClustersOutsideChamber); else CLRBIT(fFlags, kUseClustersOutsideChamber);}
1ee39b3a 100
101private:
c732f879 102 enum{
c0a6ac06 103 kUseClustersOutsideChamber = 0
c732f879 104 };
1ee39b3a 105 AliTRDcheckDET(const AliTRDcheckDET &);
106 AliTRDcheckDET& operator=(const AliTRDcheckDET &);
107 void GetDistanceToTracklet(Double_t *dist, AliTRDseedV1 * const tracklet, AliTRDcluster * const c);
8a3dd7a0 108 //----------------------------------------------------
109 // Functions creating the reference figures
d48822f2 110 TH1* MakePlotChi2() const;
1ee39b3a 111 TH1* MakePlotNTracklets();
c0a6ac06 112 Bool_t MakePlotPulseHeight();
0c76cfa4 113 void MakePlotnTrackletsVsP();
44fd53ca 114 void MakePlotMeanClustersLayer();
8a3dd7a0 115 void MakePlotNclustersTrack();
116 void MakePlotNclustersTracklet();
117 void MakePlotTrackletCharge();
1ee39b3a 118 Bool_t MakeBarPlot(TH1 *histo, Int_t Color);
8a3dd7a0 119 //----------------------------------------------------
efb9a759 120 void GetEtaPhiAt(const AliExternalTrackParam *track, Double_t x, Double_t &eta, Double_t &phi);
8a3dd7a0 121 TH1 *ProjectCentrality(TH2 *h2d, Int_t centralityBin = -1);
1ee39b3a 122
2e8eb67c 123 Int_t fCentralityClass; // Centrality Class
1ee39b3a 124 TMap *fTriggerNames; //! Containing trigger class names
c732f879 125 UChar_t fFlags; // Flags for setting
8a3dd7a0 126
127 static const Color_t fkColorsCentrality[AliTRDeventInfo::kCentralityClasses]; // Colors for the different centrality classes in the Ref Figures
fd7ffd88 128 ClassDef(AliTRDcheckDET, 2)
1ee39b3a 129};
130#endif