3737#include " CCDB/BasicCCDBManager.h"
3838#include " DCAFitter/DCAFitterN.h"
3939#include " PWGLF/DataModel/pidTOFGeneric.h"
40+ #include " PWGLF/DataModel/LFStrangenessTables.h"
4041#include " Common/Core/PID/PIDTOF.h"
4142
4243using namespace o2 ;
@@ -57,7 +58,7 @@ static constexpr std::array<int, nNuclei> charges{1, 1, 2};
5758static const std::vector<std::string> matterOrNot{" Matter" , " Antimatter" };
5859static const std::vector<std::string> nucleiNames{" H2" , " H3" , " Helium" };
5960static const std::vector<std::string> hypernucleiNames{" H3L" }; // 3-body decay case
60- static const std::vector<std::string> columnsNames{o2::aod::filtering::H2::columnLabel (), " fH3 " , o2::aod::filtering::He ::columnLabel (), o2::aod::filtering::H3L3Body::columnLabel (), o2::aod::filtering::ITSmildIonisation::columnLabel (), o2::aod::filtering::ITSextremeIonisation::columnLabel ()};
61+ static const std::vector<std::string> columnsNames{o2::aod::filtering::H2::columnLabel (), o2::aod::filtering::He::columnLabel () , o2::aod::filtering::HeV0 ::columnLabel (), o2::aod::filtering::H3L3Body::columnLabel (), o2::aod::filtering::Tracked3Body ::columnLabel (), o2::aod::filtering::ITSmildIonisation::columnLabel (), o2::aod::filtering::ITSextremeIonisation::columnLabel ()};
6162static const std::vector<std::string> cutsNames{
6263 " TPCnSigmaMin" , " TPCnSigmaMax" , " TOFnSigmaMin" , " TOFnSigmaMax" , " TOFpidStartPt" };
6364constexpr double betheBlochDefault[nNuclei][6 ]{
@@ -313,26 +314,39 @@ struct nucleiFilter {
313314 bachelorTOFPID.SetParams (mRespParamsV2 );
314315 }
315316
317+ enum {
318+ kH2 = 0 ,
319+ kHe ,
320+ kHeV0 ,
321+ kH3L3Body ,
322+ kTracked3Body ,
323+ kITSmildIonisation ,
324+ kITSextremeIonisation ,
325+ kNtriggers
326+ } TriggerType;
316327 // void process(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision, aod::Vtx3BodyDatas const& vtx3bodydatas, TrackCandidates const& tracks)
317328 using ColWithEvTime = soa::Join<aod::Collisions, aod::EvSels, aod::EvTimeTOFFT0>;
318- void process (ColWithEvTime::iterator const & collision, aod::Decay3Bodys const & decay3bodys, TrackCandidates const & tracks, aod::BCsWithTimestamps const &)
329+ void process (ColWithEvTime::iterator const & collision, aod::Decay3Bodys const & decay3bodys, TrackCandidates const & tracks, aod::AssignedTracked3Bodys const & tracked3Bodys, aod::V0s const & v0s, aod:: BCsWithTimestamps const &)
319330 {
320331 // collision process loop
321- bool keepEvent[nNuclei + nHyperNuclei + nITStriggers] {false };
332+ std::array< bool , kNtriggers > keepEvent {false };
322333 //
323334 qaHists.fill (HIST (" fCollZpos" ), collision.posZ ());
324335 hProcessedEvents->Fill (0 );
325336 //
326337 if (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
327- tags (keepEvent[0 ], keepEvent[2 ], keepEvent[3 ], keepEvent[4 ], keepEvent[5 ]);
338+ tags (keepEvent[kH2 ], keepEvent[kHe ], keepEvent[kHeV0 ], keepEvent[kH3L3Body ], keepEvent[kTracked3Body ], keepEvent[ kITSmildIonisation ], keepEvent[ kITSextremeIonisation ]);
328339 return ;
329340 }
341+
330342 //
331343 const double bgScalings[nNuclei][2 ]{
332344 {charges[0 ] * cfgMomentumScalingBetheBloch->get (0u , 0u ) / masses[0 ], charges[0 ] * cfgMomentumScalingBetheBloch->get (0u , 1u ) / masses[0 ]},
333345 {charges[1 ] * cfgMomentumScalingBetheBloch->get (1u , 0u ) / masses[1 ], charges[1 ] * cfgMomentumScalingBetheBloch->get (1u , 1u ) / masses[1 ]},
334346 {charges[2 ] * cfgMomentumScalingBetheBloch->get (2u , 0u ) / masses[2 ], charges[2 ] * cfgMomentumScalingBetheBloch->get (2u , 1u ) / masses[2 ]}};
335347
348+ constexpr int nucleusIndex[nNuclei]{kH2 , -1 , kHe }; // / remap for nuclei triggers
349+ std::vector<int > he3indices;
336350 for (auto & track : tracks) { // start loop over tracks
337351 if (track.itsNCls () >= cfgCutNclusExtremeIonisationITS) {
338352 double avgClsSize{0 .};
@@ -531,7 +545,7 @@ struct nucleiFilter {
531545 qaHists.fill (HIST (" fBachDeuTOFNsigma" ), track2.p () * track2.sign (), tofNSigmaDeuteron);
532546 qaHists.fill (HIST (" fH3LDcaVsPt" ), pt3B, dcaDaughters);
533547 qaHists.fill (HIST (" fH3LCosPAVsPt" ), pt3B, vtxCosPA);
534- keepEvent[3 ] = true ;
548+ keepEvent[kH3L3Body ] = true ;
535549 }
536550 }
537551 if (invmassAntiH3L >= trgH3L3Body.h3LMassLowerlimit && invmassAntiH3L <= trgH3L3Body.h3LMassUpperlimit ) {
0 commit comments