]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/AliTRDcheckESD.h
fixed bugs with the rule checker.
[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
bd97a050 20#include <TH1F.h>
21#include <TH2F.h>
22#include <TH3F.h>
1ee39b3a 23
24class AliESDEvent;
25class AliMCEvent;
26class TH1;
f2e89a4c 27class TH2;
bd97a050 28class TH3;
1ee39b3a 29class TObjArray;
30class TGraph;
31class TGraphErrors;
f8f46e4d 32class AliTRDcheckESD : public AliAnalysisTaskSE {
1ee39b3a 33public:
34 enum ETRDcheckESDstatus {
36d21092 35 kMC = BIT(0) // use MC info
97d0ccba 36 ,kCollision = BIT(1) //
1ee39b3a 37 };
38 enum ETRDcheckESDhistos {
f76b8071 39 kNCl = 0 // number of clusters per track
40 ,kTRDstat // TRD tracks status
41 ,kTRDmom // TRD track momentum
42 ,kPtRes // Pt resolution @ vertex for TRD
43 ,kTPCVertex // event vertex from TPC
44 ,kEventVertex // event vertex
45 ,kNTracksAll // ntracks - all
46 ,kNTracksAcc // ntracks - inside acc. and DCA cut
47 ,kNTracksTPC // additional cut on number of TPC clusters
48 ,kDCAxy // transverse DCA
49 ,kDCAz // z - DCA
50 ,kPt1 // Pt distribution, eta and ptmin cuts
51 ,kPt2 // Pt distribution, cuts from kPt1 and DCA cuts
52 ,kPt3pos // Pt distribution, cuts from kPt2 and cut on TPC clusters for positives (>100)
53 ,kPt3neg // Pt distribution, cuts from kPt2 and cut on TPC clusters for negatives (>100)
54 ,kPt4pos // Pt distribution, cuts from kPt3pos and at least one TRD tracklet
55 ,kPt4neg // Pt distribution, cuts from kPt3neg and at least one TRD tracklet
56 ,kTheta // distribution of theta for tracks passing the cuts from kPt4pos and kPt4neg
57 ,kPhi // distribution of phi for tracks passing the cuts from kPt4pos and kPt4neg
58 ,kNTPCCl // number of TPC clusters, cuts from kPt2
59 ,kNTPCCl2 // number of TPC clusters, cuts from kPt2 + pt>1 GeV/c
60 ,kTPCDedx // TPC dE/dx, cuts from kPt3pos or kPt3neg
61 ,kEtaPhi // (eta,phi) distrib. for tracks after the cuts from kPt3pos or kPt3neg
62 ,kEtaNclsTPC // (TPC_Ncls,eta) distrib. for tracks after the cuts from kPt3pos or kPt3neg
63 ,kPhiNclsTPC // (TPC_Ncls,phi) distrib. for tracks after the cuts from kPt3pos or kPt3neg
64 ,kNTrackletsTRD // (TRD tracklets per track, P) distribution, after cuts from kPt4pos or kPt4neg
65 ,kNClsTrackTRD // (TRD clusters per track, P) distribution, after cuts from kPt4pos or kPt4neg
66 ,kPHSlice // (slicePH,sliceNo) distribution, after cuts from kPt4pos or kPt4neg
67 ,kQtotP // (total Q from slices, momentum) distribution, after cuts from kPt4pos or kPt4neg
68 ,kPropagXYvsP // (X,Y,momentum) distribution after AliESDtrack::PropagateTo(r=300.)
69 ,kPropagRZvsP // (R,Z,momentum) distribution after AliESDtrack::PropagateTo(r=300.)
bd97a050 70 ,kTPCRefTracksPos // (eta,detector phi,Pt) distribution of reference TPC positive tracks (fulfill cuts from kPt3pos)
71 ,kTPCRefTracksNeg // (eta,detector phi,Pt) distribution of reference TPC negative tracks (fulfill cuts from kPt3neg)
72 ,kTRDRefTracksPos // (eta,detector phi,Pt) distribution of reference TRD positive tracks (fulfill cuts from kPt4pos)
73 ,kTRDRefTracksNeg // (eta,detector phi,Pt) distribution of reference TRD negative tracks (fulfill cuts from kPt4neg)
f76b8071 74 ,kTRDEtaPhiAvNtrkl // (eta, detector phi) profile of average number of tracklets
75 ,kTRDEtaDeltaPhiAvNtrkl // (eta, delta-phi) profile of average number of tracklets
76 // delta-phi is the angle made by the track with the normal to the chamber entrance plane
bd97a050 77 ,kTRDEtaPhiAvQtot // (eta, detector phi) profile of total tracklet charge from slices
78 ,kNhistos = 43 // number of histograms
79 ,kNrefs = 6 // number of reference plots
1ee39b3a 80 };
81 enum ETRDcheckESDbits {
82 kTPCout = 1 // track left TPC
83 ,kTRDin // track reach TRD fiducial volume
84 ,kTRDout // track reconstructed in TRD
85 ,kTRDpid // PID calculated in TRD
86 ,kTRDref // track refitted in TRD
1ee39b3a 87 };
88 AliTRDcheckESD();
f8f46e4d 89 AliTRDcheckESD(char* name);
1ee39b3a 90 virtual ~AliTRDcheckESD();
91
f8f46e4d 92 void UserCreateOutputObjects();
e2e3cec2 93 Bool_t GetRefFigure(Int_t ifig);
36d21092 94 Int_t GetNRefFigures() const { return fNRefFigures; }
f8f46e4d 95 void UserExec(Option_t *);
1ee39b3a 96
97 Bool_t HasMC() const { return TESTBIT(fStatus, kMC);}
36d21092 98 Bool_t IsCollision() const {return TESTBIT(fStatus, kCollision);}
99 void SetCollision(Bool_t set=kTRUE) {set ? SETBIT(fStatus, kCollision) : CLRBIT(fStatus, kCollision);}
1ee39b3a 100 TObjArray* Histos();
97d0ccba 101 Bool_t Load(const Char_t *fn="AnalysisResults.root", const Char_t *dir="TRD_Performance", const Char_t *name=NULL);
1ee39b3a 102 void SetMC(Bool_t mc = kTRUE) { mc ? SETBIT(fStatus, kMC) : CLRBIT(fStatus, kMC);}
103 Bool_t PutTrendValue(const Char_t *name, Double_t val);
104 void Terminate(Option_t *);
b795b480 105 void MakeSummary();
1ee39b3a 106
107private:
108 static const Float_t fgkxTPC; // end radial position of TPC
109 static const Float_t fgkxTOF; // start radial position of TOF
629ae9b8 110 static const UChar_t fgkNgraph[kNrefs]; // number of graphs/ref plot
1ee39b3a 111
112 AliTRDcheckESD(const AliTRDcheckESD&);
113 AliTRDcheckESD& operator=(const AliTRDcheckESD&);
fb09668f 114 Int_t Pdg2Idx(Int_t pdg);
1ee39b3a 115 void Process(TH1 **h, TGraphErrors *g);
629ae9b8 116 void Process2D(TH2 * const h, TGraphErrors **g);
1ee39b3a 117 void PrintStatus(ULong_t s);
bd97a050 118 TH2F* Proj3D(TH3F* hist, TH2F* accMap, Int_t binLow, Int_t binHigh, Float_t &entries);
119 TH1F* TRDEfficiency(Short_t positives=+1);
120
1ee39b3a 121 Int_t fStatus; // bit mask for controlling the task
629ae9b8 122 Int_t fNRefFigures; // number of current ref plots
a96ac33a 123 AliESDEvent *fESD; //! ESD event
124 AliMCEvent *fMC; //! MC event
125 TObjArray *fHistos; //! QA histos
1ee39b3a 126 TObjArray *fResults; // QA graphs
629ae9b8 127 static FILE *fgFile; //! trend file streamer
36d21092 128 // Vertex selection
129 static const Float_t fgkEvVertexZ;// cm
130 static const Int_t fgkEvVertexN;// cm
131 // Track selection
132 static const Float_t fgkTrkDCAxy; // cm
133 static const Float_t fgkTrkDCAz; // cm
134 static const Int_t fgkNclTPC; // N clusters TPC
135 static const Float_t fgkPt; // min. pt
136 static const Float_t fgkEta; // eta range
f76b8071 137
138 static const Float_t fgkQs; // scale for the total charge
97d0ccba 139
36d21092 140 ClassDef(AliTRDcheckESD, 5) // user oriented TRD analysis based on ESD-MC data
1ee39b3a 141};
142#endif