57static constexpr uint32_t DUMP_HEADER_SIZE = 4;
58static constexpr char DUMP_HEADER[DUMP_HEADER_SIZE + 1] =
"CAv1";
71 if (ioPtrs ==
nullptr) {
74 fwrite(DUMP_HEADER, 1, DUMP_HEADER_SIZE, fp);
83 std::pair<const char*, size_t> tmp = {
buffer.data(),
buffer.size()};
84 DumpData(fp, &tmp.first, &tmp.second, InOutPointerType::CLUSTER_NATIVE_MC);
108 for (
uint32_t j = 0;
j < GPUTrackingInOutZS::NENDPOINTS;
j++) {
114 std::vector<std::array<char, TPCZSHDR::TPC_ZS_PAGE_SIZE>> pages(total);
115 char*
ptr = pages[0].data();
119 for (
uint32_t j = 0;
j < GPUTrackingInOutZS::NENDPOINTS;
j++) {
127 total *= TPCZSHDR::TPC_ZS_PAGE_SIZE;
128 if (
DumpData(fp, &
ptr, &total, InOutPointerType::TPC_ZS)) {
129 fwrite(&counts,
sizeof(counts), 1, fp);
134 throw std::runtime_error(
"Cannot dump non-flat compressed clusters");
170 char buf[DUMP_HEADER_SIZE + 1] =
"";
171 size_t r = fread(
buf, 1, DUMP_HEADER_SIZE, fp);
172 if (strncmp(DUMP_HEADER,
buf, DUMP_HEADER_SIZE)) {
173 GPUError(
"Invalid file header");
178 r = fread(&geo,
sizeof(geo), 1, fp);
194 std::pair<const char*, size_t> tmp = {
nullptr, 0};
196 mIOMem.
clusterNativeMCView = std::make_unique<ConstMCLabelContainerView>(gsl::span<const char>(tmp.first, tmp.first + tmp.second));
224 r = fread(&counts,
sizeof(counts), 1, fp);
229 for (
uint32_t j = 0;
j < GPUTrackingInOutZS::NENDPOINTS;
j++) {
260 size_t fptr = ftell(fp);
261 fseek(fp, 0, SEEK_END);
262 size_t fend = ftell(fp);
265 GPUError(
"Error reading data file, reading incomplete");
271 ptrClusterData[
i][
j].
id = nClustersTotal++;
273 GPUError(
"Invalid cluster charge, truncating (%d >= %d)", (
int32_t)ptrClusterData[
i][
j].amp, 25 * 1024);
274 ptrClusterData[
i][
j].
amp = 25 * 1024 - 1;
279 GPUError(
"Invalid raw cluster charge, truncating (%d >= %d)", (
int32_t)ptrRawClusters[
i][
j].GetCharge(), 25 * 1024);
283 GPUError(
"Invalid raw cluster charge max, truncating (%d >= %d)", (
int32_t)ptrRawClusters[
i][
j].GetQMax(), 1024);
295 if (
processors()->calibObjects.fastTransform !=
nullptr) {
297 f +=
"tpctransform.dump";
300 if (
processors()->calibObjects.tpcPadGain !=
nullptr) {
302 f +=
"tpcpadgaincalib.dump";
305 if (
processors()->calibObjects.tpcZSLinkMapping !=
nullptr) {
307 f +=
"tpczslinkmapping.dump";
310 if (
processors()->calibObjects.dEdxCalibContainer !=
nullptr) {
312 f +=
"dEdxCalibContainer.dump";
315 if (
processors()->calibObjects.matLUT !=
nullptr) {
320 if (
processors()->calibObjects.trdGeometry !=
nullptr) {
322 f +=
"trdgeometry.dump";
325 if (
processors()->calibObjects.trdRecoParam !=
nullptr) {
327 f +=
"trdrecoparam.dump";
336 f +=
"tpctransform.dump";
337 mTPCFastTransformU = ReadDynamicStructFromFile<TPCFastTransformPOD, &TPCFastTransformPOD::size>(
f.c_str());
340 f +=
"tpcpadgaincalib.dump";
344 f +=
"tpczslinkmapping.dump";
348 f +=
"dEdxCalibContainer.dump";
353 mMatLUTU = ReadFlatObjectFromFile<o2::base::MatLayerCylSet>(
f.c_str());
356 f +=
"trdgeometry.dump";
357 mTRDGeometryU = ReadStructFromFile<o2::trd::GeometryFlat>(
f.c_str());
360 f +=
"trdrecoparam.dump";
Definition of container class for dE/dx corrections.
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
Online TRD tracker based on extrapolated TPC tracks.
Used for storing the MC labels for the TRD tracklets.
TRD Tracklet word for GPU tracker - 32bit tracklet info + half chamber ID + index.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Definitions of TPC Zero Suppression Data Headers.
std::unique_ptr< o2::base::MatLayerCylSet > mMatLUTU
std::unique_ptr< GPUTRDRecoParam > mTRDRecoParamU
void ReadSettings(const char *dir="") override
std::unique_ptr< TPCPadGainCalib > mTPCPadGainCalibU
std::unique_ptr< o2::tpc::CalibdEdxContainer > mdEdxCalibContainerU
std::unique_ptr< o2::trd::GeometryFlat > mTRDGeometryU
std::unique_ptr< TPCZSLinkMapping > mTPCZSLinkMappingU
void DumpData(const char *filename, const GPUTrackingInOutPointers *ioPtrs=nullptr)
GPUTrackingInOutPointers & mIOPtrs
struct o2::gpu::GPUChainTracking::InOutMemory mIOMem
int32_t ReadData(const char *filename)
void DumpSettings(const char *dir="") override
aligned_unique_buffer_ptr< TPCFastTransformPOD > mTPCFastTransformU
GPUConstantMem * processors()
void DumpStructToFile(const T *obj, const char *file)
void DumpDynamicStructToFile(const T *obj, size_t dynamicSize, const char *file)
static constexpr int32_t NSECTORS
void DumpFlatObjectToFile(const T *obj, const char *file)
static constexpr GeometryType geometryType
static constexpr const char *const GEOMETRY_TYPE_NAMES[]
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLenum GLuint GLenum GLsizei const GLchar * buf
Global TPC definitions and constants.
void SetQMax(uint16_t qmax)
void SetCharge(uint16_t charge)
S< o2::trd::GeometryFlat >::type * trdGeometry
S< o2::tpc::CalibdEdxContainer >::type * dEdxCalibContainer
S< TPCZSLinkMapping >::type * tpcZSLinkMapping
S< TPCFastTransformPOD >::type * fastTransform
S< GPUTRDRecoParam >::type * trdRecoParam
S< TPCPadGainCalib >::type * tpcPadGain
S< o2::base::MatLayerCylSet >::type * matLUT
std::unique_ptr< o2::tpc::Digit[]> tpcDigits[NSECTORS]
std::unique_ptr< char[]> clusterNativeMC
std::unique_ptr< char[]> tpcCompressedClusters
std::unique_ptr< GPUTPCMCInfo[]> mcInfosTPC
std::unique_ptr< char[]> tpcDigitsMC[NSECTORS]
std::unique_ptr< GPUTRDTrackletWord[]> trdTracklets
std::unique_ptr< o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel >[]> tpcDigitMCView
std::unique_ptr< GPUTPCMCInfoCol[]> mcInfosTPCCol
std::unique_ptr< GPUTPCGMMergedTrackHit[]> mergedTrackHits
std::unique_ptr< int32_t[]> trdTrackletIdxFirst
std::unique_ptr< GPUTPCGMMergedTrack[]> mergedTracks
std::unique_ptr< AliHLTTPCClusterMCLabel[]> mcLabelsTPC
std::unique_ptr< o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > > clusterNativeMCView
std::unique_ptr< GPUTrackingInOutDigits > digitMap
std::unique_ptr< GPUTPCClusterData[]> clusterData[NSECTORS]
std::unique_ptr< o2::tpc::ClusterNative[]> clustersNative
std::unique_ptr< GPUTPCDigitsMCInput > tpcDigitMCMap
InOutMemory & operator=(InOutMemory &&)
std::unique_ptr< float[]> trdTriggerTimes
std::unique_ptr< GPUTPCTrack[]> sectorTracks[NSECTORS]
std::unique_ptr< GPUTRDSpacePoint[]> trdSpacePoints
std::unique_ptr< GPUTrackingInOutZS > tpcZSmeta
std::unique_ptr< uint8_t[]> trdTrigRecMask
std::unique_ptr< o2::tpc::ClusterNativeAccess > clusterNativeAccess
std::unique_ptr< AliHLTTPCRawCluster[]> rawClusters[NSECTORS]
std::unique_ptr< GPUTPCHitId[]> sectorClusters[NSECTORS]
std::unique_ptr< GPUSettingsTF[]> settingsTF
std::unique_ptr< char[]> tpcZSpagesChar
std::unique_ptr< GPUTRDTrackGPU[]> trdTracks
std::unique_ptr< GPUTrackingInOutZS::GPUTrackingInOutZSMeta > tpcZSmeta2
GPUCalibObjectsConst calibObjects
const o2::tpc::Digit * tpcDigits[NSECTORS]
size_t nTPCDigits[NSECTORS]
const GPUTPCDigitsMCInput * tpcDigitsMC
const int32_t * trdTrackletIdxFirst
const GPUTPCHitId * sectorClusters[NSECTORS]
const o2::tpc::ClusterNativeAccess * clustersNative
const GPUTPCMCInfo * mcInfosTPC
uint32_t nClusterData[NSECTORS]
uint32_t nRawClusters[NSECTORS]
const o2::tpc::CompressedClustersFlat * tpcCompressedClusters
const AliHLTTPCClusterMCLabel * mcLabelsTPC
uint32_t nSectorClusters[NSECTORS]
const GPUTRDSpacePoint * trdSpacePoints
const GPUTPCTrack * sectorTracks[NSECTORS]
const GPUTRDTrackGPU * trdTracks
const GPUSettingsTF * settingsTF
const GPUTRDTrackletWord * trdTracklets
const GPUTrackingInOutZS * tpcZS
const AliHLTTPCRawCluster * rawClusters[NSECTORS]
const GPUTPCClusterData * clusterData[NSECTORS]
uint32_t nSectorTracks[NSECTORS]
uint32_t nMergedTrackHits
const float * trdTriggerTimes
const uint8_t * trdTrigRecMask
const GPUTPCGMMergedTrackHit * mergedTrackHits
const GPUTrackingInOutDigits * tpcPackedDigits
uint32_t nTRDTriggerRecords
const GPUTPCMCInfoCol * mcInfosTPCCol
const GPUTPCGMMergedTrack * mergedTracks
uint32_t count[NSECTORS][NENDPOINTS]
const void *const * zsPtr[NENDPOINTS]
uint32_t count[NENDPOINTS]
const uint32_t * nZSPtr[NENDPOINTS]
GPUTrackingInOutZSSector sector[NSECTORS]
unsigned int nClusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW]
const o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > * clustersMCTruth
unsigned int nClustersTotal
const ClusterNative * clustersLinear
const CompressedClusters * ptrForward