Skip to content

Commit c8fb564

Browse files
committed
solved errors
1 parent 65e4fed commit c8fb564

1 file changed

Lines changed: 47 additions & 30 deletions

File tree

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -569,25 +569,33 @@ struct Kstarqa {
569569
if (configGp.isGlobalTracks) {
570570
if (!candidate.isGlobalTrack())
571571
return false;
572+
572573
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
573574
return false;
575+
574576
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
575577
return false;
578+
576579
if (!configGp.isApplyPtDepDCAxyCut) {
577580
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
578581
return false;
582+
579583
} else {
580584
if (std::abs(candidate.dcaXY()) > (0.0105 + 0.035 / std::pow(candidate.pt(), 1.1)))
581585
return false;
582586
}
583587
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
584588
return false;
589+
585590
if (candidate.itsNCls() < configGp.cfgITScluster)
586591
return false;
592+
587593
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
588594
return false;
595+
589596
if (configGp.hasITS && !candidate.hasITS())
590597
return false;
598+
591599
if (configGp.isITSTPCRefit) {
592600
if (!(candidate.flags() & o2::aod::track::ITSrefit) ||
593601
!(candidate.flags() & o2::aod::track::TPCrefit)) {
@@ -596,29 +604,38 @@ struct Kstarqa {
596604
}
597605
if (configGp.cfgPVContributor && !candidate.isPVContributor())
598606
return false;
607+
599608
} else if (!configGp.isGlobalTracks) {
600609
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
601610
return false;
602-
// if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax || std::abs(candidate.eta()) < configGp.cfgCutEtaMin)
611+
603612
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
604613
return false;
605-
// if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax || std::abs(candidate.dcaXY()) < configGp.cfgCutDCAxyMin)
614+
606615
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
607616
return false;
617+
608618
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
609619
return false;
620+
610621
// if (candidate.tpcCrossedRowsOverFindableCls() < configGp.cfgRCRFC)
611-
return false;
622+
// return false;
623+
612624
if (candidate.itsNCls() < configGp.cfgITScluster)
613625
return false;
626+
614627
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
615628
return false;
629+
616630
// if (candidate.itsChi2NCl() >= configGp.cfgITSChi2NCl)
617631
// return false;
632+
618633
// if (candidate.tpcChi2NCl() >= configGp.cfgTPCChi2NClMax || candidate.tpcChi2NCl() < configGp.cfgTPCChi2NClMin)
619634
// return false;
635+
620636
if (configGp.cfgPVContributor && !candidate.isPVContributor())
621637
return false;
638+
622639
if (!candidate.isPrimaryTrack())
623640
return false;
624641
}
@@ -1057,7 +1074,7 @@ struct Kstarqa {
10571074
bool isMix = false;
10581075

10591076
template <typename T1, typename T2>
1060-
void fillInvMass(const T1& dau1, const T1& dau2, const T1& motherVec, float multiplicity, bool isMix, const T2& track1, const T2& track2)
1077+
void fillInvMass(const T1& dau1, const T1& dau2, const T1& motherVec, float multiplicityFill, bool isMixInput, const T2& track1, const T2& track2)
10611078
{
10621079
daughterSelected = (boostDaugter1) ? dau1 : dau2; // polarization calculations
10631080

@@ -1075,10 +1092,10 @@ struct Kstarqa {
10751092
if (track1.sign() * track2.sign() < 0) {
10761093

10771094
// Same-event
1078-
if (!isMix) {
1095+
if (!isMixInput) {
10791096

10801097
if (std::abs(motherVec.Rapidity()) < configGp.rapidityMotherData) {
1081-
hInvMass.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicity, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
1098+
hInvMass.fill(HIST("h3KstarInvMassUnlikeSign"), multiplicityFill, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
10821099
}
10831100

10841101
// Rotational background
@@ -1096,30 +1113,30 @@ struct Kstarqa {
10961113
auto cosThetaStarHelicityRot = motherRot.Vect().Dot(daughterRotCM.Vect()) / (std::sqrt(daughterRotCM.Vect().Mag2()) * std::sqrt(motherRot.Vect().Mag2()));
10971114

10981115
if (calcRotational && std::abs(motherRot.Rapidity()) < configGp.rapidityMotherData) {
1099-
hInvMass.fill(HIST("h3KstarInvMassRotated"), multiplicity, motherRot.Pt(), motherRot.M(), cosThetaStarHelicityRot);
1116+
hInvMass.fill(HIST("h3KstarInvMassRotated"), multiplicityFill, motherRot.Pt(), motherRot.M(), cosThetaStarHelicityRot);
11001117
}
11011118
}
11021119

11031120
// Mixed-event
11041121
} else if (std::abs(motherVec.Rapidity()) < configGp.rapidityMotherData) {
11051122

1106-
hInvMass.fill(HIST("h3KstarInvMassMixed"), multiplicity, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
1123+
hInvMass.fill(HIST("h3KstarInvMassMixed"), multiplicityFill, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
11071124
}
11081125

11091126
// Like-sign pairs
11101127
} else {
11111128

1112-
if (!isMix) {
1129+
if (!isMixInput) {
11131130

11141131
if (calcLikeSign && std::abs(motherVec.Rapidity()) < configGp.rapidityMotherData) {
11151132

11161133
if (track1.sign() > 0 && track2.sign() > 0) {
11171134

1118-
hInvMass.fill(HIST("h3KstarInvMasslikeSignPP"), multiplicity, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
1135+
hInvMass.fill(HIST("h3KstarInvMasslikeSignPP"), multiplicityFill, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
11191136

11201137
} else if (track1.sign() < 0 && track2.sign() < 0) {
11211138

1122-
hInvMass.fill(HIST("h3KstarInvMasslikeSignMM"), multiplicity, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
1139+
hInvMass.fill(HIST("h3KstarInvMasslikeSignMM"), multiplicityFill, motherVec.Pt(), motherVec.M(), cosThetaStarHelicity);
11231140
}
11241141
}
11251142
}
@@ -1339,7 +1356,7 @@ struct Kstarqa {
13391356
void processME(EventCandidatesMix const&, TrackCandidates const&)
13401357
{
13411358
// Map estimator to pair and multiplicity accessor
1342-
auto runMixing = [&](auto& pair, auto multiplicityGetter) {
1359+
auto runMixing = [&](const auto& pair, auto multiplicityGetter) {
13431360
for (const auto& [c1, tracks1, c2, tracks2] : pair) {
13441361
// if (!c1.sel8() || !c2.sel8())
13451362
// continue;
@@ -1441,7 +1458,7 @@ struct Kstarqa {
14411458

14421459
void processMEMC(EventCandidatesMC const&, TrackCandidatesMC const&, aod::McParticles const&, aod::McCollisions const&)
14431460
{
1444-
auto runMixing = [&](auto& pair, auto multiplicityGetter) {
1461+
auto runMixing = [&](const auto& pair, auto multiplicityGetter) {
14451462
for (const auto& [c1, tracks1, c2, tracks2] : pair) {
14461463

14471464
if (!selectionEvent(c1, false) || !selectionEvent(c2, false)) { // don't fill event cut histogram
@@ -1955,7 +1972,7 @@ struct Kstarqa {
19551972
}
19561973
hInvMass.fill(HIST("CorrFactors/hGenEvents"), multiplicityNch, 2.5);
19571974

1958-
float multiplicity = -1.0;
1975+
float multiplicitySigLoss = -1.0;
19591976
bool isSelectedEvent = false;
19601977

19611978
for (auto const& collision : collisions) {
@@ -1965,21 +1982,21 @@ struct Kstarqa {
19651982
continue;
19661983

19671984
if (cSelectMultEstimator == kFT0M) {
1968-
multiplicity = collision.centFT0M();
1985+
multiplicitySigLoss = collision.centFT0M();
19691986
} else if (cSelectMultEstimator == kFT0A) {
1970-
multiplicity = collision.centFT0A();
1987+
multiplicitySigLoss = collision.centFT0A();
19711988
} else if (cSelectMultEstimator == kFT0C) {
1972-
multiplicity = collision.centFT0C();
1989+
multiplicitySigLoss = collision.centFT0C();
19731990
} else if (cSelectMultEstimator == kFV0A) {
1974-
multiplicity = collision.centFV0A();
1991+
multiplicitySigLoss = collision.centFV0A();
19751992
}
19761993
isSelectedEvent = true;
19771994
}
19781995

19791996
// auto multiplicityGen = -1;
19801997
// multiplicityGen = mcCollision.centFT0M();
19811998

1982-
hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch);
1999+
hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicitySigLoss, multiplicityNch);
19832000
hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size());
19842001
hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicityNch);
19852002
if (isSelectedEvent) {
@@ -2033,8 +2050,8 @@ struct Kstarqa {
20332050
if ((passkaon && passpion) && (hasPos && hasNeg)) {
20342051
mother = daughter1 + daughter2; // Kstar meson
20352052

2036-
hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt());
2037-
hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicity, mother.Pt());
2053+
hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicitySigLoss, mother.Pt());
2054+
hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicitySigLoss, mother.Pt());
20382055
hInvMass.fill(HIST("CorrFactors/hSignalLoss1"), mother.pt(), multiplicityNch);
20392056
if (isSelectedEvent) {
20402057
hInvMass.fill(HIST("CorrFactors/hSignalLoss2"), mother.pt(), multiplicityNch);
@@ -2694,7 +2711,7 @@ struct Kstarqa {
26942711
void processMEPhi(EventCandidatesMix const&, TrackCandidates const&)
26952712
{
26962713
// Map estimator to pair and multiplicity accessor
2697-
auto runMixing = [&](auto& pair, auto multiplicityGetter) {
2714+
auto runMixing = [&](const auto& pair, auto multiplicityGetter) {
26982715
for (const auto& [c1, tracks1, c2, tracks2] : pair) {
26992716
// if (!c1.sel8() || !c2.sel8())
27002717
// continue;
@@ -2880,7 +2897,7 @@ struct Kstarqa {
28802897
}
28812898
hInvMass.fill(HIST("CorrFactors/hGenEvents"), multiplicityNch, 2.5);
28822899

2883-
float multiplicity = -1.0;
2900+
float multiplicityPhi = -1.0;
28842901
bool isSelectedEvent = false;
28852902

28862903
for (auto const& collision : collisions) {
@@ -2890,21 +2907,21 @@ struct Kstarqa {
28902907
continue;
28912908

28922909
if (cSelectMultEstimator == kFT0M) {
2893-
multiplicity = collision.centFT0M();
2910+
multiplicityPhi = collision.centFT0M();
28942911
} else if (cSelectMultEstimator == kFT0A) {
2895-
multiplicity = collision.centFT0A();
2912+
multiplicityPhi = collision.centFT0A();
28962913
} else if (cSelectMultEstimator == kFT0C) {
2897-
multiplicity = collision.centFT0C();
2914+
multiplicityPhi = collision.centFT0C();
28982915
} else if (cSelectMultEstimator == kFV0A) {
2899-
multiplicity = collision.centFV0A();
2916+
multiplicityPhi = collision.centFV0A();
29002917
}
29012918
isSelectedEvent = true;
29022919
}
29032920

29042921
// auto multiplicityGen = -1;
29052922
// multiplicityGen = mcCollision.centFT0M();
29062923

2907-
hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicity, multiplicityNch);
2924+
hInvMass.fill(HIST("CorrFactors/hMultiplicityVsMultMC"), multiplicityPhi, multiplicityNch);
29082925
hInvMass.fill(HIST("CorrFactors/hNrecInGen"), collisions.size());
29092926
hInvMass.fill(HIST("CorrFactors/MultiplicityGen"), multiplicityNch);
29102927
if (isSelectedEvent) {
@@ -2958,8 +2975,8 @@ struct Kstarqa {
29582975
if ((passkaon && passpion) && (hasPos && hasNeg)) {
29592976
mother = daughter1 + daughter2; // Kstar meson
29602977

2961-
hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicity, mother.Pt());
2962-
hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicity, mother.Pt());
2978+
hInvMass.fill(HIST("CorrFactors/h2dGenKstar"), multiplicityPhi, mother.Pt());
2979+
hInvMass.fill(HIST("CorrFactors/h3dGenKstarVsMultMCVsMultiplicity"), multiplicityNch, multiplicityPhi, mother.Pt());
29632980
hInvMass.fill(HIST("CorrFactors/hSignalLoss1"), mother.pt(), multiplicityNch);
29642981
if (isSelectedEvent) {
29652982
hInvMass.fill(HIST("CorrFactors/hSignalLoss2"), mother.pt(), multiplicityNch);

0 commit comments

Comments
 (0)