Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
122 changes: 103 additions & 19 deletions PWGLF/DataModel/LFAntinCexTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@
DECLARE_SOA_COLUMN(IsCex, isCex, bool); // 1=CEX (from antin), 0=BG
DECLARE_SOA_COLUMN(MotherPdg, motherPdg, int32_t); // mother PDG
DECLARE_SOA_COLUMN(MotherP, motherP, float); // mother P
DECLARE_SOA_COLUMN(ColId, colId, int32_t); // mcCollisionId
DECLARE_SOA_COLUMN(PId, pId, int32_t); // proton MC id
DECLARE_SOA_COLUMN(AntipId, antipId, int32_t); // antiproton MC id
DECLARE_SOA_COLUMN(MotherPt, motherPt, float);
DECLARE_SOA_COLUMN(MotherPz, motherPz, float);
DECLARE_SOA_COLUMN(MotherEta, motherEta, float);
DECLARE_SOA_COLUMN(MotherVz, motherVz, float);
DECLARE_SOA_COLUMN(HasPi0, hasPi0, bool);
DECLARE_SOA_COLUMN(AntipProcess, antipProcess, int32_t);
DECLARE_SOA_COLUMN(ColId, colId, int64_t);
DECLARE_SOA_COLUMN(PId, pId, int64_t);
DECLARE_SOA_COLUMN(AntipId, antipId, int64_t);

// MC (pair)
DECLARE_SOA_COLUMN(McPairP, mcPairP, float);
Expand Down Expand Up @@ -98,12 +104,14 @@
DECLARE_SOA_COLUMN(DPairPz, dPairPz, float);
DECLARE_SOA_COLUMN(DOpenAngle, dOpenAngle, float);

DECLARE_SOA_COLUMN(SVNearestLayerId, svNearestLayerId, int16_t);

Check failure on line 107 in PWGLF/DataModel/LFAntinCexTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(SVDeltaRToLayer, svDeltaRToLayer, float);

Check failure on line 108 in PWGLF/DataModel/LFAntinCexTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_COLUMN(PTrkItsHitMap, pTrkItsHitMap, uint16_t);
DECLARE_SOA_COLUMN(APTrkItsHitMap, apTrkItsHitMap, uint16_t);

Check failure on line 111 in PWGLF/DataModel/LFAntinCexTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_COLUMN(PVtxX, pVtxX, float);
DECLARE_SOA_COLUMN(PVtxY, pVtxY, float);
DECLARE_SOA_COLUMN(PVtxZ, pVtxZ, float);

// Proton ITS PID
Expand All @@ -115,29 +123,105 @@
DECLARE_SOA_COLUMN(AntipTrkItsNSigmaPr, antipTrkItsNSigmaPr, float);
DECLARE_SOA_COLUMN(AntipTrkItsPidValid, antipTrkItsPidValid, int8_t);
DECLARE_SOA_COLUMN(AntipTrkTgl, antipTrkTgl, float);

// Proton track quality
DECLARE_SOA_COLUMN(PTrkTpcNClsCrossedRows, pTrkTpcNClsCrossedRows, int);
DECLARE_SOA_COLUMN(PTrkTpcCrossedRowsOverFindableCls, pTrkTpcCrossedRowsOverFindableCls, float);
DECLARE_SOA_COLUMN(PTrkTpcChi2NCl, pTrkTpcChi2NCl, float);
DECLARE_SOA_COLUMN(PTrkItsChi2NCl, pTrkItsChi2NCl, float);

// Antiproton track quality
DECLARE_SOA_COLUMN(AntipTrkTpcNClsCrossedRows, antipTrkTpcNClsCrossedRows, int);
DECLARE_SOA_COLUMN(AntipTrkTpcCrossedRowsOverFindableCls, antipTrkTpcCrossedRowsOverFindableCls, float);
DECLARE_SOA_COLUMN(AntipTrkTpcChi2NCl, antipTrkTpcChi2NCl, float);
DECLARE_SOA_COLUMN(AntipTrkItsChi2NCl, antipTrkItsChi2NCl, float);
} // namespace antin_cex

