]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZEROTriggerMask.cxx
Fix Coverity 15062, 15063
[u/mrichter/AliRoot.git] / VZERO / AliVZEROTriggerMask.cxx
index a8f7e97943e4fe2537ad09b0348e9bf762408778..029a718bed4e98cad5e65c449722241ab560c086 100644 (file)
@@ -114,8 +114,8 @@ void AliVZEROTriggerMask::FillMasks(AliESDVZERO *esdV0,
   UInt_t aBBtriggerV0C = 0; // bit mask for Beam-Beam trigger in V0C
   UInt_t aBGtriggerV0C = 0; // bit mask for Beam-Gas trigger in V0C
 
-  const Float_t p1 = 2.19; // photostatistics term in the time resolution
-  const Float_t p2 = 1.31; // slewing related term in the time resolution
+  const Float_t p1 = 2.50; // photostatistics term in the time resolution
+  const Float_t p2 = 3.00; // slewing related term in the time resolution
 
   // loop over vzero channels
   Float_t timeAW = 0,timeCW = 0;
@@ -130,7 +130,8 @@ void AliVZEROTriggerMask::FillMasks(AliESDVZERO *esdV0,
        Float_t timeErr = TMath::Sqrt(kIntTimeRes*kIntTimeRes+
                                      p1*p1/nphe+
                                      p2*p2*(slewing->GetParameter(0)*slewing->GetParameter(1))*(slewing->GetParameter(0)*slewing->GetParameter(1))*
-                                     TMath::Power(adc/cal->GetDiscriThr(i),2.*(slewing->GetParameter(1)-1.)));
+                                     TMath::Power(adc/cal->GetCalibDiscriThr(i,kTRUE),2.*(slewing->GetParameter(1)-1.))/
+                                     (cal->GetCalibDiscriThr(i,kTRUE)*cal->GetCalibDiscriThr(i,kTRUE)));
 
        if (i < 32) { // in V0C
          ntimeC++;
@@ -175,7 +176,7 @@ void AliVZEROTriggerMask::FillMasks(AliESDVZERO *esdV0,
   esdV0->SetV0ATime(timeAW);
   esdV0->SetV0CTime(timeCW);
   esdV0->SetV0ATimeError((weightA > 0) ? (1./TMath::Sqrt(weightA)) : 0);
-  esdV0->SetV0ATimeError((weightC > 0) ? (1./TMath::Sqrt(weightC)) : 0);
+  esdV0->SetV0CTimeError((weightC > 0) ? (1./TMath::Sqrt(weightC)) : 0);
 
   esdV0->SetV0ADecision(AliESDVZERO::kV0Empty);
   esdV0->SetV0CDecision(AliESDVZERO::kV0Empty);