@@ -238,6 +238,8 @@ void Digitizer::storeBC(const BCCache& bc,
238238 int8_t nTotFiredCells = 0 ;
239239 int8_t nTrgFiredCells = 0 ; // number of fired cells, that follow additional trigger conditions (time gate)
240240 int totalChargeAllRing = 0 ;
241+ int totalChargeInnerRing = 0 ;
242+ int totalChargeOuterRing = 0 ;
241243 int32_t avgTime = 0 ;
242244 double nSignalInner = 0 ;
243245 double nSignalOuter = 0 ;
@@ -285,8 +287,10 @@ void Digitizer::storeBC(const BCCache& bc,
285287 avgTime += iCfdZero;
286288 if (iPmt < 24 ) {
287289 nSignalInner++;
290+ totalChargeInnerRing += iTotalCharge;
288291 } else {
289292 nSignalOuter++;
293+ totalChargeOuterRing += iTotalCharge;
290294 }
291295 }
292296 }
@@ -301,23 +305,23 @@ void Digitizer::storeBC(const BCCache& bc,
301305 avgTime = o2::fit::Triggers::DEFAULT_TIME;
302306 }
303307 // /Triggers for FV0
304- bool isA, isAIn, isAOut, isCen, isSCen ;
308+ bool isA, isNchannels, isAIn, isAOut, isTotalCharge ;
305309 isA = nTrgFiredCells > 0 ;
306- isAIn = nSignalInner > 0 ; // ring 1,2 and 3
307- isAOut = nSignalOuter > 0 ; // ring 4 and 5
308- isCen = totalChargeAllRing > FV0DigParam::Instance ().adcChargeCenThr ;
309- isSCen = totalChargeAllRing > FV0DigParam::Instance ().adcChargeSCenThr ;
310+ isNchannels = nTrgFiredCells > FV0DigParam::Instance (). NchannelsLevel ;
311+ isAIn = nSignalInner > FV0DigParam::Instance ().;NchannelsLevel // ring 1,2 and 3
312+ isAOut = nSignalOuter > FV0DigParam::Instance ().NchannelsLevel ; // ring 4 and 5
313+ isTotalCharge = 0.125 * totalChargeAllRing > 2 * FV0DigParam::Instance ().ChargeLevel ;
310314
311315 Triggers triggers;
312316 const int unusedCharge = o2::fit::Triggers::DEFAULT_AMP;
313317 const int unusedTime = o2::fit::Triggers::DEFAULT_TIME;
314318 const int unusedZero = o2::fit::Triggers::DEFAULT_ZERO;
315319 const bool unusedBitsInSim = false ; // bits related to laser and data validity
316320 const bool bitDataIsValid = true ;
317- triggers.setTriggers (isA, isAIn, isAOut, isCen, isSCen , nTrgFiredCells, (int8_t )unusedZero,
321+ triggers.setTriggers (isA, isAIn, isAOut, isTotalCharge, isNchannels , nTrgFiredCells, (int8_t )unusedZero,
318322 (int32_t )(0.125 * totalChargeAllRing), (int32_t )unusedCharge, (int16_t )avgTime, (int16_t )unusedTime, unusedBitsInSim, unusedBitsInSim, bitDataIsValid);
319323 digitsBC.emplace_back (first, nTotFiredCells, bc, triggers, mEventId - 1 );
320- digitsTrig.emplace_back (bc, isA, isAIn, isAOut, isCen, isSCen );
324+ digitsTrig.emplace_back (bc, isA, isAIn, isAOut, isTotalCharge, isNChannels );
321325 for (auto const & lbl : bc.labels ) {
322326 labels.addElement (nBC, lbl);
323327 }
0 commit comments