// Table
DECLARE_SOA_TABLE(AntinCexPairs, "AOD", "ANTINCEX",
antin_cex::IsCex,
antin_cex::MotherPdg, antin_cex::MotherP, antin_cex::ColId, antin_cex::PId, antin_cex::AntipId,
antin_cex::McPairP, antin_cex::McPairPt, antin_cex::McPairPz,
antin_cex::McDplane, antin_cex::McAngleDeg, antin_cex::McVtxX, antin_cex::McVtxY, antin_cex::McVtxZ,
antin_cex::TrkPairP, antin_cex::TrkPairPt, antin_cex::TrkPairPz, antin_cex::TrkAngleDeg,
antin_cex::TrkVtxfitDcaPair, antin_cex::TrkVtxfitR, antin_cex::TrkVtxfitDistToPv,
antin_cex::TrkVtxfitSecVtxX, antin_cex::TrkVtxfitSecVtxY, antin_cex::TrkVtxfitSecVtxZ,
antin_cex::VtxfitChi2, antin_cex::VtxfitStatus, antin_cex::NCand,
antin_cex::VtxfitDX, antin_cex::VtxfitDY, antin_cex::VtxfitDZ, antin_cex::VtxfitD3D,
antin_cex::PTrkP, antin_cex::PTrkPx, antin_cex::PTrkPy, antin_cex::PTrkPz, antin_cex::PTrkEta, antin_cex::PTrkTpcSignal, antin_cex::PTrkNClsIts,
antin_cex::AntipTrkP, antin_cex::AntipTrkPx, antin_cex::AntipTrkPy, antin_cex::AntipTrkPz, antin_cex::AntipTrkEta, antin_cex::AntipTrkTpcSignal, antin_cex::AntipTrkNClsIts,
antin_cex::MotherPdg,
antin_cex::MotherP,
antin_cex::MotherPt,
antin_cex::MotherPz,
antin_cex::MotherEta,
antin_cex::MotherVz,
antin_cex::HasPi0,
antin_cex::AntipProcess,
antin_cex::ColId,
antin_cex::PId,
antin_cex::AntipId,
antin_cex::McPairP,
antin_cex::McPairPt,
antin_cex::McPairPz,
antin_cex::McDplane,
antin_cex::McAngleDeg,
antin_cex::McVtxX,
antin_cex::McVtxY,
antin_cex::McVtxZ,
antin_cex::TrkPairP,
antin_cex::TrkPairPt,
antin_cex::TrkPairPz,
antin_cex::TrkAngleDeg,
antin_cex::TrkVtxfitDcaPair,
antin_cex::TrkVtxfitR,
antin_cex::TrkVtxfitDistToPv,
antin_cex::TrkVtxfitSecVtxX,
antin_cex::TrkVtxfitSecVtxY,
antin_cex::TrkVtxfitSecVtxZ,
antin_cex::VtxfitChi2,
antin_cex::VtxfitStatus,
antin_cex::NCand,
antin_cex::VtxfitDX,
antin_cex::VtxfitDY,
antin_cex::VtxfitDZ,
antin_cex::VtxfitD3D,
antin_cex::PTrkP,
antin_cex::PTrkPx,
antin_cex::PTrkPy,
antin_cex::PTrkPz,
antin_cex::PTrkEta,
antin_cex::PTrkTpcSignal,
antin_cex::PTrkNClsIts,
antin_cex::AntipTrkP,
antin_cex::AntipTrkPx,
antin_cex::AntipTrkPy,
antin_cex::AntipTrkPz,
antin_cex::AntipTrkEta,
antin_cex::AntipTrkTpcSignal,
antin_cex::AntipTrkNClsIts,
antin_cex::SelMask,
antin_cex::PairPointingAngleDeg, antin_cex::PvsvThetaDeg, antin_cex::PvsvPhiDeg, antin_cex::PairPBalance, antin_cex::PairPtBalance, antin_cex::PairQ,
antin_cex::DPairP, antin_cex::DPairPt, antin_cex::DPairPz, antin_cex::DOpenAngle,
antin_cex::SVNearestLayerId, antin_cex::SVDeltaRToLayer,
antin_cex::PTrkItsHitMap, antin_cex::APTrkItsHitMap,
antin_cex::PairPointingAngleDeg,
antin_cex::PvsvThetaDeg,
antin_cex::PvsvPhiDeg,
antin_cex::PairPBalance,
antin_cex::PairPtBalance,
antin_cex::PairQ,
antin_cex::DPairP,
antin_cex::DPairPt,
antin_cex::DPairPz,
antin_cex::DOpenAngle,
antin_cex::SVNearestLayerId,
antin_cex::SVDeltaRToLayer,
antin_cex::PTrkItsHitMap,
antin_cex::APTrkItsHitMap,
antin_cex::PVtxX,
antin_cex::PVtxY,
antin_cex::PVtxZ,
antin_cex::PTrkItsNSigmaPr, antin_cex::PTrkItsPidValid, antin_cex::PTrkTgl,
antin_cex::AntipTrkItsNSigmaPr, antin_cex::AntipTrkItsPidValid, antin_cex::AntipTrkTgl);
antin_cex::PTrkItsNSigmaPr,
antin_cex::PTrkItsPidValid,
antin_cex::PTrkTgl,
antin_cex::AntipTrkItsNSigmaPr,
antin_cex::AntipTrkItsPidValid,
antin_cex::AntipTrkTgl,
antin_cex::PTrkTpcNClsCrossedRows,
antin_cex::PTrkTpcCrossedRowsOverFindableCls,
antin_cex::PTrkTpcChi2NCl,
antin_cex::PTrkItsChi2NCl,
antin_cex::AntipTrkTpcNClsCrossedRows,
antin_cex::AntipTrkTpcCrossedRowsOverFindableCls,
antin_cex::AntipTrkTpcChi2NCl,
antin_cex::AntipTrkItsChi2NCl);

} // namespace o2::aod

