#ifndef SICENTER_HPP #define SICENTER_HPP // // $Id: SiCenter.hpp,v 1.6 2001/02/03 22:53:35 hobbs Exp $ // // File: SiCenter.hpp // Purpose: // Created: 17-JAN-1998 Emanuela Barberis // // $Revision: 1.6 $ // // // Include files #include #include #include #include #include // Constructors/Destructors /** SMT central detector (default: six barrels and F disks) A SiCenter is used to position the central units. In the current detector configuration there are eight central units, the outer units contain three F disks, the six inner ones contain one barrel and one F disk. */ class SiCenter: public dgs::ReferencePoint { public: /// Default constructor (empty center). SiCenter(); /** Construct a center containing the given centrals. Centrals are positioned according to the vector $z \_ positions$. */ SiCenter(const std::vector ¢rals, const std::vector &z_positions); /** Return the address of the children. Used within dgs::GeometryElement and ReferencePoint to do positioning. */ const std::list get_children(); /// Return the number of centrals. int get_central_count() const; /// Return a constant reference to the icentral-th central. const SiCentral* get_central(int icentral) const; /// Return a modifiable reference to the icentral-th central. SiCentral* get_mutable_central(int icentral); /** Simplified interface to barrels. This interface knows the distributions of barrels within the set of centrals so users can simply ask for a given barrel. */ int get_barrel_count() const; const SiBarrel* get_barrel(int barrel) const; SiBarrel* get_mutable_barrel(int barrel); /** Simplified interface to disks. This interface knows the distributions of disks within the set of centrals so users can simply ask for a given disk. */ int get_disk_count() const; const SiDisk* get_disk(int disk) const; SiDisk* get_mutable_disk(int disk); /// Text dump of a center unit. friend std::ostream& operator <<(std::ostream& os, const SiCenter& me); friend bool operator <(const SiCenter& lhs, const SiCenter &rhs); friend bool operator ==(const SiCenter& lhs, const SiCenter &rhs); friend bool operator !=(const SiCenter& lhs, const SiCenter &rhs); private: /// Vector to hold the centrals. std::vector _centrals; /** IDs of barrels within the centrals. Some centrals don't have a barrel. */ std::vector _barrel_map_centralID; /// IDs of barrels in the center structure (1...6) std::vector _barrel_map_barrelID; /** IDs of disks within the centrals. Number of disks might be 1 or 3.. */ std::vector _disk_map_centralID; /// IDs of disks in the center structure (1...12) std::vector _disk_map_diskID; public: D0_OBJECT_SETUP(SiCenter); }; // Inlines #include #endif //SICENTER_HPP