CMS 3D CMS Logo

GeometricDet.h

Go to the documentation of this file.
00001 #ifndef Geometry_TrackerNumberingBuilder_GeometricDet_H
00002 #define Geometry_TrackerNumberingBuilder_GeometricDet_H
00003 
00004 #include "DetectorDescription/Core/interface/DDExpandedView.h"
00005 #include "DetectorDescription/Base/interface/DDRotationMatrix.h"
00006 #include "DetectorDescription/Base/interface/DDTranslation.h"
00007 #include "DetectorDescription/Core/interface/DDSolidShapes.h"
00008 #include "DataFormats/GeometrySurface/interface/Surface.h"
00009 #include "DataFormats/GeometrySurface/interface/Bounds.h"
00010 #include "DataFormats/DetId/interface/DetId.h"
00011 
00012 #include "CondFormats/IdealGeometryObjects/interface/PGeometricDet.h"
00013 #include <vector>
00014 #include "FWCore/ParameterSet/interface/types.h"
00015 
00016 //class DetId;
00017 class DDFilteredView;
00018 
00024 class GeometricDet {
00025  public:
00026   
00027   typedef std::vector< GeometricDet const *>  ConstGeometricDetContainer;
00028   typedef std::vector< GeometricDet const *>  GeometricDetContainer;
00029   typedef DDExpandedView::nav_type nav_type;
00030   typedef Surface::PositionType Position;
00031   typedef Surface::RotationType Rotation;
00032 
00033   //
00034   // more can be added; please add at the end!
00035   //
00036   typedef enum GDEnumType {unknown=100, Tracker=0, PixelBarrel=1, PixelEndCap=2,
00037                           TIB=3, TID=4, TOB=5, TEC=6,
00038                           layer=8, wheel=9, strng=10, rod=11, petal=12, ring=13,
00039                           ladder=14, mergedDet=15, DetUnit=16, disk=17, panel=18 } GeometricEnumType;
00043   GeometricDet(nav_type navtype, GeometricEnumType dd);
00044   GeometricDet(DDExpandedView* ev, GeometricEnumType dd);
00045   GeometricDet(DDFilteredView* fv, GeometricEnumType dd);
00046   GeometricDet(const PGeometricDet::Item& onePGD, GeometricEnumType dd);
00047   
00048   /*
00049   GeometricDet(const GeometricDet &);
00050 
00051   GeometricDet & operator=( const GeometricDet & );
00052   */
00053 
00057   void setGeographicalID(DetId id) const {_geographicalID = id;}
00058   void setComponents(GeometricDetContainer const & cont) {_container = cont;}
00059   void addComponents(GeometricDetContainer const & cont);
00060   void addComponent(GeometricDet*);
00064   void clearComponents() {_container.clear();}
00065  
00070   void deleteComponents();
00071 
00072   bool isLeaf() const {return _container.empty();}
00073   
00077   DDRotationMatrix const & rotation() const {return _rot;}
00078   DDTranslation const & translation() const {return _trans;}
00079   double phi() const { return _phi; }
00080   double rho() const { return _rho; }
00081 
00082 
00083   DDSolidShape const & shape() const  {return _shape;}
00084   GeometricEnumType type() const {return _type;}
00085   DDName const & name() const {return _ddname;};
00086   nav_type navType() const {return _ddd;}
00087   std::vector<double> const & params() const {return _params;}
00088 
00089 
00090   ~GeometricDet();
00091   
00096     GeometricDetContainer & components() {
00097     return _container;
00098    }  
00099    GeometricDetContainer const & components() const {
00100     return _container;
00101   }
00102 
00108   ConstGeometricDetContainer deepComponents() const;
00109   void deepComponents(GeometricDetContainer & cont) const;
00110 
00111   //rr
00115   std::vector< DDExpandedNode > const &  parents() const {return _parents;}
00116   //rr  
00117   
00121   DetId geographicalID() const  { return _geographicalID; }
00122   DetId geographicalId() const  { return _geographicalID; }
00123 
00127   Position positionBounds() const; 
00128 
00132   Rotation  rotationBounds() const; 
00133 
00137   const Bounds * bounds() const; 
00138   
00139   int copyno() const {return _copy;}
00140   double volume() const {return _volume;}
00141   double density() const {return _density;}
00142   double weight() const {return _weight;}
00143   std::string const &  material() const {return _material;}
00144   double radLength() const {return _radLength;}
00145   double xi() const {return _xi;}
00149   double pixROCRows() const {return _pixROCRows;}
00150   double pixROCCols() const {return _pixROCCols;}
00151   double pixROCx() const {return _pixROCx;}
00152   double pixROCy() const {return _pixROCy;}
00153 
00157   bool stereo() const {return _stereo;}
00158   double siliconAPVNum() const {return _siliconAPVNum;}
00159 
00163   bool wasBuiltFromDD() const {return _fromDD;}
00164 
00165  private:
00166 
00167   GeometricDetContainer _container;
00168   DDTranslation _trans;
00169   double _phi;
00170   double _rho;
00171   DDRotationMatrix _rot;
00172   DDSolidShape _shape;
00173   nav_type _ddd;
00174   DDName _ddname;
00175   GeometricEnumType _type;
00176   std::vector<double> _params;
00177   //FIXME
00178   mutable DetId _geographicalID;
00179 
00180   std::vector< DDExpandedNode > _parents;
00181   double _volume;
00182   double _density;
00183   double _weight;
00184   int    _copy;
00185   std::string _material;
00186   double _radLength;
00187   double _xi;
00188   double _pixROCRows;
00189   double _pixROCCols;
00190   double _pixROCx;
00191   double _pixROCy;
00192   bool _stereo;
00193   double _siliconAPVNum;
00194   bool _fromDD;
00195 
00196 };
00197 
00198 #endif
00199 

Generated on Tue Jun 9 17:37:34 2009 for CMSSW by  doxygen 1.5.4