Project
Loading...
Searching...
No Matches
PadPlane.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_TRD_PADPLANE_H
13#define O2_TRD_PADPLANE_H
14
15// Forwards to standard header with protection for GPU compilation
16#include "GPUCommonRtypes.h" // for ClassDef
17#include "GPUCommonDef.h"
18
20// //
21// TRD pad plane class //
22// //
23// Contains the information on ideal pad positions, pad dimensions, //
24// tilting angle, etc. //
25// It also provides methods to identify the current pad number from //
26// local tracking coordinates. //
27// //
29namespace o2
30{
31namespace trd
32{
34{
35 public:
36 PadPlane() = default;
37 PadPlane(int layer, int stack) : mLayer(layer), mStack(stack){};
38 PadPlane(const PadPlane& p) = delete;
39 PadPlane& operator=(const PadPlane& p) = delete;
40 ~PadPlane() = default;
41
42 void setLayer(int l) { mLayer = l; };
43 void setStack(int s) { mStack = s; };
44 void setRowSpacing(double s) { mRowSpacing = s; };
45 void setColSpacing(double s) { mColSpacing = s; };
46 void setLengthRim(double l) { mLengthRim = l; };
47 void setWidthRim(double w) { mWidthRim = w; };
48 void setNcols(int n);
49 void setNrows(int n);
50 void setPadCol(int ic, double c)
51 {
52 if (ic < mNcols) {
53 mPadCol[ic] = c;
54 }
55 };
56 void setPadRow(int ir, double r)
57 {
58 if (ir < mNrows) {
59 mPadRow[ir] = r;
60 }
61 };
62 void setLength(double l) { mLength = l; };
63 void setWidth(double w) { mWidth = w; };
64 void setLengthOPad(double l)
65 {
66 mLengthOPad = l;
67 mInverseLengthOPad = 1.0 / l;
68 };
69 void setWidthOPad(double w)
70 {
71 mWidthOPad = w;
72 mInverseWidthOPad = 1.0 / w;
73 };
74 void setLengthIPad(double l)
75 {
76 mLengthIPad = l;
77 mInverseLengthIPad = 1.0 / l;
78 };
79 void setWidthIPad(double w)
80 {
81 mWidthIPad = w;
82 mInverseWidthIPad = 1.0 / w;
83 };
84 void setPadRowSMOffset(double o) { mPadRowSMOffset = o; };
85 void setAnodeWireOffset(float o) { mAnodeWireOffset = o; };
86 void setTiltingAngle(double t);
87
88 GPUd() int getPadRowNumber(double z) const
89 {
90 //
91 // Finds the pad row number for a given z-position in local supermodule system
92 //
93 int row = 0;
94 int nabove = 0;
95 int nbelow = 0;
96 int middle = 0;
97
98 if ((z > getRow0()) || (z < getRowEnd())) {
99 row = -1;
100
101 } else {
102 nabove = mNrows + 1;
103 nbelow = 0;
104 while (nabove - nbelow > 1) {
105 middle = (nabove + nbelow) / 2;
106 if (z == (mPadRow[middle - 1] + mPadRowSMOffset)) {
107 row = middle;
108 }
109 if (z > (mPadRow[middle - 1] + mPadRowSMOffset)) {
110 nabove = middle;
111 } else {
112 nbelow = middle;
113 }
114 }
115 row = nbelow - 1;
116 }
117
118 return row;
119 };
120
121 GPUd() int getPadRowNumberROC(double z) const;
122 GPUd() double getPadRow(double z) const;
123
124 GPUd() int getPadColNumber(double rphi) const
125 {
126 //
127 // Finds the pad column number for a given rphi-position
128 //
129
130 int col = 0;
131 int nabove = 0;
132 int nbelow = 0;
133 int middle = 0;
134
135 if ((rphi < getCol0()) || (rphi > getColEnd())) {
136 col = -1;
137
138 } else {
139 nabove = mNcols;
140 nbelow = 0;
141 while (nabove - nbelow > 1) {
142 middle = (nabove + nbelow) / 2;
143 if (rphi == mPadCol[middle]) {
144 col = middle;
145 }
146 if (rphi > mPadCol[middle]) {
147 nbelow = middle;
148 } else {
149 nabove = middle;
150 }
151 }
152 col = nbelow;
153 }
154
155 return col;
156 }
157
158 GPUd() double getPad(double y, double z) const;
159
160 GPUd() double getTiltOffset(int row, double rowOffset) const
161 {
162 if (row == 0 || row == mNrows - 1) {
163 return mTiltingTan * (rowOffset - 0.5 * mLengthOPad);
164 } else {
165 return mTiltingTan * (rowOffset - 0.5 * mLengthIPad);
166 }
167 };
168 GPUd() double getPadRowOffset(int row, double z) const
169 {
170 if ((row < 0) || (row >= mNrows)) {
171 return -1.0;
172 } else {
173 return mPadRow[row] + mPadRowSMOffset - z;
174 }
175 };
176 GPUd() double getPadRowOffsetROC(int row, double z) const
177 {
178 if ((row < 0) || (row >= mNrows)) {
179 return -1.0;
180 } else {
181 return mPadRow[row] - z;
182 }
183 };
184
185 GPUd() double getPadColOffset(int col, double rphi) const
186 {
187 if ((col < 0) || (col >= mNcols)) {
188 return -1.0;
189 } else {
190 return rphi - mPadCol[col];
191 }
192 };
193
194 GPUd() double getTiltingAngle() const { return mTiltingAngle; };
195 GPUd() int getNrows() const { return mNrows; };
196 GPUd() int getNcols() const { return mNcols; };
197 GPUd() double getRow0() const { return mPadRow[0] + mPadRowSMOffset; };
198 GPUd() double getRow0ROC() const { return mPadRow[0]; };
199 GPUd() double getCol0() const { return mPadCol[0]; };
200 GPUd() double getRowEnd() const { return mPadRow[mNrows - 1] - mLengthOPad + mPadRowSMOffset; };
201 GPUd() double getRowEndROC() const { return mPadRow[mNrows - 1] - mLengthOPad; };
202 GPUd() double getColEnd() const { return mPadCol[mNcols - 1] + mWidthOPad; };
203 GPUd() double getRowPos(int row) const { return mPadRow[row] + mPadRowSMOffset; };
204 GPUd() double getRowPosROC(int row) const { return mPadRow[row]; };
205 GPUd() double getColPos(int col) const { return mPadCol[col]; };
206 GPUd() double getRowSize(int row) const
207 {
208 if ((row == 0) || (row == mNrows - 1)) {
209 return mLengthOPad;
210 } else {
211 return mLengthIPad;
212 }
213 };
214 GPUd() double getColSize(int col) const
215 {
216 if ((col == 0) || (col == mNcols - 1)) {
217 return mWidthOPad;
218 } else {
219 return mWidthIPad;
220 }
221 };
222
223 GPUd() double getLengthRim() const { return mLengthRim; };
224 GPUd() double getWidthRim() const { return mWidthRim; };
225 GPUd() double getRowSpacing() const { return mRowSpacing; };
226 GPUd() double getColSpacing() const { return mColSpacing; };
227 GPUd() double getLengthOPad() const { return mLengthOPad; };
228 GPUd() double getLengthIPad() const { return mLengthIPad; };
229 GPUd() double getWidthOPad() const { return mWidthOPad; };
230 GPUd() double getWidthIPad() const { return mWidthIPad; };
231 GPUd() double getAnodeWireOffset() const { return mAnodeWireOffset; };
232
233 private:
234 static GPUglobalconstexpr() int MAXCOLS = 144;
235 static GPUglobalconstexpr() int MAXROWS = 16;
236
237 int mLayer; // Layer number
238 int mStack; // Stack number
239
240 double mLength; // Length of pad plane in z-direction (row)
241 double mWidth; // Width of pad plane in rphi-direction (col)
242
243 double mLengthRim; // Length of the rim in z-direction (row)
244 double mWidthRim; // Width of the rim in rphi-direction (col)
245
246 double mLengthOPad; // Length of an outer pad in z-direction (row)
247 double mWidthOPad; // Width of an outer pad in rphi-direction (col)
248
249 double mLengthIPad; // Length of an inner pad in z-direction (row)
250 double mWidthIPad; // Width of an inner pad in rphi-direction (col)
251
252 double mRowSpacing; // Spacing between the pad rows
253 double mColSpacing; // Spacing between the pad columns
254
255 int mNrows; // Number of rows
256 int mNcols; // Number of columns
257
258 double mTiltingAngle; // Pad tilting angle
259 double mTiltingTan; // Tangens of pad tilting angle
260
261 double mPadRow[MAXROWS]; // Pad border positions in row direction
262 double mPadCol[MAXCOLS]; // Pad border positions in column direction
263
264 double mPadRowSMOffset; // To be added to translate local ROC system to local SM system
265
266 double mAnodeWireOffset; // Distance of first anode wire from pad edge
267
268 double mInverseLengthIPad; // 1 / mLengthIPad
269 double mInverseLengthOPad; // 1 / mLengthOPad
270
271 double mInverseWidthIPad; // 1 / mWidthIPad
272 double mInverseWidthOPad; // 1 / mWidthOPad
273
274 ClassDefNV(PadPlane, 2); // TRD ROC pad plane
275};
276} // namespace trd
277} // namespace o2
278#endif
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 trd
uint32_t col
Definition RawData.h:4
uint32_t c
Definition RawData.h:2
uint32_t stack
Definition RawData.h:1
void setPadRow(int ir, double r)
Definition PadPlane.h:56
GPUd() double getRowEndROC() const
Definition PadPlane.h:201
GPUd() double getColSpacing() const
Definition PadPlane.h:226
GPUd() double getRow0ROC() const
Definition PadPlane.h:198
void setWidthOPad(double w)
Definition PadPlane.h:69
GPUd() double getPadRowOffset(int row
void setNrows(int n)
Definition PadPlane.cxx:87
GPUd() double getCol0() const
Definition PadPlane.h:199
void setNcols(int n)
Definition PadPlane.cxx:79
GPUd() int getNrows() const
Definition PadPlane.h:195
void setPadRowSMOffset(double o)
Definition PadPlane.h:84
GPUd() double getColSize(int col) const
Definition PadPlane.h:214
GPUd() double getWidthIPad() const
Definition PadPlane.h:230
GPUd() double getColEnd() const
Definition PadPlane.h:202
GPUd() double getWidthRim() const
Definition PadPlane.h:224
PadPlane & operator=(const PadPlane &p)=delete
GPUd() double getWidthOPad() const
Definition PadPlane.h:229
GPUd() double getLengthIPad() const
Definition PadPlane.h:228
GPUd() double getAnodeWireOffset() const
Definition PadPlane.h:231
GPUd() double getTiltingAngle() const
Definition PadPlane.h:194
void setTiltingAngle(double t)
Definition PadPlane.cxx:34
GPUd() int getNcols() const
Definition PadPlane.h:196
GPUd() int getPadRowNumberROC(double z) const
PadPlane()=default
void setRowSpacing(double s)
Definition PadPlane.h:44
PadPlane(const PadPlane &p)=delete
void setWidthRim(double w)
Definition PadPlane.h:47
void setLayer(int l)
Definition PadPlane.h:42
void setWidthIPad(double w)
Definition PadPlane.h:79
GPUd() double getRowSpacing() const
Definition PadPlane.h:225
GPUd() int getPadRowNumber(double z) const
Definition PadPlane.h:88
GPUd() double getRowPos(int row) const
Definition PadPlane.h:203
void setPadCol(int ic, double c)
Definition PadPlane.h:50
~PadPlane()=default
void setColSpacing(double s)
Definition PadPlane.h:45
GPUd() double getColPos(int col) const
Definition PadPlane.h:205
GPUd() double getRowSize(int row) const
Definition PadPlane.h:206
void setLengthIPad(double l)
Definition PadPlane.h:74
GPUd() double getRowPosROC(int row) const
Definition PadPlane.h:204
void setAnodeWireOffset(float o)
Definition PadPlane.h:85
void setLengthRim(double l)
Definition PadPlane.h:46
GPUd() double getRowEnd() const
Definition PadPlane.h:200
PadPlane(int layer, int stack)
Definition PadPlane.h:37
void setLength(double l)
Definition PadPlane.h:62
void setWidth(double w)
Definition PadPlane.h:63
GPUd() double getPadRowOffsetROC(int row
GPUd() double getLengthRim() const
Definition PadPlane.h:223
void setLengthOPad(double l)
Definition PadPlane.h:64
GPUd() double getRow0() const
Definition PadPlane.h:197
GPUd() double getLengthOPad() const
Definition PadPlane.h:227
void setStack(int s)
Definition PadPlane.h:43
GLdouble n
Definition glcorearb.h:1982
GLint y
Definition glcorearb.h:270
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLboolean r
Definition glcorearb.h:1233
GLubyte GLubyte GLubyte GLubyte w
Definition glcorearb.h:852
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)
std::vector< int > row