Adding simple example to load default debug streamer
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibTracks.h
CommitLineData
10757ee9 1#ifndef AliTPCCALIBTRACKS_H
2#define AliTPCCALIBTRACKS_H
3
4
5///////////////////////////////////////////////////////////////////////////////
6// //
7// Class to analyse tracks for calibration //
8// to be used as a component in AliTPCSelectorTracks //
9// In the constructor you have to specify name and title //
10// to get the Object out of a file. //
11// The parameter 'clusterParam', a AliTPCClusterParam object //
12// (needed for TPC cluster error and shape parameterization) //
13// Normally you get this object out of the file 'TPCClusterParam.root' //
14// In the parameter 'cuts' the cuts are specified, that decide //
15// weather a track will be accepted for calibration or not. //
16// //
17// //
18///////////////////////////////////////////////////////////////////////////////
19
20
21
c32da879 22#include <AliTPCcalibBase.h>
10757ee9 23class TF2;
24class TH3F;
25class TH1F;
26class TH1I;
27class TH2I;
28class TH2D;
29class TCollection;
30class TTreeSRedirector;
31class TLinearFitter;
32class AliTPCClusterParam;
33class TTreeSRedirector;
34class AliTPCROC;
35class AliTPCseed;
36class AliESDtrack;
37class AliTPCclusterMI;
38class AliTPCcalibTracksCuts;
39class AliTPCCalPadRegion;
40class AliTPCCalPad;
41class TChain;
9c171b96 42class TTree;
10757ee9 43class TMutex;
44
45using namespace std;
46
c32da879 47class AliTPCcalibTracks : public AliTPCcalibBase {
10757ee9 48public :
49 AliTPCcalibTracks(); // default constructor
b42cf9ed 50 AliTPCcalibTracks(const AliTPCcalibTracks&calibTracks); // copy constructor
9c171b96 51 AliTPCcalibTracks(const Text_t *name, const Text_t *title, AliTPCClusterParam *clusterParam, AliTPCcalibTracksCuts* cuts, Int_t logLevel = 0);
b42cf9ed 52 AliTPCcalibTracks & operator=(const AliTPCcalibTracks& calibTracks);
9c171b96 53
54 virtual ~AliTPCcalibTracks(); // destructor
55
56 void Process(AliTPCseed *track); // to be called by the Selector
57 virtual Long64_t Merge(TCollection *li);
58 void MakeResPlotsQTree(Int_t minEntries = 100, char* pathName = "plots");
59 static void MakeQPosNormAll(TTree * chain, AliTPCClusterParam * param, Int_t maxPoints=1000000, Int_t verbose=0);
10757ee9 60 void MakeReport(Int_t stat, char* pathName = "plots"); // calls all functions that procude pictures, results are written to pathName, stat is the minimal statistic threshold
9c171b96 61 //
10757ee9 62
9c171b96 63
64 Int_t AcceptTrack(AliTPCseed * track);
65 void FillResolutionHistoLocal(AliTPCseed * track); // the MAIN-FUNCTION, called for each track to fill the histograms, called by Process(...)
66 static TH2D* MakeDiff(TH2D * hfit, TF2 * func);
67
68 static AliTPCcalibTracks* TestMerge(AliTPCcalibTracks *ct, AliTPCClusterParam *clusterParam, Int_t nCalTracks = 50);
69
70 void SetStyle() const;
71 void Draw(Option_t* opt); // draw some exemplaric histograms for fast result-check
72 void MakeAmpPlots(Int_t stat, char* pathName = "plots");
73 void MakeDeltaPlots(char* pathName = "plots");
74 void MakeChargeVsDriftLengthPlotsOld(char* pathName = "plots");
75 void MakeChargeVsDriftLengthPlots(char* pathName = "plots");
76 void FitResolutionNew(char* pathName = "plots");
77 void FitRMSNew(char* pathName = "plots");
78
79 TObjArray* GetfArrayAmpRow() {return fArrayAmpRow;}
80 TObjArray* GetfArrayAmp() {return fArrayAmp;}
81 TObjArray* GetfArrayQDY() {return fArrayQDY;}
82 TObjArray* GetfArrayQDZ() {return fArrayQDZ;}
83 TObjArray* GetfArrayQRMSY() {return fArrayQRMSY;}
84 TObjArray* GetfArrayQRMSZ() {return fArrayQRMSZ;}
85 TObjArray* GetfArrayChargeVsDriftlength() {return fArrayChargeVsDriftlength;}
86 TH1F* GetfDeltaY() {return fDeltaY;}
87 TH1F* GetfDeltaZ() {return fDeltaZ;}
88 TObjArray* GetfResolY() {return fResolY;}
89 TObjArray* GetfResolZ() {return fResolZ;}
90 TObjArray* GetfRMSY() {return fRMSY;}
91 TObjArray* GetfRMSZ() {return fRMSZ;}
92 TH1I* GetfHclus() {return fHclus;}
93 TH1I* GetfRejectedTracksHisto() {return fRejectedTracksHisto;}
94 TH1I* GetfHclusterPerPadrow() {return fHclusterPerPadrow;}
95 TH1I* GetfHclusterPerPadrowRaw() {return fHclusterPerPadrowRaw;}
96 TH2I* GetfClusterCutHisto() {return fClusterCutHisto;}
97 AliTPCCalPad* GetfCalPadClusterPerPad() {return fCalPadClusterPerPad; }
98 AliTPCCalPad* GetfCalPadClusterPerPadRaw() {return fCalPadClusterPerPadRaw;}
99 AliTPCCalPadRegion* GetCalPadRegionchargeVsDriftlength() {return fcalPadRegionChargeVsDriftlength;}
100 AliTPCcalibTracksCuts* GetCuts() {return fCuts;}
10757ee9 101protected:
10757ee9 102
10757ee9 103private:
104 static Int_t GetBin(Float_t q, Int_t pad);
105 static Int_t GetBin(Int_t iq, Int_t pad);
106 static Float_t GetQ(Int_t bin);
107 static Float_t GetPad(Int_t bin);
108 void FillResolutionHistoLocalDebugPart(AliTPCseed *track, AliTPCclusterMI *cluster0, Int_t irow, Float_t angley, Float_t anglez, Int_t nclFound, Int_t kDelta);
9f0beaf7 109 AliTPCClusterParam *fClusterParam; // pointer to cluster parameterization
10757ee9 110 AliTPCROC *fROC; //!
111 TObjArray *fArrayAmpRow; // array with amplitudes versus row for given sector
112 TObjArray *fArrayAmp; // array with amplitude for sectors
113 TObjArray *fArrayQDY; // q binned delta Y histograms
114 TObjArray *fArrayQDZ; // q binned delta Z histograms
115 TObjArray *fArrayQRMSY; // q binned delta Y histograms
116 TObjArray *fArrayQRMSZ; // q binned delta Z histograms
117 TObjArray *fArrayChargeVsDriftlength; // array of arrays of TProfiles with charge vs. driftlength for each padsize and sector
118 AliTPCCalPadRegion *fcalPadRegionChargeVsDriftlength; // CalPadRegion, one TProfile for charge vs. driftlength for each padsize and sector
119 TH1F *fDeltaY; // integrated delta y histo
120 TH1F *fDeltaZ; // integrated delta z histo
121 TObjArray *fResolY; // array of resolution histograms Y
122 TObjArray *fResolZ; // array of resolution histograms Z
123 TObjArray *fRMSY; // array of RMS histograms Y
124 TObjArray *fRMSZ; // array of RMS histograms Z
125 AliTPCcalibTracksCuts *fCuts; // object with cuts, that is passed to the constructor
126 TH1I *fHclus; // number of clusters per track
127 TH1I *fRejectedTracksHisto; // histogram of rejecteced tracks, the number coresponds to the failed cut
128 TH1I *fHclusterPerPadrow; // histogram showing the number of clusters per padRow
129 TH1I *fHclusterPerPadrowRaw;// histogram showing the number of clusters per padRow before cuts on clusters are applied
130 TH2I *fClusterCutHisto; // histogram showing in which padRow the clusters were cutted by which criterium
131 AliTPCCalPad *fCalPadClusterPerPad; // AliTPCCalPad showing the number of clusters per Pad
132 AliTPCCalPad *fCalPadClusterPerPadRaw; // AliTPCCalPad showing the number of clusters per Pad before cuts on clusters are applied
9c171b96 133 ClassDef(AliTPCcalibTracks,1)
10757ee9 134
10757ee9 135};
136
137#endif