Skip to content

Commit eb734fc

Browse files
author
sandeep dudi
committed
rapidity cut added in MC
1 parent 37c14c2 commit eb734fc

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

PWGLF/Tasks/Nuspex/spectraKinkPiKa.cxx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -517,28 +517,28 @@ struct SpectraKinkPiKa {
517517
return ptd;
518518
}
519519

520-
double maxKinkAngle(double pMother, double M, double mDaughter)
520+
double maxKinkAngle(double pMother, double M, double beta)
521521
{
522-
double pStar = (M * M - mDaughter * mDaughter) / (2 * M); // rest-frame momentum
523-
double denom = std::sqrt(pMother * pMother + mDaughter * mDaughter);
524-
double sinTheta = pStar / denom;
525-
if (sinTheta > 1.0)
526-
sinTheta = 1.0;
527-
return std::asin(sinTheta) * o2::constants::math::Rad2Deg;
522+
double num = M * beta; // rest-frame momentum
523+
double denom = std::sqrt(pMother * pMother * (1 - beta * beta) - (M * M * beta * beta));
524+
double tanTheta = num / denom;
525+
return std::atan(tanTheta) * o2::constants::math::Rad2Deg;
528526
}
529527

530528
double f1(double p) // K → μ ν
531529
{
530+
double betak = 0.9127037;
532531
return maxKinkAngle(p,
533532
o2::constants::physics::MassKaonCharged,
534-
o2::constants::physics::MassMuon);
533+
betak);
535534
}
536535

537536
inline double f2(double p) // π → μ ν
538537
{
538+
double betapi = 0.2731374;
539539
return maxKinkAngle(p,
540540
o2::constants::physics::MassPionCharged,
541-
o2::constants::physics::MassMuon);
541+
betapi);
542542
}
543543

544544
void processData(CollisionsFull::iterator const& collision, aod::KinkCands const& KinkCands, TracksFull const&)
@@ -744,7 +744,7 @@ struct SpectraKinkPiKa {
744744
rEventSelection.fill(HIST("hVertexZRec"), collision.posZ());
745745
rEventSelection.fill(HIST("hMultiplicity"), multiplicity);
746746

747-
auto kinkCandPerColl = KinkCands.sliceBy(mPerCol, collision.globalIndex());
747+
auto kinkCandPerColl = KinkCands.sliceBy(mPerCol, collision.index());
748748
for (const auto& kinkCand : kinkCandPerColl) {
749749
auto dauTrack = kinkCand.trackDaug_as<TracksFull>();
750750
auto mothTrack = kinkCand.trackMoth_as<TracksFull>();
@@ -754,9 +754,9 @@ struct SpectraKinkPiKa {
754754
if (mothTrack.collisionId() != dauTrack.collisionId()) {
755755
continue; // skip mismatched collision tracks
756756
}
757-
if (mothTrack.collisionId() != collision.globalIndex()) {
758-
continue; // not from this event
759-
}
757+
// if (mothTrack.collisionId() != collision.globalIndex()) {
758+
// continue; // not from this event
759+
// }
760760
if (dauTrack.sign() != mothTrack.sign()) {
761761
LOG(info) << "Skipping kink candidate with opposite sign daughter and mother: " << kinkCand.globalIndex();
762762
continue; // Skip if the daughter has the opposite sign as the mother
@@ -853,6 +853,9 @@ struct SpectraKinkPiKa {
853853
continue;
854854

855855
rpiKkink.fill(HIST("h1_tracks"), 12.0);
856+
if (std::abs(v0.Rapidity()) > rapCut) {
857+
continue;
858+
}
856859
if (additionalhist) {
857860
rpiKkink.fill(HIST("h2_moth_pt_vs_eta_rec"), v0.Pt(), v0.Eta(), multiplicity);
858861
rpiKkink.fill(HIST("h2_dau_pt_vs_eta_rec"), v1.Pt(), v1.Eta(), multiplicity);

0 commit comments

Comments
 (0)