Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
njacazio committed Jan 24, 2025
1 parent 76eb765 commit 69fcd4b
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 104 deletions.
99 changes: 45 additions & 54 deletions Common/TableProducer/PID/pidTOF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -232,40 +232,31 @@ struct tofPid {
{
switch (id) {
case 0:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDEl);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDEl);
break;
case 1:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDMu);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDMu);
break;
case 2:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDPi);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDPi);
break;
case 3:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDKa);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDKa);
break;
case 4:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDPr);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDPr);
break;
case 5:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDDe);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDDe);
break;
case 6:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDTr);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDTr);
break;
case 7:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDHe);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDHe);
break;
case 8:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDAl);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDAl);
break;
default:
LOG(fatal) << "Wrong particle ID in makeTableEmpty()";
Expand Down Expand Up @@ -326,40 +317,40 @@ struct tofPid {
for (auto const& pidId : mEnabledParticles) { // Loop on enabled particle hypotheses
switch (pidId) {
case 0:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseEl.GetSeparation(mRespParamsV2, trkInColl),
tablePIDEl);
aod::pidtof_tiny::binning::packInTable(responseEl.GetSeparation(mRespParamsV2, trkInColl),
tablePIDEl);
break;
case 1:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseMu.GetSeparation(mRespParamsV2, trkInColl),
tablePIDMu);
aod::pidtof_tiny::binning::packInTable(responseMu.GetSeparation(mRespParamsV2, trkInColl),
tablePIDMu);
break;
case 2:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responsePi.GetSeparation(mRespParamsV2, trkInColl),
tablePIDPi);
aod::pidtof_tiny::binning::packInTable(responsePi.GetSeparation(mRespParamsV2, trkInColl),
tablePIDPi);
break;
case 3:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseKa.GetSeparation(mRespParamsV2, trkInColl),
tablePIDKa);
aod::pidtof_tiny::binning::packInTable(responseKa.GetSeparation(mRespParamsV2, trkInColl),
tablePIDKa);
break;
case 4:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responsePr.GetSeparation(mRespParamsV2, trkInColl),
tablePIDPr);
aod::pidtof_tiny::binning::packInTable(responsePr.GetSeparation(mRespParamsV2, trkInColl),
tablePIDPr);
break;
case 5:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseDe.GetSeparation(mRespParamsV2, trkInColl),
tablePIDDe);
aod::pidtof_tiny::binning::packInTable(responseDe.GetSeparation(mRespParamsV2, trkInColl),
tablePIDDe);
break;
case 6:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseTr.GetSeparation(mRespParamsV2, trkInColl),
tablePIDTr);
aod::pidtof_tiny::binning::packInTable(responseTr.GetSeparation(mRespParamsV2, trkInColl),
tablePIDTr);
break;
case 7:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseHe.GetSeparation(mRespParamsV2, trkInColl),
tablePIDHe);
aod::pidtof_tiny::binning::packInTable(responseHe.GetSeparation(mRespParamsV2, trkInColl),
tablePIDHe);
break;
case 8:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseAl.GetSeparation(mRespParamsV2, trkInColl),
tablePIDAl);
aod::pidtof_tiny::binning::packInTable(responseAl.GetSeparation(mRespParamsV2, trkInColl),
tablePIDAl);
break;
default:
LOG(fatal) << "Wrong particle ID in processWSlice()";
Expand Down Expand Up @@ -414,40 +405,40 @@ struct tofPid {
for (auto const& pidId : mEnabledParticles) { // Loop on enabled particle hypotheses
switch (pidId) {
case 0:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseEl.GetSeparation(mRespParamsV2, track),
tablePIDEl);
aod::pidtof_tiny::binning::packInTable(responseEl.GetSeparation(mRespParamsV2, track),
tablePIDEl);
break;
case 1:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseMu.GetSeparation(mRespParamsV2, track),
tablePIDMu);
aod::pidtof_tiny::binning::packInTable(responseMu.GetSeparation(mRespParamsV2, track),
tablePIDMu);
break;
case 2:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responsePi.GetSeparation(mRespParamsV2, track),
tablePIDPi);
aod::pidtof_tiny::binning::packInTable(responsePi.GetSeparation(mRespParamsV2, track),
tablePIDPi);
break;
case 3:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseKa.GetSeparation(mRespParamsV2, track),
tablePIDKa);
aod::pidtof_tiny::binning::packInTable(responseKa.GetSeparation(mRespParamsV2, track),
tablePIDKa);
break;
case 4:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responsePr.GetSeparation(mRespParamsV2, track),
tablePIDPr);
aod::pidtof_tiny::binning::packInTable(responsePr.GetSeparation(mRespParamsV2, track),
tablePIDPr);
break;
case 5:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseDe.GetSeparation(mRespParamsV2, track),
tablePIDDe);
aod::pidtof_tiny::binning::packInTable(responseDe.GetSeparation(mRespParamsV2, track),
tablePIDDe);
break;
case 6:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseTr.GetSeparation(mRespParamsV2, track),
tablePIDTr);
aod::pidtof_tiny::binning::packInTable(responseTr.GetSeparation(mRespParamsV2, track),
tablePIDTr);
break;
case 7:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseHe.GetSeparation(mRespParamsV2, track),
tablePIDHe);
aod::pidtof_tiny::binning::packInTable(responseHe.GetSeparation(mRespParamsV2, track),
tablePIDHe);
break;
case 8:
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(responseAl.GetSeparation(mRespParamsV2, track),
tablePIDAl);
aod::pidtof_tiny::binning::packInTable(responseAl.GetSeparation(mRespParamsV2, track),
tablePIDAl);
break;
default:
LOG(fatal) << "Wrong particle ID in processWoSlice()";
Expand Down
63 changes: 27 additions & 36 deletions Common/TableProducer/PID/pidTOFMerge.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1015,72 +1015,63 @@ struct tofPidMerge {
if (fullTable) {
tablePIDFullEl(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDEl);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDEl);
}
break;
case idxMu:
if (fullTable) {
tablePIDFullMu(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDMu);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDMu);
}
break;
case idxPi:
if (fullTable) {
tablePIDFullPi(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDPi);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDPi);
}
break;
case idxKa:
if (fullTable) {
tablePIDFullKa(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDKa);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDKa);
}
break;
case idxPr:
if (fullTable) {
tablePIDFullPr(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDPr);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDPr);
}
break;
case idxDe:
if (fullTable) {
tablePIDFullDe(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDDe);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDDe);
}
break;
case idxTr:
if (fullTable) {
tablePIDFullTr(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDTr);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDTr);
}
break;
case idxHe:
if (fullTable) {
tablePIDFullHe(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDHe);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDHe);
}
break;
case idxAl:
if (fullTable) {
tablePIDFullAl(-999.f, -999.f);
} else {
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(-999.f,
tablePIDAl);
aod::pidtof_tiny::binning::packInTable(-999.f, tablePIDAl);
}
break;
default:
Expand Down Expand Up @@ -1134,47 +1125,47 @@ struct tofPidMerge {
switch (pidId) {
case idxEl: {
nsigma = responseEl.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDEl);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDEl);
break;
}
case idxMu: {
nsigma = responseMu.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDMu);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDMu);
break;
}
case idxPi: {
nsigma = responsePi.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDPi);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDPi);
break;
}
case idxKa: {
nsigma = responseKa.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDKa);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDKa);
break;
}
case idxPr: {
nsigma = responsePr.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDPr);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDPr);
break;
}
case idxDe: {
nsigma = responseDe.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDDe);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDDe);
break;
}
case idxTr: {
nsigma = responseTr.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDTr);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDTr);
break;
}
case idxHe: {
nsigma = responseHe.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDHe);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDHe);
break;
}
case idxAl: {
nsigma = responseAl.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDAl);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDAl);
break;
}
default:
Expand Down Expand Up @@ -1296,47 +1287,47 @@ struct tofPidMerge {
switch (pidId) {
case idxEl: {
nsigma = responseEl.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDEl);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDEl);
break;
}
case idxMu: {
nsigma = responseMu.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDMu);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDMu);
break;
}
case idxPi: {
nsigma = responsePi.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDPi);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDPi);
break;
}
case idxKa: {
nsigma = responseKa.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDKa);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDKa);
break;
}
case idxPr: {
nsigma = responsePr.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDPr);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDPr);
break;
}
case idxDe: {
nsigma = responseDe.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDDe);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDDe);
break;
}
case idxTr: {
nsigma = responseTr.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDTr);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDTr);
break;
}
case idxHe: {
nsigma = responseHe.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDHe);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDHe);
break;
}
case idxAl: {
nsigma = responseAl.GetSeparation(mRespParamsV3, trk);
aod::pidutils::packInTable<aod::pidtof_tiny::binning>(nsigma, tablePIDAl);
aod::pidtof_tiny::binning::packInTable(nsigma, tablePIDAl);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/PID/pidTPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ struct tpcPid {
if (flagFull)
tableFull(expSigma, nSigma);
if (flagTiny)
aod::pidutils::packInTable<aod::pidtpc_tiny::binning>(nSigma, tableTiny);
aod::pidtpc_tiny::binning::packInTable(nSigma, tableTiny);
};

void processStandard(Coll const& collisions, Trks const& tracks, aod::BCsWithTimestamps const& bcs)
Expand Down
4 changes: 2 additions & 2 deletions Common/Tools/PID/checkPidPacking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ bool process(std::string outputName, int nevents = 100000)
for (int i = 0; i < nevents; i++) {
float nsigma = gRandom->Gaus(0, 1);
hgaus->Fill(nsigma);
aod::pidutils::packInTable<T>(nsigma, container);
T::packInTable(nsigma, container);
hgausPacked->Fill(container.unpack());

nsigma = gRandom->Uniform(-10, 10);
huniform->Fill(nsigma);
aod::pidutils::packInTable<T>(nsigma, container);
T::packInTable(nsigma, container);
huniformPacked->Fill(container.unpack());
}

Expand Down
Loading

0 comments on commit 69fcd4b

Please sign in to comment.