Adding the possiblity to replay v0 online trigger, in the same way as it is done...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Feb 2010 13:12:19 +0000 (13:12 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Feb 2010 13:12:19 +0000 (13:12 +0000)
ANALYSIS/AliTriggerAnalysis.cxx

index 0c41e1a..2d7c433 100644 (file)
@@ -687,13 +687,24 @@ AliTriggerAnalysis::V0Decision AliTriggerAnalysis::V0Trigger(const AliESDEvent*
     }
   }
   else {
-    for (Int_t i = begin; i < end; ++i) {
-      if (esdV0->GetTime(i) > 1e-6 && esdV0->GetAdc(i) > fV0AdcThr) {
-        Float_t correctedTime = V0CorrectLeadingTime(i, esdV0->GetTime(i), esdV0->GetAdc(i));
-        Float_t timeWeight = V0LeadingTimeWeight(esdV0->GetAdc(i));
-        time += correctedTime*timeWeight;
+    if (online) {
+      for (Int_t i = begin; i < end; ++i) {
+        if (esdV0->GetTime(i) >= 1e-6 &&
+            esdV0->GetTime(i) > fV0HwWinLow && esdV0->GetTime(i) < fV0HwWinHigh &&
+            esdV0->GetAdc(i) > fV0HwAdcThr)
+          return kV0BB;
+      }
+      return kV0Empty;
+    }
+    else {
+      for (Int_t i = begin; i < end; ++i) {
+       if (esdV0->GetTime(i) > 1e-6 && esdV0->GetAdc(i) > fV0AdcThr) {
+         Float_t correctedTime = V0CorrectLeadingTime(i, esdV0->GetTime(i), esdV0->GetAdc(i));
+         Float_t timeWeight = V0LeadingTimeWeight(esdV0->GetAdc(i));
+         time += correctedTime*timeWeight;
             
-        weight += timeWeight;
+         weight += timeWeight;
+       }
       }
     }
   }