Project
Loading...
Searching...
No Matches
GeometryTGeo.cxx
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
13#include <TGeoManager.h>
14// #include "TRKBase/SegmentationChip.h"
15
16// using Segmentation = o2::trk::SegmentationChip;
17
18namespace o2
19{
20namespace trk
21{
22std::unique_ptr<o2::trk::GeometryTGeo> GeometryTGeo::sInstance;
23
24// Names
25std::string GeometryTGeo::sVolumeName = "TRKV";
26std::string GeometryTGeo::sLayerName = "TRKLayer";
27std::string GeometryTGeo::sPetalName = "PETALCASE";
28std::string GeometryTGeo::sPetalDiskName = "DISK";
29std::string GeometryTGeo::sPetalLayerName = "LAYER";
30std::string GeometryTGeo::sStaveName = "TRKStave";
31std::string GeometryTGeo::sChipName = "TRKChip";
32std::string GeometryTGeo::sSensorName = "TRKSensor";
33std::string GeometryTGeo::sWrapperVolumeName = "TRKUWrapVol";
34
36{
37 if (!mOwner) {
38 mOwner = true;
39 sInstance.release();
40 }
41}
42GeometryTGeo::GeometryTGeo(bool build, int loadTrans) : DetMatrixCache(detectors::DetID::TRK)
43{
44 if (sInstance) {
45 LOGP(fatal, "Invalid use of public constructor: o2::trk::GeometryTGeo instance exists");
46 }
47 mLayerToWrapper.fill(-1);
48 if (build) {
49 Build(loadTrans);
50 }
51}
52
53//__________________________________________________________________________
54void GeometryTGeo::Build(int loadTrans)
55{
60
61 if (isBuilt()) {
62 LOGP(warning, "Already built");
63 return; // already initialized
64 }
65
66 if (gGeoManager == nullptr) {
67 LOGP(fatal, "Geometry is not loaded");
68 }
69
75
84
85 for (int i = 0; i < mNumberOfLayersMLOT; i++) {
86 std::cout << "Layer MLOT: " << i << std::endl;
88 }
89
90 int numberOfChipsTotal = 0;
91
93 for (int i = 0; i < mNumberOfPetalsVD; i++) {
95 numberOfChipsTotal += mNumberOfChipsPerPetalVD[i];
96 mLastChipIndex[i] = numberOfChipsTotal - 1;
97 mLastChipIndexVD[i] = numberOfChipsTotal - 1;
98 }
99
101 for (int i = 0; i < mNumberOfLayersMLOT; i++) {
102 mNumberOfChipsPerLayerMLOT[i] = extractNumberOfStavesMLOT(i); // for the moment, considering 1 stave = 1 chip. TODO: add the final segmentation in chips
103 numberOfChipsTotal += mNumberOfChipsPerLayerMLOT[i];
104 mLastChipIndex[i + mNumberOfPetalsVD] = numberOfChipsTotal - 1;
105 mLastChipIndexMLOT[i] = numberOfChipsTotal - 1;
106 }
107
108 // setSize(mNumberOfLayersMLOT + mNumberOfActivePartsVD); /// temporary, number of chips = number of layers and active parts
109 setSize(numberOfChipsTotal);
110 fillMatrixCache(loadTrans);
111}
112
113//__________________________________________________________________________
115{
116 if (index <= mLastChipIndexVD[mLastChipIndexVD.size() - 1]) {
117 return 0;
118 } else if (index > mLastChipIndexVD[mLastChipIndexVD.size() - 1]) {
119 return 1;
120 }
121 return -1;
122}
123
124//__________________________________________________________________________
126{
127 int petalcase = 0;
128
129 int subDetID = getSubDetID(index);
130 if (subDetID == 1) {
131 return -1;
132 }
133
134 else if (index <= mLastChipIndexVD[mNumberOfPetalsVD - 1]) {
135 while (index > mLastChipIndexVD[petalcase]) {
136 petalcase++;
137 }
138 }
139 return petalcase;
140}
141
142//__________________________________________________________________________
144{
145 int subDetID = getSubDetID(index);
146 int petalcase = getPetalCase(index);
147 int lay = 0;
148
149 if (subDetID == 0) {
151 return -1;
152 }
153 return index % mNumberOfChipsPerPetalVD[petalcase];
154 } else if (subDetID == 1) {
155 while (index > mLastChipIndex[lay]) {
156 lay++;
157 }
158 return lay - mNumberOfPetalsVD;
159 }
160 return -1;
161}
162//__________________________________________________________________________
164{
165 int subDetID = getSubDetID(index);
166 int lay = getLayer(index);
167 int petalcase = getPetalCase(index);
168
169 if (subDetID == 0) {
170 return -1;
171 } else if (subDetID == 1) {
172 int lay = getLayer(index);
173 index -= getFirstChipIndex(lay, petalcase, subDetID);
174 return index;
175 }
176 return -1;
177}
178
179//__________________________________________________________________________
181{
182 int subDetID = getSubDetID(index);
183 int petalcase = getPetalCase(index);
184
185 if (subDetID == 0) {
187 return -1;
188 }
189 return (index % mNumberOfChipsPerPetalVD[petalcase]) - mNumberOfLayersVD;
190 }
191
192 return -1;
193}
194
195//__________________________________________________________________________
196int GeometryTGeo::getChipIndex(int subDetID, int petalcase, int disk, int lay, int stave) const
197{
198 if (subDetID == 0) { // VD
199 if (lay == -1) { // disk
200 return getFirstChipIndex(lay, petalcase, subDetID) + mNumberOfLayersVD + disk;
201 } else { // layer
202 return getFirstChipIndex(lay, petalcase, subDetID) + lay;
203 }
204 } else if (subDetID == 1) { // MLOT
205 return getFirstChipIndex(lay, petalcase, subDetID) + stave;
206 }
207 return -1; // not found
208}
209
210//__________________________________________________________________________
211bool GeometryTGeo::getChipID(int index, int& subDetID, int& petalcase, int& disk, int& lay, int& stave) const
212{
213 subDetID = getSubDetID(index);
214 petalcase = getPetalCase(index);
215 disk = getDisk(index);
216 lay = getLayer(index);
217 stave = getStave(index);
218
219 return kTRUE;
220}
221
222//__________________________________________________________________________
224{
225
226 // int lay, hba, stav, sstav, mod, chipInMod;
227 int subDetID, petalcase, disk, lay, stave;
228 getChipID(index, subDetID, petalcase, disk, lay, stave);
229
230 int indexRetrieved = getChipIndex(subDetID, petalcase, disk, lay, stave);
231
232 PrintChipID(index, subDetID, petalcase, disk, lay, stave, indexRetrieved);
233
234 // TString path = Form("/cave_1/barrel_1/%s_2/", GeometryTGeo::getTRKVolPattern());
235 TString path = "/cave_1/barrel_1/TRKV_2/TRKLayer0_1/TRKStave0_1/TRKChip0_1/TRKSensor0_1/";
236
237 // if (wrID >= 0) {
238 // path += Form("%s%d_1/", getITSWrapVolPattern(), wrID);
239 // }
240
241 // if (isVD) {
242 // path += Form("%s%d_1/", getTRKPetalPattern(), index);
243
244 // } else {
245 // path += Form("%s%d_1/", getTRKLayerPattern(), index);
246 // }
247
248 // if (!mIsLayerITS3[lay]) {
249 // path +=
250 // Form("%s%d_1/", getITSLayerPattern(), lay);
251 // if (mNumberOfHalfBarrels > 0) {
252 // path += Form("%s%d_%d/", getITSHalfBarrelPattern(), lay, hba);
253 // }
254 // path +=
255 // Form("%s%d_%d/", getITSStavePattern(), lay, stav);
256
257 // if (mNumberOfHalfStaves[lay] > 0) {
258 // path += Form("%s%d_%d/", getITSHalfStavePattern(), lay, sstav);
259 // }
260 // if (mNumberOfModules[lay] > 0) {
261 // path += Form("%s%d_%d/", getITSModulePattern(), lay, mod);
262 // }
263 // path += Form("%s%d_%d/%s%d_1", getITSChipPattern(), lay, chipInMod, getITSSensorPattern(), lay);
264 // } else {
265 // // hba = carbonform
266 // // stav = 0
267 // // sstav = segment
268 // // mod = rsu
269 // // chipInMod = tile
270 // // sensor = pixelarray
271 // path += Form("%s_0/", getITS3LayerPattern(lay));
272 // path += Form("%s_%d/", getITS3CarbonFormPattern(lay), hba);
273 // path += Form("%s_0/", getITS3ChipPattern(lay));
274 // path += Form("%s_%d/", getITS3SegmentPattern(lay), sstav);
275 // path += Form("%s_%d/", getITS3RSUPattern(lay), mod);
276 // path += Form("%s_%d/", getITS3TilePattern(lay), chipInMod);
277 // path += Form("%s_0", getITS3PixelArrayPattern(lay));
278 // }
279 return path;
280}
281
282//__________________________________________________________________________
284{
285 // extract matrix transforming from the PHYSICAL sensor frame to global one
286 // Note, the if the effective sensitive layer thickness is smaller than the
287 // total physical sensor tickness, this matrix is biased and connot be used
288 // directly for transformation from sensor frame to global one.
289 //
290 // Therefore we need to add a shift
291 auto path = getMatrixPath(index);
292
293 static TGeoHMatrix matTmp;
294 gGeoManager->PushPath();
295
296 // if (!gGeoManager->cd(path.Data())) {
297 // gGeoManager->PopPath();
298 // LOG(error) << "Error in cd-ing to " << path.Data();
299 // return nullptr;
300 // } // end if !gGeoManager
301
302 matTmp = *gGeoManager->GetCurrentMatrix(); // matrix may change after cd
303
304 // RSS
305 // printf("%d/%d/%d %s\n", lay, stav, detInSta, path.Data());
306 // matTmp.Print();
307 // Restore the modeler state.
308 gGeoManager->PopPath();
309
310 static int chipInGlo{0};
311
312 // account for the difference between physical sensitive layer (where charge collection is simulated) and effective sensor thicknesses
313 // in the ITS3 case this accounted by specialized functions
314 // double delta = Segmentation::SensorLayerThickness;
315 // static TGeoTranslation tra(0., 0.5 * delta, 0.);
316 // #ifdef ENABLE_UPGRADES // only apply for non ITS3 OB layers
317 // if (!mIsLayerITS3[getLayer(index)]) {
318 // matTmp *= tra;
319 // }
320 // #else
321 // matTmp *= tra;
322 // #endif
323
324 return &matTmp;
325}
326
327//__________________________________________________________________________
329{
330 if (mSize < 1) {
331 LOG(warning) << "The method Build was not called yet";
332 Build(mask);
333 return;
334 }
335
336 // build matrices
337 if ((mask & o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G)) && !getCacheL2G().isFilled()) {
338 // Matrices for Local (Sensor!!! rather than the full chip) to Global frame transformation
339 LOGP(info, "Loading {} L2G matrices from TGeo; there are {} matrices", getName(), mSize);
340 auto& cacheL2G = getCacheL2G();
341 cacheL2G.setSize(mSize);
342
343 for (int i = 0; i < mSize; i++) {
344 TGeoHMatrix* hm = extractMatrixSensor(i);
345 cacheL2G.setMatrix(Mat3D(*hm), i);
346 }
347 }
348}
349
350//__________________________________________________________________________
351
352const char* GeometryTGeo::composeSymNameLayer(int d, int lr)
353{
354 return Form("%s/%s%d", composeSymNameTRK(d), getTRKLayerPattern(), lr);
355}
356
357const char* GeometryTGeo::composeSymNameStave(int d, int lr)
358{
359 return Form("%s/%s%d", composeSymNameLayer(d, lr), getTRKStavePattern(), lr);
360}
361
362const char* GeometryTGeo::composeSymNameChip(int d, int lr)
363{
364 return Form("%s/%s%d", composeSymNameStave(d, lr), getTRKChipPattern(), lr);
365}
366
367const char* GeometryTGeo::composeSymNameSensor(int d, int lr)
368{
369 return Form("%s/%s%d", composeSymNameChip(d, lr), getTRKSensorPattern(), lr);
370}
371
372//__________________________________________________________________________
373int GeometryTGeo::extractVolumeCopy(const char* name, const char* prefix) const
374{
375 TString nms = name;
376 if (!nms.BeginsWith(prefix)) {
377 return -1;
378 }
379 nms.Remove(0, strlen(prefix));
380 if (!isdigit(nms.Data()[0])) {
381 return -1;
382 }
383 return nms.Atoi();
384}
385
386//__________________________________________________________________________
388{
389 int numberOfLayers = 0;
390 TGeoVolume* trkV = gGeoManager->GetVolume(getTRKVolPattern());
391 if (trkV == nullptr) {
392 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
393 }
394
395 // Loop on all TRKV nodes, count Layer volumes by checking names
396 // Build on the fly layer - wrapper correspondence
397 TObjArray* nodes = trkV->GetNodes();
398 // nodes->Print();
399 int nNodes = nodes->GetEntriesFast();
400 for (int j = 0; j < nNodes; j++) {
401 int lrID = -1;
402 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
403 const char* name = nd->GetName();
404 if (strstr(name, getTRKLayerPattern()) != nullptr) {
405 numberOfLayers++;
407 LOG(fatal) << "Failed to extract layer ID from the " << name;
408 }
409 mLayerToWrapper[lrID] = -1; // not wrapped
410 } else if (strstr(name, getTRKWrapVolPattern()) != nullptr) { // this is a wrapper volume, may cointain layers
411 int wrID = -1;
413 LOG(fatal) << "Failed to extract wrapper ID from the " << name;
414 }
415 TObjArray* nodesW = nd->GetNodes();
416 int nNodesW = nodesW->GetEntriesFast();
417
418 for (int jw = 0; jw < nNodesW; jw++) {
419 auto ndW = dynamic_cast<TGeoNode*>(nodesW->At(jw))->GetName();
420 if (strstr(ndW, getTRKLayerPattern()) != nullptr) {
421 if ((lrID = extractVolumeCopy(ndW, GeometryTGeo::getTRKLayerPattern())) < 0) {
422 LOGP(fatal, "Failed to extract layer ID from wrapper volume '{}' from one of its nodes '{}'", name, ndW);
423 }
424 numberOfLayers++;
425 mLayerToWrapper[lrID] = wrID;
426 }
427 }
428 }
429 }
430 return numberOfLayers;
431}
432
433//__________________________________________________________________________
435{
436 // The number of active parts returned here is 36 = 4 petals * (3 layers + 6 disks)
437 int numberOfParts = 0;
438
439 TGeoVolume* vdV = gGeoManager->GetVolume(getTRKVolPattern());
440 if (vdV == nullptr) {
441 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
442 }
443 LOG(info) << "Volume name: " << getTRKVolPattern();
444
445 // Loop on all TRKV nodes, count Layer volumes by checking names
446 TObjArray* nodes = vdV->GetNodes();
447 int nNodes = nodes->GetEntriesFast();
448 for (int j = 0; j < nNodes; j++) {
449 int lrID = -1;
450 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
451 const char* name = nd->GetName();
452
453 if (strstr(name, getTRKPetalPattern()) != nullptr && (strstr(name, getTRKPetalLayerPattern()) != nullptr || strstr(name, getTRKPetalDiskPattern()) != nullptr)) {
454 numberOfParts++;
456 LOG(fatal) << "Failed to extract layer ID from the " << name;
457 }
458 }
459 }
460 return numberOfParts;
461}
462
463//__________________________________________________________________________
465{
466 // The number of disks returned here is 6
467 int numberOfDisks = 0;
468
469 TGeoVolume* vdV = gGeoManager->GetVolume(getTRKVolPattern());
470 if (vdV == nullptr) {
471 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
472 }
473 LOG(info) << "Volume name: " << getTRKVolPattern();
474
475 // Loop on all TRKV nodes, count Layer volumes by checking names
476 TObjArray* nodes = vdV->GetNodes();
477 int nNodes = nodes->GetEntriesFast();
478 for (int j = 0; j < nNodes; j++) {
479 int lrID = -1;
480 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
481 const char* name = nd->GetName();
482
483 if (strstr(name, Form("%s%s", getTRKPetalPattern(), "0")) != nullptr && (strstr(name, getTRKPetalDiskPattern()) != nullptr)) {
484 numberOfDisks++;
486 LOG(fatal) << "Failed to extract layer ID from the " << name;
487 }
488 }
489 }
490 return numberOfDisks;
491}
492
493//__________________________________________________________________________
495{
496 // The number of petals returned here is 4 = number of petals
497 int numberOfChips = 0;
498
499 TGeoVolume* vdV = gGeoManager->GetVolume(getTRKVolPattern());
500 if (vdV == nullptr) {
501 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
502 }
503 LOG(info) << "Volume name: " << getTRKVolPattern();
504
505 // Loop on all TRKV nodes, count Layer volumes by checking names
506 TObjArray* nodes = vdV->GetNodes();
507 int nNodes = nodes->GetEntriesFast();
508 for (int j = 0; j < nNodes; j++) {
509 int lrID = -1;
510 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
511 const char* name = nd->GetName();
512
513 if (strstr(name, getTRKPetalPattern()) != nullptr && (strstr(name, Form("%s%s", getTRKPetalLayerPattern(), "0")) != nullptr)) {
514 numberOfChips++;
516 LOG(fatal) << "Failed to extract layer ID from the " << name;
517 }
518 }
519 }
520 return numberOfChips;
521}
522
523//__________________________________________________________________________
525{
526 // The number of layers returned here is 3
527 int numberOfLayers = 0;
528
529 TGeoVolume* vdV = gGeoManager->GetVolume(getTRKVolPattern());
530 if (vdV == nullptr) {
531 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
532 }
533 LOG(info) << "Volume name: " << getTRKVolPattern();
534
535 // Loop on all TRKV nodes, count Layer volumes by checking names
536 TObjArray* nodes = vdV->GetNodes();
537 int nNodes = nodes->GetEntriesFast();
538 for (int j = 0; j < nNodes; j++) {
539 int lrID = -1;
540 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
541 const char* name = nd->GetName();
542
543 if (strstr(name, Form("%s%s", getTRKPetalPattern(), "0")) != nullptr && strstr(name, getTRKPetalLayerPattern()) != nullptr) {
544 numberOfLayers++;
546 LOG(fatal) << "Failed to extract layer ID from the " << name;
547 }
548 }
549 }
550 return numberOfLayers;
551}
552
553//__________________________________________________________________________
555{
556 // The number of chips per petal returned here is 9 for each layer = number of layers + number of quarters of disks per petal
557 int numberOfChips = 0;
558
559 TGeoVolume* vdV = gGeoManager->GetVolume(getTRKVolPattern());
560 if (vdV == nullptr) {
561 LOG(fatal) << getName() << " volume " << getTRKVolPattern() << " is not in the geometry";
562 }
563 LOG(info) << "Volume name: " << getTRKVolPattern();
564
565 // Loop on all TRKV nodes, count Layer volumes by checking names
566 TObjArray* nodes = vdV->GetNodes();
567 int nNodes = nodes->GetEntriesFast();
568 for (int j = 0; j < nNodes; j++) {
569 int lrID = -1;
570 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
571 const char* name = nd->GetName();
572
573 if (strstr(name, Form("%s%s", getTRKPetalPattern(), "0")) != nullptr && (strstr(name, getTRKPetalLayerPattern()) != nullptr || strstr(name, getTRKPetalDiskPattern()) != nullptr)) {
574 numberOfChips++;
576 LOG(fatal) << "Failed to extract layer ID from the " << name;
577 }
578 }
579 }
580 return numberOfChips;
581}
582
583//__________________________________________________________________________
585{
586 int numberOfStaves = 0;
587
588 std::string layName = Form("%s%d", getTRKLayerPattern(), lay);
589 TGeoVolume* layV = gGeoManager->GetVolume(layName.c_str());
590
591 if (layV == nullptr) {
592 LOG(fatal) << getName() << " volume " << getTRKLayerPattern() << " is not in the geometry";
593 }
594
595 // Loop on all layV nodes, count Layer volumes by checking names
596 TObjArray* nodes = layV->GetNodes();
597 // std::cout << "Printing nodes for layer " << lay << std::endl;
598 // nodes->Print();
599 int nNodes = nodes->GetEntriesFast();
600
601 for (int j = 0; j < nNodes; j++) {
602 int lrID = -1;
603 auto nd = dynamic_cast<TGeoNode*>(nodes->At(j));
604 const char* name = nd->GetName();
605 if (strstr(name, getTRKStavePattern()) != nullptr) {
606 numberOfStaves++;
607 }
608 }
609 return numberOfStaves;
610}
611
612//__________________________________________________________________________
613void GeometryTGeo::PrintChipID(int index, int subDetID, int petalcase, int disk, int lay, int stave, int indexRetrieved) const
614{
615 std::cout << "\nindex = " << index << std::endl;
616 std::cout << "subDetID = " << subDetID << std::endl;
617 std::cout << "petalcase = " << petalcase << std::endl;
618 std::cout << "layer = " << lay << std::endl;
619 std::cout << "disk = " << disk << std::endl;
620 std::cout << "first chip index = " << getFirstChipIndex(lay, petalcase, subDetID) << std::endl;
621 std::cout << "stave = " << stave << std::endl;
622 std::cout << "chck index Retrieved = " << indexRetrieved << std::endl;
623}
624
625//__________________________________________________________________________
626void GeometryTGeo::Print(Option_t*) const
627{
628 if (!isBuilt()) {
629 LOGF(info, "Geometry not built yet!");
630 return;
631 }
632 std::cout << "Detector ID: " << sInstance.get()->getDetID() << std::endl;
633
634 LOGF(info, "Summary of GeometryTGeo: %s", getName());
635 LOGF(info, "Number of layers ML + OL: %d", mNumberOfLayersMLOT);
636 LOGF(info, "Number of active parts VD: %d", mNumberOfActivePartsVD);
637 LOGF(info, "Number of layers VD: %d", mNumberOfLayersVD);
638 LOGF(info, "Number of petals VD: %d", mNumberOfPetalsVD);
639 LOGF(info, "Number of disks VD: %d", mNumberOfDisksVD);
640 LOGF(info, "Number of chips per petal VD: ");
641 for (int i = 0; i < mNumberOfPetalsVD; i++) {
642 LOGF(info, "%d", mNumberOfChipsPerPetalVD[i]);
643 }
644 LOGF(info, "Number of staves per layer MLOT: ");
645 for (int i = 0; i < mNumberOfLayersMLOT; i++) {
646 std::string mlot = "";
647 mlot = (i < 5) ? "ML" : "OT";
648 LOGF(info, "Layer: %d, %s, %d staves", i, mlot.c_str(), mNumberOfStaves[i]);
649 }
650 LOGF(info, "Total number of chips: %d", getNumberOfChips());
651
652 std::cout << "mLastChipIndex = [";
653 for (int i = 0; i < mLastChipIndex.size(); i++) {
654 std::cout << mLastChipIndex[i];
655 if (i < mLastChipIndex.size() - 1) {
656 std::cout << ", ";
657 }
658 }
659 std::cout << "]" << std::endl;
660 std::cout << "mLastChipIndexVD = [";
661 for (int i = 0; i < mLastChipIndexVD.size(); i++) {
662 std::cout << mLastChipIndexVD[i];
663 if (i < mLastChipIndexVD.size() - 1) {
664 std::cout << ", ";
665 }
666 }
667 std::cout << "]" << std::endl;
668}
669
670} // namespace trk
671} // namespace o2
int32_t i
uint32_t j
Definition RawData.h:0
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
const char * getName() const
int mSize
prebooked number of sensors
const MatrixCache< Mat3D > & getCacheL2G() const
static const char * getTRKPetalDiskPattern()
static const char * composeSymNameLayer(int d, int layer)
static const char * getTRKStavePattern()
int getPetalCase(int index) const
static const char * getTRKChipPattern()
std::vector< int > mNumberOfChipsPerLayerVD
number of chips per layer VD ( = number of petals)
static std::string sVolumeName
int getSubDetID(int index) const
std::array< char, MAXLAYERS > mLayerToWrapper
Layer to wrapper correspondence.
static std::string sPetalLayerName
void PrintChipID(int index, int subDetID, int petalcase, int disk, int lay, int stave, int indexRetrieved) const
static const char * getTRKSensorPattern()
static std::string sStaveName
int extractNumberOfChipsPerPetalVD() const
bool getChipID(int index, int &subDetID, int &petalcase, int &disk, int &lay, int &stave) const
static const char * getTRKPetalLayerPattern()
int extractNumberOfLayersMLOT()
Determines the number of active parts in the Geometry.
std::vector< int > mNumbersOfChipPerDiskVD
numbersOfChipPerDiskVD
std::vector< int > mNumberOfStaves
Number Of Staves per layer in ML/OT.
Int_t mNumberOfPetalsVD
number of Petals = chip in each VD layer
std::vector< int > mLastChipIndexVD
max ID of the detctor in the layer for the VD
static std::string sPetalName
int extractNumberOfStavesMLOT(int lay) const
static const char * composeSymNameChip(int d, int lr)
static std::string sPetalDiskName
void Print(Option_t *opt="") const
int getLayer(int index) const
static const char * getTRKWrapVolPattern()
TString getMatrixPath(int index) const
int getNumberOfChips() const
static const char * getTRKLayerPattern()
int getFirstChipIndex(int lay, int petalcase, int subDetID) const
o2::math_utils::Transform3D Mat3D
static std::string sWrapperVolumeName
Wrapper volume name.
int extractNumberOfLayersVD() const
std::vector< int > mNumberOfChipsPerPetalVD
numbersOfChipPerPetalVD
std::vector< int > mLastChipIndex
max ID of the detctor in the petal(VD) or layer(MLOT)
static std::string sChipName
static std::string sSensorName
std::vector< int > mLastChipIndexMLOT
max ID of the detctor in the layer for the MLOT
void fillMatrixCache(int mask)
static std::string sLayerName
int extractNumberOfActivePartsVD() const
static const char * composeSymNameSensor(int d, int layer)
int extractNumberOfDisksVD() const
static const char * getTRKPetalPattern()
Int_t mNumberOfActivePartsVD
number of layers
std::vector< int > mNumberOfChipsPerLayerMLOT
number of chips per layer MLOT ( = 1 for the moment)
Int_t mNumberOfDisksVD
number of Disks = 6
Int_t mNumberOfLayersMLOT
number of layers
int getChipIndex(int subDetID, int petalcase, int disk, int lay, int stave) const
int getStave(int index) const
static const char * getTRKVolPattern()
static const char * composeSymNameStave(int d, int layer)
int getDisk(int index) const
static const char * composeSymNameTRK(int d)
int extractNumberOfPetalsVD() const
int extractVolumeCopy(const char *name, const char *prefix) const
Extract number following the prefix in the name string.
void Build(int loadTrans)
Int_t mNumberOfLayersVD
number of layers
GeometryTGeo(bool build=false, int loadTrans=0)
TGeoHMatrix * extractMatrixSensor(int index) const
GLuint index
Definition glcorearb.h:781
GLuint const GLchar * name
Definition glcorearb.h:781
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
GLint GLuint mask
Definition glcorearb.h:291
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr int L2G
Definition Cartesian.h:54
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"