Index: modules/DenseTrackFilter.cc
===================================================================
--- modules/DenseTrackFilter.cc	(revision 6965fe1be0c42d186b41aa8a2aa345c393dc2c6e)
+++ modules/DenseTrackFilter.cc	(revision fce5dd5917b4faa3bffdb1bef9a0d5d332bbaf13)
@@ -54,5 +54,5 @@
 
 DenseTrackFilter::DenseTrackFilter() :
-  fItTrackInputArray(0)
+  fItTrackInputArray(0),   fItDenseChargedInputArray(0)
 {
 }
@@ -113,6 +113,9 @@
   fEtaPhiRes = GetDouble("EtaPhiRes", 0.005);
 
-  fTrackInputArray = ImportArray(GetString("TrackInputArray", "ParticlePropagator/tracks"));
+  fTrackInputArray = ImportArray(GetString("TrackInputArray", "TrackMerger/tracks"));
   fItTrackInputArray = fTrackInputArray->MakeIterator();
+
+  fDenseChargedInputArray = ImportArray(GetString("DenseChargedInputArray", "DenseMergeTracks/tracks"));
+  fItDenseChargedInputArray = fDenseChargedInputArray->MakeIterator();
 
   fTrackOutputArray = ExportArray(GetString("TrackOutputArray", "tracks"));
@@ -125,4 +128,5 @@
   vector< vector< Double_t >* >::iterator itPhiBin;
   if(fItTrackInputArray) delete fItTrackInputArray;
+  if(fItDenseChargedInputArray) delete fItDenseChargedInputArray;
   for(itPhiBin = fPhiBins.begin(); itPhiBin != fPhiBins.end(); ++itPhiBin)
   {
@@ -135,5 +139,5 @@
 void DenseTrackFilter::Process()
 {
-  Candidate *candidate, *track, *bestTrack, *mother;
+  Candidate *candidate, *track, *bestTrack, *mother, *trackRef, *bestTrackRef;
   TLorentzVector position, momentum;
   Short_t etaBin, phiBin, flags;
@@ -142,4 +146,5 @@
 
   Double_t pt, ptmax, eta, phi;
+  Bool_t matched;
 
   vector< Double_t >::iterator itEtaBin;
@@ -152,7 +157,7 @@
 
   // loop over all tracks
-  fItTrackInputArray->Reset();
+  fItDenseChargedInputArray->Reset();
   number = -1;
-  while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
+  while((track = static_cast<Candidate*>(fItDenseChargedInputArray->Next())))
   {
     const TLorentzVector &trackPosition = track->Position;
@@ -205,14 +210,34 @@
       if(towerTrackHits > 0)
       {
-         mother = bestTrack;
-         candidate = static_cast<Candidate*>(bestTrack->Clone());
-         pt = candidate->Momentum.Pt();
-         eta = candidate->Momentum.Eta();
-         phi = candidate->Momentum.Phi();
-         eta = gRandom->Gaus(eta, fEtaPhiRes);
-         phi = gRandom->Gaus(phi, fEtaPhiRes);
-         candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta));
-         candidate->AddCandidate(mother);
-         fTrackOutputArray->Add(candidate);
+         bestTrackRef = static_cast<Candidate*>(bestTrack->GetCandidates()->At(0));
+	 
+         // find corresponding track in properly propagated tracks
+         
+	 
+	 fItTrackInputArray->Reset();
+	 matched = kFALSE;
+	 int ntrack = 0;
+	 while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
+         {
+           ntrack++;
+           trackRef = static_cast<Candidate*>(track->GetCandidates()->At(0));
+           if (trackRef->GetUniqueID() == bestTrackRef->GetUniqueID())
+           {
+             mother = track;
+             candidate = static_cast<Candidate*>(track->Clone());
+             pt = candidate->Momentum.Pt();
+             eta = candidate->Momentum.Eta();
+             phi = candidate->Momentum.Phi();
+             eta = gRandom->Gaus(eta, fEtaPhiRes);
+             phi = gRandom->Gaus(phi, fEtaPhiRes);
+             candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta));
+             candidate->AddCandidate(mother);
+             fTrackOutputArray->Add(candidate);
+             matched = kTRUE;
+	   }
+           if (matched) break;
+	 }
+         
+         // find track 
       }
 
@@ -226,5 +251,5 @@
     {
       ++towerTrackHits;
-      track = static_cast<Candidate*>(fTrackInputArray->At(number));
+      track = static_cast<Candidate*>(fDenseChargedInputArray->At(number));
       momentum = track->Momentum;
 
@@ -237,3 +262,4 @@
     }
   }
-}
+  
+}
Index: modules/DenseTrackFilter.h
===================================================================
--- modules/DenseTrackFilter.h	(revision 6965fe1be0c42d186b41aa8a2aa345c393dc2c6e)
+++ modules/DenseTrackFilter.h	(revision fce5dd5917b4faa3bffdb1bef9a0d5d332bbaf13)
@@ -70,4 +70,8 @@
   TObjArray *fTrackOutputArray; //!
 
+
+  const TObjArray *fDenseChargedInputArray;
+  TIterator *fItDenseChargedInputArray;
+
   ClassDef(DenseTrackFilter, 1)
 };