Expand Down
72 changes: 56 additions & 16 deletions PWGLF/TableProducer/Nuspex/nucleiAntineutronCex.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ struct NucleiAntineutronCex {
double antipE = particle.e();
int antipId = particle.globalIndex();

// Selection conditions: Produced in the ITS IB
// Selection conditions MC: Produced in the ITS IB

const double r = std::sqrt(antipVx * antipVx + antipVy * antipVy);
// Config for ITS
// if(3.9<=r && r<=43.0 && std::abs(antipVz)<=48.9){
Expand Down Expand Up @@ -543,12 +544,15 @@ struct NucleiAntineutronCex {
double antipTrkP = 0.;
double antipTrkEta = 0.;
double antipTrkTpcSignal = 0;
// int antip_trk_nClsTPC = 0;
int antipTrkNClsIts = 0;
uint16_t apItsMap = 0;
float pTrkItsNSigmaPr = -999.f;
int8_t pTrkItsPidValid = 0;
float pTrkTgl = 0.f;
float antipTrkItsNSigmaPr = -999.f;
int8_t antipTrkItsPidValid = 0;
float antipTrkTgl = 0.f;
int antipTrkTpcNClsCrossedRows = -1;
float antipTrkTpcCrossedRowsOverFindableCls = -999.f;
float antipTrkTpcChi2NCl = -999.f;
float antipTrkItsChi2NCl = -999.f;

bool pLayersCondition = false;
bool pHasTrack = false;
Expand All @@ -558,12 +562,15 @@ struct NucleiAntineutronCex {
double pTrkP = 0.;
double pTrkEta = 0.;
double pTrkTpcSignal = 0;
// int p_trk_nClsTPC = 0;
int pTrkNClsIts = 0;
uint16_t pItsMap = 0;
float antipTrkItsNSigmaPr = -999.f;
int8_t antipTrkItsPidValid = 0;
float antipTrkTgl = 0.f;
float pTrkItsNSigmaPr = -999.f;
int8_t pTrkItsPidValid = 0;
float pTrkTgl = 0.f;
int pTrkTpcNClsCrossedRows = -1;
float pTrkTpcCrossedRowsOverFindableCls = -999.f;
float pTrkTpcChi2NCl = -999.f;
float pTrkItsChi2NCl = -999.f;

o2::aod::ITSResponse itsResponse;

Expand Down Expand Up @@ -602,6 +609,10 @@ struct NucleiAntineutronCex {
// antip_trk_nClsTPC = track.tpcNCls();
antipTrkNClsIts = track.itsNCls();
antipTrkTgl = track.tgl();
antipTrkTpcNClsCrossedRows = track.tpcNClsCrossedRows();
antipTrkTpcCrossedRowsOverFindableCls = track.tpcCrossedRowsOverFindableCls();
antipTrkTpcChi2NCl = track.tpcChi2NCl();
antipTrkItsChi2NCl = track.itsChi2NCl();
const auto nsigmaITSantip = itsResponse.nSigmaITS<o2::track::PID::Proton>(track);
antipTrkItsNSigmaPr = static_cast<float>(nsigmaITSantip);
antipTrkItsPidValid = std::isfinite(nsigmaITSantip) ? 1 : 0;
Expand Down Expand Up @@ -629,8 +640,11 @@ struct NucleiAntineutronCex {
// p_trk_nClsTPC = track.tpcNCls();
pTrkNClsIts = track.itsNCls();
pTrkTgl = track.tgl();
const auto nsigmaITSp =
itsResponse.nSigmaITS<o2::track::PID::Proton>(track);
pTrkTpcNClsCrossedRows = track.tpcNClsCrossedRows();
pTrkTpcCrossedRowsOverFindableCls = track.tpcCrossedRowsOverFindableCls();
pTrkTpcChi2NCl = track.tpcChi2NCl();
pTrkItsChi2NCl = track.itsChi2NCl();
const auto nsigmaITSp = itsResponse.nSigmaITS<o2::track::PID::Proton>(track);
pTrkItsNSigmaPr = static_cast<float>(nsigmaITSp);
pTrkItsPidValid = std::isfinite(nsigmaITSp) ? 1 : 0;
pHasTrack = true;
Expand Down Expand Up @@ -714,12 +728,17 @@ struct NucleiAntineutronCex {
if (motherPdg != -kNeutron)
histos.fill(HIST("cexbg_pairtrkVtxfitDcaPair"), dcaPair);

if (pRow->isPVContributor() || apRow->isPVContributor())
continue;
if (!(antipLayersCondition && pLayersCondition))
continue;
const double radius = std::hypot(secX, secY);
if (radius < kIts2MinR || radius > kIts2MaxR || std::abs(secZ) > kIts2MaxVz)
continue;

double cexPairTrkP = total_trk_pVec.Mag();
double cexPairTrkPt = total_trk_pVec.Pt();
double cexPairTrkPz = pTrkPz + antipTrkPz;
const double radius = std::hypot(secX, secY);
const double dxPv = secX - pvtxX;
const double dyPv = secY - pvtxY;
const double dzPv = secZ - pvtxZ;
Expand Down Expand Up @@ -812,11 +831,20 @@ struct NucleiAntineutronCex {

outPairs(
isCex,

motherPdg,
motherP,
colId,
pId,
antipId,
motherPt,
motherPz,
motherEta,
motherVz,

pion0,
static_cast<int32_t>(procEnum),

static_cast<int64_t>(colId),
static_cast<int64_t>(pId),
static_cast<int64_t>(antipId),

cexPairMcP,
cexPairMcPt,
Expand Down Expand Up @@ -882,6 +910,8 @@ struct NucleiAntineutronCex {
pItsMap,
apItsMap,

pvtxX,
pvtxY,
pvtxZ,

pTrkItsNSigmaPr,
Expand All @@ -890,7 +920,17 @@ struct NucleiAntineutronCex {

antipTrkItsNSigmaPr,
antipTrkItsPidValid,
antipTrkTgl);
antipTrkTgl,

pTrkTpcNClsCrossedRows,
pTrkTpcCrossedRowsOverFindableCls,
pTrkTpcChi2NCl,
pTrkItsChi2NCl,

antipTrkTpcNClsCrossedRows,
antipTrkTpcCrossedRowsOverFindableCls,
antipTrkTpcChi2NCl,
antipTrkItsChi2NCl);
}
}
// ==== end DCAFitter2 ====
Expand Down
Loading