]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/AliTRDcheckESD.h
update task to read results from AnalysisResults.root file
[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 {
36d21092 31 kMC = BIT(0) // use MC info
97d0ccba 32 ,kCollision = BIT(1) //
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);
36d21092 55 Int_t GetNRefFigures() const { return fNRefFigures; }
f8f46e4d 56 void UserExec(Option_t *);
1ee39b3a 57
58 Bool_t HasMC() const { return TESTBIT(fStatus, kMC);}
36d21092 59 Bool_t IsCollision() const {return TESTBIT(fStatus, kCollision);}
60 void SetCollision(Bool_t set=kTRUE) {set ? SETBIT(fStatus, kCollision) : CLRBIT(fStatus, kCollision);}
1ee39b3a 61 TObjArray* Histos();
97d0ccba 62 Bool_t Load(const Char_t *fn="AnalysisResults.root", const Char_t *dir="TRD_Performance", const Char_t *name=NULL);
1ee39b3a 63 void SetMC(Bool_t mc = kTRUE) { mc ? SETBIT(fStatus, kMC) : CLRBIT(fStatus, kMC);}
64 Bool_t PutTrendValue(const Char_t *name, Double_t val);
65 void Terminate(Option_t *);
66
67private:
68 static const Float_t fgkxTPC; // end radial position of TPC
69 static const Float_t fgkxTOF; // start radial position of TOF
629ae9b8 70 static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot
1ee39b3a 71
72 AliTRDcheckESD(const AliTRDcheckESD&);
73 AliTRDcheckESD& operator=(const AliTRDcheckESD&);
fb09668f 74 Int_t Pdg2Idx(Int_t pdg);
1ee39b3a 75 void Process(TH1 **h, TGraphErrors *g);
629ae9b8 76 void Process2D(TH2 * const h, TGraphErrors **g);
1ee39b3a 77 void PrintStatus(ULong_t s);
78
79 Int_t fStatus; // bit mask for controlling the task
629ae9b8 80 Int_t fNRefFigures; // number of current ref plots
a96ac33a 81 AliESDEvent *fESD; //! ESD event
82 AliMCEvent *fMC; //! MC event
83 TObjArray *fHistos; //! QA histos
1ee39b3a 84 TObjArray *fResults; // QA graphs
629ae9b8 85 static FILE *fgFile; //! trend file streamer
36d21092 86 // Vertex selection
87 static const Float_t fgkEvVertexZ;// cm
88 static const Int_t fgkEvVertexN;// cm
89 // Track selection
90 static const Float_t fgkTrkDCAxy; // cm
91 static const Float_t fgkTrkDCAz; // cm
92 static const Int_t fgkNclTPC; // N clusters TPC
93 static const Float_t fgkPt; // min. pt
94 static const Float_t fgkEta; // eta range
97d0ccba 95
36d21092 96 ClassDef(AliTRDcheckESD, 5) // user oriented TRD analysis based on ESD-MC data
1ee39b3a 97};
98#endif