#include "AliMUONConstants.h"
#include "AliMUONVCluster.h"
+#include "AliMUONVClusterServer.h"
#include "AliMUONVClusterStore.h"
#include "AliMUONTrack.h"
#include "AliMUONTrackParam.h"
#include "AliMUONTrackExtrap.h"
+#include "AliMpArea.h"
+
#include "AliLog.h"
#include <Riostream.h>
/// \endcond
//__________________________________________________________________________
-AliMUONTrackReconstructorK::AliMUONTrackReconstructorK()
- : AliMUONVTrackReconstructor()
+AliMUONTrackReconstructorK::AliMUONTrackReconstructorK(AliMUONVClusterServer& clusterServer)
+ : AliMUONVTrackReconstructor(clusterServer)
{
/// Constructor
}
}
//__________________________________________________________________________
-void AliMUONTrackReconstructorK::MakeTrackCandidates(const AliMUONVClusterStore& clusterStore)
+void AliMUONTrackReconstructorK::MakeTrackCandidates(AliMUONVClusterStore& clusterStore)
{
/// To make track candidates (assuming linear propagation if the flag fgkMakeTrackCandidatesFast is set to kTRUE):
/// Start with segments station(1..) 4 or 5 then follow track in station 5 or 4.
AliDebug(1,"Enter MakeTrackCandidates");
+ // Unless we're doing combined tracking, we'll clusterize all stations at once
+ Int_t firstChamber(0);
+ Int_t lastChamber(9);
+
+ if (AliMUONReconstructor::GetRecoParam()->CombineClusterTrackReco()) {
+ // ... Here's the exception : ask the clustering to reconstruct
+ // clusters *only* in station 4 and 5 for combined tracking
+ firstChamber = 6;
+ }
+
+ for (Int_t i = firstChamber; i <= lastChamber; ++i )
+ {
+ fClusterServer.Clusterize(i, clusterStore, AliMpArea());
+ }
+
// Loop over stations(1..) 5 and 4 and make track candidates
for (Int_t istat=4; istat>=3; istat--) {
}
//__________________________________________________________________________
-void AliMUONTrackReconstructorK::FollowTracks(const AliMUONVClusterStore& clusterStore)
+void AliMUONTrackReconstructorK::FollowTracks(AliMUONVClusterStore& clusterStore)
{
/// Follow tracks in stations(1..) 3, 2 and 1
AliDebug(1,"Enter FollowTracks");
}
//__________________________________________________________________________
-Bool_t AliMUONTrackReconstructorK::FollowTrackInStation(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextStation)
+Bool_t AliMUONTrackReconstructorK::FollowTrackInStation(AliMUONTrack &trackCandidate, AliMUONVClusterStore& clusterStore, Int_t nextStation)
{
/// Follow trackCandidate in station(0..) nextStation and search for compatible cluster(s)
/// Keep all possibilities or only the best one(s) according to the flag fgkTrackAllTracks:
cout << "FollowTrackInStation: look for clusters in chamber(1..): " << ch2+1 << endl;
}
+ // Ask the clustering to reconstruct new clusters around the track position in the current station
+ // except for station 4 and 5 that are already entirely clusterized
+ if (AliMUONReconstructor::GetRecoParam()->CombineClusterTrackReco()) {
+ if (nextStation < 3) AskForNewClustersInStation(extrapTrackParamAtCh, clusterStore, nextStation);
+ }
+
// Create iterators to loop over clusters in both chambers
TIter nextInCh1(clusterStore.CreateChamberIterator(ch1,ch1));
TIter nextInCh2(clusterStore.CreateChamberIterator(ch2,ch2));
}
//__________________________________________________________________________
-Bool_t AliMUONTrackReconstructorK::RecoverTrack(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextStation)
+Bool_t AliMUONTrackReconstructorK::RecoverTrack(AliMUONTrack &trackCandidate, AliMUONVClusterStore& clusterStore, Int_t nextStation)
{
/// Try to recover the track candidate in the next station
/// by removing the worst of the two clusters attached in the current station
trackParamAtCluster = (AliMUONTrackParam*)track->GetTrackParamAtCluster()->First();
while (trackParamAtCluster) {
- // Pick up cluster with the worst chi2
+ // save parameters into smooth parameters in case of smoother did not work properly
+ if (AliMUONReconstructor::GetRecoParam()->UseSmoother() && !smoothed) {
+ trackParamAtCluster->SetSmoothParameters(trackParamAtCluster->GetParameters());
+ trackParamAtCluster->SetSmoothCovariances(trackParamAtCluster->GetCovariances());
+ }
+
+ // Pick up cluster with the worst chi2
localChi2 = trackParamAtCluster->GetLocalChi2();
if (localChi2 > worstLocalChi2) {
worstLocalChi2 = localChi2;
smoothed = kFALSE;
if (AliMUONReconstructor::GetRecoParam()->UseSmoother()) smoothed = RunSmoother(*track);
if (!smoothed) track->UpdateCovTrackParamAtCluster();
- }
+ } else smoothed = AliMUONReconstructor::GetRecoParam()->UseSmoother();
// copy smoothed parameters and covariances if any
if (smoothed) {