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
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,31 @@ class DecayNBodyIndex
void setProngID(int i, GIndex gid) { mProngIDs[i] = gid; }
int getVertexID() const { return mVertexID; }
void setVertexID(int id) { mVertexID = id; }
uint8_t getBits() const { return mBits; }
bool testBit(int i) const { return (mBits & (0x1 << i)) != 0; }
void setBit(int i) { mBits |= (0x1 << i); }
void resetBit(int i) { mBits &= ~(0x1 << i); }

const std::array<GIndex, N>& getProngs() const { return mProngIDs; }
static constexpr int getNProngs() { return N; }

protected:
int mVertexID = -1; // id of parent vertex
std::array<GIndex, N> mProngIDs{}; // global IDs of prongs
ClassDefNV(DecayNBodyIndex, 1);
uint8_t mBits = 0; // user defined bits

ClassDefNV(DecayNBodyIndex, 2);
};

class V0Index : public DecayNBodyIndex<2>
{
public:
using DecayNBodyIndex<2>::DecayNBodyIndex;
V0Index(int v, GIndex p, GIndex n) : DecayNBodyIndex<2>(v, {p, n}) {}
bool isStandaloneV0() const { return testBit(0); }
bool isPhotonOnly() const { return testBit(1); }
void setStandaloneV0() { setBit(0); }
void setPhotonOnly() { setBit(1); }
ClassDefNV(V0Index, 1);
};

Expand Down
3 changes: 2 additions & 1 deletion Detectors/AOD/src/AODProducerWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ void AODProducerWorkflowDPL::fillSecondaryVertices(const o2::globaltracking::Rec
const auto& v0 = v0s[iv0];
auto trPosID = v0.getProngID(0);
auto trNegID = v0.getProngID(1);
uint8_t v0flags = v0.getBits();
int posTableIdx = -1, negTableIdx = -1, collID = -1;
auto item = mGIDToTableID.find(trPosID);
if (item != mGIDToTableID.end()) {
Expand All @@ -1219,7 +1220,7 @@ void AODProducerWorkflowDPL::fillSecondaryVertices(const o2::globaltracking::Rec
collID = itemV->second;
}
if (posTableIdx != -1 and negTableIdx != -1 and collID != -1) {
v0Cursor(collID, posTableIdx, negTableIdx);
v0Cursor(collID, posTableIdx, negTableIdx, v0flags);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddobrigk at the moment compilation fails here with

/home/shahoian/alice/sw/SOURCES/O2/dev/0/Framework/Core/include/Framework/AnalysisHelpers.h: In instantiation of 'void o2::framework::WritingCursor<o2::soa::Table<C ...> >::operator()(T ...) [with T = {int, int, int, unsigned char}; PC = {o2::aod::v0::CollisionId, o2::aod::v0::PosTrackId, o2::aod::v0::NegTrackId}]':
/home/shahoian/alice/sw/SOURCES/O2/dev/0/Detectors/AOD/src/AODProducerWorkflowSpec.cxx:1180:15:   required from 'void o2::aodproducer::AODProducerWorkflowDPL::fillSecondaryVertices(const o2::globaltracking::RecoContainer&, V0CursorType&, CascadeCursorType&, Decay3BodyCursorType&) [with V0CursorType = o2::framework::Produces<o2::soa::Table<o2::soa::Index<0, -1>, o2::aod::v0::CollisionId, o2::aod::v0::PosTrackId, o2::aod::v0::NegTrackId> >; CascadeCursorType = o2::framework::Produces<o2::soa::Table<o2::soa::Index<0, -1>, o2::aod::cascade::CollisionId, o2::aod::cascade::V0Id, o2::aod::cascade::BachelorId> >; Decay3bodyCursorType = o2::framework::Produces<o2::soa::Table<o2::soa::Index<0, -1>, o2::aod::decay3body::CollisionId, o2::aod::decay3body::Track0Id, o2::aod::decay3body::Track1Id, o2::aod::decay3body::Track2Id> >]'
/home/shahoian/alice/sw/SOURCES/O2/dev/0/Detectors/AOD/src/AODProducerWorkflowSpec.cxx:2117:24:   required from here
/home/shahoian/alice/sw/SOURCES/O2/dev/0/Framework/Core/include/Framework/AnalysisHelpers.h:48:33: error: static assertion failed: Argument number mismatch
   48 |     static_assert(sizeof...(PC) == sizeof...(T), "Argument number mismatch");

mV0ToTableID[int(iv0)] = mTableV0ID++;
}
}
Expand Down
11 changes: 9 additions & 2 deletions Detectors/Vertexing/src/SVertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,9 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,
// apply mass selections
float p2Pos = pP[0] * pP[0] + pP[1] * pP[1] + pP[2] * pP[2], p2Neg = pN[0] * pN[0] + pN[1] * pN[1] + pN[2] * pN[2];

bool goodHyp = false;
bool goodHyp = false, photonOnly = mSVParams->mTPCTrackPhotonTune && isTPConly;
std::array<bool, NHypV0> hypCheckStatus{};
int nPID = (mSVParams->mTPCTrackPhotonTune && isTPConly) ? (Photon + 1) : NHypV0;
int nPID = photonOnly ? (Photon + 1) : NHypV0;
for (int ipid = 0; (ipid < nPID) && mSVParams->checkV0Hypothesis; ipid++) {
if (mV0Hyps[ipid].check(p2Pos, p2Neg, p2V0, ptV0)) {
goodHyp = hypCheckStatus[ipid] = true;
Expand Down Expand Up @@ -855,6 +855,13 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP,

if (nV0Used || !rejectIfNotCascade) { // need to add this v0
mV0sIdxTmp[ithread].push_back(v0Idxnew);
if (!rejectIfNotCascade) {
mV0sIdxTmp[ithread].back().setStandaloneV0();
}
if (photonOnly) {
mV0sIdxTmp[ithread].back().setPhotonOnly();
}

if (mSVParams->createFullV0s) {
mV0sTmp[ithread].push_back(v0new);
}
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/AnalysisDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ DECLARE_SOA_TABLE_VERSIONED(V0s_002, "AOD", "V0", 2, //! Run 3 V0 table (version
v0::IsStandardV0<v0::V0Type>,
v0::IsPhotonV0<v0::V0Type>);

using V0s = V0s_001; //! this defines the current default version
using V0s = V0s_002; //! this defines the current default version
using V0 = V0s::iterator;

namespace cascade
Expand Down