Project
Loading...
Searching...
No Matches
Layer.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 ALICEO2_IOTOF_LAYER_H
13#define ALICEO2_IOTOF_LAYER_H
14
15#include <TGeoManager.h>
16#include <Rtypes.h>
17#include <string>
18#include <vector>
19
20namespace o2
21{
22namespace iotof
23{
24class Layer
25{
26 public:
27 Layer() = default;
28 Layer(std::string layerName, float rInn, float rOut, float zLength, float zOffset, float layerX2X0,
29 int layout = kBarrel, int nStaves = 0, float staveSize = 0.0, double staveTiltAngle = 0.0, int modulesPerStave = 0, float sensorThickness = 0.0f);
30 ~Layer() = default;
31
32 auto getInnerRadius() const { return mInnerRadius; }
33 auto getOuterRadius() const { return mOuterRadius; }
34 auto getZLength() const { return mZLength; }
35 auto getZOffset() const { return mZOffset; }
36 auto getx2X0() const { return mX2X0; }
37 auto getChipThickness() const { return mLayerThickness; }
38 auto getName() const { return mLayerName; }
39 auto getLayout() const { return mLayout; }
40 auto getSegments() const { return mStaves; }
41 static constexpr int kBarrel = 0;
42 static constexpr int kDisk = 1;
43 static constexpr int kBarrelSegmented = 2;
44 static constexpr int kDiskSegmented = 3;
45 static constexpr int kBarrelStaggered = 4;
46
47 virtual void createLayer(TGeoVolume* motherVolume) {};
48
49 protected:
50 std::string mLayerName;
53 float mZLength;
54 float mZOffset{0.f}; // Of use when fwd layers
55 float mX2X0;
56 float mLayerThickness; // Thickness of the layer in cm, derived from mX2X0 and the radiation length of silicon
57 float mSensorThickness; // Thickness of the sensor in cm, to be subtracted from the chip thickness to get the total module thickness
58 int mLayout{kBarrel}; // Identifier of the type of layer layout (barrel, disk, barrel segmented, disk segmented)
59 // To be used only in case of the segmented layout, to define the number of staves in phi (for barrel) or in r (for disk)
60 std::pair<int, float> mStaves{0, 0.0f}; // Number and size of staves in phi (for barrel) or in r (for disk) in case of segmented layout
61 int mModulesPerStave{0}; // Number of modules along a stave
62 double mTiltAngle{0.0}; // Tilt angle in degrees to be applied as a rotation around the local center of the stave
63
64 static const int sChipsPerRow; // number of chips per row in module
65 static const int sChipsPerCol; // number of chips per col in module
66 static const double sChipGap; // gap between chips in module
67 static const double sModuleGap; // gap between modules in stave
68 static const double sChipThickness; // full thickness of the chip
69};
70
71class ITOFLayer : public Layer
72{
73 public:
74 using Layer::Layer;
75 virtual void createLayer(TGeoVolume* motherVolume) override;
76 static std::vector<std::string> mRegister;
77
78 static const double sStaggerRadialShift;
79
80 private:
81};
82
83class OTOFLayer : public Layer
84{
85 public:
86 using Layer::Layer;
87 virtual void createLayer(TGeoVolume* motherVolume) override;
88 static std::vector<std::string> mRegister;
89
90 static const double sSubStavesDistanceY;
91 static const double sSubStavesOverlapX;
92};
93
94class FTOFLayer : public Layer
95{
96 public:
97 using Layer::Layer;
98 virtual void createLayer(TGeoVolume* motherVolume) override;
99};
100
101class BTOFLayer : public Layer
102{
103 public:
104 using Layer::Layer;
105 virtual void createLayer(TGeoVolume* motherVolume) override;
106};
107
108} // namespace iotof
109} // namespace o2
110#endif // ALICEO2_IOTOF_LAYER_H
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:483
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:451
static std::vector< std::string > mRegister
Definition Layer.h:76
static const double sStaggerRadialShift
Definition Layer.h:78
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:156
float mZOffset
Definition Layer.h:54
auto getName() const
Definition Layer.h:38
auto getLayout() const
Definition Layer.h:39
float mOuterRadius
Definition Layer.h:52
~Layer()=default
float mZLength
Definition Layer.h:53
int mModulesPerStave
Definition Layer.h:61
static constexpr int kBarrelSegmented
Definition Layer.h:43
static constexpr int kDisk
Definition Layer.h:42
auto getZLength() const
Definition Layer.h:34
auto getInnerRadius() const
Definition Layer.h:32
float mSensorThickness
Definition Layer.h:57
static constexpr int kBarrel
Definition Layer.h:41
static constexpr int kDiskSegmented
Definition Layer.h:44
std::pair< int, float > mStaves
Definition Layer.h:60
auto getx2X0() const
Definition Layer.h:36
auto getChipThickness() const
Definition Layer.h:37
static const double sModuleGap
Definition Layer.h:67
std::string mLayerName
Definition Layer.h:50
float mInnerRadius
Definition Layer.h:51
static const int sChipsPerCol
Definition Layer.h:65
static const double sChipGap
Definition Layer.h:66
double mTiltAngle
Definition Layer.h:62
virtual void createLayer(TGeoVolume *motherVolume)
Definition Layer.h:47
auto getZOffset() const
Definition Layer.h:35
auto getSegments() const
Definition Layer.h:40
static const double sChipThickness
Definition Layer.h:68
float mLayerThickness
Definition Layer.h:56
float mX2X0
Definition Layer.h:55
auto getOuterRadius() const
Definition Layer.h:33
static const int sChipsPerRow
Definition Layer.h:64
static constexpr int kBarrelStaggered
Definition Layer.h:45
static const double sSubStavesDistanceY
Definition Layer.h:90
static const double sSubStavesOverlapX
Definition Layer.h:91
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:296
static std::vector< std::string > mRegister
Definition Layer.h:88
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...