Add protection for wrong Ntrk profile correction settings
authorzconesa <zaida.conesa.del.valle@cern.ch>
Tue, 25 Feb 2014 08:51:56 +0000 (09:51 +0100)
committerzconesa <zaida.conesa.del.valle@cern.ch>
Tue, 25 Feb 2014 08:52:10 +0000 (09:52 +0100)
PWGHF/vertexingHF/AliCFTaskVertexingHF.cxx

index 34565f5..88172c5 100755 (executable)
@@ -1583,19 +1583,20 @@ TProfile* AliCFTaskVertexingHF::GetEstimatorHistogram(const AliVEvent* event){
   //
 
   Int_t runNo  = event->GetRunNumber();
-  Int_t period = -1;   // pp: 0-LHC10b, 1-LHC10c, 2-LHC10d, 3-LHC10e
-                       //pPb: 0-LHC13b, 1-LHC13c
+  Int_t period = -1;   // pp:  0-LHC10b, 1-LHC10c, 2-LHC10d, 3-LHC10e
+                       // pPb: 0-LHC13b, 1-LHC13c
 
   if (fIsPPbData) {    // setting run numbers for LHC13 if pPb
       if (runNo>195343 && runNo<195484) period = 0;
       if (runNo>195528 && runNo<195678) period = 1;
-  } else {     //else assume pp                       
+      if (period<0 || period>1) return 0;
+  } else {             //else assume pp 2010                 
       if(runNo>114930 && runNo<117223) period = 0;
       if(runNo>119158 && runNo<120830) period = 1;
       if(runNo>122373 && runNo<126438) period = 2;
       if(runNo>127711 && runNo<130841) period = 3;
       if(period<0 || period>3) return 0;
   }
-  
+
   return fMultEstimatorAvg[period];
 }