1 #ifndef AliTPCCALIBTRACKS_H
2 #define AliTPCCALIBTRACKS_H
5 ///////////////////////////////////////////////////////////////////////////////
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. //
18 ///////////////////////////////////////////////////////////////////////////////
30 class TTreeSRedirector;
32 class AliTPCClusterParam;
33 class TTreeSRedirector;
37 class AliTPCclusterMI;
38 class AliTPCcalibTracksCuts;
39 class AliTPCCalPadRegion;
46 class AliTPCcalibTracks : public TNamed {
48 AliTPCcalibTracks(); // default constructor
49 AliTPCcalibTracks(const AliTPCcalibTracks&calibTracks); // copy constructor
50 AliTPCcalibTracks(const Text_t *name, const Text_t *title, AliTPCClusterParam *clusterParam, AliTPCcalibTracksCuts* cuts, Int_t logLevel = 0);
51 AliTPCcalibTracks & operator=(const AliTPCcalibTracks& calibTracks);
53 virtual ~AliTPCcalibTracks(); // destructor
55 static void AddInfo(TChain *chain, char *fileName); // add clusterParametrization as user info to the chain
56 void Process(AliTPCseed *track, AliESDtrack *esd); // to be called by the Selector
58 Int_t AcceptTrack(AliTPCseed * track);
59 void FillResolutionHistoLocal(AliTPCseed * track); // the MAIN-FUNCTION, called for each track to fill the histograms, called by Process(...)
60 static TH2D* MakeDiff(TH2D * hfit, TF2 * func);
62 Long64_t Merge(TCollection *li);
63 static AliTPCcalibTracks* TestMerge(AliTPCcalibTracks *ct, AliTPCClusterParam *clusterParam, Int_t nCalTracks = 50);
65 void SetStyle() const;
66 void Draw(Option_t* opt); // draw some exemplaric histograms for fast result-check
67 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
68 void MakeAmpPlots(Int_t stat, char* pathName = "plots");
69 void MakeDeltaPlots(char* pathName = "plots");
70 void MakeChargeVsDriftLengthPlotsOld(char* pathName = "plots");
71 void MakeChargeVsDriftLengthPlots(char* pathName = "plots");
72 void FitResolutionNew(char* pathName = "plots");
73 void FitRMSNew(char* pathName = "plots");
74 void MakeResPlotsQTree(Int_t minEntries = 100, char* pathName = "plots");
76 // void MakeResPlotsQTreeThread(Int_t minEntries = 100, char* pathName = "plots");
77 // static void* MakeResPlotsQTreeThreadFunction(void* arg);
80 TObjArray* GetfArrayAmpRow() {return fArrayAmpRow;}
81 TObjArray* GetfArrayAmp() {return fArrayAmp;}
82 TObjArray* GetfArrayQDY() {return fArrayQDY;}
83 TObjArray* GetfArrayQDZ() {return fArrayQDZ;}
84 TObjArray* GetfArrayQRMSY() {return fArrayQRMSY;}
85 TObjArray* GetfArrayQRMSZ() {return fArrayQRMSZ;}
86 TObjArray* GetfArrayChargeVsDriftlength() {return fArrayChargeVsDriftlength;}
87 TH1F* GetfDeltaY() {return fDeltaY;}
88 TH1F* GetfDeltaZ() {return fDeltaZ;}
89 TObjArray* GetfResolY() {return fResolY;}
90 TObjArray* GetfResolZ() {return fResolZ;}
91 TObjArray* GetfRMSY() {return fRMSY;}
92 TObjArray* GetfRMSZ() {return fRMSZ;}
93 TH1I* GetfHclus() {return fHclus;}
94 TH1I* GetfRejectedTracksHisto() {return fRejectedTracksHisto;}
95 TH1I* GetfHclusterPerPadrow() {return fHclusterPerPadrow;}
96 TH1I* GetfHclusterPerPadrowRaw() {return fHclusterPerPadrowRaw;}
97 TH2I* GetfClusterCutHisto() {return fClusterCutHisto;}
98 AliTPCCalPad* GetfCalPadClusterPerPad() {return fCalPadClusterPerPad; }
99 AliTPCCalPad* GetfCalPadClusterPerPadRaw() {return fCalPadClusterPerPadRaw;}
100 AliTPCCalPadRegion* GetCalPadRegionchargeVsDriftlength() {return fcalPadRegionChargeVsDriftlength;}
101 AliTPCcalibTracksCuts* GetCuts() {return fCuts;}
102 void SetLogLevel(Int_t level) {fDebugLevel = level;}
103 Int_t GetLogLevel() const {return fDebugLevel;}
106 ClassDef(AliTPCcalibTracks,1)
110 static Int_t GetBin(Float_t q, Int_t pad);
111 static Int_t GetBin(Int_t iq, Int_t pad);
112 static Float_t GetQ(Int_t bin);
113 static Float_t GetPad(Int_t bin);
114 void FillResolutionHistoLocalDebugPart(AliTPCseed *track, AliTPCclusterMI *cluster0, Int_t irow, Float_t angley, Float_t anglez, Int_t nclFound, Int_t kDelta);
115 AliTPCClusterParam *fClusterParam; //! pointer to cluster parameterization
116 TTreeSRedirector *fDebugStream; //! debug stream for
118 TObjArray *fArrayAmpRow; // array with amplitudes versus row for given sector
119 TObjArray *fArrayAmp; // array with amplitude for sectors
120 TObjArray *fArrayQDY; // q binned delta Y histograms
121 TObjArray *fArrayQDZ; // q binned delta Z histograms
122 TObjArray *fArrayQRMSY; // q binned delta Y histograms
123 TObjArray *fArrayQRMSZ; // q binned delta Z histograms
124 TObjArray *fArrayChargeVsDriftlength; // array of arrays of TProfiles with charge vs. driftlength for each padsize and sector
125 AliTPCCalPadRegion *fcalPadRegionChargeVsDriftlength; // CalPadRegion, one TProfile for charge vs. driftlength for each padsize and sector
126 TH1F *fDeltaY; // integrated delta y histo
127 TH1F *fDeltaZ; // integrated delta z histo
128 TObjArray *fResolY; // array of resolution histograms Y
129 TObjArray *fResolZ; // array of resolution histograms Z
130 TObjArray *fRMSY; // array of RMS histograms Y
131 TObjArray *fRMSZ; // array of RMS histograms Z
132 AliTPCcalibTracksCuts *fCuts; // object with cuts, that is passed to the constructor
133 TH1I *fHclus; // number of clusters per track
134 TH1I *fRejectedTracksHisto; // histogram of rejecteced tracks, the number coresponds to the failed cut
135 TH1I *fHclusterPerPadrow; // histogram showing the number of clusters per padRow
136 TH1I *fHclusterPerPadrowRaw;// histogram showing the number of clusters per padRow before cuts on clusters are applied
137 TH2I *fClusterCutHisto; // histogram showing in which padRow the clusters were cutted by which criterium
138 AliTPCCalPad *fCalPadClusterPerPad; // AliTPCCalPad showing the number of clusters per Pad
139 AliTPCCalPad *fCalPadClusterPerPadRaw; // AliTPCCalPad showing the number of clusters per Pad before cuts on clusters are applied
140 Int_t fDebugLevel; // log level - debug output: -1: silence, 0: default, 1: things like constructor called, 5: write fDebugStream, 6: waste your screen
141 TLinearFitter *fFitterLinY1; //!
142 TLinearFitter *fFitterLinZ1; //!
143 TLinearFitter *fFitterLinY2; //!
144 TLinearFitter *fFitterLinZ2; //!
145 TLinearFitter *fFitterParY; //!
146 TLinearFitter *fFitterParZ; //!