@@ -60,6 +60,7 @@ struct TreeWriterTpcV0 {
6060 using Colls = soa::Join<aod::Collisions, aod::Mults, aod::EvSels>;
6161 using MyBCTable = soa::Join<aod::BCsWithTimestamps, aod::BCTFinfoTable>;
6262 using V0sWithID = soa::Join<aod::V0Datas, aod::V0MapID>;
63+ using CascsWithID = soa::Join<aod::CascDatas, aod::CascMapID>;
6364
6465 // / Tables to be produced
6566 Produces<o2::aod::SkimmedTPCV0Tree> rowTPCTree;
@@ -80,9 +81,21 @@ struct TreeWriterTpcV0 {
8081 Configurable<float > downsamplingTsalisPions{" downsamplingTsalisPions" , -1 ., " Downsampling factor to reduce the number of pions" };
8182 Configurable<float > downsamplingTsalisProtons{" downsamplingTsalisProtons" , -1 ., " Downsampling factor to reduce the number of protons" };
8283 Configurable<float > downsamplingTsalisElectrons{" downsamplingTsalisElectrons" , -1 ., " Downsampling factor to reduce the number of electrons" };
84+ Configurable<float > downsamplingTsalisKaons{" downsamplingTsalisKaons" , -1 ., " Downsampling factor to reduce the number of kaons" };
8385 Configurable<float > maxPt4dwnsmplTsalisPions{" maxPt4dwnsmplTsalisPions" , 100 ., " Maximum Pt for applying downsampling factor of pions" };
8486 Configurable<float > maxPt4dwnsmplTsalisProtons{" maxPt4dwnsmplTsalisProtons" , 100 ., " Maximum Pt for applying downsampling factor of protons" };
8587 Configurable<float > maxPt4dwnsmplTsalisElectrons{" maxPt4dwnsmplTsalisElectrons" , 100 ., " Maximum Pt for applying downsampling factor of electrons" };
88+ Configurable<float > maxPt4dwnsmplTsalisKaons{" maxPt4dwnsmplTsalisKaons" , 100 ., " Maximum Pt for applying downsampling factor of kaons" };
89+
90+ enum { // Reconstructed V0
91+ kUndef = -1 ,
92+ kGamma = 0 ,
93+ kK0S = 1 ,
94+ kLambda = 2 ,
95+ kAntiLambda = 3 ,
96+ kOmega = 4 ,
97+ kAntiOmega = 5
98+ };
8699
87100 Filter trackFilter = (trackSelection.node() == 0 ) ||
88101 ((trackSelection.node() == 1 ) && requireGlobalTrackInFilter()) ||
@@ -336,7 +349,7 @@ struct TreeWriterTpcV0 {
336349 }
337350
338351 // / Apply a track quality selection with a filter!
339- void processStandard (Colls::iterator const & collision, soa::Filtered<Trks> const & tracks, V0sWithID const & v0s, aod::BCsWithTimestamps const &)
352+ void processStandard (Colls::iterator const & collision, soa::Filtered<Trks> const & tracks, V0sWithID const & v0s, CascsWithID const & cascs, aod::BCsWithTimestamps const &)
340353 {
341354 // / Check event slection
342355 if (!isEventSelected (collision, tracks)) {
@@ -396,6 +409,21 @@ struct TreeWriterTpcV0 {
396409 }
397410 }
398411 }
412+
413+ // / Loop over cascade candidates
414+ for (const auto & casc : cascs) {
415+ auto bachTrack = casc.bachelor_as <soa::Filtered<Trks>>();
416+ if (casc.cascaddid () == kUndef ) {
417+ continue ;
418+ }
419+ // Omega
420+ if (static_cast <bool >(bachTrack.pidbit () & (1 << kOmega ))) {
421+ if (downsampleTsalisCharged (bachTrack.pt (), downsamplingTsalisKaons, sqrtSNN, o2::track::pid_constants::sMasses [o2::track::PID::Kaon], maxPt4dwnsmplTsalisKaons)) {
422+ // fillSkimmedV0Table(casc, bachTrack, collision, bachTrack.tpcNSigmaPr(), bachTrack.tofNSigmaPr(), bachTrack.tpcExpSignalPr(bachTrack.tpcSignal()), o2::track::PID::Proton, runnumber, dwnSmplFactor_Pr, hadronicRate);
423+ }
424+ }
425+ }
426+
399427 } // / process Standard
400428 PROCESS_SWITCH (TreeWriterTpcV0, processStandard, " Standard V0 Samples for PID" , true );
401429
0 commit comments