Add barrel track propagation to PV at AOD creation stage#11458
Conversation
| void fetchMeanVtxCCDB(int runNumber) | ||
| { | ||
| static int prevRunNumber = -1; | ||
| if (runNumber == prevRunNumber) | ||
| return; | ||
| auto& ccdbMgr = o2::ccdb::BasicCCDBManager::instance(); | ||
| std::map<std::string, std::string> headers, metadataRCT; | ||
| headers = mCCDBAPI.retrieveHeaders(Form("RCT/Info/RunInformation/%i", runNumber), metadataRCT, -1); | ||
| int64_t ts = std::atol(headers["SOR"].c_str()); // timestamp in ms | ||
| mVtx = ccdbMgr.getForTimeStamp<o2::dataformats::MeanVertexObject>(mVtxPath, ts); | ||
| prevRunNumber = runNumber; | ||
| } | ||
|
|
There was a problem hiding this comment.
Please don't use ccdb manager but use the DPL fetcher, e.g. like:
| mGIDUsedBySVtx.insert(id3Body.getProngID(0)); | ||
| mGIDUsedBySVtx.insert(id3Body.getProngID(1)); | ||
| mGIDUsedBySVtx.insert(id3Body.getProngID(2)); | ||
| } |
There was a problem hiding this comment.
Note that now we also going to have the strangeness tracking: fmazzasc@3715b20
| const o2::globaltracking::RecoContainer& data, | ||
| int colID) | ||
| { | ||
| if (trackPar.getX() > mMinPropR) |
| continue; | ||
| } | ||
| addToTracksTable(tracksCursor, tracksCovCursor, data.getTrackParam(trackIndex), collisionID); | ||
| o2::track::TrackParametrizationWithError<float> trackPar = data.getTrackParam(trackIndex); |
There was a problem hiding this comment.
here you create a track copy and check for the getX() > Xtpc only in the propagateTrackToPV. It would be faster to 1st check if the track should be propagated then to create its copy
| if (mPropTracks) { | ||
| mCCDBAPI.init(mCCDBUrl); | ||
| auto& ccdbMgr = o2::ccdb::BasicCCDBManager::instance(); | ||
| ccdbMgr.setURL(mCCDBUrl); | ||
| ccdbMgr.setCaching(true); | ||
| ccdbMgr.setLocalObjectValidityChecking(); | ||
| } |
There was a problem hiding this comment.
don't use the manager, see above.
| if (colID >= 0) { | ||
| const auto& vtx = data.getPrimaryVertex(colID); | ||
| v.setPos({vtx.getXYZ()}); | ||
| if (mPropTracksCov) { | ||
| v.setCov({vtx.getCov()}); | ||
| } | ||
| } else { | ||
| v.setPos({mVtx->getXYZ()}); | ||
| if (mPropTracksCov) { | ||
| v.setCov(mVtx->getSigmaX() * mVtx->getSigmaX(), | ||
| 0.f, | ||
| mVtx->getSigmaY() * mVtx->getSigmaY(), | ||
| 0.f, | ||
| 0.f, | ||
| mVtx->getSigmaZ() * mVtx->getSigmaZ()); | ||
| } | ||
| } |
There was a problem hiding this comment.
The MeanVertex is in general Z-dependent (the beams have some angles), use just
o2::dataformats::VertexBase v = mVtx.getMeanVertex( colID < 0 ? 0.f : data.getPrimaryVertex(colID).getZ());
| mVtx->getSigmaZ() * mVtx->getSigmaZ()); | ||
| } | ||
| } | ||
| return o2::base::Propagator::Instance()->propagateToDCABxByBz(v, trackPar, 2.f, mMatCorr, &dcaInfo); |
There was a problem hiding this comment.
Not sure what is the point of mPropTracksCov option? You are always propagating the cov.matrix.
|
Thank you for the comments @shahor02! I will fix the code and ping you back :) |
|
@shahor02, I have tried fixing the code according to your suggestions. Could you please take a look when you have a moment? |
| o2::track::TrackParametrizationWithError<float> trackPar; | ||
| bool isProp = false; | ||
| if (mPropTracks && trackPar.getX() < mMinPropR) { |
There was a problem hiding this comment.
Now you have the trackPar undefined before the check :).
I would do:
const auto& trOrig = data.getTrackParam(trackIndex);
bool isProp = false;
if (mPropTracks && trOrig.getX() < mMinPropR) {
auto trackPar(trOrig);
if (isProp = propagateTrackToPV(trackPar, data, collisionID)) {
addToTracksTable(tracksCursor, trackPar, collisionID, aod::track::Track);
}
}
if (!isProp) {
addToTracksTable(tracksCursor, tracksCovCursor, trOrig, collisionID, aod::track::TrackIU);
}
There was a problem hiding this comment.
Thank you @shahor02, this looks better indeed :)
|
Error while checking build/O2/fullCI for 38887fc at 2023-06-08 16:04: Full log here. |
|
Thanks a lot for this work. I have no additional comments. |
…p#11458) * Add barrel track propagation to PV at AOD creation stage
This feature was introduced in AliceO2Group#11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
This feature was introduced in #11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
This feature was introduced in #11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
This feature was introduced in AliceO2Group#11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
This feature was introduced in AliceO2Group#11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
This feature was introduced in AliceO2Group#11458, however the additional check for SV was forgotten. This is anyways not enabled by default and should not have affected any default production.
Dear @ddobrigk, @jgrosseo, @sawenzel
Here is an implementation of (barrel) tracks propagation. It is similar to the track propagation task:
aod::track::Track,aod::track::TrackIUotherwise--propagate-tracks--propagate-tracks-covis passed (in addition to--propagate-tracks)Please let me know if you have any suggestions
Nazar