32 TCanvas *
test3 =
new TCanvas(
"ASIDE3",
"Aoriginal");
34 TCanvas *
test4 =
new TCanvas(
"CSIDE4",
"Coriginal");
36 TH1F * hDEBUG =
new TH1F(
"bla",
"fitRMS/fitMean",100,0,0.3);
38 const Double_t kryptonMean = 0.05012;
39 const Double_t kryptonSigma = 0.00386;
46 for(Int_t isector=0; isector < 72; isector++){
59 for(Int_t iChannel=0; iChannel < rocOutlier->
GetNchannels(); iChannel++){
60 Double_t fitMean = rocKrypFitMean->
GetValue(iChannel);
61 Double_t fitRMS = rocKrypFitRMS->
GetValue(iChannel);
62 if (fitRMS < 0.001 || fitMean < 0.001)
continue;
63 hDEBUG->Fill(fitRMS/fitMean);
64 if (TMath::Abs(fitRMS/fitMean - kryptonMean) < 4*kryptonSigma || fitRMS < 0.001 || fitMean < 0.001) {
72 Double_t rocMedian = rocKrypFitMean->
GetMedian(rocOutlier);
80 rocKrypFitMean->
GlobalFit(rocOutlier,0,params,cov,chi2);
83 if (nPointsFit != 0) cout <<
"sector: "<< isector <<
" chi2: " << chi2/nPointsFit <<
" median: "<< rocMedian <<
" n: " << nPointsFit << endl;
84 if (nPointsFit == 0) {
86 arrayRocFinal.AddAt(rocFinal,isector);
96 if (chi2/nPointsFit > 5) {
98 if (rocMedian == 0 && isector == 51) rocMedian = 1075;
99 for(Int_t iChannel=0; iChannel < rocFinal->
GetNchannels(); iChannel++) rocFinal->
SetValue(iChannel,rocMedian);
100 arrayRocFinal.AddAt(rocFinal,isector);
107 for(Int_t iChannel=0; iChannel < rocFinal->
GetNchannels(); iChannel++){
108 Double_t fitMean = rocKrypFitMean->
GetValue(iChannel);
109 Double_t fitRMS = rocKrypFitRMS->
GetValue(iChannel);
110 if (fitRMS < 0.001 || fitMean < 0.001 || TMath::Abs(rocParabolicFit->
GetValue(iChannel)/fitMean - 1) > 0.35) {
114 if (TMath::Abs(fitRMS/fitMean - kryptonMean) < 4*kryptonSigma) {
122 const Double_t noiseMin = 0.01;
123 const Double_t noiseMax = 2;
127 for(Int_t iChannel=0; iChannel < rocFinal->
GetNchannels(); iChannel++){
128 Double_t noise = rocNoise->
GetValue(iChannel);
129 if (noise < noiseMin || noise > noiseMax) rocFinal->
SetValue(iChannel, 0);
134 arrayRocFinal.AddAt(rocFinal,isector);
142 Double_t meanMedianIROC;
143 Double_t meanMedianOROC;
146 for(Int_t isector=0; isector < 36; isector++){
153 meanMedianIROC = meanMedianIROC/n;
156 for(Int_t isector=36; isector < 72; isector++){
163 meanMedianOROC = meanMedianOROC/n;
165 for(Int_t isector=0; isector < 72; isector++){
167 if (isector<36) rocFinal->
Multiply(1./meanMedianIROC);
168 if (isector>35) rocFinal->
Multiply(1./meanMedianOROC);
172 TCanvas *
test =
new TCanvas(
"ASIDE",
"A");
173 final->MakeHisto2D()->Draw(
"colz");
174 TCanvas *
test2 =
new TCanvas(
"CSIDE",
"C");
175 final->MakeHisto2D(1)->Draw(
"colz");
176 TCanvas *cDEBUG =
new TCanvas();
180 final->SetName(
"GainMap");
187 void MakeCalibTree(
char * inputKr=
"calibKr.root",
char * inputCE =
"fitCE.root",
char * inputPulser=0){
230 tree->SetAlias(
"krAccept0",
"abs(fitRMS.fElements/fitMean.fElements-0.06)<0.04");
231 tree->SetAlias(
"krAccept1",
"abs(fitRMS.fElements)>30");
232 tree->SetAlias(
"yedge",
"tan(10*pi/180.)*lx.fElements");
233 tree->SetAlias(
"ceAccept1",
"abs(qIn.fElements/qIn_Median.fElements-1.5)<1.4&&qIn.fElements>3&&qIn_Median.fElements>3");
238 TF1 f1(
"f1",
"[0]*exp(-[1]*x)+[2]");
239 f1.SetParameters(1,1,0.2);
240 tree->Draw(
"1-qIn.fElements/qF1.fElements:yedge-abs(ly.fElements)>>his(50,1.5,5,100,-0.5,1.5)",
"ceAccept1&§or>36");
AliTPCCalROC * GetCalROC(Int_t sector) const
AliTPCCalPad * CreateGainMap(AliTPCCalPad *krypFitMean, AliTPCCalPad *krypFitRMS, AliTPCCalPad *noiseMap=0, AliTPCCalPad *krypSpectrMean=0, AliTPCCalPad *krypChi2=0, AliTPCCalPad *pulser=0, AliTPCCalPad *electrode=0)
AliTPCCalibViewerGUI * viewer
Double_t GetMedian(AliTPCCalROC *const outlierROC=0, EPadType padType=kAll) const
GUI for the AliTPCCalibViewer used for the calibration monitor All functionalities of the AliTPCCalib...
Float_t GetValue(UInt_t row, UInt_t pad) const
void Multiply(Float_t c1)
void GlobalFit(const AliTPCCalROC *ROCoutliers, Bool_t robust, TVectorD &fitParam, TMatrixD &covMatrix, Float_t &chi2, Int_t fitType=1, Double_t chi2Threshold=5, Double_t robustFraction=0.7, Double_t err=1, EPadType padType=kAll)
AliTPCCalibViewer * GetViewer()
AliTPCCalibViewer * makePad
void MakeCalibTree(char *inputKr="calibKr.root", char *inputCE="fitCE.root", char *inputPulser=0)
void SetValue(UInt_t row, UInt_t pad, Float_t vd)
TPC calibration base class for one ROC.
TH2F * MakeHisto2D(Int_t side=0)
static TObjArray * ShowGUI(const char *fileName=0)
UInt_t GetNchannels() const
void DumpToFile(const char *fileName)
Preprocessor class for HLT and DAQ.
class TVectorT< Double_t > TVectorD
void AddComponent(TObject *obj)
static AliTPCCalROC * CreateGlobalFitCalROC(TVectorD &fitParam, Int_t sector, EPadType padType=kAll, AliTPCCalROC *oldTPCCalROC=0)
class TMatrixT< Double_t > TMatrixD