}
Bool_t AliTrackFitterRieman::Fit(const TArrayI *volIds,const TArrayI *volIdsFit,
- AliAlignObj::ELayerID layerRangeMin,
- AliAlignObj::ELayerID layerRangeMax)
+ AliGeomManager::ELayerID layerRangeMin,
+ AliGeomManager::ELayerID layerRangeMax)
{
// Fit the track points. The method takes as an input
// the set of id's (volids) of the volumes in which
// found using the covariance matrix of the point
// (assuming sigma(x)=0 at the reference coordinate system.
Int_t debugLevel = AliLog::GetDebugLevel("","AliTrackFitterRieman");
- Float_t debugRatio = 1./(1.+debugLevel);
+
+ // Float_t debugRatio = 1./(1.+debugLevel);
+ Float_t debugRatio = debugLevel? 1.0/debugLevel : 1.0;
- const Int_t kMinPoints =1;
Int_t npoints = fPoints->GetNPoints();
if ( npoints<fMinNPoints) return kFALSE;
//
// fast count points
- Int_t countFit = 0;
- for (Int_t ifit=0; ifit<volIdsFit->GetSize(); ifit++){
- Int_t volIdFit = volIdsFit->At(ifit);
- for (Int_t ipoint = 0; ipoint < npoints; ipoint++)
- if (volIdFit==fPoints->GetVolumeID()[ipoint]) countFit++;
- }
- if (countFit<fMinNPoints) return kFALSE;
- //
- Int_t countPoint = 0;
- for (Int_t jpoint=0; jpoint<volIds->GetSize(); jpoint++){
- Int_t volIdPoint = volIds->At(jpoint);
- for (Int_t ipoint = 0; ipoint < npoints; ipoint++)
- if (volIdPoint==fPoints->GetVolumeID()[ipoint]) countPoint++;
+ if (volIdsFit != 0x0) {
+ Int_t countFit = 0;
+ Int_t countPoint = 0;
+ for (Int_t ipoint = 0; ipoint < npoints; ipoint++) {
+ if (FindVolId(volIds,fPoints->GetVolumeID()[ipoint]))
+ countPoint++;
+ if (volIdsFit != 0x0) {
+ if (FindVolId(volIdsFit,fPoints->GetVolumeID()[ipoint]))
+ countFit++;
+ }
+ }
+ if (countPoint==0) return kFALSE;
+ if ((countFit<fMinNPoints) && (volIdsFit != 0x0)) return kFALSE;
}
- if (countPoint<kMinPoints) return kFALSE;
- //
//
Reset();
if (!FindVolId(volIdsFit,iVolId)) continue;
}
else {
- if (iVolId < AliAlignObj::LayerToVolUID(layerRangeMin,0) ||
- iVolId > AliAlignObj::LayerToVolUID(layerRangeMax,
- AliAlignObj::LayerSize(layerRangeMax))) continue;
+ if (iVolId < AliGeomManager::LayerToVolUID(layerRangeMin,0) ||
+ iVolId > AliGeomManager::LayerToVolUID(layerRangeMax,
+ AliGeomManager::LayerSize(layerRangeMax))) continue;
}
if (!isAlphaCalc) {
fAlpha = p.GetAngle();
fPTrack->GetPoint(pFit,ipoint);
pFitlocal= pFit.Rotate(lAngle);
//
- Float_t xyz[3], cov[3];
+ Float_t xyz[3], cov[6];
xyz[0] = pFitlocal.GetX();
xyz[1] = pFitlocal.GetY();
xyz[2] = pFitlocal.GetZ();
Int_t nVolFit = volIdsFit->GetSize();
Int_t volId = volIds->At(0);
Int_t modId =0;
- Int_t layer = AliAlignObj::VolUIDToLayer(volId,modId);
+ Int_t layer = AliGeomManager::VolUIDToLayer(volId,modId);
Int_t volIdFit = volIdsFit->At(0);
Int_t modIdFit =0;
- Int_t layerFit = AliAlignObj::VolUIDToLayer(volIdFit,modIdFit);
+ Int_t layerFit = AliGeomManager::VolUIDToLayer(volIdFit,modIdFit);
(*fDebugStream)<<"Fit"<<
"VolId="<<volId<< // volume ID
-void AliTrackFitterRieman::Update(){
+Bool_t AliTrackFitterRieman::Update(){
//
//
//
}
fCorrY[3]=fitY.GetChisquare()/Float_t(fRieman->GetN()-3);
fCorrZ[3]=fitZ.GetChisquare()/Float_t(fRieman->GetN()-3);
+
+ return kTRUE;
}
if (AliLog::GetDebugLevel("","AliTrackFitterRieman")>0 && gRandom->Rndm()<debugRatio){
AliTrackPoint lp0(p);
AliTrackPoint lp2(p2);
+ AliTrackPoint localp0(p);
+ AliTrackPoint localp2(p2);
+ Float_t lAngle = lp0.GetAngle();
+ localp0 = localp0.Rotate(lAngle);
+ localp2 = localp2.Rotate(lAngle);
+
(*fDebugStream)<<"PCA"<<
- "P0.="<<&lp0<<
+ "P0.="<<&lp0<< //global position
"P2.="<<&lp2<<
+ "LP0.="<<&localp0<< //local position
+ "LP2.="<<&localp2<<
"\n";
}
return kTRUE;
}
return TMath::Sqrt(error+correction);
}
-