Skip to content

Commit 0528115

Browse files
committed
Please consider the following formatting changes
1 parent c4c3694 commit 0528115

2 files changed

Lines changed: 112 additions & 116 deletions

File tree

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 57 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ struct HfCorrelatorLcScHadrons {
550550
return y;
551551
}
552552

553-
template <typename TCollision, typename V0>
553+
template <typename TCollision, typename V0>
554554
bool selectionV0(TCollision const& collision, V0 const& candidate)
555555
{
556556
if (candidate.v0radius() < cfgV0.cfgV0radiusMin) {
@@ -810,11 +810,11 @@ struct HfCorrelatorLcScHadrons {
810810

811811
// Correlate Lc with all Lambda V0 in the same event
812812
for (const auto& v0 : v0s) {
813-
813+
814814
const int v0Lambda = 1;
815815
const int v0AntiLambda = -1;
816816

817-
if (!selectionV0(collision, v0)){
817+
if (!selectionV0(collision, v0)) {
818818
continue;
819819
}
820820

@@ -1000,89 +1000,87 @@ struct HfCorrelatorLcScHadrons {
10001000

10011001
if (passV0Sel && v0Mc.pdgCode() == kLambda0) {
10021002
if (isSelectedV0Daughter(trackV0Pos, v0, kProton) && isSelectedV0Daughter(trackV0Neg, v0, kPiMinus)) {
1003-
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1004-
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1005-
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
1006-
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1007-
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1008-
}
1003+
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1004+
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1005+
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
1006+
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1007+
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1008+
}
10091009

1010-
if (passPIDSelection(trackV0Pos, cfgCharmCand.trkPIDspecies, cfgCharmCand.pidTPCMax, cfgCharmCand.pidTOFMax, cfgCharmCand.tofPIDThreshold, cfgCharmCand.forceTOF)) {
1011-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1012-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1010+
if (passPIDSelection(trackV0Pos, cfgCharmCand.trkPIDspecies, cfgCharmCand.pidTPCMax, cfgCharmCand.pidTOFMax, cfgCharmCand.tofPIDThreshold, cfgCharmCand.forceTOF)) {
1011+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1012+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1013+
}
10131014
}
10141015
}
1015-
}
10161016
if (passV0Sel && v0Mc.pdgCode() == kLambda0Bar) {
1017-
if (isSelectedV0Daughter(trackV0Neg, v0, kProtonBar) && isSelectedV0Daughter(trackV0Pos, v0, kPiPlus)) {
1018-
registry.fill(HIST("hV0LambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1019-
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1017+
if (isSelectedV0Daughter(trackV0Neg, v0, kProtonBar) && isSelectedV0Daughter(trackV0Pos, v0, kPiPlus)) {
1018+
registry.fill(HIST("hV0LambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1019+
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
10201020

1021-
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
1022-
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1023-
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1024-
}
1025-
if (passPIDSelection(trackV0Neg, cfgCharmCand.trkPIDspecies, cfgCharmCand.pidTPCMax, cfgCharmCand.pidTOFMax, cfgCharmCand.tofPIDThreshold, cfgCharmCand.forceTOF)) {
1026-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1027-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1021+
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
1022+
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1023+
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1024+
}
1025+
if (passPIDSelection(trackV0Neg, cfgCharmCand.trkPIDspecies, cfgCharmCand.pidTPCMax, cfgCharmCand.pidTOFMax, cfgCharmCand.tofPIDThreshold, cfgCharmCand.forceTOF)) {
1026+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
1027+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
1028+
}
10281029
}
10291030
}
1030-
}
1031-
if (cfgV0.calEffV0 && countV0 == 1) {
1031+
if (cfgV0.calEffV0 && countV0 == 1) {
10321032
auto genPart = mcParticles.sliceBy(perTrueCollision, v0Mc.mcCollisionId());
10331033

1034-
for (const auto& particle : genPart) {
1035-
1036-
if (std::abs(particle.pdgCode()) != kLambda0) {
1037-
continue;
1038-
}
1039-
1040-
if (std::abs(particle.y()) > cfgCharmCand.yCandMax) {
1041-
continue;
1042-
}
1043-
if (!particle.isPhysicalPrimary() || !particle.producedByGenerator()) {
1044-
continue;
1045-
}
1034+
for (const auto& particle : genPart) {
10461035

1047-
auto daughterParts = particle.template daughters_as<aod::McParticles>();
1048-
const int8_t nDaughtersV0 = 2;
1036+
if (std::abs(particle.pdgCode()) != kLambda0) {
1037+
continue;
1038+
}
10491039

1050-
if (daughterParts.size() != nDaughtersV0) {
1051-
continue;
1052-
}
1040+
if (std::abs(particle.y()) > cfgCharmCand.yCandMax) {
1041+
continue;
1042+
}
1043+
if (!particle.isPhysicalPrimary() || !particle.producedByGenerator()) {
1044+
continue;
1045+
}
10531046

1054-
int8_t countPassedDaughter = 0;
1055-
for (const auto& currentDaughter : daughterParts) {
1047+
auto daughterParts = particle.template daughters_as<aod::McParticles>();
1048+
const int8_t nDaughtersV0 = 2;
10561049

1057-
if (std::abs(currentDaughter.eta()) > cfgCharmCand.etaTrackMax) {
1050+
if (daughterParts.size() != nDaughtersV0) {
10581051
continue;
10591052
}
10601053

1061-
if (std::abs(currentDaughter.pdgCode()) == kProton) {
1054+
int8_t countPassedDaughter = 0;
1055+
for (const auto& currentDaughter : daughterParts) {
10621056

1063-
if (currentDaughter.pt() > cfgV0.cfgV0DaughPrPtMax || currentDaughter.pt() < cfgV0.cfgV0DaughPrPtMin) {
1057+
if (std::abs(currentDaughter.eta()) > cfgCharmCand.etaTrackMax) {
10641058
continue;
10651059
}
10661060

1067-
} else if (std::abs(currentDaughter.pdgCode()) == kPiPlus) {
1068-
if (currentDaughter.pt() > cfgV0.cfgV0DaughPiPtMax || currentDaughter.pt() < cfgV0.cfgV0DaughPiPtMin) {
1061+
if (std::abs(currentDaughter.pdgCode()) == kProton) {
1062+
1063+
if (currentDaughter.pt() > cfgV0.cfgV0DaughPrPtMax || currentDaughter.pt() < cfgV0.cfgV0DaughPrPtMin) {
1064+
continue;
1065+
}
1066+
1067+
} else if (std::abs(currentDaughter.pdgCode()) == kPiPlus) {
1068+
if (currentDaughter.pt() > cfgV0.cfgV0DaughPiPtMax || currentDaughter.pt() < cfgV0.cfgV0DaughPiPtMin) {
1069+
continue;
1070+
}
1071+
1072+
} else {
10691073
continue;
10701074
}
1071-
1072-
} else {
1073-
continue;
1075+
countPassedDaughter++;
1076+
}
1077+
if (countPassedDaughter == nDaughtersV0) {
1078+
registry.fill(HIST("hV0PtPrimLambdaMcGen"), particle.pt());
10741079
}
1075-
countPassedDaughter++;
1076-
}
1077-
if (countPassedDaughter == nDaughtersV0) {
1078-
registry.fill(HIST("hV0PtPrimLambdaMcGen"), particle.pt());
10791080
}
10801081
}
1081-
}
10821082
countV0++;
1083-
10841083
}
1085-
10861084
}
10871085
}
10881086

PWGHF/HFC/TableProducer/correlatorXicHadrons.cxx

Lines changed: 55 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -773,89 +773,87 @@ struct HfCorrelatorXicHadrons {
773773

774774
if (passV0Sel && v0Mc.pdgCode() == kLambda0) {
775775
if (isSelectedV0Daughter(trackV0Pos, v0, kProton) && isSelectedV0Daughter(trackV0Neg, v0, kPiMinus)) {
776-
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
777-
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
778-
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
779-
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
780-
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
781-
}
776+
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
777+
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
778+
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
779+
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
780+
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
781+
}
782782

783-
if (passPIDSelection(trackV0Pos, cfgXicCand.trkPIDspecies, cfgXicCand.pidTPCMax, cfgXicCand.pidTOFMax, cfgXicCand.tofPIDThreshold, cfgXicCand.forceTOF)) {
784-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
785-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
783+
if (passPIDSelection(trackV0Pos, cfgXicCand.trkPIDspecies, cfgXicCand.pidTPCMax, cfgXicCand.pidTOFMax, cfgXicCand.tofPIDThreshold, cfgXicCand.forceTOF)) {
784+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
785+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
786+
}
786787
}
787788
}
788-
}
789789
if (passV0Sel && v0Mc.pdgCode() == kLambda0Bar) {
790-
if (isSelectedV0Daughter(trackV0Neg, v0, kProtonBar) && isSelectedV0Daughter(trackV0Pos, v0, kPiPlus)) {
791-
registry.fill(HIST("hV0LambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
792-
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
790+
if (isSelectedV0Daughter(trackV0Neg, v0, kProtonBar) && isSelectedV0Daughter(trackV0Pos, v0, kPiPlus)) {
791+
registry.fill(HIST("hV0LambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
792+
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
793793

794-
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
795-
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
796-
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
797-
}
798-
if (passPIDSelection(trackV0Neg, cfgXicCand.trkPIDspecies, cfgXicCand.pidTPCMax, cfgXicCand.pidTOFMax, cfgXicCand.tofPIDThreshold, cfgXicCand.forceTOF)) {
799-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
800-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
794+
if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary() && v0Mc.producedByGenerator()) {
795+
registry.fill(HIST("hV0PrimLambdaMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
796+
registry.fill(HIST("hV0PrimLambdaReflMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
797+
}
798+
if (passPIDSelection(trackV0Neg, cfgXicCand.trkPIDspecies, cfgXicCand.pidTPCMax, cfgXicCand.pidTOFMax, cfgXicCand.tofPIDThreshold, cfgXicCand.forceTOF)) {
799+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), partV0Neg.pt());
800+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), partV0Pos.pt());
801+
}
801802
}
802803
}
803-
}
804-
if (cfgV0.calEffV0 && countV0 == 1) {
804+
if (cfgV0.calEffV0 && countV0 == 1) {
805805
auto genPart = mcParticles.sliceBy(perTrueCollision, v0Mc.mcCollisionId());
806806

807-
for (const auto& particle : genPart) {
808-
809-
if (std::abs(particle.pdgCode()) != kLambda0) {
810-
continue;
811-
}
812-
813-
if (std::abs(particle.y()) > cfgXicCand.yCandMax) {
814-
continue;
815-
}
816-
if (!particle.isPhysicalPrimary() || !particle.producedByGenerator()) {
817-
continue;
818-
}
807+
for (const auto& particle : genPart) {
819808

820-
auto daughterParts = particle.template daughters_as<aod::McParticles>();
821-
const int8_t nDaughtersV0 = 2;
809+
if (std::abs(particle.pdgCode()) != kLambda0) {
810+
continue;
811+
}
822812

823-
if (daughterParts.size() != nDaughtersV0) {
824-
continue;
825-
}
813+
if (std::abs(particle.y()) > cfgXicCand.yCandMax) {
814+
continue;
815+
}
816+
if (!particle.isPhysicalPrimary() || !particle.producedByGenerator()) {
817+
continue;
818+
}
826819

827-
int8_t countPassedDaughter = 0;
828-
for (const auto& currentDaughter : daughterParts) {
820+
auto daughterParts = particle.template daughters_as<aod::McParticles>();
821+
const int8_t nDaughtersV0 = 2;
829822

830-
if (std::abs(currentDaughter.eta()) > cfgXicCand.etaTrackMax) {
823+
if (daughterParts.size() != nDaughtersV0) {
831824
continue;
832825
}
833826

834-
if (std::abs(currentDaughter.pdgCode()) == kProton) {
827+
int8_t countPassedDaughter = 0;
828+
for (const auto& currentDaughter : daughterParts) {
835829

836-
if (currentDaughter.pt() > cfgV0.cfgDaughPrPtMax || currentDaughter.pt() < cfgV0.cfgDaughPrPtMin) {
830+
if (std::abs(currentDaughter.eta()) > cfgXicCand.etaTrackMax) {
837831
continue;
838832
}
839833

840-
} else if (std::abs(currentDaughter.pdgCode()) == kPiPlus) {
841-
if (currentDaughter.pt() > cfgV0.cfgDaughPiPtMax || currentDaughter.pt() < cfgV0.cfgDaughPiPtMin) {
834+
if (std::abs(currentDaughter.pdgCode()) == kProton) {
835+
836+
if (currentDaughter.pt() > cfgV0.cfgDaughPrPtMax || currentDaughter.pt() < cfgV0.cfgDaughPrPtMin) {
837+
continue;
838+
}
839+
840+
} else if (std::abs(currentDaughter.pdgCode()) == kPiPlus) {
841+
if (currentDaughter.pt() > cfgV0.cfgDaughPiPtMax || currentDaughter.pt() < cfgV0.cfgDaughPiPtMin) {
842+
continue;
843+
}
844+
845+
} else {
842846
continue;
843847
}
844-
845-
} else {
846-
continue;
848+
countPassedDaughter++;
849+
}
850+
if (countPassedDaughter == nDaughtersV0) {
851+
registry.fill(HIST("hV0PtPrimLambdaMcGen"), particle.pt());
847852
}
848-
countPassedDaughter++;
849-
}
850-
if (countPassedDaughter == nDaughtersV0) {
851-
registry.fill(HIST("hV0PtPrimLambdaMcGen"), particle.pt());
852853
}
853854
}
854-
}
855855
countV0++;
856-
857856
}
858-
859857
}
860858
}
861859

@@ -1007,7 +1005,7 @@ struct HfCorrelatorXicHadrons {
10071005

10081006
// Correlate Xic with all Lambda V0 in the same event
10091007
for (const auto& v0 : v0s) {
1010-
if (!selectionV0(collision, v0)){
1008+
if (!selectionV0(collision, v0)) {
10111009
continue;
10121010
}
10131011
auto const& trackV0Pos = v0.template posTrack_as<TrackType>();

0 commit comments

Comments
 (0)