Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:49

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_DEVELO_H 
0016 #define DETECTOR_DEVELO_H 1
0017 
0018 // Framework include files
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 /// Gaudi namespace declaration
0032 namespace gaudi   {
0033 
0034   /// Gaudi::detail namespace declaration
0035   namespace detail   {
0036     
0037     /// Velo  detector element data
0038     /**
0039      *
0040      *  \author  Markus Frank
0041      *  \date    2018-03-08
0042      *  \version  1.0
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       /// Standard constructors and assignment
0066       DE_CTORS_DEFAULT(DeVeloStaticObject);
0067       /// Initialization of sub-classes
0068       virtual void initialize()  override;
0069       /// Printout method to stdout
0070       virtual void print(int indent, int flags)  const override;
0071     };
0072   }    // End namespace detail
0073 
0074 
0075   /// Handle defintiion to an instance of Velo  detector element data
0076   /**
0077    *  This object defines the behaviour of the objects's data
0078    *
0079    *  \author  Markus Frank
0080    *  \date    2018-03-08
0081    *  \version  1.0
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     /// Standard constructors and assignment
0090     DE_CTORS_HANDLE(DeVeloStaticElement,Base);
0091   };
0092   /// For the fully enabled object, we have to combine it with the generic stuff
0093   typedef  DetectorStaticElement<DeVeloStaticElement>  DeVeloStatic;
0094 
0095   /// Gaudi::detail namespace declaration
0096   namespace detail   {
0097   
0098     /// Velo  detector element data
0099     /**
0100      *
0101      *  \author  Markus Frank
0102      *  \date    2018-03-08
0103      *  \version  1.0
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       /// Standard constructors and assignment
0123       DE_CTORS_DEFAULT(DeVeloObject);
0124       /// Initialization of sub-classes
0125       virtual void initialize()  override;
0126       /// Printout method to stdout
0127       void print(int indent, int flags)  const  override;
0128     };
0129   }    // End namespace detail
0130 
0131   /// Handle defintiion to an instance of Velo  detector element data
0132   /**
0133    *  This object defines the behaviour of the objects's data
0134    *
0135    *  \author  Markus Frank
0136    *  \date    2018-03-08
0137    *  \version  1.0
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     /// Standard constructors and assignment
0147     DE_CTORS_HANDLE(DeVeloElement,Base);
0148     /// Access to the static data. If this handle is valid, the static handle must be valid too!
0149     static_t& staticData()  const    { return *(access()->vp_static.ptr());   }
0150   };
0151 
0152   /// For the fully enabled object, we have to combine it with the generic stuff
0153   typedef  DetectorElement<DeVeloElement>  DeVelo;
0154 
0155 }      // End namespace gaudi
0156 #undef DE_VELO_TYPEDEFS
0157 #endif // DETECTOR_DEVELO_H