--- PamCut/CollectionActions/ReprocessTrackAction/ReprocessTrackAction.cpp 2010/06/24 17:21:19 1.2.2.1 +++ PamCut/CollectionActions/ReprocessTrackAction/ReprocessTrackAction.cpp 2010/07/08 12:57:55 1.2.2.2 @@ -33,28 +33,29 @@ L1->SetFromLevel1Struct(); } - // See if the event has a track before reprocessing - TrkLevel2 *trkl2 = event->GetTrkLevel2(); - bool hadTrack = false; - if (trkl2->GetTrkLevel2()->GetNTracks() > 0) - hadTrack = true; + if (_reprocL2) { + // See if the event has a track before reprocessing + TrkLevel2 *trkl2 = event->GetTrkLevel2(); + bool hadTrack = false; + if (trkl2->GetTrkLevel2()->GetNTracks() > 0) + hadTrack = true; - // Reprocess - _reprocessed++; - L1->ProcessEvent();// re-processing level1->level2 + // Reprocess + _reprocessed++; + L1->ProcessEvent();// re-processing level1->level2 - trkl2 = event->GetTrkLevel2(); - trkl2->Clear(); - trkl2->SetFromLevel2Struct(); + trkl2 = event->GetTrkLevel2(); + trkl2->Clear(); + trkl2->SetFromLevel2Struct(); - // See if we gained or lost a track; - if (trkl2->GetNTracks() > 0) { - if (!hadTrack) { - _recoveredTracks++; + // See if we gained or lost a track; + if (trkl2->GetNTracks() > 0) { + if (!hadTrack) { + _recoveredTracks++; + } + } + else if (hadTrack) { + _lostTracks++; } - } - else if (hadTrack) { - _lostTracks++; } } -