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