]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding the online v0 trigger bits which are already available (and filled correctly...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Sep 2010 08:00:18 +0000 (08:00 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Sep 2010 08:00:18 +0000 (08:00 +0000)
ANALYSIS/AliTriggerAnalysis.cxx

index 65e9c6d392b1f931d5ecad36eed3b6520c5344bf..3b0576e8cfbb859d6e4ca35752ff74f9599e8a87 100644 (file)
@@ -690,18 +690,46 @@ AliTriggerAnalysis::V0Decision AliTriggerAnalysis::V0Trigger(const AliESDEvent*
   // argument 'online' is used as a switch between online and offline trigger algorithms
   //
   // Based on an algorithm by Cvetan Cheshkov
-  
+
   AliESDVZERO* esdV0 = aEsd->GetVZEROData();
   if (!esdV0)
   {
     AliError("AliESDVZERO not available");
     return kV0Invalid;
   }
+  AliDebug(2,Form("In V0Trigger: %f %f",esdV0->GetV0ATime(),esdV0->GetV0CTime()));
 
-  if (esdV0->TestBit(AliESDVZERO::kDecisionFilled)) {
+  Int_t begin = -1;
+  Int_t end = -1;
+  
+  if (side == kASide)
+  {
+    begin = 32;
+    end = 64;
+  } 
+  else if (side == kCSide)
+  {
+    begin = 0;
+    end = 32;
+  }
+  else
+    return kV0Invalid;
+    
+   if (esdV0->TestBit(AliESDVZERO::kDecisionFilled)) {
     if (online) {
-      AliWarning("V0 online trigger analysis is not yet available!");
-      return kV0BB;
+      if (esdV0->TestBit(AliESDVZERO::kOnlineBitsFilled)) {
+       for (Int_t i = begin; i < end; ++i) {
+         if (esdV0->GetBBFlag(i)) return kV0BB;
+       }
+       for (Int_t i = begin; i < end; ++i) {
+         if (esdV0->GetBGFlag(i)) return kV0BG;
+       }
+       return kV0Empty;
+      }
+      else {
+       AliWarning("V0 online trigger analysis is not yet available!");
+       return kV0BB;
+      }
     }
     else {
 
@@ -718,22 +746,6 @@ AliTriggerAnalysis::V0Decision AliTriggerAnalysis::V0Trigger(const AliESDEvent*
     }
   }
 
-  Int_t begin = -1;
-  Int_t end = -1;
-  
-  if (side == kASide)
-  {
-    begin = 32;
-    end = 64;
-  } 
-  else if (side == kCSide)
-  {
-    begin = 0;
-    end = 32;
-  }
-  else
-    return kV0Invalid;
-    
   Float_t time = 0;
   Float_t weight = 0;
   if (fMC)