Skip to content

Commit 0a74715

Browse files
committed
Add to matching debug info TPC inermost cl. row/pad
1 parent 1640a62 commit 0a74715

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "ITSReconstruction/RecoGeomHelper.h"
5151
#include "TPCFastTransform.h"
5252
#include "GPUO2InterfaceRefit.h"
53+
#include "GPUTPCGeometry.h"
5354
#include "GlobalTracking/MatchTPCITSParams.h"
5455
#include "DataFormatsITSMFT/TopologyDictionary.h"
5556
#include "DataFormatsITSMFT/TrkClusRef.h"
@@ -132,6 +133,8 @@ struct TrackLocTPC : public o2::track::TrackParCov {
132133
int sourceID = 0; ///< TPC track origin in
133134
o2::dataformats::GlobalTrackID gid{}; // global track source ID (TPC track may be part of it)
134135
int matchID = MinusOne; ///< entry (non if MinusOne) of its matchTPC struct in the mMatchesTPC
136+
uint8_t lowestRow = -1;
137+
uint8_t padFromEdge = -1;
135138
Constraint_t constraint{Constrained};
136139

137140
float getCorrectedTime(float dt) const // return time0 corrected for extra drift (to match certain Z)
@@ -143,7 +146,7 @@ struct TrackLocTPC : public o2::track::TrackParCov {
143146
return constraint == Constrained ? 0.f : (constraint == ASide ? dt : -dt);
144147
}
145148

146-
ClassDefNV(TrackLocTPC, 2);
149+
ClassDefNV(TrackLocTPC, 3);
147150
};
148151

149152
///< ITS track outward parameters propagated to reference X, with time bracket and index of
@@ -738,6 +741,7 @@ class MatchTPCITS
738741
static constexpr float MaxSnp = 0.9; // max snp of ITS or TPC track at xRef to be matched
739742
static constexpr float MaxTgp = 2.064; // max tg corresponting to MaxSnp = MaxSnp/std::sqrt(1.-MaxSnp^2)
740743
static constexpr float MinTBToCleanCache = 600.; // keep in AB ITS cluster refs cache at most this number of TPC bins
744+
static const o2::gpu::GPUTPCGeometry TPCGeometry;
741745

742746
enum TimerIDs { SWTot,
743747
SWPrepITS,

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
#include "GPUO2Interface.h" // Needed for propper settings in GPUParam.h
13+
#include "GPUParam.h"
14+
#include "GPUParam.inc"
15+
#ifdef WITH_OPENMP
16+
#include <omp.h>
17+
#endif
18+
1219
#include <TTree.h>
1320
#include <cassert>
1421
#include <algorithm>
@@ -50,13 +57,6 @@
5057
#include "ITS3Reconstruction/IOUtils.h"
5158
#endif
5259

53-
#include "GPUO2Interface.h" // Needed for propper settings in GPUParam.h
54-
#include "GPUParam.h"
55-
#include "GPUParam.inc"
56-
#ifdef WITH_OPENMP
57-
#include <omp.h>
58-
#endif
59-
6060
using namespace o2::globaltracking;
6161

6262
using MatrixDSym4 = ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<double, 4>>;
@@ -68,6 +68,8 @@ constexpr float MatchTPCITS::Tan70, MatchTPCITS::Cos70I2, MatchTPCITS::MaxSnp, M
6868

6969
LinksPoolMT* TPCABSeed::gLinksPool = nullptr;
7070

71+
const o2::gpu::GPUTPCGeometry MatchTPCITS::TPCGeometry{};
72+
7173
//______________________________________________
7274
MatchTPCITS::MatchTPCITS() = default;
7375

@@ -428,6 +430,12 @@ int MatchTPCITS::addTPCSeed(const o2::track::TrackParCov& _tr, float t0, float t
428430
if (clRow > mParams->askMinTPCRow[clSect]) {
429431
return -9;
430432
}
433+
const auto& clus = mTPCClusterIdxStruct->clusters[clSect][clRow][clIdx];
434+
uint8_t padFromEdge = uint8_t(clus.getPad());
435+
if (padFromEdge > TPCGeometry.NPads(clRow) / 2) {
436+
padFromEdge = TPCGeometry.NPads(clRow) - 1 - padFromEdge;
437+
}
438+
431439
// create working copy of track param
432440
bool extConstrained = srcGID.getSource() != GTrackID::TPC;
433441
if (extConstrained) {
@@ -442,6 +450,8 @@ int MatchTPCITS::addTPCSeed(const o2::track::TrackParCov& _tr, float t0, float t
442450
tpcID,
443451
srcGID,
444452
MinusOne,
453+
clRow,
454+
padFromEdge,
445455
(extConstrained || tpcOrig.hasBothSidesClusters()) ? TrackLocTPC::Constrained : (tpcOrig.hasASideClustersOnly() ? TrackLocTPC::ASide : TrackLocTPC::CSide)});
446456
// propagate to matching Xref
447457
const auto& trackTune = TrackTuneParams::Instance();
@@ -2872,7 +2882,7 @@ void MatchTPCITS::dumpTPCOrig(bool acc, int tpcIndex)
28722882
///< fill debug tree for TPC original tracks (passing pT cut)
28732883
mTimer[SWDBG].Start(false);
28742884
const auto& tpcOrig = mTPCTracksArray[tpcIndex];
2875-
uint8_t clSect = 0, clRow = 0, prevRow = 0xff;
2885+
uint8_t clSect = 0, clRow = 0, prevRow = 0xff, padFromEdge = -1;
28762886
uint32_t clIdx = 0;
28772887
int nshared = 0;
28782888
std::array<bool, 152> shMap{};
@@ -2888,6 +2898,11 @@ void MatchTPCITS::dumpTPCOrig(bool acc, int tpcIndex)
28882898
prevRawShared = true;
28892899
}
28902900
}
2901+
const auto& clus = mTPCClusterIdxStruct->clusters[clSect][clRow][clIdx];
2902+
padFromEdge = uint8_t(clus.getPad());
2903+
if (padFromEdge > TPCGeometry.NPads(clRow) / 2) {
2904+
padFromEdge = TPCGeometry.NPads(clRow) - 1 - padFromEdge;
2905+
}
28912906
int tb = tpcOrig.getTime0() * mNTPCOccBinLengthInv;
28922907
float mltTPC = tb < 0 ? mTBinClOcc[0] : (tb >= mTBinClOcc.size() ? mTBinClOcc.back() : mTBinClOcc[tb]);
28932908
(*mDBGOut) << "tpcOrig"
@@ -2900,6 +2915,7 @@ void MatchTPCITS::dumpTPCOrig(bool acc, int tpcIndex)
29002915
<< "time0=" << tpcOrig.getTime0()
29012916
<< "trc=" << ((o2::track::TrackParCov&)tpcOrig)
29022917
<< "minRow=" << clRow
2918+
<< "padFromEdge=" << padFromEdge
29032919
<< "multTPC=" << mltTPC;
29042920
if (mMCTruthON) {
29052921
(*mDBGOut) << "tpcOrig"

0 commit comments

Comments
 (0)