X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=ITS%2FAliITSAlignMille2.cxx;h=2fe25dd95944b76572981525188346226c61c0b1;hp=a9bfb90797c5ab65febedebc2ff927038df97224;hb=b28b535651883d36aeb0d7e14a5262e0a191772a;hpb=c82cdb653e231c6acbb8a9a778ef0590423db98a diff --git a/ITS/AliITSAlignMille2.cxx b/ITS/AliITSAlignMille2.cxx index a9bfb90797c..2fe25dd9594 100644 --- a/ITS/AliITSAlignMille2.cxx +++ b/ITS/AliITSAlignMille2.cxx @@ -211,6 +211,8 @@ AliITSAlignMille2::AliITSAlignMille2(const Char_t *configFilename,TList *userInf fDiamondPointID(-1), fDiamondModID(-1), fCheckDiamondPoint(kDiamondCheckIfPrompt), + fFixCurvIfConstraned(kTRUE), + fCurvFitWasConstrained(kFALSE), fConvAlgMatOld(100) { /// main constructor that takes input from configuration file @@ -321,6 +323,7 @@ TObjArray* AliITSAlignMille2::GetConfigRecord(FILE* stream, TString& recTitle, T //________________________________________________________________________________________________________ Int_t AliITSAlignMille2::CheckConfigRecords(FILE* stream) { + // check the correctness of the record TString record,recTitle; int lineCnt = 0; rewind(stream); @@ -2447,6 +2450,7 @@ Int_t AliITSAlignMille2::ProcessTrack(const AliTrackPointArray *track, Double_t // finally send local equations to millepede SetLocalEquations(md,nloceq); fMillepede->SaveRecordData(); // RRR + fCurvFitWasConstrained = kFALSE; // restore default // return 0; } @@ -2557,7 +2561,7 @@ Int_t AliITSAlignMille2::FitTrack() } //________________________________________________________________________________________________________ -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)) @@ -2955,6 +2959,9 @@ Int_t AliITSAlignMille2::AddLocalEquationTPA(Mille2Data &m) TGeoHMatrix *tempHMat = GetSensorCurrMatrixSID(fCurrentSensID);// fCurrentModule->GetSensitiveVolumeMatrix(fCluster.GetVolumeID()); // fTPAFitter->GetDResDParams(&fDerivativeLoc[0][0], curpoint); // resid. derivatives over the track parameters + if (fCurvFitWasConstrained && fFixCurvIfConstraned && !IsZero(fBField)) + for (int i=3;i--;) fDerivativeLoc[AliITSTPArrayFit::kR0][i] = 0; //Fix curvarute + // for (Int_t i=fNLocal; i--;) tempHMat->MasterToLocalVect(fDerivativeLoc[i],m.fDerLoc[i]); // int status = 0; @@ -3111,6 +3118,12 @@ void AliITSAlignMille2::SetLocalEquations(const Mille2Data *marr, Int_t neq) /// Set local equations with data stored in m /// return 0 if success // + Bool_t locPatt[kNLocal] = {0}; // pattern of lacal eq's to account + for (int i=fNLocal; i--;) { + if (locPatt[i]) continue; // already set + for (Int_t j=0; jGetSymName(),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 @@ -3852,7 +3865,7 @@ Bool_t AliITSAlignMille2::FixedOrphans() const } //________________________________________________________________________________________________________ -void AliITSAlignMille2::ConvertParamsToGlobal() +void AliITSAlignMille2::ConvertParamsToGlobal() const { // convert params in local frame to global one double pars[AliITSAlignMille2Module::kMaxParGeom]; @@ -3866,7 +3879,7 @@ void AliITSAlignMille2::ConvertParamsToGlobal() } //________________________________________________________________________________________________________ -void AliITSAlignMille2::ConvertParamsToLocal() +void AliITSAlignMille2::ConvertParamsToLocal() const { // convert params in global frame to local one double pars[AliITSAlignMille2Module::kMaxParGeom]; @@ -3968,7 +3981,7 @@ Int_t AliITSAlignMille2::ProcessUserInfo(TList* userInfo) } //________________________________________________________________________________________________________ -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); @@ -4325,6 +4338,7 @@ void AliITSAlignMille2::ConstrainHelixFitPT(Int_t q,Double_t pt,Double_t pterr) fConstrCharge = q==0 ? q:TMath::Sign(1,q); fConstrPT = pt; fConstrPTErr = pterr; + fCurvFitWasConstrained = kTRUE; } //________________________________________________________________________________________________________ @@ -4338,10 +4352,12 @@ void AliITSAlignMille2::ConstrainHelixFitCurv(Int_t q,Double_t crv,Double_t crve if (crv<0 || IsZero(crv)) { fConstrPT = -1; fConstrPTErr = -1; + fCurvFitWasConstrained = kFALSE; } else { fConstrPT = TMath::Abs(1./crv*fBField*kCQConv); fConstrPTErr = crverr>1e-10 ? TMath::Abs(fConstrPT/crv*crverr) : 0.; + fCurvFitWasConstrained = kTRUE; } } @@ -4715,7 +4731,7 @@ void AliITSAlignMille2::ProcessSDDPointInfo(const AliTrackPoint* pnt,Int_t sID, 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;