Skip to content
Merged
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
45 changes: 6 additions & 39 deletions PWGHF/TableProducer/candidateCreatorCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ struct HfCandidateCreatorCascade {
double bz = 0.;

using V0full = soa::Join<aod::V0Datas, aod::V0Covs>;
using V0fCfull = soa::Join<aod::V0fCDatas, aod::V0fCCovs>;

std::shared_ptr<TH1> hCandidates;
HistogramRegistry registry{"registry"};
Expand Down Expand Up @@ -169,7 +168,6 @@ struct HfCandidateCreatorCascade {
aod::HfCascades const& rowsTrackIndexCasc,
aod::V0sLinked const&,
V0full const&,
V0fCfull const&,
aod::TracksWCov const&,
aod::BCsWithTimestamps const& /*bcWithTimeStamps*/)
{
Expand Down Expand Up @@ -224,42 +222,14 @@ struct HfCandidateCreatorCascade {
dcaNegToPV = v0row.dcanegtopv();
v0cosPA = v0row.v0cosPA();

int momIndSize = 6;
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 6; i++) {
covV[MomInd[i]] = v0row.momentumCovMat()[i];
covV[i] = v0row.positionCovMat()[i];
}
} else if (v0index.has_v0fCData()) {
// this V0 passes only V0-for-cascade selections, use that instead
auto v0row = v0index.template v0fCData_as<V0fCfull>();
const auto& trackV0DaughPos = v0row.posTrack_as<aod::TracksWCov>();
const auto& trackV0DaughNeg = v0row.negTrack_as<aod::TracksWCov>();
posGlobalIndex = trackV0DaughPos.globalIndex();
negGlobalIndex = trackV0DaughNeg.globalIndex();
v0X = v0row.x();
v0Y = v0row.y();
v0Z = v0row.z();
v0px = v0row.px();
v0py = v0row.py();
v0pz = v0row.pz();
v0PosPx = v0row.pxpos();
v0PosPy = v0row.pypos();
v0PosPz = v0row.pzpos();
v0NegPx = v0row.pxneg();
v0NegPy = v0row.pyneg();
v0NegPz = v0row.pzneg();
dcaV0dau = v0row.dcaV0daughters();
dcaPosToPV = v0row.dcapostopv();
dcaNegToPV = v0row.dcanegtopv();
v0cosPA = v0row.v0cosPA();

constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
for (int i = 0; i < 6; i++) {
for (int i = 0; i < momIndSize; i++) {
covV[MomInd[i]] = v0row.momentumCovMat()[i];
covV[i] = v0row.positionCovMat()[i];
}
} else {
LOGF(warning, "V0Data/V0fCData not there for V0 %d in HF cascade %d. Skipping candidate.", casc.v0Id(), casc.globalIndex());
LOGF(warning, "V0Data not there for V0 %d in HF cascade %d. Skipping candidate.", casc.v0Id(), casc.globalIndex());
continue; // this was inadequately linked, should not happen
}

Expand Down Expand Up @@ -363,11 +333,10 @@ struct HfCandidateCreatorCascade {
aod::HfCascades const& rowsTrackIndexCasc,
aod::V0sLinked const& v0sLinked,
V0full const& v0Full,
V0fCfull const& v0fcFull,
aod::TracksWCov const& tracks,
aod::BCsWithTimestamps const& bcs)
{
runCreatorCascade<CentralityEstimator::None>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, v0fcFull, tracks, bcs);
runCreatorCascade<CentralityEstimator::None>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, tracks, bcs);
}
PROCESS_SWITCH(HfCandidateCreatorCascade, processNoCent, " Run candidate creator w/o centrality selections", true);

Expand All @@ -376,11 +345,10 @@ struct HfCandidateCreatorCascade {
aod::HfCascades const& rowsTrackIndexCasc,
aod::V0sLinked const& v0sLinked,
V0full const& v0Full,
V0fCfull const& v0fcFull,
aod::TracksWCov const& tracks,
aod::BCsWithTimestamps const& bcs)
{
runCreatorCascade<CentralityEstimator::FT0C>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, v0fcFull, tracks, bcs);
runCreatorCascade<CentralityEstimator::FT0C>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, tracks, bcs);
}
PROCESS_SWITCH(HfCandidateCreatorCascade, processCentFT0C, " Run candidate creator w/ centrality selection on FT0C", false);

Expand All @@ -389,11 +357,10 @@ struct HfCandidateCreatorCascade {
aod::HfCascades const& rowsTrackIndexCasc,
aod::V0sLinked const& v0sLinked,
V0full const& v0Full,
V0fCfull const& v0fcFull,
aod::TracksWCov const& tracks,
aod::BCsWithTimestamps const& bcs)
{
runCreatorCascade<CentralityEstimator::FT0M>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, v0fcFull, tracks, bcs);
runCreatorCascade<CentralityEstimator::FT0M>(collisions, rowsTrackIndexCasc, v0sLinked, v0Full, tracks, bcs);
}
PROCESS_SWITCH(HfCandidateCreatorCascade, processCentFT0M, " Run candidate creator w/ centrality selection on FT0M", false);

Expand Down
Loading