]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Mask events with integrated fastor amps as multiples of 1024 as bad
authormfasel <mfasel@lbl.gov>
Fri, 31 Oct 2014 13:52:57 +0000 (14:52 +0100)
committermfasel <mfasel@lbl.gov>
Fri, 31 Oct 2014 14:09:48 +0000 (15:09 +0100)
PWG/EMCAL/AliEmcalPhysicsSelection.cxx

index a7e68ce57820d56b596f9797cd419d80d9b65049..d44fcba5425675b6c91262ab55568c0e19cd2b01 100644 (file)
@@ -263,6 +263,30 @@ UInt_t AliEmcalPhysicsSelection::GetSelectionMask(const TObject* obj)
     }
   }
 
+  // Check for trigger patches with 1024 bug
+  // event declared bad if at least one found
+  AliVCaloTrigger *emcaltriggers = ev->GetCaloTrigger(eev == NULL ? "EMCALTrigger" : "emcalTrigger");
+  if(emcaltriggers){
+    emcaltriggers->Reset();
+    Int_t adc;
+    Bool_t isBad = false;
+    while(emcaltriggers->Next()){
+      emcaltriggers->GetL1TimeSum(adc);
+      isBad = false;
+      // check for multiples of 1024
+      for(int i = 0; i < 20; i++){
+        if(adc == 1024 * i){
+          isBad = true;
+          break;
+        }
+      }
+      if(isBad){
+        fIsGoodEvent = kFALSE;
+        break;
+      }
+    }
+  }
+
   if (fIsGoodEvent) {
     if (fCellMaxE>fCellMinE)
       res |= kEmcalHC;