From 484c030f5bea7dfffa8f47776d848a965b7f117a Mon Sep 17 00:00:00 2001 From: mfasel Date: Fri, 31 Oct 2014 14:52:57 +0100 Subject: [PATCH] Mask events with integrated fastor amps as multiples of 1024 as bad --- PWG/EMCAL/AliEmcalPhysicsSelection.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/PWG/EMCAL/AliEmcalPhysicsSelection.cxx b/PWG/EMCAL/AliEmcalPhysicsSelection.cxx index a7e68ce5782..d44fcba5425 100644 --- a/PWG/EMCAL/AliEmcalPhysicsSelection.cxx +++ b/PWG/EMCAL/AliEmcalPhysicsSelection.cxx @@ -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; -- 2.39.3