|
||||
File indexing completed on 2025-01-18 09:14:50
0001 //============================================================================== 0002 // AIDA Detector description implementation for LHCb 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 Markus Frank 0011 // \date 2018-03-08 0012 // \version 1.0 0013 // 0014 //============================================================================== 0015 #ifndef DETECTOR_DEVPSENSOR_H 0016 #define DETECTOR_DEVPSENSOR_H 1 0017 0018 // C/C++ include files 0019 #include <array> 0020 0021 // Framework include files 0022 #include "Kernel/VPConstants.h" 0023 #include "Detector/DetectorElement.h" 0024 #include "Detector/DeStatic.h" 0025 #include "Detector/DeIOV.h" 0026 0027 /// Gaudi namespace declaration 0028 namespace gaudi { 0029 0030 0031 /// Gaudi::detail namespace declaration 0032 namespace detail { 0033 0034 /// Generic VP static detector element 0035 /** 0036 * 0037 * \author Markus Frank 0038 * \date 2018-03-08 0039 * \version 1.0 0040 */ 0041 class DeVPSensorStaticObject : public detail::DeStaticObject { 0042 public: 0043 enum { classID = 1008205 }; 0044 /// Cache of local x-cooordinates 0045 std::array<double,VP::NSensorColumns> local_x; 0046 /// Cache of x-pitch 0047 std::array<double,VP::NSensorColumns> x_pitch; 0048 0049 /// Dimensions of the sensor active area 0050 double sizeX = 0e0; 0051 double sizeY = 0e0; 0052 double thickness = 0e0; 0053 /// Length of chip active area 0054 double chipSize = 0e0; 0055 /// Distance between two chips 0056 double interChipDist = 0e0; 0057 /// Cell size of pixels 0058 double pixelSize = 0e0; 0059 /// Cell size in column direction of elongated pixels 0060 double interChipPixelSize = 0e0; 0061 /// Global Z position 0062 double zpos = 0e0; 0063 0064 /// Number of chips per ladder 0065 unsigned int nChips = 0; 0066 /// Number of columns and rows 0067 unsigned int nCols = 0; 0068 unsigned int nRows = 0; 0069 /// Sensor ans module number 0070 unsigned int sensorNumber = 0; 0071 unsigned int module = 0; 0072 0073 public: 0074 /// Standard constructors and assignment 0075 DE_CTORS_DEFAULT(DeVPSensorStaticObject); 0076 0077 /// Initialization of sub-classes 0078 virtual void initialize() override; 0079 /// Printout method to stdout 0080 virtual void print(int indent, int flags) const override; 0081 }; 0082 } // End namespace detail 0083 0084 /// Handle defintiion to an instance of VP static detector element data 0085 /** 0086 * This object defines the behaviour of the objects's data 0087 * 0088 * \author Markus Frank 0089 * \date 2018-03-08 0090 * \version 1.0 0091 */ 0092 class DeVPSensorStaticElement 0093 : public dd4hep::Handle<detail::DeVPSensorStaticObject> 0094 { 0095 DE_CONDITIONS_TYPEDEFS; 0096 /// This is needed by the DetectorElement<TYPE> to properly forward requests. 0097 typedef Object static_t; 0098 public: 0099 /// Standard constructors and assignment 0100 DE_CTORS_HANDLE(DeVPSensorStaticElement,Base); 0101 }; 0102 0103 /// For the full sensor object, we have to combine it with the geometry stuff: 0104 typedef DetectorStaticElement<DeVPSensorStaticElement> DeVPSensorStatic; 0105 0106 /// Gaudi::detail namespace declaration 0107 namespace detail { 0108 0109 /// Generic VP iov dependent detector element 0110 /** 0111 * 0112 * \author Markus Frank 0113 * \date 2018-03-08 0114 * \version 1.0 0115 */ 0116 class DeVPSensorObject : public DeIOVObject { 0117 DE_CONDITIONS_TYPEDEFS; 0118 typedef DeVPSensorStatic::Object static_t; 0119 0120 /// The static part of the detector element 0121 DeVPSensorStatic sensor_static; 0122 0123 /** For ref only: values are taken from the RUN-II conditions information */ 0124 /// Reference to time-dependent sensor information 0125 Condition info; 0126 /// Reference to time-dependent noise 0127 Condition noise; 0128 /// Reference to time-dependent readout configuration parameters 0129 Condition readout; 0130 0131 public: 0132 /// Standard constructors and assignment 0133 DE_CTORS_DEFAULT(DeVPSensorObject); 0134 0135 /// Initialization of sub-classes 0136 virtual void initialize() override; 0137 /// Printout method to stdout 0138 virtual void print(int indent, int flags) const override; 0139 0140 }; 0141 } // End namespace detail 0142 0143 0144 /// Handle defintiion to an instance of VP IOV dependent data 0145 /** 0146 * This object defines the behaviour of the objects's data 0147 * 0148 * \author Markus Frank 0149 * \date 2018-03-08 0150 * \version 1.0 0151 */ 0152 class DeVPSensorElement : public dd4hep::Handle<detail::DeVPSensorObject> { 0153 DE_CONDITIONS_TYPEDEFS; 0154 typedef Object::static_t static_t; 0155 typedef Object iov_t; 0156 0157 public: 0158 /** Define conditions access keys for optimization */ 0159 static const itemkey_type key_info; 0160 static const itemkey_type key_noise; 0161 static const itemkey_type key_readout; 0162 /// Standard constructors and assignment 0163 DE_CTORS_HANDLE(DeVPSensorElement,Base); 0164 /// Access to the static data. Does this need to be optionized??? 0165 static_t& staticData() const { return access()->sensor_static; } 0166 //bool isLeft() const { return (ptr()->de_user & VP::RIGHT) == 0; } 0167 //bool isRight() const { return (ptr()->de_user & VP::RIGHT) != 0; } 0168 0169 }; 0170 0171 /// For the full sensor object, we have to combine it with the geometry stuff: 0172 typedef DetectorElement<DeVPSensorElement> DeVPSensor; 0173 0174 } // End namespace gaudi 0175 #endif // DETECTOR_DEVPSENSOR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |