20#include "frontend/GPUDisplayInfo.inc"
26#include "GPUParam.inc"
33#ifndef GPUCA_STANDALONE
37#include <oneapi/tbb.h>
41void GPUDisplay::DrawGLScene_updateEventData()
43 mUpdateGUIOptions =
true;
53 if (mNMaxClusters < mCurrentClusters) {
54 mNMaxClusters = mCurrentClusters;
55 mGlobalPosPtr.reset(
new float4[mNMaxClusters]);
56 mGlobalPos = mGlobalPosPtr.get();
60 if (mCurrentSpacePointsTRD > mNMaxSpacePointsTRD) {
61 mNMaxSpacePointsTRD = mCurrentSpacePointsTRD;
62 mGlobalPosPtrTRD.reset(
new float4[mNMaxSpacePointsTRD]);
63 mGlobalPosPtrTRD2.reset(
new float4[mNMaxSpacePointsTRD]);
64 mGlobalPosTRD = mGlobalPosPtrTRD.get();
65 mGlobalPosTRD2 = mGlobalPosPtrTRD2.get();
69 if (mNMaxClustersITS < mCurrentClustersITS) {
70 mNMaxClustersITS = mCurrentClustersITS;
71 mGlobalPosPtrITS.reset(
new float4[mNMaxClustersITS]);
72 mGlobalPosITS = mGlobalPosPtrITS.get();
76 if (mNMaxClustersTOF < mCurrentClustersTOF) {
77 mNMaxClustersTOF = mCurrentClustersTOF;
78 mGlobalPosPtrTOF.reset(
new float4[mNMaxClustersTOF]);
79 mGlobalPosTOF = mGlobalPosPtrTOF.get();
83 if ((
size_t)nTpcMergedTracks > mTRDTrackIds.size()) {
84 mTRDTrackIds.resize(nTpcMergedTracks);
86 if (mIOPtrs->
nItsTracks > mITSStandaloneTracks.size()) {
87 mITSStandaloneTracks.resize(mIOPtrs->
nItsTracks);
92 auto tmpDoTRDTracklets = [&](
auto* trdTracks) {
94 if (trdTracks[
i].getNtracklets()) {
95 mTRDTrackIds[trdTracks[
i].getRefGlobalTrackIdRaw()] =
i;
105 std::fill(mITSStandaloneTracks.begin(), mITSStandaloneTracks.end(),
true);
109 mITSStandaloneTracks[mIOPtrs->
tpcLinkITS[
i]] =
false;
114 if (timer.IsRunning()) {
115 GPUInfo(
"Display Time: Init:\t\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
118 if (mCfgH.trackFilter) {
120 mTrackFilter.resize(nTracks);
121 std::fill(mTrackFilter.begin(), mTrackFilter.end(),
true);
122 if (buildTrackFilter()) {
123 SetInfo(
"Error running track filter from %s", trackFilterName().c_str());
126 for (
uint32_t i = 0;
i < mTrackFilter.size();
i++) {
127 nFiltered += !mTrackFilter[
i];
129 if (mUpdateTrackFilter) {
130 SetInfo(
"Applied track filter %s - filtered %u / %u", trackFilterName().c_str(), nFiltered, (
uint32_t)mTrackFilter.size());
134 mUpdateTrackFilter =
false;
135 if (timer.IsRunning()) {
136 GPUInfo(
"Display Time: Track Filter:\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
139 mMaxClusterZ = tbb::parallel_reduce(tbb::blocked_range<int32_t>(0, NSECTORS, 1),
float(0.f), [&](
const tbb::blocked_range<int32_t>&
r,
float maxClusterZ) {
146 while (row < GPUTPCGeometry::NROWS - 1 && mIOPtrs->clustersNative->clusterOffset[
iSector][
row + 1] <= (
uint32_t)cid) {
149 if (cid >= mNMaxClusters) {
150 throw std::runtime_error(
"Cluster Buffer Size exceeded");
156 if (mCfgH.clustersOnNominalRow) {
157 x = GPUTPCGeometry::Row2X(
row);
161 if (fabsf(
ptr->z) > maxClusterZ) {
162 maxClusterZ = fabsf(
ptr->z);
164 ptr->z +=
iSector < 18 ? mCfgH.xzAdd : -mCfgH.xzAdd;
165 ptr->x *= GL_SCALE_FACTOR;
166 ptr->y *= GL_SCALE_FACTOR;
167 ptr->z *= GL_SCALE_FACTOR;
172 }, [](
const float a,
const float b) {
return std::max(
a,
b); }, tbb::simple_partitioner());
173 if (timer.IsRunning()) {
174 GPUInfo(
"Display Time: Load TPC:\t\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
177 mMaxClusterZ = tbb::parallel_reduce(tbb::blocked_range<int32_t>(0, mCurrentSpacePointsTRD, 32),
float(mMaxClusterZ), [&](
const tbb::blocked_range<int32_t>&
r,
float maxClusterZ) {
179 float trdZoffset = 0;
180 for (
int i =
r.begin();
i <
r.end();
i++) {
183 float trdTime = mIOPtrs->
trdTriggerTimes[trdTriggerRecord] * 1e3 / o2::constants::lhc::LHCBunchSpacingNS / o2::tpc::constants::LHCBCPERTIMEBIN;
189 mParam->Sector2Global(iSec, sp.getX() + mCfgH.xzAdd, sp.getY(), sp.getZ(), &
ptr->x, &
ptr->y, &
ptr->z);
190 ptr->
z +=
ptr->z > 0 ? trdZoffset : -trdZoffset;
191 if (fabsf(
ptr->z) > maxClusterZ) {
192 maxClusterZ = fabsf(
ptr->z);
194 ptr->x *= GL_SCALE_FACTOR;
195 ptr->y *= GL_SCALE_FACTOR;
196 ptr->z *= GL_SCALE_FACTOR;
197 ptr->w = tTRDCLUSTER;
198 ptr = &mGlobalPosTRD2[
i];
199 mParam->Sector2Global(iSec, sp.getX() + mCfgH.xzAdd + 4.5f, sp.getY() + 1.5f * sp.getDy(), sp.getZ(), &
ptr->x, &
ptr->y, &
ptr->z);
200 ptr->
z +=
ptr->z > 0 ? trdZoffset : -trdZoffset;
201 if (fabsf(
ptr->z) > maxClusterZ) {
202 maxClusterZ = fabsf(
ptr->z);
204 ptr->x *= GL_SCALE_FACTOR;
205 ptr->y *= GL_SCALE_FACTOR;
206 ptr->z *= GL_SCALE_FACTOR;
207 ptr->w = tTRDCLUSTER;
210 }, [](
const float a,
const float b) {
return std::max(
a,
b); }, tbb::static_partitioner());
211 if (timer.IsRunning()) {
212 GPUInfo(
"Display Time: Load TRD:\t\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
215 mMaxClusterZ = tbb::parallel_reduce(tbb::blocked_range<int32_t>(0, mCurrentClustersTOF, 32),
float(mMaxClusterZ), [&](
const tbb::blocked_range<int32_t>&
r,
float maxClusterZ) {
216 for (int32_t
i =
r.begin();
i <
r.end();
i++) {
220 if (mParam->
par.continuousTracking) {
221 float tofTime = mIOPtrs->
tofClusters[
i].
getTime() * 1
e-3 / o2::constants::lhc::LHCBunchSpacingNS / o2::tpc::constants::LHCBCPERTIMEBIN;
223 ptr->z +=
ptr->z > 0 ? ZOffset : -ZOffset;
225 if (fabsf(
ptr->z) > maxClusterZ) {
226 maxClusterZ = fabsf(
ptr->z);
228 ptr->x *= GL_SCALE_FACTOR;
229 ptr->y *= GL_SCALE_FACTOR;
230 ptr->z *= GL_SCALE_FACTOR;
231 ptr->w = tTOFCLUSTER;
234 }, [](
const float a,
const float b) {
return std::max(
a,
b); });
235 if (timer.IsRunning()) {
236 GPUInfo(
"Display Time: Load TOF:\t\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
239 if (mCurrentClustersITS) {
240 float itsROFhalfLen = 0;
241#ifndef GPUCA_STANDALONE
242 if (mParam->
par.continuousTracking) {
244 itsROFhalfLen = alpParams.roFrameLengthInBC / (
float)o2::tpc::constants::LHCBCPERTIMEBIN / 2;
250 if (mParam->
par.continuousTracking) {
256 throw std::runtime_error(
"Inconsistent ITS data, number of clusters does not match ROF content");
262 auto p = cl.getXYZGlo(*itsGeo);
266 ptr->z +=
ptr->z > 0 ? ZOffset : -ZOffset;
267 if (fabsf(
ptr->z) > mMaxClusterZ) {
268 mMaxClusterZ = fabsf(
ptr->z);
270 ptr->x *= GL_SCALE_FACTOR;
271 ptr->y *= GL_SCALE_FACTOR;
272 ptr->z *= GL_SCALE_FACTOR;
273 ptr->w = tITSCLUSTER;
278 if (timer.IsRunning()) {
279 GPUInfo(
"Display Time: Load ITS:\t\t%6.0f us", timer.GetCurrentElapsedTime(
true) * 1e6);
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
configStandalone Reconstruction rec_tpc float
TRD Tracklet word for GPU tracker - 32bit tracklet info + half chamber ID + index.
Definition of the GeometryTGeo class.
static const DPLAlpideParam< N > & Instance()
const GPUSettingsProcessing & GetProcessingSettings() const
static GeometryTGeo * Instance()
const BCData & getBCData() const
int getFirstEntry() const
std::int8_t getSector() const
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLdouble GLdouble GLdouble z
int64_t differenceInBC(const InteractionRecord &other) const
S< TPCFastTransformPOD >::type * fastTransform
const int32_t * trdTrackletIdxFirst
const o2::tpc::ClusterNativeAccess * clustersNative
uint32_t nClusterData[NSECTORS]
const GPUTRDSpacePoint * trdSpacePoints
const o2::tof::Cluster * tofClusters
const o2::BaseCluster< float > * itsClusters
const o2::itsmft::ROFRecord * itsClusterROF
const GPUTRDTrackGPU * trdTracks
const GPUSettingsTF * settingsTF
const GPUTRDTrackletWord * trdTracklets
const GPUTRDTrack * trdTracksO2
uint32_t nOutputTracksTPCO2
const float * trdTriggerTimes
uint32_t nTRDTriggerRecords
int32_t continuousMaxTimeBin
unsigned int nClustersSector[constants::MAXSECTOR]
unsigned int nClustersTotal
const ClusterNative * clusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW]
unsigned int clusterOffset[constants::MAXSECTOR][constants::MAXGLOBALPADROW]