]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/AliTRDcheckESD.h
implement LocalInit function
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDcheckESD.h
CommitLineData
1ee39b3a 1#ifndef ALITRDCHECKESD_H
2#define ALITRDCHECKESD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDcheckESD.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8/////////////////////////////////////////////////////
9//
10// Check basic detector results at ESD level
11//
12// Author
13// Alex Bercuci <A.Bercuci@gsi.de>
14//
15//////////////////////////////////////////////////////
16
17#ifndef ALIANALYSISTASK_H
f8f46e4d 18#include "AliAnalysisTaskSE.h"
1ee39b3a 19#endif
20
21class AliESDEvent;
22class AliMCEvent;
23class TH1;
f2e89a4c 24class TH2;
1ee39b3a 25class TObjArray;
26class TGraph;
27class TGraphErrors;
f8f46e4d 28class AliTRDcheckESD : public AliAnalysisTaskSE {
1ee39b3a 29public:
30 enum ETRDcheckESDstatus {
a96ac33a 31 kMC = BIT(0) // use MC info
32 ,kLoad = BIT(1) // container from file
1ee39b3a 33 };
34 enum ETRDcheckESDhistos {
35 kNCl = 0 // number of clusters per track
36 ,kTRDstat // TRD tracks status
37 ,kTRDmom // TRD track momentum
fb09668f 38 ,kPtRes // Pt resolution @ vertex for TRD
39 ,kNhistos = 4 // number of histograms
629ae9b8 40 ,kNrefs = 4 // number of reference plots
1ee39b3a 41 };
42 enum ETRDcheckESDbits {
43 kTPCout = 1 // track left TPC
44 ,kTRDin // track reach TRD fiducial volume
45 ,kTRDout // track reconstructed in TRD
46 ,kTRDpid // PID calculated in TRD
47 ,kTRDref // track refitted in TRD
1ee39b3a 48 };
49 AliTRDcheckESD();
f8f46e4d 50 AliTRDcheckESD(char* name);
1ee39b3a 51 virtual ~AliTRDcheckESD();
52
f8f46e4d 53 void UserCreateOutputObjects();
e2e3cec2 54 Bool_t GetRefFigure(Int_t ifig);
629ae9b8 55 Int_t GetNRefFigures() const { return fNRefFigures; }
f8f46e4d 56 void UserExec(Option_t *);
1ee39b3a 57
58 Bool_t HasMC() const { return TESTBIT(fStatus, kMC);}
a96ac33a 59 Bool_t IsLoad() const { return TESTBIT(fStatus, kLoad);}
1ee39b3a 60 TObjArray* Histos();
629ae9b8 61 Bool_t Load(const Char_t *fn="TRD.Performance.root", const Char_t *name=NULL);
1ee39b3a 62 void SetMC(Bool_t mc = kTRUE) { mc ? SETBIT(fStatus, kMC) : CLRBIT(fStatus, kMC);}
63 Bool_t PutTrendValue(const Char_t *name, Double_t val);
64 void Terminate(Option_t *);
65
66private:
67 static const Float_t fgkxTPC; // end radial position of TPC
68 static const Float_t fgkxTOF; // start radial position of TOF
629ae9b8 69 static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot
1ee39b3a 70
71 AliTRDcheckESD(const AliTRDcheckESD&);
72 AliTRDcheckESD& operator=(const AliTRDcheckESD&);
fb09668f 73 Int_t Pdg2Idx(Int_t pdg);
1ee39b3a 74 void Process(TH1 **h, TGraphErrors *g);
629ae9b8 75 void Process2D(TH2 * const h, TGraphErrors **g);
1ee39b3a 76 void PrintStatus(ULong_t s);
77
78 Int_t fStatus; // bit mask for controlling the task
629ae9b8 79 Int_t fNRefFigures; // number of current ref plots
a96ac33a 80 AliESDEvent *fESD; //! ESD event
81 AliMCEvent *fMC; //! MC event
82 TObjArray *fHistos; //! QA histos
1ee39b3a 83 TObjArray *fResults; // QA graphs
629ae9b8 84 static FILE *fgFile; //! trend file streamer
85 ClassDef(AliTRDcheckESD, 4) // user oriented TRD analysis based on ESD-MC data
1ee39b3a 86};
87#endif