forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLayer.h
More file actions
95 lines (84 loc) · 3.06 KB
/
Layer.h
File metadata and controls
95 lines (84 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#ifndef ALICEO2_IOTOF_LAYER_H
#define ALICEO2_IOTOF_LAYER_H
#include <TGeoManager.h>
#include <Rtypes.h>
#include <string>
#include <vector>
namespace o2
{
namespace iotof
{
class Layer
{
public:
Layer() = default;
Layer(std::string layerName, float rInn, float rOut, float zLength, float zOffset, float layerX2X0,
int layout = kBarrel, int nStaves = 0, float staveSize = 0.0, double staveTiltAngle = 0.0, int modulesPerStave = 0);
~Layer() = default;
auto getInnerRadius() const { return mInnerRadius; }
auto getOuterRadius() const { return mOuterRadius; }
auto getZLength() const { return mZLength; }
auto getZOffset() const { return mZOffset; }
auto getx2X0() const { return mX2X0; }
auto getChipThickness() const { return mChipThickness; }
auto getName() const { return mLayerName; }
auto getLayout() const { return mLayout; }
auto getSegments() const { return mStaves; }
static constexpr int kBarrel = 0;
static constexpr int kDisk = 1;
static constexpr int kBarrelSegmented = 2;
static constexpr int kDiskSegmented = 3;
virtual void createLayer(TGeoVolume* motherVolume) {};
protected:
std::string mLayerName;
float mInnerRadius;
float mOuterRadius;
float mZLength;
float mZOffset{0.f}; // Of use when fwd layers
float mX2X0;
float mChipThickness;
int mLayout{kBarrel}; // Identifier of the type of layer layout (barrel, disk, barrel segmented, disk segmented)
// 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)
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
int mModulesPerStave{0}; // Number of modules along a stave
double mTiltAngle{0.0}; // Tilt angle in degrees to be applied as a rotation around the local center of the stave
};
class ITOFLayer : public Layer
{
public:
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
static std::vector<std::string> mRegister;
};
class OTOFLayer : public Layer
{
public:
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
static std::vector<std::string> mRegister;
};
class FTOFLayer : public Layer
{
public:
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
};
class BTOFLayer : public Layer
{
public:
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
};
} // namespace iotof
} // namespace o2
#endif // ALICEO2_IOTOF_LAYER_H