//________________________________________________________________________________________________________
Int_t AliITSAlignMille2::CheckConfigRecords(FILE* stream)
{
+ // check the correctness of the record
TString record,recTitle;
int lineCnt = 0;
rewind(stream);
}
//________________________________________________________________________________________________________
-Int_t AliITSAlignMille2::CalcIntersectionPoint(Double_t *lpar, Double_t *gpar)
+Int_t AliITSAlignMille2::CalcIntersectionPoint(const Double_t *lpar, const Double_t *gpar)
{
/// calculate track intersection point in local coordinates
/// according with a given set of parameters (local(4) and global(6))
strncpy(st,a->GetSymName(),TMath::Min(sizeof(st),strlen(a->GetSymName())+1));
a->GetMatrix(m);
//
- symname[0] = '\0';
+ memset(symname,0,250*sizeof(char));
sscanf(st,"%249s",symname);
//
// decode module list
}
//________________________________________________________________________________________________________
-void AliITSAlignMille2::ConvertParamsToGlobal()
+void AliITSAlignMille2::ConvertParamsToGlobal() const
{
// convert params in local frame to global one
double pars[AliITSAlignMille2Module::kMaxParGeom];
}
//________________________________________________________________________________________________________
-void AliITSAlignMille2::ConvertParamsToLocal()
+void AliITSAlignMille2::ConvertParamsToLocal() const
{
// convert params in global frame to local one
double pars[AliITSAlignMille2Module::kMaxParGeom];
}
//________________________________________________________________________________________________________
-Int_t AliITSAlignMille2::GetPathFromUserInfo(TList* cdbList,const char* calib,TString& path, Int_t useBit)
+Int_t AliITSAlignMille2::GetPathFromUserInfo(const TList* cdbList,const char* calib,TString& path, Int_t useBit)
{
// extract the path for specific CDB path from user info. If it is the same as already loaded, set corresponing bit
TIter itList(cdbList);
return 0;
}
+//________________________________________________________________________________________________________
+Int_t AliITSAlignMille2::LoadPreSDDCalib()
+{
+ // Load SDD correction map for prealignment from current CDB
+ //
+ AliInfo(Form("Loading SDD Calibration set for run %d",fRunID));
+ AliCDBManager* man = AliCDBManager::Instance();
+ man->SetRun(fRunID);
+ AliCDBEntry *entry = man->Get("ITS/Calib/MapsTimeSDD");
+ delete fPreCorrMapSDD;
+ TObjArray* arr = (TObjArray*) entry->GetObject();
+ entry->SetObject(NULL);
+ entry->SetOwner(kTRUE);
+ arr->SetOwner(kTRUE);
+ fPreCorrMapSDD = new AliITSCorrectSDDPoints(arr);
+ //
+ entry = man->Get("ITS/Calib/RespSDD");
+ delete fPreRespSDD;
+ fPreRespSDD = (AliITSresponseSDD*) entry->GetObject();
+ entry->SetObject(NULL);
+ entry->SetOwner(kTRUE);
+ //
+ entry = man->Get("ITS/Calib/DriftSpeedSDD");
+ delete fPreVDriftSDD;
+ fPreVDriftSDD = (TObjArray*) entry->GetObject();
+ entry->SetObject(NULL);
+ entry->SetOwner(kTRUE);
+ delete entry;
+ //
+ return 0;
+}
+
//________________________________________________________________________________________________________
Int_t AliITSAlignMille2::LoadDiamond(TString& path)
{
// build arrays for the fast access to sensor original matrices (used for production)
//
TGeoHMatrix mdel;
- AliInfo("Building sensors original matrices cache");
+ AliInfo(Form("Building sensors original matrices cache. InitDeltaPath: %s",fIniDeltaPath.Data()));
//
/*if (fIniGeomPath!=fGeometryPath)*/ if (LoadGeometry(fIniGeomPath)) {AliInfo("Failed to re-load ideal geometry");exit(1);}
//
// Load the initial calib parameters (geometry, SDD response...)
// Can be used if set of data was processed with different calibration
//
+ AliInfo(Form("SameInitDelta: %d | SameInitGeom: %d",TestBit(kSameInitDeltasBit), TestBit(kSameInitGeomBit)));
// 1st cache original matrices
if (!(TestBit(kSameInitDeltasBit) && TestBit(kSameInitGeomBit))) { // need to reload geometry
//
else vdrift += corr*1e-4;
//
// if IniRespSDD was used, it should be subtracted back, since it is accounted in the PreResp
- if (fIniVDriftSDD&&fIniRespSDD) {
+ if (fIniVDriftSDD&&fIniRespSDD && (fPreVDriftSDD==0)) {
double corr1 = fIniRespSDD->GetDeltaVDrift(sID, sddSide);
if (fIniRespSDD->IsVDCorrMult()) vdrift *= (1-corr1);
else vdrift -= corr1*1e-4;
}
return delta;
}
-