]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGPP/pid/AliAnalysisTaskLambdaBayes.cxx
Added protection against failed fit, for automatic QA trending.
[u/mrichter/AliRoot.git] / PWGPP / pid / AliAnalysisTaskLambdaBayes.cxx
index 57a4428de2520f42f24fe6a5b8d678d515803dd6..d83390a7b9b0920d86246ba7d67e21ab0deb1d98 100644 (file)
@@ -727,8 +727,8 @@ void AliAnalysisTaskLambdaBayes::Analyze(AliAODEvent* aodEvent)
            
            // generate random time
            Float_t timeRandom = fHmismTOF->GetRandom() + distIP*3.35655419905265973e+01;
-           Double_t times[10];
-           KpTrack->GetIntegratedTimes(times);
+           Double_t times[AliPID::kSPECIESC];
+           KpTrack->GetIntegratedTimes(times,AliPID::kSPECIESC);
            nSigmaTOF = TMath::Abs(timeRandom - times[4])/PIDResponse->GetTOFResponse().GetExpectedSigma(KpTrack->P(), times[4], AliPID::kProton);
            nSigmaTOFRef = TMath::Abs(timeRandom - times[fSpeciesRef])/PIDResponse->GetTOFResponse().GetExpectedSigma(KpTrack->P(), times[fSpeciesRef], (AliPID::EParticleType) fSpeciesRef);
          }
@@ -754,6 +754,8 @@ void AliAnalysisTaskLambdaBayes::Analyze(AliAODEvent* aodEvent)
     }
 
     // use sigmaTOF instead of sigmaComb
+    nSigmaTOFRef = TMath::Abs(nSigmaTOFRef);
+
     if(tofMatch1){
       nSigmaComb = nSigmaTOF;
       nSigmaCombRef = nSigmaTOFRef;
@@ -829,8 +831,8 @@ void AliAnalysisTaskLambdaBayes::Analyze(AliAODEvent* aodEvent)
            
            // generate random time
            Float_t timeRandom = fHmismTOF->GetRandom() + distIP*3.35655419905265973e+01;
-           Double_t times[10];
-           KnTrack->GetIntegratedTimes(times);
+           Double_t times[AliPID::kSPECIESC];
+           KnTrack->GetIntegratedTimes(times,AliPID::kSPECIESC);
            nSigmaTOF2 = TMath::Abs(timeRandom - times[4])/PIDResponse->GetTOFResponse().GetExpectedSigma(KnTrack->P(), times[4], AliPID::kProton);
          }
        }