fkESDInterface(0x0),
fGeometryTransformer(0x0),
fClusterServer(0x0),
- fTracker(0x0)
+ fTracker(0x0),
+ nextClusterIndex(0)
{
/// Default constructor
CreateGeometryTransformer();
CreateClusterServer(*fGeometryTransformer);
- if (fClusterServer) fTracker = AliMUONTracker::CreateTrackReconstructor(recoParam,fClusterServer);
+ if (fClusterServer) fTracker = AliMUONTracker::CreateTrackReconstructor(recoParam,fClusterServer,fGeometryTransformer);
if (!fClusterServer || !fTracker) {
AliFatal("refitter initialization failed");
exit(-1);
fClusterServer->UseDigits(next,fkESDInterface->GetDigits());
fClusterServer->Clusterize(cluster->GetChamberId(),*clusterStore,AliMpArea(),fkRecoParam);
+ // set the uniqueID of the new clusters
+ TIter nextCl(clusterStore->CreateIterator());
+ AliMUONVCluster* newCluster = 0x0;
+ while ((newCluster = static_cast<AliMUONVCluster*>(nextCl())))
+ newCluster->SetUniqueID(AliMUONVCluster::BuildUniqueID(cluster->GetChamberId(), cluster->GetDetElemId(), nextClusterIndex++));
+
return clusterStore;
}
fClusterServer->UseDigits(next,fkESDInterface->GetDigits());
fClusterServer->Clusterize(cluster->GetChamberId(),*clusterStore,AliMpArea(),fkRecoParam);
+ // set the uniqueID of the new clusters
+ TIter nextCl(clusterStore->CreateIterator());
+ AliMUONVCluster* newCluster = 0x0;
+ while ((newCluster = static_cast<AliMUONVCluster*>(nextCl())))
+ newCluster->SetUniqueID(AliMUONVCluster::BuildUniqueID(cluster->GetChamberId(), cluster->GetDetElemId(), nextClusterIndex++));
+
return clusterStore;
}
// check if digits exist
UInt_t trackId = track.GetUniqueID();
- if (fkESDInterface->GetNDigits(trackId) == 0) {
+ if (!fkESDInterface->DigitsStored(trackId)) {
AliError(Form("no digit attached to track #%d",trackId));
return 0x0;
}
continue;
}
+ // set the uniqueID of the new clusters
+ TIter nextCl(newClusterStore->CreateIterator());
+ AliMUONVCluster* newCluster = 0x0;
+ while ((newCluster = static_cast<AliMUONVCluster*>(nextCl())))
+ newCluster->SetUniqueID(AliMUONVCluster::BuildUniqueID(cluster->GetChamberId(), cluster->GetDetElemId(), nextClusterIndex++));
+
// add the new cluster(s) to the tracks
if (!AddClusterToTracks(*newClusterStore, *newTrackStore)) {
delete newClusterStore;
// refit the track
if (!fTracker->RefitTrack(*currentTrack)) continue;
- // find best track (the one with the higher number of cluster or the best chi2 in case of equality)
+ // check the status of the improvement if enabled
+ if (fkRecoParam->ImproveTracks() && !currentTrack->IsImproved()) continue;
+
+ // find best track (the one with the highest number of cluster or the best chi2 in case of equality)
currentNCluster = currentTrack->GetNClusters();
currentChi2 = currentTrack->GetGlobalChi2();
if (currentNCluster > bestNClusters || (currentNCluster == bestNClusters && currentChi2 < bestChi2)) {