File indexing completed on 2025-01-18 09:11:05
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012 #include <atomic>
0013 #include <iostream>
0014 #include <map>
0015 #include <ostream>
0016 #include <vector>
0017
0018 #include <stdint.h>
0019
0020 namespace Acts {
0021
0022 class RoiDescriptor {
0023 public:
0024
0025 using roi_iterator = std::vector<const RoiDescriptor*>::const_iterator;
0026
0027 static constexpr bool FULLSCAN = true;
0028 static constexpr bool ROI = false;
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 RoiDescriptor(double eta, double etaMinus, double etaPlus, double phi,
0043 double phiMinus, double phiPlus, double zed = 0,
0044 double zedMinus = -s_zedWidthDefault,
0045 double zedPlus = s_zedWidthDefault);
0046
0047
0048
0049
0050
0051 RoiDescriptor(const RoiDescriptor& roi);
0052 RoiDescriptor& operator=(const RoiDescriptor& r);
0053
0054
0055 ~RoiDescriptor();
0056
0057
0058
0059 double phi() const { return m_phi; }
0060 double eta() const { return m_eta; }
0061 double zed() const { return m_zed; }
0062
0063
0064
0065
0066
0067 double zedPlus() const {
0068 return m_zedPlus;
0069 }
0070 double zedMinus() const {
0071 return m_zedMinus;
0072 }
0073
0074 double etaPlus() const { return m_etaPlus; }
0075 double etaMinus() const { return m_etaMinus; }
0076
0077 double phiPlus() const { return m_phiPlus; }
0078 double phiMinus() const { return m_phiMinus; }
0079
0080
0081 int version() const { return m_version; }
0082 void version(int v) { m_version = v; }
0083
0084
0085
0086
0087
0088 bool isFullscan() const { return m_fullscan; }
0089
0090
0091
0092
0093 bool composite() const { return m_composite; }
0094 void setComposite(bool b = true) { m_composite = b; }
0095
0096
0097 bool manageConstituents() const { return m_manageConstituents; }
0098 void manageConstituents(bool b) { m_manageConstituents = b; }
0099
0100
0101 unsigned size() const { return m_roiDescriptors.size(); }
0102
0103
0104 const RoiDescriptor* at(int i) const { return m_roiDescriptors.at(i); }
0105
0106
0107 void clear() { m_roiDescriptors.clear(); }
0108
0109
0110 void reserve(std::size_t s) { m_roiDescriptors.reserve(s); }
0111
0112
0113 void push_back(const RoiDescriptor* roi) {
0114 m_roiDescriptors.push_back(roi);
0115 setComposite(true);
0116 }
0117
0118
0119 roi_iterator begin() const { return m_roiDescriptors.begin(); }
0120 roi_iterator end() const { return m_roiDescriptors.end(); }
0121
0122
0123 double dzdrMinus() const {
0124 return m_dzdrMinus;
0125 }
0126 double dzdrPlus() const {
0127 return m_dzdrPlus;
0128 }
0129
0130 double drdzMinus() const {
0131 return m_drdzMinus;
0132 }
0133 double drdzPlus() const {
0134 return m_drdzPlus;
0135 }
0136
0137
0138
0139 double zedMin(double r) const;
0140 double zedMax(double r) const;
0141
0142 double zedOuterPlus() const {
0143 return m_zedOuterPlus;
0144 }
0145 double zedOuterMinus() const {
0146 return m_zedOuterMinus;
0147 }
0148
0149 double rhoMin(double z) const;
0150 double rhoMax(double z) const;
0151
0152 static double zedWidthDefault() { return s_zedWidthDefault; }
0153
0154
0155 static void zedWidthDefault(double d);
0156
0157
0158 unsigned int roiId() const { return m_roiId; }
0159 unsigned int l1Id() const { return m_l1Id; }
0160 unsigned int roiWord() const { return m_roiWord; }
0161
0162 private:
0163
0164 static std::atomic<double> s_zedWidthDefault;
0165
0166 static std::atomic<bool> s_firstInstanceCreated;
0167
0168 float m_phi{};
0169 float m_eta{};
0170 float m_zed{};
0171
0172 float m_phiMinus{};
0173 float m_phiPlus{};
0174 float m_etaMinus{};
0175 float m_etaPlus{};
0176 float m_zedMinus{};
0177
0178 float
0179 m_zedPlus{};
0180
0181 float m_dzdrMinus{};
0182 float m_dzdrPlus{};
0183
0184 float m_drdzMinus{};
0185 float m_drdzPlus{};
0186
0187 float
0188 m_zedOuterMinus{};
0189 float
0190 m_zedOuterPlus{};
0191
0192 bool m_fullscan{};
0193 bool m_composite{};
0194 bool m_manageConstituents{};
0195
0196
0197 int m_version{};
0198
0199 std::vector<const RoiDescriptor*> m_roiDescriptors;
0200
0201
0202 unsigned int m_l1Id{0};
0203 unsigned int m_roiId{0};
0204 unsigned int m_roiWord{0};
0205
0206
0207
0208
0209
0210 };
0211
0212 }