@@ -77,6 +77,7 @@ struct TreeWriterTpcV0 {
7777 Configurable<double > dwnSmplFactor_Pi{" dwnSmplFactor_Pi" , 1 ., " downsampling factor for pions, default fraction to keep is 1." };
7878 Configurable<double > dwnSmplFactor_Pr{" dwnSmplFactor_Pr" , 1 ., " downsampling factor for protons, default fraction to keep is 1." };
7979 Configurable<double > dwnSmplFactor_El{" dwnSmplFactor_El" , 1 ., " downsampling factor for electrons, default fraction to keep is 1." };
80+ Configurable<double > dwnSmplFactor_Ka{" dwnSmplFactor_Ka" , 1 ., " downsampling factor for kaons, default fraction to keep is 1." };
8081 Configurable<float > sqrtSNN{" sqrt_s_NN" , 0 ., " sqrt(s_NN), used for downsampling with the Tsallis distribution" };
8182 Configurable<float > downsamplingTsalisPions{" downsamplingTsalisPions" , -1 ., " Downsampling factor to reduce the number of pions" };
8283 Configurable<float > downsamplingTsalisProtons{" downsamplingTsalisProtons" , -1 ., " Downsampling factor to reduce the number of protons" };
@@ -122,7 +123,7 @@ struct TreeWriterTpcV0 {
122123
123124 const float alpha = v0casc.alpha ();
124125 const float qt = v0casc.qtarm ();
125- const float cosPA = GetCosPA (v0casc);
126+ const float cosPA = GetCosPA (v0casc, collision );
126127 const float pT = v0casc.pt ();
127128 const float v0radius = GetRadius (v0casc);
128129 const float gammapsipair = v0casc.psipair ();
@@ -349,15 +350,17 @@ struct TreeWriterTpcV0 {
349350 }
350351
351352 // / Evaluate cosPA of the v0
352- double GetCosPA (V0sWithID::iterator const & v0)
353+ template <typename CollisionType>
354+ double GetCosPA (V0sWithID::iterator const & v0, CollisionType const &)
353355 {
354356 return v0.v0cosPA ();
355357 }
356358
357359 // / Evaluate cosPA of the cascade
358- double GetCosPA (CascsWithID::iterator const & casc)
360+ template <typename CollisionType>
361+ double GetCosPA (CascsWithID::iterator const & casc, CollisionType const & collision)
359362 {
360- return casc.casccosPA ();
363+ return casc.casccosPA (collision. posX (), collision. posY (), collision. posZ () );
361364 }
362365
363366 // / Evaluate radius of the v0
@@ -440,10 +443,10 @@ struct TreeWriterTpcV0 {
440443 if (casc.cascaddid () == kUndef ) {
441444 continue ;
442445 }
443- // Omega
444- if (static_cast <bool >(bachTrack.pidbit () & (1 << kOmega ))) {
446+ // Omega and antiomega
447+ if (static_cast <bool >(bachTrack.pidbit () & (1 << kOmega )) || static_cast < bool >(bachTrack. pidbit () & ( 1 << kAntiOmega )) ) {
445448 if (downsampleTsalisCharged (bachTrack.pt (), downsamplingTsalisKaons, sqrtSNN, o2::track::pid_constants::sMasses [o2::track::PID::Kaon], maxPt4dwnsmplTsalisKaons)) {
446- fillSkimmedV0Table (casc, bachTrack, collision, bachTrack.tpcNSigmaPr (), bachTrack.tofNSigmaPr (), bachTrack.tpcExpSignalPr (bachTrack.tpcSignal ()), o2::track::PID::Proton , runnumber, dwnSmplFactor_Pr , hadronicRate);
449+ fillSkimmedV0Table (casc, bachTrack, collision, bachTrack.tpcNSigmaKa (), bachTrack.tofNSigmaKa (), bachTrack.tpcExpSignalKa (bachTrack.tpcSignal ()), o2::track::PID::Kaon , runnumber, dwnSmplFactor_Ka , hadronicRate);
447450 }
448451 }
449452 }
0 commit comments