29 for (int32_t
i = 0;
i < NumberOfSectors;
i++) {
30 double angle = (
i + 0.5) * 2. * M_PI / NumberOfSectorsA;
36 for (int32_t
i = 0;
i < MaxNumberOfRows + 1;
i++) {
45 assert(numberOfRows >= 0 && numberOfRows < MaxNumberOfRows);
47 mConstructionMask = ConstructionState::InProgress;
48 mNumberOfRows = numberOfRows;
52 for (int32_t
i = 0;
i < MaxNumberOfRows;
i++) {
61 assert(mConstructionMask & ConstructionState::InProgress);
62 assert(tpcZlength > 0.f);
64 mTPCzLength = tpcZlength;
66 mConstructionMask |= ConstructionState::GeometryIsSet;
72 assert(mConstructionMask & ConstructionState::InProgress);
73 assert(iRow >= 0 && iRow < mNumberOfRows);
75 assert(padWidth > 0.);
83 const double sectorAngle = 2. * M_PI / NumberOfSectorsA;
84 const double scaleXtoRowWidth = 2. * tan(0.5 * sectorAngle);
85 double uWidth =
x * scaleXtoRowWidth;
89 row.maxPad = nPads - 1;
90 row.padWidth = padWidth;
91 row.yMin = -uWidth / 2.;
98 assert(mConstructionMask & ConstructionState::InProgress);
99 assert(mConstructionMask & ConstructionState::GeometryIsSet);
101 for (int32_t
i = 0;
i < mNumberOfRows;
i++) {
102 assert(getRowInfo(
i).maxPad > 0);
105 mConstructionMask = (uint32_t)ConstructionState::Constructed;
111 LOG(info) <<
"TPC Fast Transformation Geometry: ";
112 LOG(info) <<
"mNumberOfRows = " << mNumberOfRows;
113 LOG(info) <<
"mTPCzLength = " << mTPCzLength;
114 LOG(info) <<
"TPC Rows : ";
115 for (int32_t
i = 0;
i < mNumberOfRows;
i++) {
116 LOG(info) <<
" tpc row " <<
i <<
": x = " << mRowInfos[
i].
x <<
" maxPad = " << mRowInfos[
i].
maxPad <<
" padWidth = " << mRowInfos[
i].
padWidth;
129 if (mNumberOfRows <= 0 || mNumberOfRows >= MaxNumberOfRows) {
132 float lx = getRowInfo(
row).x;
133 float lx1 = 0.f, ly1 = 0.f, lz1 = 0.f;
134 float gx = 0.f,
gy = 0.f,
gz = 0.f;
137 convGlobalToLocal(sector,
gx,
gy,
gz, lx1, ly1, lz1);
139 if (fabs(lx1 -
lx) > 1.e-4 || fabs(ly1 -
ly) > 1.e-4 || fabs(lz1 -
lz) > 1.e-7) {
140 LOG(info) <<
"Error local <-> global: x " <<
lx <<
" dx " << lx1 -
lx <<
" y " <<
ly <<
" dy " << ly1 -
ly <<
" z " <<
lz <<
" dz " << lz1 -
lz;
147 convPadDriftLengthToLocal(sector, 10,
pad,
length, ly2, lz2);
149 if (fabs(ly2 -
ly) + fabs(lz2 -
lz) > 1.e-6) {
150 LOG(info) <<
"Error local <-> UV: y " <<
ly <<
" dy " << ly2 -
ly <<
" z " <<
lz <<
" dz " << lz2 -
lz;
155 LOG(info) <<
"TPC Fast Transformation Geometry: Internal ERROR " << error;
164 return test(2, 5, 10., 10.);
Definition of FlatObject class.
GLuint GLsizei GLsizei * length
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"