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);
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;
56 int mLayout{kBarrel}; // Identifier of the type of layer layout (barrel, disk, barrel segmented, disk segmented)
57 // 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)
58 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
59 int mModulesPerStave{0}; // Number of modules along a stave
60 double mTiltAngle{0.0}; // Tilt angle in degrees to be applied as a rotation around the local center of the stave
61};
62
63class ITOFLayer : public Layer
64{
65 public:
66 using Layer::Layer;
67 virtual void createLayer(TGeoVolume* motherVolume) override;
68 static std::vector<std::string> mRegister;
69};
70
71class OTOFLayer : 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
79class FTOFLayer : public Layer
80{
81 public:
82 using Layer::Layer;
83 virtual void createLayer(TGeoVolume* motherVolume) override;
84};
85
86class BTOFLayer : public Layer
87{
88 public:
89 using Layer::Layer;
90 virtual void createLayer(TGeoVolume* motherVolume) override;
91};
92
93} // namespace iotof
94} // namespace o2
95#endif // ALICEO2_IOTOF_LAYER_H
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:414
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:382
static std::vector< std::string > mRegister
Definition Layer.h:68
virtual void createLayer(TGeoVolume *motherVolume) override
Definition Layer.cxx:120
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:59
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 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:58
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:60
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:252
static std::vector< std::string > mRegister
Definition Layer.h:76
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...