Project
Loading...
Searching...
No Matches
DescriptorInnerBarrelITS3.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
14#include "Framework/Logger.h"
15
16using namespace o2::its3;
17
19
20void DescriptorInnerBarrelITS3::createLayer(int iLayer, TGeoVolume* dest)
21{
22 mIBLayers[iLayer] = std::make_unique<ITS3Layer>(iLayer);
23 mIBLayers[iLayer]->createLayer(dest);
24}
25
27{
28 mServices = std::make_unique<ITS3Services>();
29 mServices->createCYSSAssembly(dest);
30}
31
32void DescriptorInnerBarrelITS3::addAlignableVolumesLayer(int idLayer, int wrapperLayerId, TString& parentPath, int& lastUID) const
33{
34 TString wrpV = wrapperLayerId != -1 ? Form("%s%d_1", its::GeometryTGeo::getITSWrapVolPattern(), wrapperLayerId) : "";
35 TString path = Form("%s/%s/%s%d_0", parentPath.Data(), wrpV.Data(), its::GeometryTGeo::getITS3LayerPattern(), idLayer);
36 TString sname = its::GeometryTGeo::composeSymNameLayer(idLayer, true);
37
38 for (int iHalfBarrel{0}; iHalfBarrel < 2; ++iHalfBarrel) {
39 addAlignableVolumesHalfBarrel(idLayer, iHalfBarrel, path, lastUID);
40 }
41}
42
43void DescriptorInnerBarrelITS3::addAlignableVolumesHalfBarrel(int idLayer, int iHB, TString& parentPath, int& lastUID) const
44{
45 // for ITS3 smallest alignable volume is the half-barrel (e.g., the carbon-form composite structure with the sensors)
46 TString path = Form("%s/%s%d_%d", parentPath.Data(), its::GeometryTGeo::getITS3HalfBarrelPattern(), idLayer, iHB);
47 TString sname = its::GeometryTGeo::composeSymNameHalfBarrel(idLayer, iHB, true);
48 if (!gGeoManager->SetAlignableEntry(sname.Data(), path.Data())) {
49 LOG(fatal) << "Unable to set alignable entry ! " << sname << " : " << path;
50 }
51 addAlignableVolumesChips(idLayer, iHB, path, lastUID);
52}
53
54void DescriptorInnerBarrelITS3::addAlignableVolumesChips(int idLayer, int iHB, TString& parentPath, int& lastUID) const
55{
56 for (int seg{0}; seg < constants::nSegments[idLayer]; ++seg) {
57 for (int rsu{0}; rsu < constants::segment::nRSUs; ++rsu) {
58 for (int tile{0}; tile < constants::rsu::nTiles; ++tile) {
59 TString path = parentPath;
60 path += Form("/%s_0/", its::GeometryTGeo::getITS3ChipPattern(idLayer));
61 path += Form("%s_%d/", its::GeometryTGeo::getITS3SegmentPattern(idLayer), seg);
62 path += Form("%s_%d/", its::GeometryTGeo::getITS3RSUPattern(idLayer), rsu);
63 path += Form("%s_%d/", its::GeometryTGeo::getITS3TilePattern(idLayer), tile);
64 TString sname = its::GeometryTGeo::composeSymNameChip(idLayer, iHB, 0, seg, rsu, tile, true);
65 if (!gGeoManager->SetAlignableEntry(sname.Data(), path.Data())) {
66 LOG(fatal) << "Unable to set alignable entry ! " << sname << " : " << path;
67 }
68 ++lastUID;
69 }
70 }
71 }
72}
o2::mch::mapping::CathodeSegmentation seg
ClassImp(DescriptorInnerBarrelITS3)
Definition of the DescriptorInnerBarrelITS3 class.
Definition of the GeometryTGeo class.
void addAlignableVolumesLayer(int idLayer, int wrapperLayerId, TString &parentPath, int &lastUID) const
void createLayer(int idLayer, TGeoVolume *dest)
static const char * composeSymNameLayer(int lr, bool isITS3=false)
sym name of the layer
static const char * getITS3SegmentPattern(int layer)
static const char * getITS3ChipPattern()
static const char * getITS3TilePattern(int layer)
static const char * getITS3RSUPattern(int layer)
static const char * composeSymNameHalfBarrel(int lr, int hba, bool isITS3=false)
Sym name of the half barrel at given layer.
static const char * composeSymNameChip(int lr, int hba, int sta, int ssta, int mod, int chip, bool isITS3=false)
Sym name of the chip in the given layer/halfbarrel/stave/substave/module.
static const char * getITS3HalfBarrelPattern()
static const char * getITS3LayerPattern()
static const char * getITSWrapVolPattern()
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
constexpr unsigned int nTiles
Definition SpecsV2.h:80
constexpr std::array< unsigned int, nLayers > nSegments
Definition SpecsV2.h:132
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"