using AliCDBConnect task in test train of TRD
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDonlineTrackletQA.h
1 #ifndef ALITRDONLINETRACKLETQA_H
2 #define ALITRDONLINETRACKLETQA_H
3
4 #include "AliAnalysisTask.h"
5
6 class TList;
7
8 class AliInputEventHandler;
9 class AliVEvent;
10 class AliAODEvent;
11 class AliMCEvent;
12
13 class AliTRDgeometry;
14 class AliTRDpadPlane;
15 class AliTRDtrackletMCM;
16 class AliTRDtrackletWord;
17
18 class AliTRDonlineTrackletQA : public AliAnalysisTask
19 {
20  public:
21   AliTRDonlineTrackletQA(const char *name);
22   ~AliTRDonlineTrackletQA();
23
24   void ConnectInputData(const Option_t *option);
25   void CreateOutputObjects();
26   void Exec(const Option_t *option);
27   void LocalInit();
28   void Terminate(const Option_t *option);
29
30   void PlotMC(AliTRDtrackletMCM *trkl);
31   void PlotESD(AliTRDtrackletMCM *trkl);
32
33   void PlotESD(AliTRDtrackletWord *trkl);
34
35   Int_t GetTrackletsForMC(Int_t label, Int_t idx[]);
36
37  protected:
38   AliESDEvent *fESD;                    //! current ESD event
39
40   AliInputEventHandler *fInputHandler;  //! input handler
41   AliVEvent            *fInputEvent;    //! input event
42   AliAODEvent          *fOutputAOD;     //! output AOD
43   AliMCEvent           *fMCEvent;       //! MC event
44
45   TClonesArray         *fTrackletsRaw;  //! array of raw tracklets
46   TClonesArray         *fTrackletsSim;  //! array of sim tracklets
47
48   // ----- output objects -----
49   TList                *fOutputList;    //! list of output objects
50   TH1F                 *fHistYpos;      //! trkl y-position within chamber
51   TH1F                 *fHistYres;      //! trkl y-residual to track reference
52   TH2F                 *fHistYresDy;    //! trkl y-residual to track reference vs. deflection
53   TH1F                 *fHistdY;        //! trkl dy 
54   TH1F                 *fHistdYres;     //! trkl dy-residual to track reference
55   TH2F                 *fHistYlocal[6]; //! trkl local y vs. MC (per layer)
56   TH1F                 *fHistYresESD;   //! trkl y-residual to ESD track
57   TH1F                 *fHistdYresESD;  //! trkl dy-residual to ESD track
58   TH1F                 *fHistCanddY;    //! trkl cand at given dy
59   TH1F                 *fHistFounddY;    //! trkl found at given dy
60   TH1F                 *fHistTrklPerRef; //! no. of tracklets found per track reference
61   TH2F                 *fHistdYdYref;    //! dy vs. dy from track reference
62   TH1F                 *fHistYposRaw;    //! trkl y-position within chamber
63   TH1F                 *fHistdYRaw;     //! trkl dy 
64   TH2F                 *fHistYdYRaw;    //! y vs dy from raw
65   TH1F                 *fHistZrow;      //! z-row
66   TH1F                 *fHistZrowRaw;   //! z-row
67   TH1F                 *fHistPid;       //! PID
68   TH1F                 *fHistPidRaw;    //! PID
69   TH1F                 *fHistYdiff;     //! difference in y between sim and raw
70   TH1F                 *fHistdYdiff;    //! difference in dy between sim and raw
71   TH2F                 *fHistdYdYraw;   //! dy sim vs. raw
72   TTree                *fTreeTracklets; //! store tracklet information
73
74   // ----- temporary storage -----
75   Float_t fY;                   // y-position
76   Float_t fDY;                  // deflection length
77   Float_t fYdiff;               // difference in y-position
78   Float_t fDYdiff;              // difference in deflection
79   Int_t   fQ0;                  // accumulated charge in first window
80   Int_t   fQ1;                  // accumulated charge in second window
81   Int_t   fNHits;               // no. of hits
82
83   // ----- configuration -----
84   Float_t fMinPt;                       // minimal pt for tracks and track reference
85                                         // which are used for comparison
86
87   // ----- internal use -----
88   AliTRDgeometry       *fGeo; //! TRD geometry
89
90   Int_t fNevent;             // current event number
91
92   TTree *fTrackletTree;  //! tracklets from simulation
93   TTree *fTrackletTreeRaw; //! tracklets from raw data
94
95  private:
96   AliTRDonlineTrackletQA(const AliTRDonlineTrackletQA&); // not implemented
97   AliTRDonlineTrackletQA& operator=(const AliTRDonlineTrackletQA&); // not implemented
98
99   ClassDef(AliTRDonlineTrackletQA, 0);
100 };
101
102 #endif