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 mChipThickness; }
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
46 virtual void createLayer(TGeoVolume* motherVolume) {};
47
48 protected:
49 std::string mLayerName;
52 float mZLength;
53 float mZOffset{0.f}; // Of use when fwd layers
54 float mX2X0;
55 float mChipThickness; // Thickness of the chip in cm, derived from mX2X0 and the radiation length of silicon
56 float mSensorThickness; // Thickness of the sensor in cm, to be subtracted from the chip thickness to get the total module thickness
57 int mLayout{kBarrel}; // Identifier of the type of layer layout (barrel, disk, barrel segmented, disk segmented)
58 // 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)
59 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
60 int mModulesPerStave{0}; // Number of modules along a stave
61 double mTiltAngle{0.0}; // Tilt angle in degrees to be applied as a rotation around the local center of the stave
62};
63
64class ITOFLayer : public Layer
65{
66 public:
67 using Layer::Layer;
68 virtual void createLayer(TGeoVolume* motherVolume) override;
69 static std::vector<std::string> mRegister;
70};
71
72class OTOFLayer : public Layer
73{
74 public:
75 using Layer::Layer;
76 virtual void createLayer(TGeoVolume* motherVolume) override;
77 static std::vector<std::string> mRegister;
78};
79
80class FTOFLayer : public Layer
81{
82 public:
83 using Layer::Layer;
84 virtual void createLayer(TGeoVolume* motherVolume) override;
85};
86
87class BTOFLayer : public Layer
88{
89 public:
90 using Layer::Layer;
91 virtual void createLayer(TGeoVolume* motherVolume) override;
92};
93
94} // namespace iotof
95} // namespace o2
96#endif // ALICEO2_IOTOF_LAYER_H
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:426
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:394
static std::vector< std::string > mRegister
Definition Layer.h:69
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:127
float mZOffset
Definition Layer.h:53
auto getName() const
Definition Layer.h:38
auto getLayout() const
Definition Layer.h:39
float mOuterRadius
Definition Layer.h:51
~Layer()=default
float mZLength
Definition Layer.h:52
int mModulesPerStave
Definition Layer.h:60
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:56
float mChipThickness
Definition Layer.h:55
static constexpr int kBarrel
Definition Layer.h:41
static constexpr int kDiskSegmented
Definition Layer.h:44
std::pair< int, float > mStaves
Definition Layer.h:59
auto getx2X0() const
Definition Layer.h:36
auto getChipThickness() const
Definition Layer.h:37
std::string mLayerName
Definition Layer.h:49
float mInnerRadius
Definition Layer.h:50
double mTiltAngle
Definition Layer.h:61
virtual void createLayer(TGeoVolume *motherVolume)
Definition Layer.h:46
auto getZOffset() const
Definition Layer.h:35
auto getSegments() const
Definition Layer.h:40
float mX2X0
Definition Layer.h:54
auto getOuterRadius() const
Definition Layer.h:33
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:261
static std::vector< std::string > mRegister
Definition Layer.h:77
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...