fixed typo, added protection against numerical instability
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Nov 2010 12:18:15 +0000 (12:18 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Nov 2010 12:18:15 +0000 (12:18 +0000)
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.cxx

index bd33d2c..f1776f8 100644 (file)
@@ -1165,7 +1165,8 @@ void AliAnalysisTaskJetSpectrum2::UserExec(Option_t */*option*/)
       Float_t minv = 2.*(recJets[0].P()*recJets[1].P()-
                         recJets[0].Px()*recJets[1].Px()- 
                         recJets[0].Py()*recJets[1].Py()- 
-                        recJets[0].Pz()*recJets[1].Py());
+                        recJets[0].Pz()*recJets[1].Pz());
+      if(minv<0)minv=0; // prevent numerical instabilities
       minv = TMath::Sqrt(minv);
       // with mass == 0;