#ifndef SIBASEGEOMETRY_RCP_HPP #define SIBASEGEOMETRY_RCP_HPP // // $Id: SiBaseGeometryRCP.hpp,v 1.12 2005/04/03 15:36:36 shfu Exp $ // // File: SiBaseGeometry_RCP.hpp // Purpose: Define simple classes to hold the information read from the // initialization RCP. These are (initially) used only in // // SiBaseGeometry::build_silicon // // Each class also holds an instance of the resulting silicon // geometry class // // Created: 07-NOV-1997 John Hobbs // // Jan 31, 2005 by Shaohua Fu // added Layer0 // SFL0_Jan_2005 // // $Revision: 1.12 $ // // // Include files // Global definitions #include #include #include "SiCenter.hpp" #include "SiEnd.hpp" #include "SiL0.hpp" // added SFL0_Jan_2005 #ifndef RCP_RCP // If this already exists, there's no need to define it... namespace edm { class RCP; } #endif /** Create prototype ladder from RCP. Instantiate a collection of the RCP parameters describing the id-th ladder type in RCPinit. A prototype of the ladder is instantiated and pointed to by $\_$ an$\_$ instance. This prototype is lost when this class is destroyed. */ class SiLadderType { public: SiLadderType() {} SiLadderType(const edm::RCP& RCPinit, int id); const SiLadder* instance() const { return &_an_instance; } private: float _halfwidth; float _halflength; float _halfthick; SiLadder _an_instance; }; /** Create prototype layer from RCP. Instantiate a collection of the RCP parameters describing the id-th layer type in RCPinit. If you have the ladders already, then an instance of the layer is pointed to by $\_$ an$\_$ instance. */ class SiLayerType { public: SiLayerType() {} SiLayerType(const edm::RCP& RCPinit, int id, const std::vector* ladders=0); const SiLayer* instance() const { return &_an_instance; } private: int _nladders; float _radius; float _zhalf; float _phi0; float _zpos; int _ladder_type; bool _ladder_sense; // Is the p-side facing inward? SiLayer _an_instance; }; /** Create prototype barrel from RCP. Instantiate a collection of the RCP parameters describing the id-th barrel type in RCPinit. If you have the layers already, then a prototype of the barrel is pointed to by $\_$ an$\_$ instance. */ class SiBarrelType { public: SiBarrelType() {} SiBarrelType(const edm::RCP& RCPinit, int id, const std::vector* layers=0); const SiBarrel* instance() const { return &_an_instance; } private: bool _spun; // Is the (ideal)local Z axis antiparallel to the global Z axis std::vector _layer_types; SiBarrel _an_instance; }; /** Create prototype wedge from RCP. Instantiate a collection of the RCP parameters describing the id-th wedge type in RCPinit. A prototype of the wedge is instantiated and pointed to by $\_$ an $\_$ instance. This prototype is lost when this class is destroyed. */ class SiWedgeType { public: SiWedgeType() {} SiWedgeType(const edm::RCP& RCPinit, int id); const SiWedge* instance() const { return &_an_instance; } private: float _halfwidth1; float _halfwidth2; float _halfheight; SiWedge _an_instance; }; /** Create prototype wedgeholder from RCP. Instantiate a collection of the RCP parameters describing the id-th wedgeholder type in RCPinit. If you have the wedgeholders already, then an instance of the wedgeholder is pointed to by $\_$ an $\_$instance. */ class SiWedgeHolderType { public: SiWedgeHolderType() {} SiWedgeHolderType(const edm::RCP& RCPinit, int id, const std::vector* wedges=0); const SiWedgeHolder* instance() const { return &_an_instance; } private: float _dhoffs; std::vector _wedge_types; SiWedgeHolder _an_instance; }; /** Create prototype disk from RCP. Instantiate a collection of the RCP parameters describing the id-th disk type in RCPinit. If you have the disks already, then an instance of the disk is pointed to by $\_$ an $\_$ instance. */ class SiDiskType { public: SiDiskType(): _nwedgeholders(0), _wedgeholder_type(0) {} SiDiskType(const edm::RCP& RCPinit, int id, const std::vector* wedgeholders=0); const SiDisk* instance() const { return &_an_instance; } private: int _nwedgeholders; float _radius; float _phi0; float _phi1; float _separation; int _wedgeholder_type; bool _wedgeholder_sense; bool _disk_flip; SiDisk _an_instance; }; /** Create prototype central from RCP. Instantiate a collection of the RCP parameters describing the id-th central tracker type in RCPinit. If you have barrels and disks already, then a prototype of the central is pointed to by $\_$ an $\_$ instance. */ class SiCentralType { public: SiCentralType() {} SiCentralType(const edm::RCP& RCPinit, int id, const std::vector* barrels=0, const std::vector* disks=0); const SiCentral* instance() const { return &_an_instance; } private: std::vector _barrel_types; // Barrel types and positions std::vector _barrel_zs; std::vector _disk_types; // Disk types and positions std::vector _disk_zs; SiCentral _an_instance; }; /** Create prototype center from RCP. Instantiate a collection of the RCP parameters describing the id-th center tracker type in RCPinit. If you have the centrals already, then a prototype of the center is pointed to by $\_$ an $\_$ instance. */ class SiCenterType { public: SiCenterType() {} SiCenterType(const edm::RCP& RCPinit, int id, const std::vector* centrals=0); const SiCenter* instance() const { return &_an_instance; } private: std::vector _central_types; std::vector _central_zs; SiCenter _an_instance; }; /** Create prototype end from RCP. Instantiate a collection of the RCP parameters describing the id-th end tracker type in RCPinit. If you have the disks already, then a prototype of the end is pointed to by $\_$ an $\_$ instance. */ class SiEndType { public: SiEndType() {} SiEndType(const edm::RCP& RCPinit, int id, const std::vector* disks=0); const SiEnd* instance() const { return &_an_instance; } private: std::vector _disk_types; std::vector _disk_zs; SiEnd _an_instance; }; // added SFL0_Jan_2005 /** Create prototype layer0 from RCP. Instantiate a collection of the RCP parameters describing the id-th layer0 tracker type in RCPinit. If you have the barrels already, then a prototype of the layer0 is pointed to by $\_$ an $\_$ instance. */ class SiL0Type { public: SiL0Type() {} SiL0Type(const edm::RCP& RCPinit, int id, const std::vector* barrels=0); const SiL0* instance() const { return &_an_instance; } private: std::vector _barrel_types; std::vector _barrel_zs; SiL0 _an_instance; }; // end of SFL0_Jan_2005 #endif //SIBASEGEOMETRY_RCP_HPP