#ifndef TScintBarGeom_hxx_seen #define TScintBarGeom_hxx_seen #include #include #include #include #include #include "EoaGeomInfo.hxx" #include "IGeometryId.hxx" namespace COMET { class IScintBarGeom; }; /// A class for the T2K scintillator-based detectors. It contains /// all the basic geometry informations about a scintillator bar /// that needs to be passed to the electronics simulation and the /// higher level reconstruction algorithms. /// to create a bar object the user need to specify the nodeId, /// the orientation of the bar in the layer (X,Y) and which end /// has a sensor class COMET::IScintBarGeom { public: typedef std::vector Neighbors; /// Create a new IScintBarGeom object. The new IScintBarGeom object is /// created for the geometry node, the orientation (0 is X, 1 is Y), and the /// number of photosensors that are attached. IScintBarGeom(COMET::IGeometryId geomId, int orientation, int nsensors); virtual ~IScintBarGeom(); /// Get the geometry node number for the bar. COMET::IGeometryId GetGeomId() const {return fGeomId;} /// Get the number of readout sensor for the bar int GetNumOfSensors() const {return fSensorNumber;} /// Get the orientation of the bar as specified in the layer name /// in the path (ex: FGDScintX is an "X" bar) orientation= 0 /// along Y : orientation = 1 /// int GetOrientation() const {return fBarOrientation;} /// Get the pointing direction of the bar (P0D bars). const TVector3& GetPointing() const {return fPointing;} TVector3& GetPointing() {return fPointing;} /// Get the vector of node id's for each of the neighbors. There will /// be between two and eight neighbors for any given bar (depending on /// the local geometry). The list is not in any particular order. const Neighbors& GetNeighbors(void) const {return fNeighbors;} Neighbors& GetNeighbors(void) {return fNeighbors;}; /// Get bar dimensions in the local reference system : /// thickness along Y, width along X and length along Z. TVector3 GetBarDimensions(); /// Get bar material TGeoMaterial* GetMaterial(); private: //int fNodeId; COMET::IGeometryId fGeomId; /// Orientation of the bar in the module Int_t fBarOrientation; /// Number of sensor on the bar, choice is : /// -1 : one sensor on minus side /// 1 : one sensor on plus side /// 2 : sensor on both ends Int_t fSensorNumber; protected: /// the list of neighbors for this bar. Neighbors fNeighbors; /// The direction that the triangle is pointing (the direction of the /// tip). TVector3 fPointing; }; #endif