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
1 change: 1 addition & 0 deletions GPU/GPUTracking/Definitions/GPUSettingsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ AddOption(noEvents, bool, false, "", 0, "Run without data (e.g. for field visual
AddOption(eventDisplay, int32_t, 0, "display", 'd', "Show standalone event display", def(1))
AddOption(eventGenerator, bool, false, "", 0, "Run event generator")
AddOption(cont, bool, false, "", 0, "Process continuous timeframe data, even if input is triggered")
AddOption(setMaxTimeBin, int32_t, -2, "", 0, "maximum time bin of continuous data, 0 for triggered events, -1 for automatic continuous mode, -2 for automatic continuous / triggered")
AddOption(outputcontrolmem, uint64_t, 0, "outputMemory", 0, "Use predefined output buffer of this size", min(0ul), message("Using %s bytes as output memory"))
AddOption(inputcontrolmem, uint64_t, 0, "inputMemory", 0, "Use predefined input buffer of this size", min(0ul), message("Using %s bytes as input memory"))
AddOption(cpuAffinity, int32_t, -1, "", 0, "Pin CPU affinity to this CPU core", min(-1))
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Merger/GPUTPCGMMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack
trk.SinPhi() = inTrack->Param().GetSinPhi();
trk.DzDs() = inTrack->Param().GetDzDs();
trk.QPt() = inTrack->Param().GetQPt();
trk.TOffset() = GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convZOffsetToVertexTime(sector, inTrack->Param().GetZOffset(), Param().continuousMaxTimeBin);
trk.TOffset() = Param().par.continuousTracking ? GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convZOffsetToVertexTime(sector, inTrack->Param().GetZOffset(), Param().continuousMaxTimeBin) : 0;
const auto tmp = sectorTrack.ClusterTN() > sectorTrack.ClusterT0() ? std::array<float, 2>{sectorTrack.ClusterTN(), sectorTrack.ClusterT0()} : std::array<float, 2>{sectorTrack.ClusterT0(), sectorTrack.ClusterTN()};
trk.ShiftZ(this, sector, tmp[0], tmp[1], inTrack->Param().GetX()); // We do not store the inner / outer cluster X, so we just use the track X instead
sectorTrack.SetX2(0.f);
Expand Down Expand Up @@ -1939,7 +1939,7 @@ GPUd() void GPUTPCGMMerger::MergeLoopersInit(int32_t nBlocks, int32_t nThreads,
const float qptabs = CAMath::Abs(p.GetQPt());
if (trk.OK() && trk.NClusters() && trk.Leg() == 0 && qptabs * Param().qptB5Scaler > 5.f && qptabs * Param().qptB5Scaler <= lowPtThresh) {
const int32_t sector = mClusters[trk.FirstClusterRef() + trk.NClusters() - 1].sector;
const float refz = p.GetZ() + GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(sector, p.GetTOffset(), Param().continuousMaxTimeBin) + (trk.CSide() ? -100 : 100);
const float refz = p.GetZ() + (Param().par.continuousTracking ? GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(sector, p.GetTOffset(), Param().continuousMaxTimeBin) : 0) + (trk.CSide() ? -100 : 100);
float sinA, cosA;
CAMath::SinCos(trk.GetAlpha(), sinA, cosA);
float gx = cosA * p.GetX() - sinA * p.GetY();
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Merger/GPUTPCGMSectorTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ GPUd() bool GPUTPCGMSectorTrack::TransportToX(GPUTPCGMMerger* merger, float x, f
b.SetPar(2, ey1);
b.SetPar(3, param.mDzDs);
b.SetPar(4, param.mQPt);
b.SetZOffsetLinear(merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(mSector, mTOffset, merger->Param().continuousMaxTimeBin));
b.SetZOffsetLinear(merger->Param().par.continuousTracking ? merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(mSector, mTOffset, merger->Param().continuousMaxTimeBin) : 0);

if (!doCov) {
return (1);
Expand Down Expand Up @@ -478,7 +478,7 @@ GPUd() bool GPUTPCGMSectorTrack::TransportToXAlpha(GPUTPCGMMerger* merger, float
b.SetPar(2, ey1);
b.SetPar(3, dzds);
b.SetPar(4, qpt);
b.SetZOffsetLinear(merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(mSector, mTOffset, merger->Param().continuousMaxTimeBin));
b.SetZOffsetLinear(merger->Param().par.continuousTracking ? merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(mSector, mTOffset, merger->Param().continuousMaxTimeBin) : 0);

b.SetCov(0, c00 + h2 * h2c22 + h4 * h4c44 + 2.f * (h2 * c20ph4c42 + h4 * c40));
b.SetCov(1, c11 + dS * (c31 + n7));
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ GPUd() float GPUTPCGMTrackParam::AttachClusters(const GPUTPCGMMerger* GPUrestric
return -1e6f;
}

const float zOffset = Merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(sector, mTOffset, Merger->Param().continuousMaxTimeBin);
const float zOffset = Merger->Param().par.continuousTracking ? Merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(sector, mTOffset, Merger->Param().continuousMaxTimeBin) : 0;
const float y0 = row.Grid().YMin();
const float stepY = row.HstepY();
const float z0 = row.Grid().ZMin() - zOffset; // We can use our own ZOffset, since this is only used temporarily anyway
Expand Down
12 changes: 6 additions & 6 deletions GPU/GPUTracking/SectorTracker/GPUTPCTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ class GPUTPCTracker : public GPUProcessor

GPUdi() static void GetErrors2Seeding(const GPUParam& param, char sector, int32_t iRow, const GPUTPCTrackParam& t, float time, float& ErrY2, float& ErrZ2)
{
// param.GetClusterErrors2(sector, iRow, param.GetContinuousTracking() != 0. ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, 0.f, 0.f, ErrY2, ErrZ2);
param.GetClusterErrorsSeeding2(sector, iRow, param.par.continuousTracking != 0.f ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, ErrY2, ErrZ2);
// param.GetClusterErrors2(sector, iRow, param.continuousTracking ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, 0.f, 0.f, ErrY2, ErrZ2);
param.GetClusterErrorsSeeding2(sector, iRow, param.par.continuousTracking ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, ErrY2, ErrZ2);
}

GPUdi() void GetErrors2Seeding(int32_t iRow, const GPUTPCTrackParam& t, float time, float& ErrY2, float& ErrZ2) const
{
// Param().GetClusterErrors2(mISector, iRow, Param().GetContinuousTracking() != 0. ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, 0.f, 0.f, ErrY2, ErrZ2);
Param().GetClusterErrorsSeeding2(mISector, iRow, Param().par.continuousTracking != 0.f ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, ErrY2, ErrZ2);
// Param().GetClusterErrors2(mISector, iRow, Param().continuousTracking ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, 0.f, 0.f, ErrY2, ErrZ2);
Param().GetClusterErrorsSeeding2(mISector, iRow, Param().par.continuousTracking ? 125.f : t.Z(), t.SinPhi(), t.DzDs(), time, ErrY2, ErrZ2);
}
GPUdi() void GetErrors2Seeding(int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
{
// Param().GetClusterErrors2(mISector, iRow, Param().GetContinuousTracking() != 0. ? 125.f : z, sinPhi, DzDs, time, 0.f, 0.f, ErrY2, ErrZ2);
Param().GetClusterErrorsSeeding2(mISector, iRow, Param().par.continuousTracking != 0.f ? 125.f : z, sinPhi, DzDs, time, ErrY2, ErrZ2);
// Param().GetClusterErrors2(mISector, iRow, Param().continuousTracking ? 125.f : z, sinPhi, DzDs, time, 0.f, 0.f, ErrY2, ErrZ2);
Param().GetClusterErrorsSeeding2(mISector, iRow, Param().par.continuousTracking ? 125.f : z, sinPhi, DzDs, time, ErrY2, ErrZ2);
}

void SetupCommonMemory();
Expand Down
10 changes: 7 additions & 3 deletions GPU/GPUTracking/SectorTracker/GPUTPCTrackletConstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ GPUdic(2, 1) void GPUTPCTrackletConstructor::UpdateTracklet(int32_t /*nBlocks*/,
float x = row.X();
float y = y0 + hh.x * stepY;
float z = z0 + hh.y * stepZ;
if (iRow != r.mStartRow || !tracker.Param().par.continuousTracking) {
tParam.ConstrainZ(z, tracker.ISector(), z0, r.mLastZ);
if (iRow != r.mStartRow) {
if (tracker.Param().par.continuousTracking) {
tParam.ConstrainZ(z, tracker.ISector(), z0, r.mLastZ);
}
tracker.GetConstantMem()->calibObjects.fastTransformHelper->TransformXYZ(tracker.ISector(), iRow, x, y, z);
}
if (iRow == r.mStartRow) {
Expand Down Expand Up @@ -262,7 +264,9 @@ GPUdic(2, 1) void GPUTPCTrackletConstructor::UpdateTracklet(int32_t /*nBlocks*/,
rowHit = CALINK_INVAL;
break;
}
tParam.ConstrainZ(tmpZ, tracker.ISector(), z0, r.mLastZ);
if (tracker.Param().par.continuousTracking) {
tParam.ConstrainZ(tmpZ, tracker.ISector(), z0, r.mLastZ);
}
tracker.GetConstantMem()->calibObjects.fastTransformHelper->InverseTransformYZtoX(tracker.ISector(), iRow, tmpY, tmpZ, x);
}

Expand Down
8 changes: 7 additions & 1 deletion GPU/GPUTracking/Standalone/Benchmark/standalone.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,15 @@ int32_t SetupReconstruction()
grp.grpContinuousMaxTimeBin = configStandalone.TF.timeFrameLen * ((double)GPUReconstructionTimeframe::TPCZ / (double)GPUReconstructionTimeframe::DRIFT_TIME) / chainTracking->GetTPCTransformHelper()->getCorrMap()->getVDrift();
}
}
if (configStandalone.cont && grp.grpContinuousMaxTimeBin == 0) {
if (configStandalone.setMaxTimeBin != -2) {
grp.grpContinuousMaxTimeBin = configStandalone.setMaxTimeBin;
} else if (configStandalone.cont && grp.grpContinuousMaxTimeBin == 0) {
grp.grpContinuousMaxTimeBin = -1;
}
if (grp.grpContinuousMaxTimeBin < -1 && !configStandalone.noEvents) {
printf("Invalid maxTimeBin %d\n", grp.grpContinuousMaxTimeBin);
return 1;
}
if (rec->GetDeviceType() == GPUReconstruction::DeviceType::CPU) {
printf("Standalone Test Framework for CA Tracker - Using CPU\n");
} else {
Expand Down