Protection added (Levente)
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Oct 2011 06:32:12 +0000 (06:32 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Oct 2011 06:32:12 +0000 (06:32 +0000)
PWG1/HMPID/AliHMPIDTaskQA.cxx

index affcc52..536a20f 100644 (file)
@@ -283,7 +283,9 @@ void AliHMPIDTaskQA::UserExec(Option_t *)
     if(Equal(x,0.,ktol) && Equal(y,0.,ktol) && Equal(xpc,0.,ktol) && Equal(ypc,0.,ktol)) continue;
 
     Float_t sign = track->GetSign();
-    Int_t ch = track->GetHMPIDcluIdx()/1000000;
+    Int_t ch = track->GetHMPIDcluIdx()/1000000; 
+    if( ch < 0 || ch > 6 ) continue; //Chamber numbering is [0,6]
+    
     if (sign > 0.) fHmpMipTrkDistPosX[ch]->Fill(xpc - x), fHmpMipTrkDistPosY[ch]->Fill(ypc - y);
     if (sign < 0.) fHmpMipTrkDistNegX[ch]->Fill(xpc - x), fHmpMipTrkDistNegY[ch]->Fill(ypc - y);
     fHmpMipCharge[ch]->Fill(q);