X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCcalibDB.cxx;h=37f96be3ac02f00588794810b4cb6b4057e22f91;hb=9fb81082df5f2a9f648453d386e36c7b151f8249;hp=c1d95fcba7953ae138df734f7515a3ad4317454f;hpb=0b736a46b43b45235fd860316ac9f51c061c2a83;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCcalibDB.cxx b/TPC/AliTPCcalibDB.cxx index c1d95fcba79..37f96be3ac0 100644 --- a/TPC/AliTPCcalibDB.cxx +++ b/TPC/AliTPCcalibDB.cxx @@ -243,7 +243,7 @@ AliTPCcalibDB::AliTPCcalibDB(const AliTPCcalibDB& ): fVoltageArray(0), fTemperatureArray(0), //! array of temperature sensors - per run - Just for calibration studies fVdriftArray(0), //! array of v drift interfaces - fDriftCorrectionArray(0), //! array of v drift interfaces + fDriftCorrectionArray(0), //! array of v drift corrections fRunList(0), //! run list - indicates try to get the run param fDButil(0), fCTPTimeParams(0) @@ -323,6 +323,7 @@ void AliTPCcalibDB::Update(){ AliCDBManager::Instance()->SetCacheFlag(kTRUE); // activate CDB cache fDButil = new AliTPCcalibDButil; // + entry = GetCDBEntry("TPC/Calib/PadGainFactor"); if (entry){ //if (fPadGainFactor) delete fPadGainFactor; @@ -1002,12 +1003,15 @@ void AliTPCcalibDB::UpdateRunInformations( Int_t run, Bool_t force){ fDButil->FilterSensor(press,kMinP,kMaxP,kMaxdP,kSigmaCut); if (press->GetFit()==0) accept=kFALSE; } + if (press && temp &&accept){ AliTPCCalibVdrift * vdrift = new AliTPCCalibVdrift(temp, press,0); fVdriftArray.AddAt(vdrift,run); } + fDButil->FilterCE(120., 3., 4.,0); fDButil->FilterTracks(run, 10.,0); + } @@ -1311,9 +1315,9 @@ Float_t AliTPCcalibDB::GetDCSSensorMeanValue(AliDCSSensorArray *arr, const char } } if (sigDigits>=0){ - val/=10; + // val/=10; val=(Float_t)TMath::Floor(val * TMath::Power(10., sigDigits) + .5) / TMath::Power(10., sigDigits); - val*=10; + // val*=10; } return val; } @@ -1697,7 +1701,7 @@ Bool_t AliTPCcalibDB::CreateGUITree(const char* filename){ // TString file(filename); - if (file.IsNull()) file=Form("guiTreeRun_%d.root",fRun); + if (file.IsNull()) file=Form("guiTreeRun_%lld.root",fRun); prep.DumpToFile(file.Data()); return kTRUE; } @@ -1777,6 +1781,9 @@ Double_t AliTPCcalibDB::GetVDriftCorrectionTime(Int_t timeStamp, Int_t run, Int_ if (mode==1) { const Double_t kEpsilon=0.00000000001; const Double_t kdeltaT=360.; // 10 minutes + if(TMath::Abs(deltaITS) < 12*kdeltaT) { + result = driftITS; + } else { wITS = 64.*kdeltaT/(deltaITS +kdeltaT); wLT = 16.*kdeltaT/(deltaLT +kdeltaT); wP = 0. *kdeltaT/(deltaP +kdeltaT); @@ -1789,6 +1796,9 @@ Double_t AliTPCcalibDB::GetVDriftCorrectionTime(Int_t timeStamp, Int_t run, Int_ if (TMath::Abs(driftCE)GetTimeVdriftSplineRun(run); if (!array) return 0; + Double_t result=0; + + // use TPC-ITS if present + TGraphErrors *gr= (TGraphErrors*)array->FindObject("ALIGN_ITSB_TPC_VDGY"); + if(gr) { + result = AliTPCcalibDButil::EvalGraphConst(gr,timeStamp); + + // transform from [(cm/mus)/ m] to [1/cm] + result /= (fParam->GetDriftV()/1000000.); + result /= 100.; + + //printf("result %e \n", result); + return result; + } + + // use laser if ITS-TPC not present TGraphErrors *laserA= (TGraphErrors*)array->FindObject("GRAPH_MEAN_GLOBALYGRADIENT_LASER_ALL_A"); TGraphErrors *laserC= (TGraphErrors*)array->FindObject("GRAPH_MEAN_GLOBALYGRADIENT_LASER_ALL_C"); - Double_t result=0; if (laserA && laserC){ result= (laserA->Eval(timeStamp)+laserC->Eval(timeStamp))*0.5; } @@ -1855,6 +1880,8 @@ Double_t AliTPCcalibDB::GetVDriftCorrectionGy(Int_t timeStamp, Int_t run, Int_t if (laserC &&side==1){ result = (laserC->Eval(timeStamp)); } + //printf("laser result %e \n", -result/250.); + return -result/250.; //normalized before }