Skip to content

Commit a5c927f

Browse files
ddobrigkalibuild
andauthored
[PWGLF] Strangeness derived builder changes (AliceO2Group#9157)
Co-authored-by: ALICE Builder <[email protected]>
1 parent 1364f7d commit a5c927f

File tree

1 file changed

+163
-16
lines changed

1 file changed

+163
-16
lines changed

PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx

Lines changed: 163 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,143 @@ struct strangederivedbuilder {
221221

222222
void init(InitContext&)
223223
{
224+
LOGF(info, "Initializing now: cross-checking correctness...");
225+
if (doprocessCollisions +
226+
doprocessCollisionsWithUD +
227+
doprocessCollisionsWithMC +
228+
doprocessCollisionsWithUDWithMC >
229+
1) {
230+
LOGF(fatal, "You have enabled more than one process function associated to collisions. Please check your configuration! Aborting now.");
231+
}
232+
if (doprocessTrackExtrasV0sOnly +
233+
doprocessTrackExtras +
234+
doprocessTrackExtrasNoPID +
235+
doprocessTrackExtrasMC >
236+
1) {
237+
LOGF(fatal, "You have enabled more than one process function associated to TracksExtra. Please check your configuration! Aborting now.");
238+
}
239+
240+
LOGF(info, "====] base information processing [===============================");
241+
if (doprocessDataframeIDs) {
242+
LOGF(info, "Process data frame IDs............: yes");
243+
} else {
244+
LOGF(info, "Process data frame IDs............: no");
245+
}
246+
247+
// collision processing printout
248+
if (doprocessCollisions) {
249+
LOGF(info, "Collision processing type.........: no UD, no MC");
250+
}
251+
if (doprocessCollisionsWithUD) {
252+
LOGF(info, "Collision processing type.........: with UD, no MC");
253+
}
254+
if (doprocessCollisionsWithMC) {
255+
LOGF(info, "Collision processing type.........: with MC, no UD");
256+
}
257+
if (doprocessCollisionsWithUDWithMC) {
258+
LOGF(info, "Collision processing type.........: with MC, with UD");
259+
}
260+
261+
LOGF(info, "====] event characterization processing [=========================");
262+
if (doprocessFT0AQVectors) {
263+
LOGF(info, "Process FT0A Q-vectors............: yes");
264+
} else {
265+
LOGF(info, "Process FT0A Q-vectors............: no");
266+
}
267+
if (doprocessFT0CQVectors) {
268+
LOGF(info, "Process FT0C Q-vectors............: yes");
269+
} else {
270+
LOGF(info, "Process FT0C Q-vectors............: no");
271+
}
272+
if (doprocessFT0CQVectorsLF) {
273+
LOGF(info, "Process FT0C Q-vectors (LF).......: yes");
274+
} else {
275+
LOGF(info, "Process FT0C Q-vectors (LF).......: no");
276+
}
277+
if (doprocessFT0MQVectors) {
278+
LOGF(info, "Process FT0M Q-vectors............: yes");
279+
} else {
280+
LOGF(info, "Process FT0M Q-vectors............: no");
281+
}
282+
if (doprocessFV0AQVectors) {
283+
LOGF(info, "Process FV0A Q-vectors............: yes");
284+
} else {
285+
LOGF(info, "Process FV0A Q-vectors............: no");
286+
}
287+
if (doprocessTPCQVectors) {
288+
LOGF(info, "Process TPC Q-vectors.............: yes");
289+
} else {
290+
LOGF(info, "Process TPC Q-vectors.............: no");
291+
}
292+
if (doprocessTPCQVectorsLF) {
293+
LOGF(info, "Process TPC Q-vectors (LF)........: yes");
294+
} else {
295+
LOGF(info, "Process TPC Q-vectors (LF)........: no");
296+
}
297+
if (doprocessZDCSP) {
298+
LOGF(info, "Process ZPC spectator plane.......: yes");
299+
} else {
300+
LOGF(info, "Process ZPC spectator plane.......: no");
301+
}
302+
303+
LOGF(info, "====] daughter track property processing [========================");
304+
if (doprocessTrackExtrasV0sOnly) {
305+
LOGF(info, "TracksExtra processing type.......: V0s only");
306+
}
307+
if (doprocessTrackExtras) {
308+
LOGF(info, "TracksExtra processing type.......: V0s + cascades");
309+
}
310+
if (doprocessTrackExtrasNoPID) {
311+
LOGF(info, "TracksExtra processing type.......: V0s + cascades, no PID");
312+
}
313+
if (doprocessTrackExtrasMC) {
314+
LOGF(info, "TracksExtra processing type.......: V0s + cascades, Monte Carlo");
315+
}
316+
LOGF(info, "====] cascade interlink processing [==============================");
317+
if (doprocessCascadeInterlinkTracked) {
318+
LOGF(info, "Process cascade/tracked interlink.: yes");
319+
} else {
320+
LOGF(info, "Process cascade/tracked interlink.: no");
321+
}
322+
if (doprocessCascadeInterlinkKF) {
323+
LOGF(info, "Process cascade/KF interlink......: yes");
324+
} else {
325+
LOGF(info, "Process cascade/KF interlink......: no");
326+
}
327+
LOGF(info, "====] simulated information processing [==========================");
328+
if (doprocessPureSimulation) {
329+
LOGF(info, "Process pure simulation info......: yes");
330+
} else {
331+
LOGF(info, "Process pure simulation info......: no");
332+
}
333+
if (doprocessReconstructedSimulation) {
334+
LOGF(info, "Process reco simulation info......: yes");
335+
} else {
336+
LOGF(info, "Process reco simulation info......: no");
337+
}
338+
if (doprocessBinnedGenerated) {
339+
LOGF(info, "Process binned simulation info....: yes");
340+
} else {
341+
LOGF(info, "Process binned simulation info....: no");
342+
}
343+
if (doprocessStrangeMothers) {
344+
LOGF(info, "Process strange mothers...........: yes");
345+
} else {
346+
LOGF(info, "Process strange mothers...........: no");
347+
}
348+
LOGF(info, "====] findable exercise extras [==================================");
349+
if (doprocessV0FoundTags) {
350+
LOGF(info, "Process found V0 tags.............: yes");
351+
} else {
352+
LOGF(info, "Process found V0 tags.............: no");
353+
}
354+
if (doprocessCascFoundTags) {
355+
LOGF(info, "Process found cascade tags........: yes");
356+
} else {
357+
LOGF(info, "Process found cascade tags........: no");
358+
}
359+
LOGF(info, "==================================================================");
360+
224361
// setup map for fast checking if enabled
225362
static_for<0, nSpecies - 1>([&](auto i) {
226363
constexpr int index = i.value;
@@ -583,28 +720,33 @@ struct strangederivedbuilder {
583720
tr.tpcNClsFindableMinusFound(),
584721
tr.tpcNClsFindableMinusCrossedRows());
585722

723+
// _________________________________________
586724
// if the table has MC info
587725
if constexpr (requires { tr.mcParticle(); }) {
588726
// do your thing with the mcParticleIds only in case the table has the MC info
589727
dauTrackMCIds(tr.mcParticleId()); // joinable with dauTrackExtras
590728
}
591729

592-
// round if requested
593-
if (roundNSigmaVariables) {
594-
dauTrackTPCPIDs(tr.tpcSignal(),
595-
roundToPrecision(tr.tpcNSigmaEl(), precisionNSigmas),
596-
roundToPrecision(tr.tpcNSigmaPi(), precisionNSigmas),
597-
roundToPrecision(tr.tpcNSigmaKa(), precisionNSigmas),
598-
roundToPrecision(tr.tpcNSigmaPr(), precisionNSigmas),
599-
roundToPrecision(tr.tpcNSigmaHe(), precisionNSigmas));
730+
if constexpr (requires { tr.tpcNSigmaEl(); }) {
731+
if (roundNSigmaVariables) { // round if requested
732+
dauTrackTPCPIDs(tr.tpcSignal(),
733+
roundToPrecision(tr.tpcNSigmaEl(), precisionNSigmas),
734+
roundToPrecision(tr.tpcNSigmaPi(), precisionNSigmas),
735+
roundToPrecision(tr.tpcNSigmaKa(), precisionNSigmas),
736+
roundToPrecision(tr.tpcNSigmaPr(), precisionNSigmas),
737+
roundToPrecision(tr.tpcNSigmaHe(), precisionNSigmas));
738+
} else {
739+
dauTrackTPCPIDs(tr.tpcSignal(), tr.tpcNSigmaEl(),
740+
tr.tpcNSigmaPi(), tr.tpcNSigmaKa(),
741+
tr.tpcNSigmaPr(), tr.tpcNSigmaHe());
742+
}
743+
// populate daughter-level TOF information
744+
dauTrackTOFPIDs(tr.tofSignal(), tr.tofEvTime(), tr.length());
600745
} else {
601-
dauTrackTPCPIDs(tr.tpcSignal(), tr.tpcNSigmaEl(),
602-
tr.tpcNSigmaPi(), tr.tpcNSigmaKa(),
603-
tr.tpcNSigmaPr(), tr.tpcNSigmaHe());
746+
// populate with empty fully-compatible Nsigmas if no corresponding table available
747+
dauTrackTPCPIDs(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
748+
dauTrackTOFPIDs(0.0f, 0.0f, 0.0f);
604749
}
605-
606-
// populate daughter-level TOF information
607-
dauTrackTOFPIDs(tr.tofSignal(), tr.tofEvTime(), tr.length());
608750
}
609751
}
610752
// done!
@@ -613,13 +755,17 @@ struct strangederivedbuilder {
613755
void processTrackExtras(aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, soa::Join<aod::TracksIU, aod::TracksExtra, aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTPCFullHe, aod::TOFEvTime, aod::TOFSignal> const& tracksExtra, aod::V0s const&)
614756
{
615757
fillTrackExtras(V0s, Cascades, KFCascades, TraCascades, tracksExtra);
616-
// done!
758+
}
759+
760+
// no TPC services
761+
void processTrackExtrasNoPID(aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, soa::Join<aod::TracksIU, aod::TracksExtra> const& tracksExtra, aod::V0s const&)
762+
{
763+
fillTrackExtras(V0s, Cascades, KFCascades, TraCascades, tracksExtra);
617764
}
618765

619766
void processTrackExtrasMC(aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, soa::Join<aod::TracksIU, aod::TracksExtra, aod::McTrackLabels, aod::pidTPCFullEl, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTPCFullHe, aod::TOFEvTime, aod::TOFSignal> const& tracksExtra, aod::V0s const&)
620767
{
621768
fillTrackExtras(V0s, Cascades, KFCascades, TraCascades, tracksExtra);
622-
// done!
623769
}
624770

625771
void processStrangeMothers(soa::Join<aod::V0Datas, aod::McV0Labels> const& V0s, soa::Join<aod::CascDatas, aod::McCascLabels> const& Cascades, aod::McParticles const& mcParticles)
@@ -905,6 +1051,7 @@ struct strangederivedbuilder {
9051051
// detailed information processing
9061052
PROCESS_SWITCH(strangederivedbuilder, processTrackExtrasV0sOnly, "Produce track extra information (V0s only)", true);
9071053
PROCESS_SWITCH(strangederivedbuilder, processTrackExtras, "Produce track extra information (V0s + casc)", true);
1054+
PROCESS_SWITCH(strangederivedbuilder, processTrackExtrasNoPID, "Produce track extra information (V0s + casc), no PID", false);
9081055
PROCESS_SWITCH(strangederivedbuilder, processTrackExtrasMC, "Produce track extra information (V0s + casc)", false);
9091056
PROCESS_SWITCH(strangederivedbuilder, processStrangeMothers, "Produce tables with mother info for V0s + casc", true);
9101057
PROCESS_SWITCH(strangederivedbuilder, processCascadeInterlinkTracked, "Produce tables interconnecting cascades", false);

0 commit comments

Comments
 (0)