File indexing completed on 2025-02-22 10:32:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DD4HEP_DETAIL_OBJECTSINTERNA_H
0014 #define DD4HEP_DETAIL_OBJECTSINTERNA_H
0015
0016
0017 #include <DD4hep/Volumes.h>
0018 #include <DD4hep/NamedObject.h>
0019 #include <DD4hep/IDDescriptor.h>
0020 #include <DD4hep/Segmentations.h>
0021 #include <DD4hep/BitFieldCoder.h>
0022
0023
0024 #include <set>
0025
0026
0027 class TColor;
0028
0029
0030 namespace dd4hep {
0031
0032
0033
0034
0035
0036
0037
0038
0039 class HeaderObject: public NamedObject {
0040 public:
0041 std::string url;
0042 std::string author;
0043 std::string status;
0044 std::string version;
0045 std::string comment;
0046
0047 HeaderObject();
0048
0049 virtual ~HeaderObject();
0050 private:
0051
0052 HeaderObject(const HeaderObject&) : NamedObject() {}
0053
0054 HeaderObject& operator=(const HeaderObject&) { return *this; }
0055 };
0056
0057
0058
0059
0060
0061
0062
0063
0064 class ConstantObject: public NamedObject {
0065 public:
0066
0067 std::string dataType;
0068
0069 ConstantObject();
0070
0071 ConstantObject(const std::string& nam, const std::string& val, const std::string& typ);
0072
0073 virtual ~ConstantObject();
0074 private:
0075
0076 ConstantObject(const ConstantObject&) : NamedObject() {}
0077
0078 ConstantObject& operator=(const ConstantObject&) { return *this; }
0079 };
0080
0081
0082
0083
0084
0085
0086
0087
0088 class VisAttrObject: public NamedObject {
0089 public:
0090 unsigned long magic;
0091 TColor* color = nullptr;
0092 TColor* colortr = nullptr;
0093 float alpha = 0;
0094 unsigned char drawingStyle = VisAttr::SOLID;
0095 unsigned char lineStyle = VisAttr::SOLID;
0096 unsigned char showDaughters = true;
0097 unsigned char visible = true;
0098
0099 VisAttrObject();
0100
0101 virtual ~VisAttrObject();
0102 };
0103
0104
0105
0106
0107
0108
0109
0110
0111 class RegionObject: public NamedObject {
0112 public:
0113 unsigned long magic;
0114 double threshold = 10.0;
0115 double cut = 10.0;
0116 bool store_secondaries = false;
0117 bool use_default_cut = true;
0118 bool was_threshold_set = false;
0119
0120 std::vector<std::string> user_limits;
0121
0122 RegionObject();
0123
0124 virtual ~RegionObject();
0125 };
0126
0127
0128
0129
0130
0131
0132
0133
0134 class LimitSetObject: public NamedObject {
0135 public:
0136
0137 typedef std::set<Limit>::iterator iterator;
0138 typedef std::set<Limit>::const_iterator const_iterator;
0139 public:
0140
0141 std::set<Limit> limits;
0142
0143 std::set<Limit> cuts;
0144 public:
0145
0146 LimitSetObject();
0147
0148 virtual ~LimitSetObject();
0149 };
0150
0151
0152
0153
0154
0155
0156
0157 class HitCollection {
0158 public:
0159
0160 std::string name;
0161
0162 std::string key;
0163
0164 long key_min, key_max;
0165
0166 HitCollection() : key_min(~0x0), key_max(~0x0) {}
0167
0168 HitCollection(const HitCollection& c);
0169
0170 HitCollection(const std::string& name, const std::string& key="",long k_min=~0x0, long kmax=~0x0);
0171
0172 HitCollection& operator=(const HitCollection& c);
0173 };
0174
0175
0176
0177
0178
0179
0180
0181
0182 class ReadoutObject: public NamedObject {
0183 public:
0184
0185 Segmentation segmentation;
0186
0187 Volume readoutWorld;
0188
0189 IDDescriptor id;
0190
0191 std::vector<HitCollection> hits;
0192
0193 ReadoutObject();
0194
0195 virtual ~ReadoutObject();
0196 };
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206 class IDDescriptorObject: public NamedObject {
0207 public:
0208 typedef std::vector<std::pair<std::string, const BitFieldElement*> > FieldMap;
0209 typedef std::vector<std::pair<size_t, std::string> > FieldIDs;
0210
0211 FieldMap fieldMap;
0212
0213 FieldIDs fieldIDs;
0214
0215 BitFieldCoder decoder;
0216
0217
0218 std::string description;
0219
0220 IDDescriptorObject();
0221
0222 IDDescriptorObject(const std::string& initString);
0223
0224 virtual ~IDDescriptorObject();
0225 #if 0
0226 #ifndef __CINT__
0227
0228 const std::vector<BitFieldElement*>& fields() const {
0229 return decoder.fields();
0230 }
0231 #endif
0232 #endif
0233 };
0234 }
0235 #endif