#ifndef SIBASEGEOMETRY_HPP #define SIBASEGEOMETRY_HPP // // $Id: SiBaseGeometry.hpp,v 1.13 2005/04/03 15:36:36 shfu Exp $ // // File: SiBaseGeometry.hh // Purpose: Define the top level geometry element for the silicon vertex // base geometry. It contains barrels and disks both of which // are indexed using integers, with the first element having index=1. // Created: 09-OCT-1997 John Hobbs // // Jan 31, 2005 by Shaohua Fu // added Layer0 // SFL0_Jan_2005 // // $Revision: 1.13 $ // // // Include files #include #include #include #include #include #include #include // added SFL0_Jan_2005 #include #ifndef RCP_RCP namespace edm { class RCP; } #endif /// Define Baseline Geometry class SiBaseGeometry : public dgs::ReferencePoint { public: /// Default constructor SiBaseGeometry() {} /** Instantiate detector with $nc$ centers, $ne$ end sections. The ideal positions are given in $center\_zpos$ and $end\_zpos$. The center and ends defined as $proto\_center$ and $proto\_end$ define the center and ends. If the pointer is null, the defaults are used. */ // SiBaseGeometry(int nc, const float* center_zpos, const SiCenter* proto_center, // cmt.out SFL0_Jan_2005 // int ne, const float* end_zpos, const SiEnd* proto_end); SiBaseGeometry(int nc, const float* center_zpos, const SiCenter* proto_center, // added SFL0_Jan_2005 int ne, const float* end_zpos, const SiEnd* proto_end, int nl0=0, const float* l0_zpos=0, const SiL0* proto_l0=0); // added SFL0_Jan_2005 /** Instantiate detector with $nc$ centers, $ne$ end sections. Construct a silicon detector with the centers and ends specified in the vectors ${\it const std::vector \¢ers}$ and ${\it const std::vector \&ends}$. */ // SiBaseGeometry(int nc, const float* center_zpos, // cmt.out SFL0_Jan_2005 // const std::vector ¢ers, // int ne, const float* end_zpos, // const std::vector &ends); SiBaseGeometry(int nc, const float* center_zpos, // added SFL0_Jan_2005 const std::vector ¢ers, int ne, const float* end_zpos, const std::vector &ends, int nl0=0, const float* l0_zpos=0, // added SFL0_Jan_2005 const std::vector &l0s=std::vector()); // added SFL0_Jan_2005 /** Build default geometry. Create the default geometry from the parameters contained in the RCP file SiBaseGeometry.rcp. @param RCPinit Pointer to RCP containing default geometry information. */ static d0_Ref build_default(edm::RCP* RCPinit=(edm::RCP*)0); /** Return the address of the children. Used within dgs::GeometryElement and ReferencePoint to do positioning. */ const std::list get_children(); /// For Run 2B, allow the addition of L0 to an existing Run 2A geometry // added SFL0_Jan_2005 void add_L0(SiL0 *theL0, double z_L0=0.0); // added SFL0_Jan_2005 /// Return the number of central trackers. int get_center_count() const; /// Return the number of end trackers. int get_end_count() const; /// Return the number of layer0 trackers. // added SFL0_Jan_2005 int get_l0_count() const; // added SFL0_Jan_2005 /** Return a reference to the icenter-th center in a manner which does not allow the center to be changed. */ const SiCenter* get_center(int icenter) const; /** Return a reference to the icenter-th center allowing changes to the center. */ SiCenter* get_mutable_center(int icenter); /** Return a reference to the iend-th end in a manner which does not allow the end to be changed. */ const SiEnd* get_end(int iend) const; /** Return a reference to the iend-th end allowing changes to the end. */ SiEnd* get_mutable_end(int iend); /** // added SFL0_Jan_2005 Return a reference to the ilayer0-th layer0 in a manner which does not allow the layer0 to be changed. */ const SiL0* get_l0(int il0) const; // added SFL0_Jan_2005 /** // added SFL0_Jan_2005 Return a reference to the ilayer0-th layer0 allowing changes to the layer0. */ SiL0* get_mutable_l0(int il0); // added SFL0_Jan_2005 /** Get and set the alignment constants version number */ int get_constants_version() const { return _constants_version; } int set_constants_version(int new_version); /// Text dump the silicon detector structure. friend std::ostream& operator <<(std::ostream& os, const SiBaseGeometry& me); friend bool operator<(const SiBaseGeometry& lhs, const SiBaseGeometry &rhs); /// Are two geometries the same? friend bool operator==(const SiBaseGeometry& lhs, const SiBaseGeometry &rhs); friend bool operator!=(const SiBaseGeometry& lhs, const SiBaseGeometry &rhs); private: /// Vector to hold the centers. std::vector _centers; /// Vector to hold the ends. std::vector _ends; /// Vector to hold the l0s. // added SFL0_Jan_2005 std::vector _l0s; // added SFL0_Jan_2005 /// The alignment constants version number int _constants_version; public: D0_OBJECT_SETUP(SiBaseGeometry); }; // Inlines #include #endif //SIBASEGEOMETRY_HPP