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)
AliCDBManager::Instance()->SetCacheFlag(kTRUE); // activate CDB cache
fDButil = new AliTPCcalibDButil;
//
+
entry = GetCDBEntry("TPC/Calib/PadGainFactor");
if (entry){
//if (fPadGainFactor) delete fPadGainFactor;
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);
+
}
}
}
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;
}
//
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;
}
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);
if (TMath::Abs(driftCE)<kEpsilon) wCE=0; // invalid calibration
if (wP+wITS+wLT+wCE<kEpsilon) return 0;
result = (driftP*wP+driftITS*wITS+driftLT*wLT+driftCE*wCE)/(wP+wITS+wLT+wCE);
+ }
+
+
}
return result;
//
// Get global y correction drift velocity correction factor
// additive factor vd = vdnom*(1+GetVDriftCorrectionGy *gy)
- // Value etracted combining the vdrift correction using laser tracks and CE
+ // Value etracted combining the vdrift correction using laser tracks and CE or TPC-ITS
// Arguments:
- // mode determines the algorith how to combine the Laser Track, LaserCE
+ // mode determines the algorith how to combine the Laser Track, LaserCE or TPC-ITS
// timestamp - timestamp
// run - run number
// side - the drift velocity gy correction per side (CE and Laser tracks)
UpdateRunInformations(run,kFALSE);
TObjArray *array =AliTPCcalibDB::Instance()->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;
}
if (laserC &&side==1){
result = (laserC->Eval(timeStamp));
}
+ //printf("laser result %e \n", -result/250.);
+
return -result/250.; //normalized before
}