Skip to content

Commit 0432c88

Browse files
author
Szymon Pulawski
committed
Update FV0 trigger settings and digitizer logic
1 parent 06dbac3 commit 0432c88

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

Detectors/FIT/FV0/simulation/include/FV0Simulation/FV0DigParam.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ struct FV0DigParam : o2::conf::ConfigurableParamHelper<FV0DigParam> {
6969
uint8_t defaultChainQtc = 0x48; // only 2 flags are set by default in simulation: kIsCFDinADCgate and kIsEventInTVDC
7070
float mAmpThresholdForReco = 24; // only channels with amplitude higher will participate in calibration and collision time
7171
short mTimeThresholdForReco = 1000; // only channels with time below will participate in calibration and collision time
72+
int NchannelsLevel = 8; // trigger Nchannels paramter
73+
float InnerRingsChargeLevel = 0; // InnerRingsChargeLevel, Tclu
74+
float OuterRingsChargeLevel = 0; //TcluOuterRingsChargeLevel, Tclu
75+
float ChargeLevel = 10; //ChargeLevel, Tclu
76+
7277

7378
O2ParamDef(FV0DigParam, "FV0DigParam");
7479
};

Detectors/FIT/FV0/simulation/src/Digitizer.cxx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)