25 return mDetElemId == rhs.mDetElemId;
28inline bool Segmentation::operator!=(
const Segmentation& rhs)
const {
return !(rhs == *
this); }
33 swap(
a.mDetElemId,
b.mDetElemId);
34 swap(
a.mPadIndexOffset,
b.mPadIndexOffset);
39inline Segmentation::Segmentation(
const Segmentation&&
seg) : mBending{
std::move(
seg.mBending)}, mNonBending{
std::move(
seg.mNonBending)}, mDetElemId{
seg.mDetElemId}, mPadIndexOffset{
seg.mPadIndexOffset}
49inline int Segmentation::findPadByFEE(
int dualSampaId,
int dualSampaChannel)
const
51 bool isBending = dualSampaId < 1024;
54 catPadIndex = mBending.
findPadByFEE(dualSampaId, dualSampaChannel);
55 if (!mBending.
isValid(catPadIndex)) {
59 catPadIndex = mNonBending.
findPadByFEE(dualSampaId, dualSampaChannel);
60 if (!mNonBending.
isValid(catPadIndex)) {
64 return padC2DE(catPadIndex, isBending);
67inline bool Segmentation::isValid(
int dePadIndex)
const
69 return dePadIndex >= 0 && dePadIndex <
nofPads();
72inline int Segmentation::padC2DE(
int catPadIndex,
bool isBending)
const
77 return catPadIndex + mPadIndexOffset;
80inline void Segmentation::catSegPad(
int dePadIndex,
const CathodeSegmentation*& catseg,
int& padcuid)
const
86 if (dePadIndex < mPadIndexOffset) {
91 catseg = &mNonBending;
92 padcuid = dePadIndex - mPadIndexOffset;
95inline bool Segmentation::findPadPairByPosition(
double x,
double y,
int&
b,
int& nb)
const
101 nb = padC2DE(nb,
false);
105 if (!mNonBending.
isValid(nb)) {
106 b = padC2DE(
b,
true);
109 b = padC2DE(
b,
true);
110 nb = padC2DE(nb,
false);
114template <
typename CALLABLE>
115void Segmentation::forEachPad(CALLABLE&&
func)
const
118 int offset{mPadIndexOffset};
124template <
typename CALLABLE>
125void Segmentation::forEachPadInDualSampa(
int dualSampaId, CALLABLE&&
func)
const
127 bool isBending = dualSampaId < 1024;
131 int offset{mPadIndexOffset};
138template <
typename CALLABLE>
139void Segmentation::forEachPadInArea(
double xmin,
double ymin,
double xmax,
double ymax, CALLABLE&&
func)
const
142 int offset{mPadIndexOffset};
148template <
typename CALLABLE>
149void Segmentation::forEachNeighbouringPad(
int dePadIndex, CALLABLE&&
func)
const
153 catSegPad(dePadIndex, catSeg, catPadIndex);
159 catSeg->forEachNeighbouringPad(catPadIndex, [&
offset, &
func](
int cindex) {
164inline void Segmentation::forEachDualSampa(std::function<
void(
int dualSampaId)>
func)
const
170inline std::string Segmentation::padAsString(
int dePadIndex)
const
177 catSegPad(dePadIndex, catSeg, catPadIndex);
178 auto s = catSeg->padAsString(catPadIndex);
187inline int Segmentation::padDualSampaId(
int dePadIndex)
const
191 catSegPad(dePadIndex, catSeg, catPadIndex);
192 return catSeg->padDualSampaId(catPadIndex);
195inline int Segmentation::padDualSampaChannel(
int dePadIndex)
const
199 catSegPad(dePadIndex, catSeg, catPadIndex);
200 return catSeg->padDualSampaChannel(catPadIndex);
203inline double Segmentation::padPositionX(
int dePadIndex)
const
207 catSegPad(dePadIndex, catSeg, catPadIndex);
208 return catSeg->padPositionX(catPadIndex);
211inline double Segmentation::padPositionY(
int dePadIndex)
const
215 catSegPad(dePadIndex, catSeg, catPadIndex);
216 return catSeg->padPositionY(catPadIndex);
219inline double Segmentation::padSizeX(
int dePadIndex)
const
223 catSegPad(dePadIndex, catSeg, catPadIndex);
224 return catSeg->padSizeX(catPadIndex);
227inline double Segmentation::padSizeY(
int dePadIndex)
const
231 catSegPad(dePadIndex, catSeg, catPadIndex);
232 return catSeg->padSizeY(catPadIndex);
235inline int Segmentation::detElemId()
const {
return mDetElemId; }
o2::mch::mapping::CathodeSegmentation seg
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 s
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 false
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 true
A CathodeSegmentation lets you find pads on a given plane (cathode) of a detection element and then i...
void forEachPad(CALLABLE &&func) const
void forEachPadInDualSampa(int dualSampaId, CALLABLE &&func) const
int nofDualSampas() const
void forEachDualSampa(std::function< void(int dualSampaId)> func) const
Loop over dual sampas of this detection element.
void forEachPadInArea(double xmin, double ymin, double xmax, double ymax, CALLABLE &&func) const
int findPadByPosition(double x, double y) const
int findPadByFEE(int dualSampaId, int dualSampaChannel) const
bool isValid(int catPadIndex) const
Not every integer is a valid catPadIndex. This method will tell if catPadIndex is a valid one.
A Segmentation lets you find pads of a detection element and then inspect those pads.
const CathodeSegmentation & nonBending() const
const CathodeSegmentation & bending() const
bool isBendingPad(int dePadIndex) const
friend void swap(Segmentation &a, Segmentation &b)
bool isValid(int dePadIndex) const
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
constexpr std::array< std::string_view, BasicOp::Conditional+1 > mapping
a map between BasicOp and tokens in string expressions
void swap(Segmentation &a, Segmentation &b)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)