]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
protect against missing debug projection on radial direction
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Oct 2011 10:03:01 +0000 (10:03 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Oct 2011 10:03:01 +0000 (10:03 +0000)
PWG1/TRD/AliTRDresolution.cxx

index f78fcf0a07eb2832704ed4401fa24319c7ccc167..3838a16b1dcd51a70752832a0a0678fb84779b40 100644 (file)
@@ -1465,8 +1465,10 @@ Bool_t AliTRDresolution::MakeProjectionTrackIn(Bool_t mc)
   if((h2 = hp[iproj].Projection2D(kNstat, kNcontours, 1))) arr->AddAt(h2, arr->GetEntries());
   /*!dx all tracks low momenta*/
   iproj = 2;
-  hp[iproj]+=hp[iproj+9];hp[iproj].fH->SetNameTitle(Form("H%sTrkInXl", mc?"MC":""), "TrackIn :: #Deltax{p_{t}[GeV/c]<0.8}");
-  if((h2 = hp[iproj].Projection2D(kNstat, kNcontours, 1))) arr->AddAt(h2, arr->GetEntries());
+  if(hp[iproj].fH){
+    hp[iproj]+=hp[iproj+9];hp[iproj].fH->SetNameTitle(Form("H%sTrkInXl", mc?"MC":""), "TrackIn :: #Deltax{p_{t}[GeV/c]<0.8}");
+    if((h2 = hp[iproj].Projection2D(kNstat, kNcontours, 1))) arr->AddAt(h2, arr->GetEntries());
+  }
   /*!dphi negative tracks all momenta*/
   iproj =1;
   hp[iproj]+=hp[npsel+iproj]; hp[iproj]+=hp[npsel*2+iproj]; hp[iproj].fH->SetNameTitle(Form("H%sTrkInPhn", mc?"MC":""), "TrackIn[-]:: #Delta#phi");