Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master into kfstudy #4

Merged
merged 64 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4257a09
PWGEM/PhotonMeson: fix for e pt resolution (#4050)
dsekihat Dec 4, 2023
f8029f4
DPG: add TOF selection (#4057)
njacazio Dec 4, 2023
ed579a5
Mother mcParticle label added (#4059)
ddobrigk Dec 4, 2023
6685b5a
PWGHF: add histograms and variable, change filter-->testbit in toXiPi…
ZFederica Dec 4, 2023
2487685
PWGLF: Change in v0cascadesqa.cxx (#4060)
lhusova Dec 4, 2023
43f989b
fix in collisions loop (#4062)
ercolessi Dec 4, 2023
707a91a
PWGJE : jetfinder(hf/full)QA finer phi binning (#4032)
aimeric-landou Dec 4, 2023
3e744ee
PWGDQ: Add possibility to apply BDT cuts and fill histo with normalis…
fgrosa Dec 4, 2023
fe5437c
Add the possibility to cut only on opening angle for the prefilter (#…
rbailhac Dec 4, 2023
c6d2e81
Analysis task for F1-p correlation (#4068)
skundu692 Dec 4, 2023
570edf2
EventFiltering/PWGHF: small fixes to task for signal evaluation (#4069)
fgrosa Dec 4, 2023
21f4cac
PWGHF: Modified candidateSelectorDsToKKPi. Added HfMlResponseDsToKKPi…
scattaru Dec 4, 2023
dea9413
Rework UPC skimmer, part 2 (#4071)
nburmaso Dec 5, 2023
16fb6cc
EventFiltering: add tag as generic signal from BDT (no prompt or nonp…
fgrosa Dec 5, 2023
c994a0b
PWGDQ: small fixes to JPsi-HF task (#4073)
fgrosa Dec 5, 2023
40d8db4
PWGLF: Update lambda1520SpherocityAnalysis.cxx (#4064)
yashpatley Dec 5, 2023
5afdaad
[PWGJE] adding TRD checks (#4075)
jloemker Dec 5, 2023
d561fd7
LF: fixes in sgn loss histograms (#4077)
ercolessi Dec 5, 2023
15c2eae
Split trk cov (#4080)
njacazio Dec 5, 2023
53b55ae
Add MC check (#4081)
njacazio Dec 5, 2023
91aa3c4
add diagnostic instogram for pt, eta, phi matching + add kinematic ma…
maciacco Dec 5, 2023
a4c0f80
Add check on n process functions (#4083)
njacazio Dec 6, 2023
885875d
Extend LFprop (#4085)
njacazio Dec 6, 2023
ade22ec
Fix init of DCA (#4084)
njacazio Dec 6, 2023
6e0ce98
Add extra TOF debug information for testing purposes (#4074)
ddobrigk Dec 6, 2023
2b441bd
PID: add unpack function (#4065)
njacazio Dec 6, 2023
a398105
PWGHF: Improve omegac tree creator using ST (#4086)
qgp Dec 6, 2023
21acf38
PWGHF: check on number of process function enabled toXiPi task (#4079)
ZFederica Dec 6, 2023
3857fb9
Adapt ranges of histogram to PbPb 2023 data (#4090)
rbailhac Dec 6, 2023
9214f4a
[PWGDQ] Adding dedicated process function for muons with collision in…
lucamicheletti93 Dec 6, 2023
937f1c7
Updated K0short V0 analysis (#4094)
AlessandroSturniolo Dec 6, 2023
449fa6f
PWGEM/PhotonMeson: update for TPConly tracks (#4097)
dsekihat Dec 7, 2023
740e77a
[PWGHF] XicTopKpi ML task added. TreeCreator and Selector updated (#4…
cterrevo Dec 7, 2023
f1d71ba
add Daiki to code owner in PWGEM (#4099)
dsekihat Dec 7, 2023
54bbf91
PWGMM: dndeta: update task structure (#4100)
aalkin Dec 7, 2023
73947d0
PWGJE: Adding Hadron-Jet analysis code (#4070)
dajones2 Dec 7, 2023
221b636
Femtouniverse (#4096)
Eloviyo Dec 7, 2023
0f8a529
PWGLF: Strangeness QC task (QC table producer + PP task) (#4095)
nepeivodaRS Dec 7, 2023
45dbb65
[PWG-LF]: bugfix in DeltaP histograms (separate by charge and species…
ivorobye Dec 7, 2023
e5e20c3
Add histogram and modification in histogram variables (#4105)
skundu692 Dec 7, 2023
9052156
modified UE calculation + small improvements (#4106)
alcaliva Dec 7, 2023
1e084f6
PWGEM/PhotonMeson: Update EMCalQCTask (#4107)
nstrangm Dec 7, 2023
52d0e1d
[PWFLG] LightNucleiTask - Add rapidity plots (#4093)
giovannimalfattore Dec 7, 2023
f0b5f3b
Bugfix in link builders (#4102)
ddobrigk Dec 7, 2023
6178aea
Add typecast (#4101)
ddobrigk Dec 7, 2023
ad8d833
PWGEM/PhotonMeson: remove unnecessary PHOS/EMC dep. in MaterialBudget…
dsekihat Dec 7, 2023
ab0403f
PWGEM/PhotonMeson: quick fix for TPConly tracks (#4111)
dsekihat Dec 8, 2023
b6a5e46
Update onTheFlyTOFPID.cxx (#4036)
ddobrigk Dec 8, 2023
1736f52
added more QA histograms (#4113)
alcaliva Dec 8, 2023
4f84708
Fix to avoid double histo definition (#4114)
rbailhac Dec 8, 2023
f49c6d9
PWGJE: fix track table production and isEventSelected() (#4116)
jloemker Dec 9, 2023
6ab1697
fixed bug (#4119)
Eloviyo Dec 9, 2023
915a622
added y cut and MC for efficiency (#4122)
alcaliva Dec 9, 2023
b33c173
PWGLF: Update lambda1520SpherocityAnalysis.cxx (#4120)
yashpatley Dec 9, 2023
e8a8a67
PWGHF: implement track selections for bachelor in lfCascade+bachelor …
ZFederica Dec 9, 2023
586b3d1
PWGCF: upload PbPb flow analysis for hyperloop (#4088)
Luzhiyongg Dec 9, 2023
dcecb3d
PWGEM/PhotonMeson: replace collisionId with globalIndex (#4124)
dsekihat Dec 10, 2023
e27a5ff
Add track cuts for pions associated to ST cascades (#4117)
qgp Dec 10, 2023
4a5bf28
adding new column and filters (#4104)
sofiatomassini Dec 10, 2023
ade4924
added reweighting for efficiency (#4126)
alcaliva Dec 10, 2023
9c1b332
[EMC-1108] TrackMatching: Changed dEta and dPhi histograms to have SM…
mhemmer-cern Dec 11, 2023
d49fb70
added histogram for proton reweighting (#4129)
alcaliva Dec 11, 2023
109d661
Extend V0 eff. QA to cover mor PDGs (#4127)
njacazio Dec 11, 2023
cd9ca62
Merge branch 'kfstudy' into master
creetz16 Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ struct OnTheFlyTOFPID {

if (scalarProduct1 > scalarProduct2) {
modulus = std::hypot(point1[0] - trcCircle.xC, point1[1] - trcCircle.yC) * std::hypot(startPoint[0] - trcCircle.xC, startPoint[1] - trcCircle.yC);
cosAngle = (point1[0] - trcCircle.xC) * (startPoint[0] - trcCircle.xC) + (point1[1] - trcCircle.yC) * (startPoint[0] - trcCircle.yC);
cosAngle = (point1[0] - trcCircle.xC) * (startPoint[0] - trcCircle.xC) + (point1[1] - trcCircle.yC) * (startPoint[1] - trcCircle.yC);
} else {
modulus = std::hypot(point2[0] - trcCircle.xC, point2[1] - trcCircle.yC) * std::hypot(startPoint[0] - trcCircle.xC, startPoint[1] - trcCircle.yC);
cosAngle = (point2[0] - trcCircle.xC) * (startPoint[0] - trcCircle.xC) + (point2[1] - trcCircle.yC) * (startPoint[0] - trcCircle.yC);
cosAngle = (point2[0] - trcCircle.xC) * (startPoint[0] - trcCircle.xC) + (point2[1] - trcCircle.yC) * (startPoint[1] - trcCircle.yC);
}
cosAngle /= modulus;
length = trcCircle.rC * TMath::ACos(cosAngle);
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/PWGDQ @alibuild @iarsene @dsekihat @feisenhu @lucamicheletti93
/PWGEM @alibuild @mikesas @rbailhac @feisenhu
/PWGEM/Dilepton @alibuild @mikesas @rbailhac @dsekihat @ivorobye @feisenhu
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern
/PWGEM/PhotonMeson @alibuild @mikesas @rbailhac @m-c-danisch @novitzky @mhemmer-cern @dsekihat
/PWGHF @alibuild @vkucera @fcolamar @fgrosa @fcatalan92 @mfaggin @mmazzilli @deepathoms @nzardosh @NicoleBastid
/PWGLF @alibuild @lramona @alcaliva @lbariogl @chiarapinto @BongHwi @lbarnby @mbombara @iravasen @njacazio @ChiaraDeMartin95 @skundu692
/PWGMM @alibuild @aalkin
Expand Down
9 changes: 8 additions & 1 deletion Common/DataModel/PIDResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ void packInTable(const float& valueToBin, T& table)
}
}

// Function to unpack a binned value into a float
template <typename binningType>
float unPackInTable(const typename binningType::binned_t& valueToUnpack)
{
return binningType::bin_width * static_cast<float>(valueToUnpack);
}

// Checkers for TOF PID hypothesis availability (runtime)
template <class T>
using hasTOFEl = decltype(std::declval<T&>().tofNSigmaEl());
Expand Down Expand Up @@ -481,7 +488,7 @@ DECLARE_SOA_COLUMN(TOFNSigmaAl, tofNSigmaAl, float); //! Nsigma separation with
// Macro to convert the stored Nsigmas to floats
#define DEFINE_UNWRAP_NSIGMA_COLUMN(COLUMN, COLUMN_NAME) \
DECLARE_SOA_DYNAMIC_COLUMN(COLUMN, COLUMN_NAME, \
[](binning::binned_t nsigma_binned) -> float { return binning::bin_width * static_cast<float>(nsigma_binned); });
[](binning::binned_t nsigma_binned) -> float { return o2::aod::pidutils::unPackInTable<binning>(nsigma_binned); });

namespace pidtof_tiny
{
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/trackPropagation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct TrackPropagation {

for (auto& track : tracks) {
if constexpr (fillCovMat) {
if (fillTracksDCACov) {
if (fillTracksDCA || fillTracksDCACov) {
mDcaInfoCov.set(999, 999, 999, 999, 999);
}
setTrackParCov(track, mTrackParCov);
Expand Down
102 changes: 90 additions & 12 deletions DPG/Tasks/AOTTrack/perfK0sResolution.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ struct perfK0sResolution {
const AxisSpec etaAxis{etaBins, "#eta"};
const AxisSpec phiAxis{phiBins, "#phi"};

int nProc = 0;
if (doprocessData) {
LOG(info) << "processData enabled";
nProc++;
}
if (doprocessMC) {
LOG(info) << "processMC enabled";
nProc++;
}

registry.add("h2_masspT", "h2_masspT", {HistType::kTH2F, {mAxis, pTAxis}});
registry.add("h2_masseta", "h2_masseta", {HistType::kTH2F, {mAxis, etaAxis}});
registry.add("h2_massphi", "h2_massphi", {HistType::kTH2F, {mAxis, phiAxis}});
Expand All @@ -62,26 +72,70 @@ struct perfK0sResolution {
Configurable<float> nSigTPC{"nSigTPC", 10., "nSigTPC"};
Configurable<int> trdSelectionPos{"trdSelectionPos", 0, "Flag for the TRD selection on positive daughters: -1 no TRD, 0 no selection, 1 TRD"};
Configurable<int> trdSelectionNeg{"trdSelectionNeg", 0, "Flag for the TRD selection on negative daughters: -1 no TRD, 0 no selection, 1 TRD"};
Configurable<int> tofSelectionPos{"tofSelectionPos", 0, "Flag for the TOF selection on positive daughters: -1 no TOF, 0 no selection, 1 TOF"};
Configurable<int> tofSelectionNeg{"tofSelectionNeg", 0, "Flag for the TOF selection on negative daughters: -1 no TOF, 0 no selection, 1 TOF"};
Configurable<bool> eventSelection{"eventSelection", true, "event selection"};

template <typename T1, typename T2, typename C>
bool acceptV0(const T1& v0, const T2& ntrack, const T2& ptrack, const C& collision)
{
// Apply selections on V0
if (TMath::Abs(v0.yK0Short()) > rapidity)
if (TMath::Abs(v0.yK0Short()) > rapidity) {
return false;
if (v0.v0cosPA() < v0setting_cospa)
}
if (v0.v0cosPA() < v0setting_cospa) {
return false;
if (v0.v0radius() < v0setting_radius)
}
if (v0.v0radius() < v0setting_radius) {
return false;
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * pid_constants::sMasses[PID::K0] > 2.684 * v0lifetime)
}
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * pid_constants::sMasses[PID::K0] > 2.684 * v0lifetime) {
return false;
}

// Apply selections on V0 daughters
if (!ntrack.hasTPC() || !ptrack.hasTPC())
if (!ntrack.hasTPC() || !ptrack.hasTPC()) {
return false;
if (ntrack.tpcNSigmaPi() > nSigTPC || ptrack.tpcNSigmaPi() > nSigTPC)
}
if (ntrack.tpcNSigmaPi() > nSigTPC || ptrack.tpcNSigmaPi() > nSigTPC) {
return false;
}
// TOF selection
switch (tofSelectionPos) {
case -1:
if (ptrack.hasTOF()) {
return false;
}
break;
case 0:
break;
case 1:
if (!ptrack.hasTOF()) {
return false;
}
break;
default:
LOG(fatal) << "Invalid TRD selection for positive daughter";
break;
}
switch (tofSelectionNeg) {
case -1:
if (ntrack.hasTOF()) {
return false;
}
break;
case 0:
break;
case 1:
if (!ntrack.hasTOF()) {
return false;
}
break;
default:
LOG(fatal) << "Invalid TRD selection for negative daughter";
break;
}
// TRD selection
switch (trdSelectionPos) {
case -1:
if (ptrack.hasTRD()) {
Expand Down Expand Up @@ -121,7 +175,7 @@ struct perfK0sResolution {

Filter v0Filter = nabs(aod::v0data::dcapostopv) > v0setting_dcapostopv&& nabs(aod::v0data::dcanegtopv) > v0setting_dcanegtopv&& aod::v0data::dcaV0daughters < v0setting_dcav0dau;

void process(SelectedCollisions::iterator const& collision, soa::Filtered<aod::V0Datas> const& fullV0s, PIDTracks const& tracks)
void processData(SelectedCollisions::iterator const& collision, soa::Filtered<aod::V0Datas> const& fullV0s, PIDTracks const& tracks)
{
if (eventSelection && !collision.sel8())
return;
Expand All @@ -138,10 +192,34 @@ struct perfK0sResolution {
registry.fill(HIST("h2_massphi"), v0.mK0Short(), v0.phi());
}
}
PROCESS_SWITCH(perfK0sResolution, processData, "Process data", true);

void processMC(SelectedCollisions::iterator const& collision, soa::Filtered<aod::V0Datas> const& fullV0s, soa::Join<PIDTracks, aod::McTrackLabels> const& tracks, aod::McParticles const&)
{
if (eventSelection && !collision.sel8())
return;

for (auto& v0 : fullV0s) {

const auto& posTrack = v0.posTrack_as<soa::Join<PIDTracks, aod::McTrackLabels>>();
const auto& negTrack = v0.negTrack_as<soa::Join<PIDTracks, aod::McTrackLabels>>();
if (!acceptV0(v0, negTrack, posTrack, collision))
continue;
if (!posTrack.has_mcParticle()) {
continue;
}
if (!negTrack.has_mcParticle()) {
continue;
}
if (posTrack.mcParticle().pdgCode() != PID::Pion || negTrack.mcParticle().pdgCode() != PID::Pion) {
continue;
}
registry.fill(HIST("h2_masspT"), v0.mK0Short(), v0.pt());
registry.fill(HIST("h2_masseta"), v0.mK0Short(), v0.eta());
registry.fill(HIST("h2_massphi"), v0.mK0Short(), v0.phi());
}
}
PROCESS_SWITCH(perfK0sResolution, processMC, "Process MC", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<perfK0sResolution>(cfgc)};
}
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<perfK0sResolution>(cfgc)}; }
136 changes: 63 additions & 73 deletions DPG/Tasks/AOTTrack/qaEfficiencyV0s.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,45 +36,53 @@
#include "THashList.h"

using namespace o2::framework;
static constexpr int nSpecies = 2; // One per PDG
// static constexpr const char* particleTitle[nSpecies] = {"K0s", "-K0s"};
static constexpr int PDGs[nSpecies] = {kK0Short, -kK0Short};
int pdgToIndex(int pdg)
{
for (int i = 0; i < nSpecies; i++) {
if (pdg == PDGs[i]) {
return i;
}
}
return -1;
}
static constexpr int kHistoPtNum = 0;
static constexpr int kHistoPtDen = 1;
static constexpr int kHistoTot = 2;

std::shared_ptr<TH1> histograms[nSpecies][kHistoTot] = {{nullptr}};
std::shared_ptr<TH1> histogramsPrm[nSpecies][kHistoTot] = {{nullptr}};
std::shared_ptr<TH1> histogramsPrmRap[nSpecies][kHistoTot] = {{nullptr}};

struct QaEfficiencyV0s {
// Particle information
static constexpr int nSpecies = 1; // One per PDG
static constexpr const char* particleTitle[nSpecies] = {"K0s"};
static constexpr int PDGs[nSpecies] = {kK0Short};
// Particle only selection
Configurable<bool> doK0s{"do-k0s", false, "Flag to run with the PDG code of k0s"};
Configurable<float> rapidityCut{"rapidityCut", 0.5, "Rapidity cut"};
ConfigurableAxis ptBins{"ptBins", {200, 0.f, 5.f}, "Pt binning"};
OutputObj<THashList> listEfficiencyMC{"EfficiencyMC"};
// Histograms

HistogramRegistry registry{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

void init(InitContext&)
{
const AxisSpec axisPt{ptBins, "#it{p}_{T} GeV/#it{c}"};
auto h = registry.add<TH1>("Pos/PtNum_310", "Pos/Num_310", kTH1F, {axisPt});
registry.add("Pos/PtDen_310", "Pos/Den_310", kTH1F, {axisPt});
registry.add("Neg/PtNum_310", "Neg/Num_310", kTH1F, {axisPt});
registry.add("Neg/PtDen_310", "Neg/Den_310", kTH1F, {axisPt});
registry.add("Prm/Pos/PtNum_310", "Prm/Pos/Num_310", kTH1F, {axisPt});
registry.add("Prm/Pos/PtDen_310", "Prm/Pos/Den_310", kTH1F, {axisPt});
registry.add("Prm/Neg/PtNum_310", "Prm/Neg/Num_310", kTH1F, {axisPt});
registry.add("Prm/Neg/PtDen_310", "Prm/Neg/Den_310", kTH1F, {axisPt});
registry.add("PrmRap/Pos/PtNum_310", "PrmRap/Pos/Num_310", kTH1F, {axisPt});
registry.add("PrmRap/Pos/PtDen_310", "PrmRap/Pos/Den_310", kTH1F, {axisPt});
registry.add("PrmRap/Neg/PtNum_310", "PrmRap/Neg/Num_310", kTH1F, {axisPt});
registry.add("PrmRap/Neg/PtDen_310", "PrmRap/Neg/Den_310", kTH1F, {axisPt});

TAxis* axis = h->GetXaxis();
listEfficiencyMC.setObject(new THashList);
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPt_pdg%d", PDGs[0]), Form("efficiencyPt_pdg%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPt_pdg-%d", PDGs[0]), Form("efficiencyPt_pdg-%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrm_pdg%d", PDGs[0]), Form("efficiencyPtPrm_pdg%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrm_pdg-%d", PDGs[0]), Form("efficiencyPtPrm_pdg-%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrmRap_pdg%d", PDGs[0]), Form("efficiencyPtPrmRap_pdg%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrmRap_pdg-%d", PDGs[0]), Form("efficiencyPtPrmRap_pdg-%d", PDGs[0]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));

for (int i = 0; i < nSpecies; i++) {
// MC efficiency (PDG code
histograms[i][kHistoPtNum] = registry.add<TH1>(Form("Pt/Num_%i", PDGs[i]), Form("Num %i", PDGs[i]), kTH1F, {axisPt});
histograms[i][kHistoPtDen] = registry.add<TH1>(Form("Pt/Den_%i", PDGs[i]), Form("Den %i", PDGs[i]), kTH1F, {axisPt});

histogramsPrm[i][kHistoPtNum] = registry.add<TH1>(Form("Pt/Prm/Num_%i", PDGs[i]), Form("Pt Prm Num %i", PDGs[i]), kTH1F, {axisPt});
histogramsPrm[i][kHistoPtDen] = registry.add<TH1>(Form("Pt/Prm/Den_%i", PDGs[i]), Form("Pt Prm Den %i", PDGs[i]), kTH1F, {axisPt});

histogramsPrmRap[i][kHistoPtNum] = registry.add<TH1>(Form("Pt/Prm/Rap/PtNum_%i", PDGs[i]), Form("Pt Prm Rap Num %i", PDGs[i]), kTH1F, {axisPt});
histogramsPrmRap[i][kHistoPtDen] = registry.add<TH1>(Form("Pt/Prm/Rap/PtDen_%i", PDGs[i]), Form("Pt Prm Rap Den %i", PDGs[i]), kTH1F, {axisPt});

TAxis* axis = histograms[i][0]->GetXaxis();
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPt_pdg%d", PDGs[i]), Form("efficiencyPt_pdg%d", PDGs[i]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrm_pdg%d", PDGs[i]), Form("efficiencyPtPrm_pdg%d", PDGs[i]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
listEfficiencyMC->Add(new TEfficiency(Form("efficiencyPtPrmRap_pdg%d", PDGs[i]), Form("efficiencyPtPrmRap_pdg%d", PDGs[i]), axis->GetNbins(), axis->GetXmin(), axis->GetXmax()));
}
}

// MC process
Expand All @@ -83,62 +91,44 @@ struct QaEfficiencyV0s {
void process(o2::aod::McV0Labels const& V0s,
o2::aod::McParticles const& mcParticles)
{
for (auto const& v0 : V0s) {
for (auto const& v0 : V0s) { // Numerator
if (v0.has_mcParticle()) {
auto mcparticle = v0.mcParticle();
if (mcparticle.pdgCode() == PDGs[0]) {
registry.fill(HIST("Pos/PtNum_310"), mcparticle.pt());
if (mcparticle.isPhysicalPrimary()) {
registry.fill(HIST("Prm/Pos/PtNum_310"), mcparticle.pt());
if (TMath::Abs(mcparticle.y()) < rapidityCut) {
registry.fill(HIST("PrmRap/Pos/PtNum_310"), mcparticle.pt());
}
}
} else if (mcparticle.pdgCode() == -PDGs[0]) {
registry.fill(HIST("Neg/PtNum_310"), mcparticle.pt());
if (mcparticle.isPhysicalPrimary()) {
registry.fill(HIST("Prm/Neg/PtNum_310"), mcparticle.pt());
if (TMath::Abs(mcparticle.y()) < rapidityCut) {
registry.fill(HIST("PrmRap/Neg/PtNum_310"), mcparticle.pt());
}
}
const auto index = pdgToIndex(mcparticle.pdgCode());
if (index < 0) {
continue;
}
}
}
for (auto const& mcparticle : mcParticles) {
if (mcparticle.pdgCode() == PDGs[0]) {
registry.fill(HIST("Pos/PtDen_310"), mcparticle.pt());
histograms[index][kHistoPtNum]->Fill(mcparticle.pt());
if (mcparticle.isPhysicalPrimary()) {
registry.fill(HIST("Prm/Pos/PtDen_310"), mcparticle.pt());
histogramsPrm[index][kHistoPtNum]->Fill(mcparticle.pt());
if (TMath::Abs(mcparticle.y()) < rapidityCut) {
registry.fill(HIST("PrmRap/Pos/PtDen_310"), mcparticle.pt());
histogramsPrmRap[index][kHistoPtNum]->Fill(mcparticle.pt());
}
}
} else if (mcparticle.pdgCode() == -PDGs[0]) {
registry.fill(HIST("Neg/PtDen_310"), mcparticle.pt());
if (mcparticle.isPhysicalPrimary()) {
registry.fill(HIST("Prm/Neg/PtDen_310"), mcparticle.pt());
if (TMath::Abs(mcparticle.y()) < rapidityCut) {
registry.fill(HIST("PrmRap/Neg/PtDen_310"), mcparticle.pt());
}
}
}
for (auto const& mcparticle : mcParticles) { // Denominator
const auto index = pdgToIndex(mcparticle.pdgCode());
if (index < 0) {
continue;
}
histograms[index][kHistoPtDen]->Fill(mcparticle.pt());
if (mcparticle.isPhysicalPrimary()) {
histogramsPrm[index][kHistoPtDen]->Fill(mcparticle.pt());
if (TMath::Abs(mcparticle.y()) < rapidityCut) {
histogramsPrmRap[index][kHistoPtDen]->Fill(mcparticle.pt());
}
}
}

static_cast<TEfficiency*>(listEfficiencyMC->At(0))->SetPassedHistogram(*registry.get<TH1>(HIST("Pos/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(0))->SetTotalHistogram(*registry.get<TH1>(HIST("Pos/PtDen_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(1))->SetPassedHistogram(*registry.get<TH1>(HIST("Neg/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(1))->SetTotalHistogram(*registry.get<TH1>(HIST("Neg/PtDen_310")), "f");

static_cast<TEfficiency*>(listEfficiencyMC->At(2))->SetPassedHistogram(*registry.get<TH1>(HIST("Prm/Pos/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(2))->SetTotalHistogram(*registry.get<TH1>(HIST("Prm/Pos/PtDen_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(3))->SetPassedHistogram(*registry.get<TH1>(HIST("Prm/Neg/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(3))->SetTotalHistogram(*registry.get<TH1>(HIST("Prm/Neg/PtDen_310")), "f");

static_cast<TEfficiency*>(listEfficiencyMC->At(4))->SetPassedHistogram(*registry.get<TH1>(HIST("PrmRap/Pos/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(4))->SetTotalHistogram(*registry.get<TH1>(HIST("PrmRap/Pos/PtDen_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(5))->SetPassedHistogram(*registry.get<TH1>(HIST("PrmRap/Neg/PtNum_310")), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(5))->SetTotalHistogram(*registry.get<TH1>(HIST("PrmRap/Neg/PtDen_310")), "f");
for (int i = 0; i < nSpecies; i++) {
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies))->SetPassedHistogram(*histograms[i][kHistoPtNum].get(), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies))->SetTotalHistogram(*histograms[i][kHistoPtDen].get(), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies + 1))->SetPassedHistogram(*histogramsPrm[i][kHistoPtNum].get(), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies + 1))->SetTotalHistogram(*histogramsPrm[i][kHistoPtDen].get(), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies + 2))->SetPassedHistogram(*histogramsPrmRap[i][kHistoPtNum].get(), "f");
static_cast<TEfficiency*>(listEfficiencyMC->At(i * nSpecies + 2))->SetTotalHistogram(*histogramsPrmRap[i][kHistoPtDen].get(), "f");
}
}
};

Expand Down
Loading
Loading