/[PAMELA software]/PamCut/CollectionActions/ReprocessTrackAction/ReprocessTrackAction.cpp
ViewVC logotype

Diff of /PamCut/CollectionActions/ReprocessTrackAction/ReprocessTrackAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pam-fi, Wed Mar 24 08:12:43 2010 UTC revision 1.3 by pam-fi, Thu Jul 8 14:00:28 2010 UTC
# Line 33  void ReprocessTrackAction::OnGood(PamLev Line 33  void ReprocessTrackAction::OnGood(PamLev
33      L1->SetFromLevel1Struct();      L1->SetFromLevel1Struct();
34    }    }
35    
36    // See if the event has a track before reprocessing    if (_reprocL2) {
37    TrkLevel2 *trkl2 = event->GetTrkLevel2();      // See if the event has a track before reprocessing
38    bool hadTrack = false;      TrkLevel2 *trkl2 = event->GetTrkLevel2();
39    if (trkl2->GetTrkLevel2()->GetNTracks() > 0)      bool hadTrack = false;
40      hadTrack = true;      if (trkl2->GetTrkLevel2()->GetNTracks() > 0)
41          hadTrack = true;
42    
43    // Reprocess      // Reprocess
44    _reprocessed++;      _reprocessed++;
45    L1->ProcessEvent();// re-processing level1->level2      L1->ProcessEvent();// re-processing level1->level2
46    
47    trkl2 = event->GetTrkLevel2();      trkl2 = event->GetTrkLevel2();
48    trkl2->Clear();      trkl2->Clear();
49    trkl2->SetFromLevel2Struct();      trkl2->SetFromLevel2Struct();
50    
51    // See if we gained or lost a track;      // See if we gained or lost a track;
52    if (trkl2->GetTrkLevel2()->GetNTracks() > 0) {      if (trkl2->GetNTracks() > 0) {
53      if (!hadTrack) {        if (!hadTrack) {
54        _recoveredTracks++;          _recoveredTracks++;
55          }
56        }
57        else if (hadTrack) {
58          _lostTracks++;
59      }      }
   }  
   else if (hadTrack) {  
     _lostTracks++;  
60    }    }
61  }  }
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23