File indexing completed on 2025-01-18 09:14:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef DETECTOR_DEVELO_H
0016 #define DETECTOR_DEVELO_H 1
0017
0018
0019 #include "Detector/DeVeloSensor.h"
0020 #include "Detector/DeVeloGeneric.h"
0021
0022 #define DE_VELO_TYPEDEFS(TYP) public: \
0023 DE_CONDITIONS_TYPEDEFS; \
0024 typedef std::vector<DeVeloGeneric##TYP> Sides; \
0025 typedef std::vector<DeVeloGeneric##TYP> Modules; \
0026 typedef std::vector<DeVeloGeneric##TYP> Supports; \
0027 typedef std::vector<DeVeloSensor##TYP> Sensors; \
0028 typedef std::map<unsigned int, DeVeloSensor##TYP> SensorByTell1; \
0029 typedef std::map<unsigned int, unsigned int> Tell1BySensorID
0030
0031
0032 namespace gaudi {
0033
0034
0035 namespace detail {
0036
0037
0038
0039
0040
0041
0042
0043
0044 class DeVeloStaticObject : public DeStaticObject {
0045 DE_VELO_TYPEDEFS(Static);
0046
0047 public:
0048 enum { NHalfs = 2 };
0049 enum { classID = 8100 };
0050 Sides sides;
0051 Modules modules;
0052 Supports supports;
0053 Sensors zOrdered;
0054 Sensors sensors[3];
0055 Sensors rSensors[2];
0056 Sensors phiSensors[2];
0057 Sensors rphiSensors[2];
0058 Sensors puSensors[2];
0059 SensorByTell1 sensorByTell1;
0060 Tell1BySensorID tell1BySensorID;
0061 dd4hep::Position halfBoxOffsets[NHalfs];
0062 double sensitiveVolumeCut = 0e0;
0063
0064 public:
0065
0066 DE_CTORS_DEFAULT(DeVeloStaticObject);
0067
0068 virtual void initialize() override;
0069
0070 virtual void print(int indent, int flags) const override;
0071 };
0072 }
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083 class DeVeloStaticElement : public dd4hep::Handle<detail::DeVeloStaticObject> {
0084 DE_VELO_TYPEDEFS(Static);
0085 typedef Object static_t;
0086 enum { NHalfs = 2 };
0087
0088 public:
0089
0090 DE_CTORS_HANDLE(DeVeloStaticElement,Base);
0091 };
0092
0093 typedef DetectorStaticElement<DeVeloStaticElement> DeVeloStatic;
0094
0095
0096 namespace detail {
0097
0098
0099
0100
0101
0102
0103
0104
0105 class DeVeloObject : public DeIOVObject {
0106 DE_VELO_TYPEDEFS();
0107 typedef DeVeloStatic::Object static_t;
0108
0109 public:
0110 DeVeloStatic vp_static;
0111 Sides sides;
0112 Modules modules;
0113 Supports supports;
0114 Sensors zOrdered;
0115 Sensors sensors[3];
0116 Sensors rSensors[2];
0117 Sensors phiSensors[2];
0118 Sensors rphiSensors[2];
0119 Sensors puSensors[2];
0120
0121 public:
0122
0123 DE_CTORS_DEFAULT(DeVeloObject);
0124
0125 virtual void initialize() override;
0126
0127 void print(int indent, int flags) const override;
0128 };
0129 }
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139 class DeVeloElement : public dd4hep::Handle<detail::DeVeloObject> {
0140 DE_VELO_TYPEDEFS();
0141 typedef Object::static_t static_t;
0142 typedef Object iov_t;
0143 enum { NHalfs = 2 };
0144
0145 public:
0146
0147 DE_CTORS_HANDLE(DeVeloElement,Base);
0148
0149 static_t& staticData() const { return *(access()->vp_static.ptr()); }
0150 };
0151
0152
0153 typedef DetectorElement<DeVeloElement> DeVelo;
0154
0155 }
0156 #undef DE_VELO_TYPEDEFS
0157 #endif