Warning, /include/Parsers/detail/Dimension.imp is written in an unsupported language. File is not indexed.
0001 //==========================================================================
0002 // AIDA Detector description implementation
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author : M.Frank
0011 //
0012 //==========================================================================
0013
0014
0015 /**
0016 * Note: Do NEVER include this file directly!
0017 *
0018 * Use the specific include files in the XML or JSON directory!
0019 * Also NO header guards!
0020 */
0021
0022 XML_ATTR_ACCESSOR(int, id)
0023 XML_ATTR_ACCESSOR_INT(id)
0024 XML_ATTR_ACCESSOR(int, level)
0025 XML_ATTR_ACCESSOR_INT(level)
0026 XML_ATTR_ACCESSOR(bool, combineHits)
0027 XML_ATTR_ACCESSOR(int, station)
0028
0029 XML_ATTR_ACCESSOR_DOUBLE(v)
0030 XML_ATTR_ACCESSOR_DOUBLE(V)
0031 XML_ATTR_ACCESSOR_DOUBLE(dv)
0032
0033 XML_ATTR_ACCESSOR_DOUBLE(v0)
0034 XML_ATTR_ACCESSOR_DOUBLE(v1)
0035 XML_ATTR_ACCESSOR_DOUBLE(v2)
0036 XML_ATTR_ACCESSOR_DOUBLE(v3)
0037 XML_ATTR_ACCESSOR_DOUBLE(v4)
0038 XML_ATTR_ACCESSOR_DOUBLE(vmin)
0039 XML_ATTR_ACCESSOR_DOUBLE(vmax)
0040 XML_ATTR_ACCESSOR_DOUBLE(v_offset)
0041 XML_ATTR_ACCESSOR_DOUBLE(dim_v)
0042
0043 XML_ATTR_ACCESSOR_DOUBLE(x)
0044 XML_ATTR_ACCESSOR_DOUBLE(X)
0045 XML_ATTR_ACCESSOR_DOUBLE(dx)
0046
0047 XML_ATTR_ACCESSOR_DOUBLE(x0)
0048 XML_ATTR_ACCESSOR_DOUBLE(x1)
0049 XML_ATTR_ACCESSOR_DOUBLE(x2)
0050 XML_ATTR_ACCESSOR_DOUBLE(x3)
0051 XML_ATTR_ACCESSOR_DOUBLE(x4)
0052 XML_ATTR_ACCESSOR_DOUBLE(xmin)
0053 XML_ATTR_ACCESSOR_DOUBLE(xmax)
0054 XML_ATTR_ACCESSOR_DOUBLE(x_offset)
0055 XML_ATTR_ACCESSOR_DOUBLE(dim_x)
0056
0057 XML_ATTR_ACCESSOR_DOUBLE(y)
0058 XML_ATTR_ACCESSOR_DOUBLE(Y)
0059 XML_ATTR_ACCESSOR_DOUBLE(dy)
0060 XML_ATTR_ACCESSOR_DOUBLE(y0)
0061 XML_ATTR_ACCESSOR_DOUBLE(y1)
0062 XML_ATTR_ACCESSOR_DOUBLE(y2)
0063 XML_ATTR_ACCESSOR_DOUBLE(ymin)
0064 XML_ATTR_ACCESSOR_DOUBLE(ymax)
0065 XML_ATTR_ACCESSOR_DOUBLE(y_offset)
0066 XML_ATTR_ACCESSOR_DOUBLE(dim_y)
0067
0068 XML_ATTR_ACCESSOR_DOUBLE(z)
0069 XML_ATTR_ACCESSOR_DOUBLE(Z)
0070 XML_ATTR_ACCESSOR_DOUBLE(dz)
0071 XML_ATTR_ACCESSOR_DOUBLE(z0)
0072 XML_ATTR_ACCESSOR_DOUBLE(z1)
0073 XML_ATTR_ACCESSOR_DOUBLE(z2)
0074 XML_ATTR_ACCESSOR_DOUBLE(zpos)
0075 XML_ATTR_ACCESSOR_DOUBLE(zneg)
0076 XML_ATTR_ACCESSOR_DOUBLE(zmin)
0077 XML_ATTR_ACCESSOR_DOUBLE(zmax)
0078 XML_ATTR_ACCESSOR_DOUBLE(z_offset)
0079 XML_ATTR_ACCESSOR_DOUBLE(dim_z)
0080 XML_ATTR_ACCESSOR(double, outer_z)
0081 XML_ATTR_ACCESSOR(double, inner_z)
0082
0083 XML_ATTR_ACCESSOR_DOUBLE(a)
0084 XML_ATTR_ACCESSOR_DOUBLE(b)
0085 XML_ATTR_ACCESSOR_DOUBLE(c)
0086 XML_ATTR_ACCESSOR_DOUBLE(dist)
0087 XML_ATTR_ACCESSOR_DOUBLE(distance)
0088 XML_ATTR_ACCESSOR_DOUBLE(g)
0089 XML_ATTR_ACCESSOR_DOUBLE(A)
0090 XML_ATTR_ACCESSOR_DOUBLE(B)
0091 XML_ATTR_ACCESSOR_DOUBLE(G)
0092 XML_ATTR_ACCESSOR_DOUBLE(I)
0093
0094 XML_ATTR_ACCESSOR_DOUBLE(r)
0095 XML_ATTR_ACCESSOR_DOUBLE(R)
0096 XML_ATTR_ACCESSOR_DOUBLE(dr)
0097
0098 XML_ATTR_ACCESSOR_DOUBLE(rmin)
0099 XML_ATTR_ACCESSOR_DOUBLE(rmax)
0100 XML_ATTR_ACCESSOR_DOUBLE(rmin1)
0101 XML_ATTR_ACCESSOR_DOUBLE(rmax1)
0102 XML_ATTR_ACCESSOR_DOUBLE(rmin2)
0103 XML_ATTR_ACCESSOR_DOUBLE(rmax2)
0104 XML_ATTR_ACCESSOR_DOUBLE(radius)
0105 XML_ATTR_ACCESSOR(double, outer_r)
0106 XML_ATTR_ACCESSOR(double, outer_radius)
0107 XML_ATTR_ACCESSOR(double, inner_r)
0108 XML_ATTR_ACCESSOR(double, inner_radius)
0109
0110 XML_ATTR_ACCESSOR(double, angle)
0111 XML_ATTR_ACCESSOR_DOUBLE(alpha)
0112 XML_ATTR_ACCESSOR_DOUBLE(alpha1)
0113 XML_ATTR_ACCESSOR_DOUBLE(alpha2)
0114 XML_ATTR_ACCESSOR_DOUBLE(beta)
0115 XML_ATTR_ACCESSOR_DOUBLE(gamma)
0116 XML_ATTR_ACCESSOR_DOUBLE(delta)
0117 XML_ATTR_ACCESSOR_DOUBLE(epsilon)
0118 XML_ATTR_ACCESSOR_DOUBLE(fraction)
0119 XML_ATTR_ACCESSOR_DOUBLE(theta)
0120 XML_ATTR_ACCESSOR_DOUBLE(deltatheta)
0121 XML_ATTR_ACCESSOR_DOUBLE(starttheta)
0122 XML_ATTR_ACCESSOR_DOUBLE(endtheta)
0123 XML_ATTR_ACCESSOR(int, thetaBins)
0124 XML_ATTR_ACCESSOR_DOUBLE(psi)
0125 XML_ATTR_ACCESSOR_DOUBLE(phi)
0126 XML_ATTR_ACCESSOR(int, phiBins)
0127 XML_ATTR_ACCESSOR_DOUBLE(phi0)
0128 XML_ATTR_ACCESSOR_DOUBLE(phi0_offset)
0129 XML_ATTR_ACCESSOR_DOUBLE(phi1)
0130 XML_ATTR_ACCESSOR_DOUBLE(phi2)
0131 XML_ATTR_ACCESSOR_DOUBLE(deltaphi)
0132 XML_ATTR_ACCESSOR_DOUBLE(startphi)
0133 XML_ATTR_ACCESSOR_DOUBLE(endphi)
0134 XML_ATTR_ACCESSOR_DOUBLE(twist)
0135
0136 XML_ATTR_ACCESSOR(double, length)
0137 XML_ATTR_ACCESSOR(double, width)
0138 XML_ATTR_ACCESSOR(double, height)
0139 XML_ATTR_ACCESSOR(double, depth)
0140 XML_ATTR_ACCESSOR_DOUBLE(offset)
0141 XML_ATTR_ACCESSOR(double, crossing_angle)
0142 XML_ATTR_ACCESSOR(double, incoming_r)
0143 XML_ATTR_ACCESSOR(double, outgoing_r)
0144 XML_ATTR_ACCESSOR(double, phi_size_max)
0145 XML_ATTR_ACCESSOR(double, r_size)
0146
0147 XML_ATTR_ACCESSOR_DOUBLE(skew)
0148 XML_ATTR_ACCESSOR_DOUBLE(scale)
0149 XML_ATTR_ACCESSOR_DOUBLE(coefficient)
0150
0151 XML_ATTR_ACCESSOR(double, gap)
0152 XML_ATTR_ACCESSOR(double, z_length)
0153 XML_ATTR_ACCESSOR(double, zhalf)
0154 XML_ATTR_ACCESSOR(double, phi_tilt)
0155 XML_ATTR_ACCESSOR(int, count)
0156 XML_ATTR_ACCESSOR(int, nphi)
0157 XML_ATTR_ACCESSOR(int, replicate)
0158 XML_ATTR_ACCESSOR(double, rc)
0159 XML_ATTR_ACCESSOR(int, nz)
0160 XML_ATTR_ACCESSOR(int, key)
0161 XML_ATTR_ACCESSOR(int, key_min)
0162 XML_ATTR_ACCESSOR(int, key_max)
0163 XML_ATTR_ACCESSOR(int, key_val)
0164 XML_ATTR_ACCESSOR(int, key_value)
0165 XML_ATTR_ACCESSOR(double, zstart)
0166 XML_ATTR_ACCESSOR_DOUBLE(start)
0167 XML_ATTR_ACCESSOR_DOUBLE(start_x)
0168 XML_ATTR_ACCESSOR_DOUBLE(start_y)
0169 XML_ATTR_ACCESSOR_DOUBLE(start_z)
0170 XML_ATTR_ACCESSOR_DOUBLE(end)
0171 XML_ATTR_ACCESSOR_DOUBLE(step)
0172 XML_ATTR_ACCESSOR_DOUBLE(step_x)
0173 XML_ATTR_ACCESSOR_DOUBLE(step_y)
0174 XML_ATTR_ACCESSOR_DOUBLE(step_z)
0175
0176 XML_ATTR_ACCESSOR(double, thickness)
0177 XML_ATTR_ACCESSOR(double, inner_stereo)
0178 XML_ATTR_ACCESSOR(double, outer_stereo)
0179 XML_ATTR_ACCESSOR(int, item)
0180 XML_ATTR_ACCESSOR(int, items)
0181 XML_ATTR_ACCESSOR(int, numsides)
0182 XML_ATTR_ACCESSOR(int, nsides)
0183 XML_ATTR_ACCESSOR(int, nsides_inner)
0184 XML_ATTR_ACCESSOR(int, nsides_outer)
0185 XML_ATTR_ACCESSOR(int, number)
0186 XML_ATTR_ACCESSOR(int, repeat)
0187 XML_ATTR_ACCESSOR(bool, reflect)
0188 XML_ATTR_ACCESSOR_BOOL(reflect)
0189 XML_ATTR_ACCESSOR(bool, nocore)
0190 XML_ATTR_ACCESSOR_BOOL(nocore)
0191
0192 XML_ATTR_ACCESSOR(int, nmodules)
0193 XML_ATTR_ACCESSOR(int, nsegments)
0194 XML_ATTR_ACCESSOR(int, nModules)
0195 XML_ATTR_ACCESSOR(int, RowID)
0196 XML_ATTR_ACCESSOR(int, nPads)
0197 XML_ATTR_ACCESSOR(double, moduleHeight)
0198 XML_ATTR_ACCESSOR(double, moduleWidth)
0199 XML_ATTR_ACCESSOR(double, modulePosX)
0200 XML_ATTR_ACCESSOR(double, modulePosY)
0201 XML_ATTR_ACCESSOR(double, modulePitch)
0202 XML_ATTR_ACCESSOR(double, rowPitch)
0203 XML_ATTR_ACCESSOR(double, padPitch)
0204 XML_ATTR_ACCESSOR(double, rowHeight)
0205 XML_ATTR_ACCESSOR(double, inner_field)
0206 XML_ATTR_ACCESSOR(double, outer_field)
0207 XML_ATTR_ACCESSOR(int, type)
0208
0209 XML_ATTR_ACCESSOR(bool, visible)
0210 XML_ATTR_ACCESSOR(bool, show_daughters)
0211
0212 XML_ATTR_ACCESSOR_DOUBLE(correction)
0213 XML_ATTR_ACCESSOR_DOUBLE(cut)
0214 XML_ATTR_ACCESSOR_DOUBLE(threshold)
0215 XML_ATTR_ACCESSOR_DOUBLE(lunit)
0216 XML_ATTR_ACCESSOR_DOUBLE(eunit)
0217
0218 XML_ATTR_ACCESSOR_DOUBLE(density)
0219 XML_ATTR_ACCESSOR_DOUBLE(pressure)
0220 XML_ATTR_ACCESSOR_DOUBLE(temperature)
0221
0222
0223 XML_CHILD_ACCESSOR_XML_DIM(dimensions)
0224 XML_CHILD_ACCESSOR_XML_DIM(params)
0225 XML_CHILD_ACCESSOR_XML_DIM(parameters)
0226 XML_CHILD_ACCESSOR_XML_DIM(position)
0227 XML_CHILD_ACCESSOR_XML_DIM(rotation)
0228 XML_CHILD_ACCESSOR_XML_DIM(transform)
0229 XML_CHILD_ACCESSOR_XML_DIM(transformation)
0230 XML_CHILD_ACCESSOR_XML_DIM(cone)
0231 XML_CHILD_ACCESSOR_XML_DIM(sphere)
0232 XML_CHILD_ACCESSOR_XML_DIM(torus)
0233 XML_CHILD_ACCESSOR_XML_DIM(trap)
0234 XML_CHILD_ACCESSOR_XML_DIM(trapezoid)
0235 XML_CHILD_ACCESSOR_XML_DIM(trd)
0236 XML_CHILD_ACCESSOR_XML_DIM(tubs)
0237 XML_CHILD_ACCESSOR_XML_DIM(staves)
0238 XML_CHILD_ACCESSOR_XML_DIM(envelope)
0239 XML_CHILD_ACCESSOR_XML_DIM(beampipe)
0240 XML_CHILD_ACCESSOR_XML_DIM(shape)
0241 XML_CHILD_ACCESSOR_XML_DIM(solid)
0242
0243 /// Access "name" attribute as STL std::string
0244 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::nameStr() const {
0245 return m_element.attr < std::string > (_U(name));
0246 }
0247
0248 /// Access "name" attribute as STL std::string. Return default value if not present
0249 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::nameStr(const std::string& default_value) const {
0250 Attribute attr = m_element.attr_nothrow(_U(name));
0251 return attr ? m_element.attr < std::string >(attr) : default_value;
0252 }
0253
0254 /// Access "type" attribute as STL std::string
0255 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::typeStr() const {
0256 return m_element.attr < std::string > (_U(type));
0257 }
0258
0259 /// Access "type" attribute as STL std::string. Return default value if not present
0260 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::typeStr(const std::string& default_value) const {
0261 Attribute attr = m_element.attr_nothrow(_U(type));
0262 return attr ? m_element.attr < std::string >(attr) : default_value;
0263 }
0264
0265 /// Access "value" attribute as STL std::string
0266 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::valueStr() const {
0267 return m_element.attr < std::string > (_U(value));
0268 }
0269
0270 /// Access "value" attribute as STL std::string. Return default value if not present
0271 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::valueStr(const std::string& default_value) const {
0272 Attribute attr = m_element.attr_nothrow(_U(value));
0273 return attr ? m_element.attr < std::string >(attr) : default_value;
0274 }
0275
0276 /// Access "label" attribute as STL std::string
0277 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::labelStr() const {
0278 return m_element.attr < std::string > (_U(label));
0279 }
0280
0281 /// Access "label" attribute as STL std::string. Return default value if not present
0282 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::labelStr(const std::string& default_value) const {
0283 Attribute attr = m_element.attr_nothrow(_U(label));
0284 return attr ? m_element.attr < std::string >(attr) : default_value;
0285 }
0286
0287 /// Access "symbol" attribute as STL std::string
0288 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::symbolStr() const {
0289 return m_element.attr < std::string > (_U(symbol));
0290 }
0291
0292 /// Access "symbol" attribute as STL std::string. Return default value if not present
0293 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::symbolStr(const std::string& default_value) const {
0294 Attribute attr = m_element.attr_nothrow(_U(symbol));
0295 return attr ? m_element.attr < std::string >(attr) : default_value;
0296 }
0297
0298 /// Access "padType" attribute as STL std::string
0299 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::padType() const {
0300 return m_element.attr < std::string > (_U(pads));
0301 }
0302
0303 /// Access "ref" attribute as STL std::string
0304 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::refStr() const {
0305 return m_element.attr < std::string > (_U(ref));
0306 }
0307
0308 /// Access "region" attribute as STL std::string. If not present returns empty string.
0309 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::regionStr() const {
0310 return m_element.hasAttr(_U(region)) ? m_element.attr < std::string > (_U(region)) : std::string();
0311 }
0312
0313 /// Access "region" attribute as STL std::string. If not present returns empty string.
0314 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::regionStr(const std::string& default_value) const {
0315 return m_element.hasAttr(_U(region)) ? m_element.attr < std::string > (_U(region)) : default_value;
0316 }
0317
0318 /// Access "limits" attribute as STL std::string. If not present returns empty string.
0319 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::limitsStr() const {
0320 return m_element.hasAttr(_U(limits)) ? m_element.attr < std::string > (_U(limits)) : std::string();
0321 }
0322
0323 /// Access "limits" attribute as STL std::string. If not present returns empty string.
0324 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::limitsStr(const std::string& default_value) const {
0325 return m_element.hasAttr(_U(limits)) ? m_element.attr < std::string > (_U(limits)) : default_value;
0326 }
0327
0328 /// Access "vis" attribute as STL std::string. If not present returns empty string.
0329 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::visStr() const {
0330 return m_element.hasAttr(_U(vis)) ? m_element.attr < std::string > (_U(vis)) : std::string();
0331 }
0332
0333 /// Access "vis" attribute as STL std::string. If not present returns empty string.
0334 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::visStr(const std::string& default_value) const {
0335 return m_element.hasAttr(_U(vis)) ? m_element.attr < std::string > (_U(vis)) : default_value;
0336 }
0337
0338 /// Access "readout" attribute as STL std::string. If not present returns empty string.
0339 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::readoutStr() const {
0340 return m_element.hasAttr(_U(readout)) ? m_element.attr < std::string > (_U(readout)) : std::string();
0341 }
0342
0343 /// Access "readout" attribute as STL std::string. If not present returns empty string.
0344 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::readoutStr(const std::string& default_value) const {
0345 return m_element.hasAttr(_U(readout)) ? m_element.attr < std::string > (_U(readout)) : default_value;
0346 }
0347
0348 /// Access "module" attribute as STL std::string. If not present returns empty string.
0349 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::moduleStr() const {
0350 return m_element.hasAttr(_U(module)) ? m_element.attr < std::string > (_U(module)) : std::string();
0351 }
0352
0353 /// Access "module" attribute as STL std::string. If not present returns empty string.
0354 std::string dd4hep::DD4HEP_DIMENSION_NS::Dimension::moduleStr(const std::string& default_value) const {
0355 return m_element.hasAttr(_U(module)) ? m_element.attr < std::string > (_U(module)) : default_value;
0356 }