Check also the lower boundary of the array
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Aug 2007 17:28:06 +0000 (17:28 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Aug 2007 17:28:06 +0000 (17:28 +0000)
TPC/AliTPC.cxx

index 14bd389..372e8fd 100644 (file)
@@ -764,7 +764,7 @@ void    AliTPC::SetActiveSectors(Int_t flag)
       br2->GetEvent(track);
       Int_t *volumes = fTrackHits->GetVolumes();
       for (Int_t j=0;j<fTrackHits->GetNVolumes(); j++) {
-       if (volumes[j]<fTPCParam->GetNSector()) {
+       if (volumes[j]>-1 && volumes[j]<fTPCParam->GetNSector()) {
          fActiveSectors[volumes[j]]=kTRUE;
        }
        else {