From: mivanov Date: Tue, 10 Dec 2013 21:37:32 +0000 (+0100) Subject: Calib/AliTPCPreprocessorOffline.cxx - Normalize graphs to mean + export robust... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=2f3c5f0939efa5c712735e56157fbb06508a7e1c Calib/AliTPCPreprocessorOffline.cxx - Normalize graphs to mean + export robust pol2 fits Rec/AliTPCseed.cxx - Use robust pol2 fits --- diff --git a/TPC/Calib/AliTPCPreprocessorOffline.cxx b/TPC/Calib/AliTPCPreprocessorOffline.cxx index bab7e45594f..4c953d2d85e 100644 --- a/TPC/Calib/AliTPCPreprocessorOffline.cxx +++ b/TPC/Calib/AliTPCPreprocessorOffline.cxx @@ -41,7 +41,7 @@ AliTPCPreprocessorOffline proces; proces.CalibTimeGain("TPCMultObjects.root",114000,140040,0); TFile oo("OCDB/TPC/Calib/TimeGain/Run114000_121040_v0_s0.root") - TObjArray * arr = AliCDBEntry->GetObject() + TObjArray * arr = AliCDBEntry->GetObject() arr->At(4)->Draw("alp") */ @@ -1183,6 +1183,8 @@ Bool_t AliTPCPreprocessorOffline::AnalyzeGainDipAngle(Int_t padRegion) { histQtot->FitSlicesY(0,0,-1,0,"QNR",&arrTot); TH1D * corrMax = (TH1D*)arrMax.At(1); TH1D * corrTot = (TH1D*)arrTot.At(1); + corrMax->Scale(1./histQmax->GetMean(2)); + corrTot->Scale(1./histQtot->GetMean(2)); // const char* names[3]={"SHORT","MEDIUM","LONG"}; // @@ -1197,6 +1199,19 @@ Bool_t AliTPCPreprocessorOffline::AnalyzeGainDipAngle(Int_t padRegion) { fGainArray->AddLast(graphMax); fGainArray->AddLast(graphTot); // + TF1 * funMax= new TF1("","1++abs(x)++abs(x*x)"); + TF1 * funTot= new TF1("","1++abs(x)++abs(x*x)"); + graphMax->Fit(funMax,"w","rob=0.9",-0.8,0.8); + graphTot->Fit(funTot,"w","rob=0.9",-0.8,0.8); + funMax->SetNameTitle(Form("TF1_QMAX_DIPANGLE_%s_BEAM_ALL",names[padRegion]), + Form("TF1_QMAX_DIPANGLE_%s_BEAM_ALL",names[padRegion])); + funTot->SetNameTitle(Form("TF1_QTOT_DIPANGLE_%s_BEAM_ALL",names[padRegion]), + Form("TF1_QTOT_DIPANGLE_%s_BEAM_ALL",names[padRegion])); + + // + fGainArray->AddLast(funMax); + fGainArray->AddLast(funTot); + // return kTRUE; } diff --git a/TPC/Rec/AliTPCseed.cxx b/TPC/Rec/AliTPCseed.cxx index c26561b9bd5..39843643ed7 100644 --- a/TPC/Rec/AliTPCseed.cxx +++ b/TPC/Rec/AliTPCseed.cxx @@ -1211,6 +1211,7 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I TGraphErrors * grPadEqual = 0x0; TGraphErrors* grChamberGain[3]={0x0,0x0,0x0}; TGraphErrors* grDipAngle[3]={0x0,0x0,0x0}; + TGraphErrors* funDipAngle[3]={0x0,0x0,0x0}; // // if (recoParam->GetNeighborRowsDedx() == 0) rowThres = 0; @@ -1237,6 +1238,8 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I grChamberGain[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_MEAN_CHAMBERGAIN_%s_BEAM_ALL",names[iPadRegion])); if (type==1) grDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_QMAX_DIPANGLE_%s_BEAM_ALL",names[iPadRegion])); if (type==0) grDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TGRAPHERRORS_QTOT_DIPANGLE_%s_BEAM_ALL",names[iPadRegion])); + if (type==1) funDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TF1_QMAX_DIPANGLE_%s_BEAM_ALL",names[iPadRegion])); + if (type==0) funDipAngle[iPadRegion]=(TGraphErrors*)timeGainSplines->FindObject(Form("TF1_QTOT_DIPANGLE_%s_BEAM_ALL",names[iPadRegion])); } } } @@ -1345,7 +1348,8 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I // dip angle correction // Float_t corrDipAngle = 1; - if (grDipAngle[ipad]) corrDipAngle = grDipAngle[ipad]->Eval(GetTgl()); + // if (grDipAngle[ipad]) corrDipAngle = grDipAngle[ipad]->Eval(GetTgl()); + if (funDipAngle[ipad]) corrDipAngle = funDipAngle[ipad]->Eval(GetTgl()); // // pressure temperature and high voltage correction //