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 */
6 /* $Id: AliTRDcheckESD.h 27496 2008-07-22 08:35:45Z cblume $ */
8 /////////////////////////////////////////////////////
10 // Check basic detector results at ESD level
13 // Alex Bercuci <A.Bercuci@gsi.de>
15 //////////////////////////////////////////////////////
17 #ifndef ALIANALYSISTASK_H
18 #include "AliAnalysisTaskSE.h"
28 class AliTRDcheckESD : public AliAnalysisTaskSE {
30 enum ETRDcheckESDstatus {
31 kMC = BIT(0) // use MC info
32 ,kLoad = BIT(1) // container from file
34 enum ETRDcheckESDhistos {
35 kNCl = 0 // number of clusters per track
36 ,kTRDstat // TRD tracks status
37 ,kTRDmom // TRD track momentum
38 ,kPtRes // Pt resolution @ vertex for TRD
39 ,kNhistos = 4 // number of histograms
40 ,kNrefs = 4 // number of reference plots
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
50 AliTRDcheckESD(char* name);
51 virtual ~AliTRDcheckESD();
53 void UserCreateOutputObjects();
54 Bool_t GetRefFigure(Int_t ifig);
55 Int_t GetNRefFigures() const { return fNRefFigures; }
56 void UserExec(Option_t *);
58 Bool_t HasMC() const { return TESTBIT(fStatus, kMC);}
59 Bool_t IsLoad() const { return TESTBIT(fStatus, kLoad);}
61 Bool_t Load(const Char_t *fn="TRD.Performance.root", const Char_t *name=NULL);
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 *);
67 static const Float_t fgkxTPC; // end radial position of TPC
68 static const Float_t fgkxTOF; // start radial position of TOF
69 static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot
71 AliTRDcheckESD(const AliTRDcheckESD&);
72 AliTRDcheckESD& operator=(const AliTRDcheckESD&);
73 Int_t Pdg2Idx(Int_t pdg);
74 void Process(TH1 **h, TGraphErrors *g);
75 void Process2D(TH2 * const h, TGraphErrors **g);
76 void PrintStatus(ULong_t s);
78 Int_t fStatus; // bit mask for controlling the task
79 Int_t fNRefFigures; // number of current ref plots
80 AliESDEvent *fESD; //! ESD event
81 AliMCEvent *fMC; //! MC event
82 TObjArray *fHistos; //! QA histos
83 TObjArray *fResults; // QA graphs
84 static FILE *fgFile; //! trend file streamer
85 ClassDef(AliTRDcheckESD, 4) // user oriented TRD analysis based on ESD-MC data