Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some helper for TRD and debug output for ITS-TPC extrapolation #12272

Merged
merged 2 commits into from
Nov 17, 2023
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 @@ -41,6 +41,7 @@ constexpr int TRDLINKID = 15; ///< hard coded link id, specific to TRD
constexpr int NCOLUMN = 144; ///< the number of pad columns for each chamber
constexpr int NROWC0 = 12; ///< the number of pad rows for chambers of type C0 (installed in stack 2)
constexpr int NROWC1 = 16; ///< the number of pad rows for chambers of type C1 (installed in stacks 0, 1, 3 and 4)
constexpr int FIRSTROW[NSTACK] = {0, 16, 32, 44, 60}; ///< first pad row for each stack

constexpr int NMCMROB = 16; ///< the number of MCMs per ROB
constexpr int NMCMHCMAX = 64; ///< the maximum number of MCMs for one half chamber (C1 type)
Expand Down
1 change: 1 addition & 0 deletions DataFormats/Detectors/TRD/include/DataFormatsTRD/Digit.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class Digit
int getPadCol() const { return HelperMethods::getPadColFromADC(mROB, mMCM, mChannel); }
int getROB() const { return mROB; }
int getMCM() const { return mMCM; }
int getMCMCol() const { return (getMCM() % constants::NMCMROBINCOL) + constants::NMCMROBINCOL * (getROB() % 2); }
int getChannel() const { return mChannel; }
int getPreTrigPhase() const { return ((mDetector >> 12) & 0xf); }
bool isSharedDigit() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,24 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
LOGP(debug, "Starting track extrapolation for GID {}", mGIDs[iSeed].asString());
const auto& gidTable = mGIDtables[iSeed];
TrackData trackData;
std::unique_ptr<TrackDataExtended> trackDataExtended;
std::vector<TPCClusterResiduals> clusterResiduals;
trackData.clIdx.setFirstEntry(mClRes.size());
const auto& trkITS = mRecoCont->getITSTrack(gidTable[GTrackID::ITS]);
const auto& trkTPC = mRecoCont->getTPCTrack(gidTable[GTrackID::TPC]);
if (mDumpTrackPoints) {
trackDataExtended = std::make_unique<TrackDataExtended>();
(*trackDataExtended).gid = mGIDs[iSeed];
(*trackDataExtended).clIdx.setFirstEntry(mClRes.size());
(*trackDataExtended).trkITS = trkITS;
(*trackDataExtended).trkTPC = trkTPC;
auto nCl = trkITS.getNumberOfClusters();
auto clEntry = trkITS.getFirstClusterEntry();
for (int iCl = nCl - 1; iCl >= 0; iCl--) { // clusters are stored from outer to inner layers
const auto& clsITS = mITSClustersArray[mITSTrackClusIdx[clEntry + iCl]];
(*trackDataExtended).clsITS.push_back(clsITS);
}
}
trackData.gid = mGIDs[iSeed];
trackData.par = mSeeds[iSeed];

Expand Down Expand Up @@ -599,6 +613,9 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
trackData.nClsITS = trkITS.getNumberOfClusters();
trackData.clIdx.setEntries(nMeasurements);
trackData.dEdxTPC = trkTPC.getdEdx().dEdxTotTPC;
if (mDumpTrackPoints) {
(*trackDataExtended).trkOuter = trkWork;
}

TrackParams params; // for refitted track parameters and flagging rejected clusters
if (mParams->skipOutlierFiltering || validateTrack(trackData, params, clusterResiduals)) {
Expand All @@ -619,6 +636,10 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
mTrackData.push_back(std::move(trackData));
mGIDsSuccess.push_back(mGIDs[iSeed]);
mTrackDataCompact.emplace_back(mClRes.size() - nClValidated, nClValidated, mGIDs[iSeed].getSource());
if (mDumpTrackPoints) {
(*trackDataExtended).clIdx.setEntries(nClValidated);
mTrackDataExtended.push_back(std::move(*trackDataExtended));
}
}
if (mParams->writeUnfiltered) {
TrackData trkDataTmp = trackData;
Expand Down