]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/AliTRDresolution.h
new tracking for PbPb and pp (Alex)
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDresolution.h
CommitLineData
1ee39b3a 1#ifndef ALITRDRESOLUTION_H
2#define ALITRDRESOLUTION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDresolution.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8////////////////////////////////////////////////////////////////////////////
9// //
10// TRD Resolution performance //
11// //
12// Authors: //
13// Alexandru Bercuci <A.Bercuci@gsi.de> //
14// Markus Fasel <M.Fasel@gsi.de> //
15// //
16////////////////////////////////////////////////////////////////////////////
17
18#ifndef ALITRDRECOTASK_H
19#include "AliTRDrecoTask.h"
20#endif
21
22class TH1;
23class TH2;
24class TF1;
25class TGraphErrors;
26class TObjArray;
92c40e64 27class TDatabasePDG;
1ee39b3a 28class AliTRDrecoParam;
29class AliTRDseedV1;
30class AliTRDtrackInfo;
08bdd9d1 31class AliTrackPoint;
1ee39b3a 32class AliTRDresolution : public AliTRDrecoTask
33{
34public:
35 enum ETRDresolutionPlot {
36 kCharge = 0 // charge resolution
37 ,kCluster = 1 // cluster - track
92d6d80c 38 ,kTrack = 2 // tracklet - track residuals/pulls
39 ,kTrackIn = 3 // tracklet - track residuals/pulls at lower TRD entrance
a310e49b 40 ,kTrackOut = 4 // tracklet - track residuals/pulls at lower TRD entrance during refit
41 ,kMCcluster = 5 // cluster-mc resolution/pulls
42 ,kMCtracklet = 6 // tracklet-mc resolution/pulls
43 ,kMCtrackIn = 7 // TPC track monitor
44 ,kMCtrackOut = 8 // TOF/HMPID track monitor
45 ,kMCtrack = 9 // TRD track monitor
46 ,kNviews = 10 // total number of resolution views
47 ,kNprojs = 70 // total number of projections for all views
1ee39b3a 48 };
49 enum ETRDresolutionSteer {
08bdd9d1 50 kVerbose = BIT(18) // switch verbosity
51 ,kVisual = BIT(19) // show partial results during processing
52 ,kTrackRefit = BIT(20) // steer track refit
00a56108 53 ,kTrackSelect= BIT(21) // steer track selection
94b94be0 54 ,kLoadCorr = BIT(23) // steer load corrections
1ee39b3a 55 };
705f8b0a 56 enum ETRDresolutionOutSlots {
57 kClToTrk = 2
83b44483 58 ,kClToMC = 3
59 ,kTrkltToTrk = 4
705f8b0a 60 ,kTrkltToMC = 5
61 ,kNOutSlots = 4
62 };
9dcc64cc 63 enum ETRDresolutionSegmentation {
64 kSector = 0
65 ,kStack
66 ,kDetector
67 };
1ee39b3a 68
69 AliTRDresolution();
f8f46e4d 70 AliTRDresolution(char* name);
1ee39b3a 71 virtual ~AliTRDresolution();
72
08bdd9d1 73 static Bool_t FitTrack(const Int_t np, AliTrackPoint *points, Float_t params[10]);
b37d601d 74 static Bool_t FitTracklet(const Int_t ly, const Int_t np, const AliTrackPoint *points, const Float_t trackPars[10], Float_t trackletPars[3]);
f8f46e4d 75 void UserCreateOutputObjects();
94b94be0 76 Float_t GetCorrectionX(Int_t det, Int_t tb) const {return fXcorr[det][tb];}
6859821f 77 Float_t GetDyRange() const {return fDyRange;}
3ba3e0a4 78 Float_t GetPtThreshold() const {return fPtThreshold;}
61f6b45e 79 Float_t GetSegmentationLevel() const {return fSegmentLevel;}
1ee39b3a 80 Bool_t GetRefFigure(Int_t ifig);
81 TObjArray* Histos();
fe1d1beb 82 Bool_t Load(const Char_t *file = "AnalysisResults.root", const Char_t *dir="TRD_Performance");
94b94be0 83 Bool_t LoadCorrection(const Char_t *file=NULL);
00a3f7a4 84 void MakeSummary();
2589cf64 85
1ee39b3a 86 TObjArray* Results(Int_t i=0) const {return i ? fGraphS : fGraphM;}
f8f46e4d 87 void UserExec(Option_t * opt);
83b44483 88 void InitExchangeContainers();
94b94be0 89 Bool_t HasLoadCorrection() const {return TestBit(kLoadCorr);}
08bdd9d1 90 Bool_t HasTrackRefit() const {return TestBit(kTrackRefit);}
00a56108 91 Bool_t HasTrackSelection() const {return TestBit(kTrackSelect);}
801d4d50 92 Bool_t IsVerbose() const {return TestBit(kVerbose);}
93 Bool_t IsVisual() const {return TestBit(kVisual);}
1ee39b3a 94 Bool_t PostProcess();
95
a310e49b 96 TH1* PlotCharge(const AliTRDtrackV1 *t=NULL);
97 TH1* PlotCluster(const AliTRDtrackV1 *t=NULL);
98 TH1* PlotTracklet(const AliTRDtrackV1 *t=NULL);
99 TH1* PlotTrackIn(const AliTRDtrackV1 *t=NULL);
100 TH1* PlotTrackOut(const AliTRDtrackV1 *t=NULL);
101 TH1* PlotMC(const AliTRDtrackV1 *t=NULL);
1ee39b3a 102
5468a262 103 static Bool_t Process(TH2* const h2, TGraphErrors **g, Int_t stat=100);
6859821f 104 void SetDyRange(Float_t dy) {fDyRange = dy;}
2589cf64 105 void SetSegmentationLevel(Int_t l=0);
3ba3e0a4 106 void SetPtThreshold(Float_t pt) {fPtThreshold = pt;}
94b94be0 107 void SetLoadCorrection(Bool_t v = kTRUE) {SetBit(kLoadCorr, v);}
801d4d50 108 void SetVerbose(Bool_t v = kTRUE) {SetBit(kVerbose, v);}
109 void SetVisual(Bool_t v = kTRUE) {SetBit(kVisual, v);}
08bdd9d1 110 void SetTrackRefit(Bool_t v = kTRUE) {SetBit(kTrackRefit, v);}
00a56108 111 void SetTrackSelection(Bool_t v = kTRUE) {SetBit(kTrackSelect, v);}
1ee39b3a 112
113 void Terminate(Option_t * opt);
a310e49b 114 Bool_t GetGraph(Float_t *bb, ETRDresolutionPlot ip, Int_t idx=-1, Bool_t kLEG=kTRUE, const Char_t *explain=NULL);
115 Bool_t GetGraphArray(Float_t *bb, ETRDresolutionPlot ip, Int_t idx, Bool_t kLEG=kTRUE, Int_t n=0, Int_t *sel=NULL, const Char_t *explain=NULL);
b37d601d 116 static Bool_t UseTrack(const Int_t np, const AliTrackPoint *points, Float_t params[10]);
1ee39b3a 117private:
118 AliTRDresolution(const AliTRDresolution&);
119 AliTRDresolution& operator=(const AliTRDresolution&);
afca20ef 120
1ee39b3a 121 void AdjustF1(TH1 *h, TF1 *f);
9dcc64cc 122 TObjArray* BuildMonitorContainerCluster(const char* name, Bool_t expand=kFALSE, Float_t range=-1.);
2589cf64 123 TObjArray* BuildMonitorContainerTracklet(const char* name, Bool_t expand=kFALSE);
3d2a3dff 124 TObjArray* BuildMonitorContainerTrack(const char* name);
1ee39b3a 125 void GetLandauMpvFwhm(TF1 * const f, Float_t &mpv, Float_t &xm, Float_t &xM);
068e2c00 126 void GetRange(TH2 *h2, Char_t mod, Float_t *range);
127 void MakeSummaryPlot(TObjArray *a, TH2 *h2);
1ee39b3a 128 Bool_t Process(TH2* const h2, TF1 *f, Float_t k, TGraphErrors **g);
a310e49b 129 Bool_t Process2D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1., Int_t gidx=-1);
130 Bool_t Process2Darray(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
131 Bool_t Process3D(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
81979445 132 Bool_t Process3Dlinked(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
a310e49b 133 Bool_t Process3DL(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
134 Bool_t Process3Darray(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
81979445 135 Bool_t Process3DlinkedArray(ETRDresolutionPlot ip, Int_t idx=-1, TF1 *f=NULL, Float_t scale=1.);
61f6b45e 136 Bool_t Pulls(Double_t dyz[2], Double_t cc[3], Double_t tilt) const;
1ee39b3a 137
801d4d50 138 UChar_t fSegmentLevel; // segmentation level [sector/stack/chamber]
5935a6da 139 UShort_t fIdxPlot; // plot counter (internal)
140 UShort_t fIdxFrame; // frame counter (internal)
141 UShort_t fNcomp[kNprojs]; // number of projections per task
9653acd3 142 Char_t *fAxTitle[kNprojs][4]; //! Title for all ref histos
5935a6da 143 Float_t fPtThreshold; // pt threshold for some performance plots
6859821f 144 Float_t fDyRange; // min/max dy
94b94be0 145 Float_t fXcorr[540][30]; // min/max dy
2589cf64 146 static Char_t const *fgPerformanceName[kNviews]; //! name of performance plot
61f6b45e 147 static Char_t const *fgParticle[11]; //! latex name of particles/sign
2589cf64 148 static UChar_t const fgNproj[kNviews]; //! number of projections per task
61f6b45e 149 static Int_t const fgkNresYsegm[3]; //! number of segments for saving y resolution
3ba3e0a4 150 static Char_t const *fgkResYsegmName[3];//! name of segment for saving y resolution
5935a6da 151 TDatabasePDG *fDBPDG; // PDG database
1ee39b3a 152 TObjArray *fGraphS; //! result holder - sigma values
153 TObjArray *fGraphM; //! result holder - mean values
154
155 // calibration containers
156 TObjArray *fCl; //! cluster2track calib
1ee39b3a 157 TObjArray *fMCcl; //! cluster2mc calib
83b44483 158/* TObjArray *fTrklt; //! tracklet2track calib
159 TObjArray *fMCtrklt;//! tracklet2mc calib*/
1ee39b3a 160
6859821f 161 ClassDef(AliTRDresolution, 9) // TRD tracking resolution task
1ee39b3a 162};
163#endif