Skip to content

Commit 6d75199

Browse files
Merge branch 'AliceO2Group:master' into master
2 parents 0924aa7 + c7ebcf6 commit 6d75199

File tree

17 files changed

+1269
-521
lines changed

17 files changed

+1269
-521
lines changed

Common/Tasks/centralityStudy.cxx

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ struct centralityStudy {
149149

150150
// For centrality studies if requested
151151
ConfigurableAxis axisCentrality{"axisCentrality", {100, 0, 100}, "FT0C percentile"};
152+
ConfigurableAxis axisImpactParameter{"axisImpactParameter", {200, 0.0f, 20.0f}, "b (fm)"};
152153
ConfigurableAxis axisPVChi2{"axisPVChi2", {300, 0, 30}, "FT0C percentile"};
153154
ConfigurableAxis axisDeltaTime{"axisDeltaTime", {300, 0, 300}, "#Delta time"};
154155

@@ -240,6 +241,15 @@ struct centralityStudy {
240241
histos.add("hNGlobalTracksVsNTPV", "hNGlobalTracksVsNTPV", kTH2F, {axisMultPVContributors, axisMultGlobalTracks});
241242
}
242243

244+
if (doprocessCollisionsWithResolutionStudy) {
245+
histos.add("hImpactParameterVsFT0A", "hImpactParameterVsFT0A", kTH2F, {axisMultFT0A, axisImpactParameter});
246+
histos.add("hImpactParameterVsFT0C", "hImpactParameterVsFT0C", kTH2F, {axisMultFT0C, axisImpactParameter});
247+
histos.add("hImpactParameterVsFT0M", "hImpactParameterVsFT0M", kTH2F, {axisMultFT0M, axisImpactParameter});
248+
histos.add("hImpactParameterVsFV0A", "hImpactParameterVsFV0A", kTH2F, {axisMultFV0A, axisImpactParameter});
249+
histos.add("hImpactParameterVsNMFTTracks", "hImpactParameterVsNMFTTracks", kTH2F, {axisMultMFTTracks, axisImpactParameter});
250+
histos.add("hImpactParameterVsNTPV", "hImpactParameterVsNTPV", kTH2F, {axisMultPVContributors, axisImpactParameter});
251+
}
252+
243253
if (doOccupancyStudyVsRawValues2d) {
244254
histos.add("hNcontribsProfileVsTrackOccupancyVsFT0C", "hNcontribsProfileVsTrackOccupancyVsFT0C", kTProfile2D, {axisTrackOccupancy, axisMultFT0C});
245255
histos.add("hNGlobalTracksProfileVsTrackOccupancyVsFT0C", "hNGlobalTracksProfileVsTrackOccupancyVsFT0C", kTProfile2D, {axisTrackOccupancy, axisMultFT0C});
@@ -676,6 +686,19 @@ struct centralityStudy {
676686
getHist(TH2, histPath + "hNGlobalTracksVsNTPV")->Fill(multNTracksPV, multNTracksGlobal);
677687
}
678688

689+
if constexpr (requires { collision.multMCExtraId(); }) {
690+
// requires monte carlo information
691+
if (collision.multMCExtraId() > -1) {
692+
auto mcCollision = collision.template multMCExtra_as<soa::Join<aod::MultMCExtras, aod::MultHepMCHIs>>();
693+
histos.fill(HIST("hImpactParameterVsFT0A"), multFT0A, mcCollision.impactParameter());
694+
histos.fill(HIST("hImpactParameterVsFT0C"), multFT0C, mcCollision.impactParameter());
695+
histos.fill(HIST("hImpactParameterVsFT0M"), (multFT0A + multFT0C), mcCollision.impactParameter());
696+
histos.fill(HIST("hImpactParameterVsFV0A"), multFV0A, mcCollision.impactParameter());
697+
histos.fill(HIST("hImpactParameterVsNMFTTracks"), mftNtracks, mcCollision.impactParameter());
698+
histos.fill(HIST("hImpactParameterVsNTPV"), multNTracksPV, mcCollision.impactParameter());
699+
}
700+
}
701+
679702
// if the table has centrality information
680703
if constexpr (requires { collision.centFT0C(); }) {
681704
// process FT0C centrality plots
@@ -709,29 +732,31 @@ struct centralityStudy {
709732
}
710733
}
711734

712-
if (doTimeStudies && collision.has_multBC()) {
713-
initRun(collision);
714-
auto multbc = collision.template multBC_as<aod::MultBCs>();
715-
uint64_t bcTimestamp = multbc.timestamp();
716-
float hoursAfterStartOfRun = static_cast<float>(bcTimestamp - startOfRunTimestamp) / 3600000.0;
717-
718-
getHist(TH2, histPath + "hFT0AVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0A());
719-
getHist(TH2, histPath + "hFT0CVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0C());
720-
getHist(TH2, histPath + "hFT0MVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0M());
721-
getHist(TH2, histPath + "hFV0AVsTime")->Fill(hoursAfterStartOfRun, collision.multFV0A());
722-
getHist(TH2, histPath + "hFV0AOuterVsTime")->Fill(hoursAfterStartOfRun, collision.multFV0AOuter());
723-
getHist(TH2, histPath + "hMFTTracksVsTime")->Fill(hoursAfterStartOfRun, collision.mftNtracks());
724-
getHist(TH2, histPath + "hNGlobalVsTime")->Fill(hoursAfterStartOfRun, collision.multNTracksGlobal());
725-
getHist(TH2, histPath + "hNTPVContributorsVsTime")->Fill(hoursAfterStartOfRun, collision.multPVTotalContributors());
726-
getHist(TProfile, histPath + "hPVzProfileCoVsTime")->Fill(hoursAfterStartOfRun, collision.multPVz());
727-
getHist(TProfile, histPath + "hPVzProfileBcVsTime")->Fill(hoursAfterStartOfRun, multbc.multFT0PosZ());
728-
if (doTimeStudyFV0AOuterVsFT0A3d) {
729-
histos.fill(HIST("h3dFV0AVsTime"), hoursAfterStartOfRun, collision.multFV0A(), collision.multFV0AOuter());
730-
}
731-
732-
if (irDoRateVsTime) {
733-
float interactionRate = mRateFetcher.fetch(ccdb.service, bcTimestamp, mRunNumber, irSource.value, irCrashOnNull) / 1000.; // kHz
734-
getHist(TProfile, histPath + "hIRProfileVsTime")->Fill(hoursAfterStartOfRun, interactionRate);
735+
if constexpr (requires { collision.has_multBC(); }) {
736+
if (doTimeStudies && collision.has_multBC()) {
737+
initRun(collision);
738+
auto multbc = collision.template multBC_as<aod::MultBCs>();
739+
uint64_t bcTimestamp = multbc.timestamp();
740+
float hoursAfterStartOfRun = static_cast<float>(bcTimestamp - startOfRunTimestamp) / 3600000.0;
741+
742+
getHist(TH2, histPath + "hFT0AVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0A());
743+
getHist(TH2, histPath + "hFT0CVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0C());
744+
getHist(TH2, histPath + "hFT0MVsTime")->Fill(hoursAfterStartOfRun, collision.multFT0M());
745+
getHist(TH2, histPath + "hFV0AVsTime")->Fill(hoursAfterStartOfRun, collision.multFV0A());
746+
getHist(TH2, histPath + "hFV0AOuterVsTime")->Fill(hoursAfterStartOfRun, collision.multFV0AOuter());
747+
getHist(TH2, histPath + "hMFTTracksVsTime")->Fill(hoursAfterStartOfRun, collision.mftNtracks());
748+
getHist(TH2, histPath + "hNGlobalVsTime")->Fill(hoursAfterStartOfRun, collision.multNTracksGlobal());
749+
getHist(TH2, histPath + "hNTPVContributorsVsTime")->Fill(hoursAfterStartOfRun, collision.multPVTotalContributors());
750+
getHist(TProfile, histPath + "hPVzProfileCoVsTime")->Fill(hoursAfterStartOfRun, collision.multPVz());
751+
getHist(TProfile, histPath + "hPVzProfileBcVsTime")->Fill(hoursAfterStartOfRun, multbc.multFT0PosZ());
752+
if (doTimeStudyFV0AOuterVsFT0A3d) {
753+
histos.fill(HIST("h3dFV0AVsTime"), hoursAfterStartOfRun, collision.multFV0A(), collision.multFV0AOuter());
754+
}
755+
756+
if (irDoRateVsTime) {
757+
float interactionRate = mRateFetcher.fetch(ccdb.service, bcTimestamp, mRunNumber, irSource.value, irCrashOnNull) / 1000.; // kHz
758+
getHist(TProfile, histPath + "hIRProfileVsTime")->Fill(hoursAfterStartOfRun, interactionRate);
759+
}
735760
}
736761
}
737762
}
@@ -741,12 +766,17 @@ struct centralityStudy {
741766
genericProcessCollision(collision);
742767
}
743768

769+
void processCollisionsWithResolutionStudy(soa::Join<aod::MultsRun3, aod::MFTMults, aod::Mult2MCExtras, aod::MultsExtra, aod::MultsGlobal, aod::MultSelections, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, soa::Join<aod::MultMCExtras, aod::MultHepMCHIs> const&)
770+
{
771+
genericProcessCollision(collision);
772+
}
773+
744774
void processCollisionsWithCentrality(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
745775
{
746776
genericProcessCollision(collision);
747777
}
748778

749-
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::Mults2BC, aod::FV0AOuterMults>::iterator const& collision, aod::MultBCs const&)
779+
void processCollisionsWithCentralityWithNeighbours(soa::Join<aod::MultsRun3, aod::MFTMults, aod::MultsExtra, aod::MultSelections, aod::CentFT0Cs, aod::MultsGlobal, aod::MultNeighs, aod::FV0AOuterMults>::iterator const& collision)
750780
{
751781
genericProcessCollision(collision);
752782
}
@@ -814,6 +844,7 @@ struct centralityStudy {
814844
}
815845

816846
PROCESS_SWITCH(centralityStudy, processCollisions, "per-collision analysis", false);
847+
PROCESS_SWITCH(centralityStudy, processCollisionsWithResolutionStudy, "per-collision analysis, with reso study", false);
817848
PROCESS_SWITCH(centralityStudy, processCollisionsWithCentrality, "per-collision analysis", true);
818849
PROCESS_SWITCH(centralityStudy, processCollisionsWithCentralityWithNeighbours, "per-collision analysis", false);
819850
PROCESS_SWITCH(centralityStudy, processBCs, "per-BC analysis", true);

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackCascadeExtended.cxx

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -851,32 +851,31 @@ struct femtoUniversePairTaskTrackCascadeExtended {
851851
continue;
852852

853853
cascQAHistos.fillQA<false, false>(part);
854-
855-
for (const auto& part : groupPartsOne) {
856-
int pdgCode = static_cast<int>(part.pidCut());
857-
if (pdgCode != confTrkPDGCodePartOne)
858-
continue;
859-
const auto& pdgTrackParticle = pdgMC->GetParticle(pdgCode);
860-
if (!pdgTrackParticle) {
861-
continue;
862-
}
863-
864-
if (pdgTrackParticle->Charge() > 0) {
865-
trackHistoPartOnePos.fillQA<false, false>(part);
866-
} else if (pdgTrackParticle->Charge() < 0) {
867-
trackHistoPartOneNeg.fillQA<false, false>(part);
868-
}
854+
}
855+
for (const auto& part : groupPartsOne) {
856+
int pdgCode = static_cast<int>(part.pidCut());
857+
if (pdgCode != confTrkPDGCodePartOne)
858+
continue;
859+
const auto& pdgTrackParticle = pdgMC->GetParticle(pdgCode);
860+
if (!pdgTrackParticle) {
861+
continue;
869862
}
870863

871-
for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) {
872-
if (static_cast<int>(p1.pidCut()) != confTrkPDGCodePartOne)
873-
continue;
874-
int pdgCodeCasc = static_cast<int>(p2.pidCut());
875-
if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar))
876-
continue;
877-
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
864+
if (pdgTrackParticle->Charge() > 0) {
865+
trackHistoPartOnePos.fillQA<false, false>(part);
866+
} else if (pdgTrackParticle->Charge() < 0) {
867+
trackHistoPartOneNeg.fillQA<false, false>(part);
878868
}
879869
}
870+
871+
for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) {
872+
if (static_cast<int>(p1.pidCut()) != confTrkPDGCodePartOne)
873+
continue;
874+
int pdgCodeCasc = static_cast<int>(p2.pidCut());
875+
if ((confCascType1 == 0 && pdgCodeCasc != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc != kXiPlusBar))
876+
continue;
877+
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
878+
}
880879
}
881880
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processSameEventMCgen, "Enable processing same event MC truth for track - cascade", false);
882881

@@ -895,24 +894,24 @@ struct femtoUniversePairTaskTrackCascadeExtended {
895894
continue;
896895

897896
cascQAHistos.fillQA<false, false>(part);
897+
}
898898

899-
auto pairProcessFunc = [&](auto& p1, auto& p2) -> void {
900-
int pdgCodeCasc1 = static_cast<int>(p1.pidCut());
901-
if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar))
902-
return;
903-
int pdgCodeCasc2 = static_cast<int>(p2.pidCut());
904-
if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar))
905-
return;
906-
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
907-
};
899+
auto pairProcessFunc = [&](auto& p1, auto& p2) -> void {
900+
int pdgCodeCasc1 = static_cast<int>(p1.pidCut());
901+
if ((confCascType1 == 0 && pdgCodeCasc1 != kOmegaMinus) || (confCascType1 == 2 && pdgCodeCasc1 != kOmegaPlusBar) || (confCascType1 == 1 && pdgCodeCasc1 != kXiMinus) || (confCascType1 == 3 && pdgCodeCasc1 != kXiPlusBar))
902+
return;
903+
int pdgCodeCasc2 = static_cast<int>(p2.pidCut());
904+
if ((confCascType2 == 0 && pdgCodeCasc2 != kOmegaMinus) || (confCascType2 == 2 && pdgCodeCasc2 != kOmegaPlusBar) || (confCascType2 == 1 && pdgCodeCasc2 != kXiMinus) || (confCascType2 == 3 && pdgCodeCasc2 != kXiPlusBar))
905+
return;
906+
sameEventCont.setPair<false>(p1, p2, multCol, confUse3D, 1.0f);
907+
};
908908

909-
if (confCascType1 == confCascType2) {
910-
for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsTwo, groupPartsTwo)))
911-
pairProcessFunc(p1, p2);
912-
} else {
913-
for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsTwo, groupPartsTwo)))
914-
pairProcessFunc(p1, p2);
915-
}
909+
if (confCascType1 == confCascType2) {
910+
for (const auto& [p1, p2] : combinations(CombinationsStrictlyUpperIndexPolicy(groupPartsTwo, groupPartsTwo)))
911+
pairProcessFunc(p1, p2);
912+
} else {
913+
for (const auto& [p1, p2] : combinations(CombinationsFullIndexPolicy(groupPartsTwo, groupPartsTwo)))
914+
pairProcessFunc(p1, p2);
916915
}
917916
}
918917
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processSameEventCascMCgen, "Enable processing same event MC truth for cascade - cascade", false);

0 commit comments

Comments
 (0)