Patch for using MUONTriggerTracker and MUONTracker macros one after the other (Ch. F)
authorcussonno <cussonno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Mar 2004 17:10:46 +0000 (17:10 +0000)
committercussonno <cussonno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Mar 2004 17:10:46 +0000 (17:10 +0000)
MUON/AliMUONEventReconstructor.cxx

index 0dad50e..c536ccf 100644 (file)
@@ -991,17 +991,26 @@ void AliMUONEventReconstructor::MakeTracks(void)
 void AliMUONEventReconstructor::ValidateTracksWithTrigger(void)
 {
   AliMUONTrack *track;
+  static Bool_t isTriggerTrackInMem = 1;
+
   TClonesArray *recTriggerTracks = fMUONData->RecTriggerTracks();
-  if (recTriggerTracks == 0x0) {
+
+  // protection if using triggertrack and track macro instead of reconstruct macro
+  if (recTriggerTracks == 0x0) 
+    isTriggerTrackInMem = 0;
+
+  if (!isTriggerTrackInMem) {
+    fMUONData->ResetRecTriggerTracks();
     fMUONData->SetTreeAddress("RL");
     fMUONData->GetRecTriggerTracks();
     recTriggerTracks = fMUONData->RecTriggerTracks();
   } 
+
   track = (AliMUONTrack*) fRecTracksPtr->First();
   while (track) {
     track->MatchTriggerTrack(recTriggerTracks);
     track = (AliMUONTrack*) fRecTracksPtr->After(track);
-  } 
+  }
 }
 
   //__________________________________________________________________________