/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h

Go to the documentation of this file.
00001 // $Id: MdcLayer.h,v 1.2 2009/12/17 00:38:40 zhangy Exp $ // -*-c++-*-
00002 // header file for a class called "MdcLayer"
00003 #ifndef MDCLAYER_H
00004 #define MDCLAYER_H
00005 
00006 #include <CLHEP/Geometry/Point3D.h>
00007 #include <iostream>
00008 #include <vector>
00009 #include "MdcGeom/MdcSWire.h"
00010 #include "MdcGeom/Constants.h"
00011 
00012 class MdcDetector;
00013 class Trajectory;
00014 
00015 class MdcLayer {
00016 
00017   public:
00018     // Constructor.
00019      MdcLayer(int lay, int nwir, MdcSWire** wires, const MdcDetector &theDet);
00020 
00021     // Destructor
00022     ~MdcLayer(){};
00023 
00024     void print( std::ostream& o ) const;
00025                               
00026   public: // Extractors
00027     bool exist(void)        const { return _exist; }
00028     int view(void)          const { return _view; }
00029     int layNum(void)        const { return _layer; }
00030     int nWires(void)        const { return _nwires; }
00031     int superLayer(void)  const { return 1+((layNum()-1)/4);}
00032     int subLayer(void)    const { return layNum()-4*(superLayer()-1);}
00033     double cellHeight(void) const { return _cellHeight; }
00034     double stDip(void)      const { return _stdip; }
00035     double zEnd(void)       const { return _zend; }
00036     double rMid(void)       const { return _rmid; }
00037     double rEnd(void)       const { return _rend; }
00038     double rIn(void)        const { return rMid() - 0.5 * cellHeight(); }//yzhang del
00039     double rOut(void)       const { return rMid() + 0.5 * cellHeight(); }//yzhang del
00040 //    double rIn(void)        const { return rMid() - RCSiz1(); }//yzhang change FIXME
00041 //    double rOut(void)       const { return rMid() + RCSiz2(); }//yzhang change FIXME
00042     double stereo(void)     const { return _stereo; }
00043     double dPhiz(void)      const { return _delphi; }
00044     double zLength(void)    const { return getWire(0)->zLength(); }
00045     double sag(void)        const { return getWire(0)->getSag(); }
00046     //  this function returns the phi offset in the middle of the chamber
00047     double phiOffset(void)    const { return phiWire(0); }
00048     //  this function returns the cell offset w.r.t rear end-plate
00049     double phiEPOffset(void)  const { return _phiOffset; }
00050     double dPhizDC(double z)  const { return phiWireDC(0, z); }
00051     double radiusDC(double z) const { return getWire(0)->radiusDC(z); }
00052     MdcSWire *getWire(int wire) const { return _wires[wire]; }
00053 //    int view(void) const { return _view; }
00054 //    TrkEnums::TrkViewInfo whatView() const {
00055 //      return _view==0?TrkEnums::xyView:TrkEnums::bothView;
00056 //    }
00057     double phiWireDC(int cell, double z) const;
00058     double phiWire(int cell) const;
00059     double xWire(int cell) const;
00060     double yWire(int cell) const;
00061     double dPhi(void) const { return Constants::twoPi/nWires(); }
00062     // return the width of the cell at mid chamber corrected by the
00063     // stereo angle
00064     double cellWidth(void) const { return dPhi()*rMid()*cos(stereo()); }
00065     // return the width of the cell at z along the chamber
00066     double cellWidth(double z) const { return dPhi()*radiusDC(z)*cos(stereo()); }
00067     
00068 //    const MdcSuperLayer SLayer(void) const {return *_sLay;}
00069       
00070       
00071 
00072     const Trajectory* makeHitTrajInGlobalCoords(int wire, double z=0) const;
00073 
00074   public: // Modifiers
00075 
00076     void View(int v ) { _view = v; }
00077     void setCellHeight(double height) { _cellHeight = height; }
00078     
00079   private:
00080 
00081     const MdcDetector& _mdcDet;   // Reference to layer's owner (for whichCells)
00082 
00083     bool _exist;                  // this layer exist ? 
00084     int _layer;                   // layer number
00085     int _nwires;                  // number of wires
00086     MdcSWire **_wires;            // array of pointers to hits on wires    
00087 //    const MdcSuperLayer* _sLay;   // pointer to SuperLayer
00088                                       
00089     double _stdip;                // change in radius from mid to end - nominal
00090                                   // value
00091     double _rend;                 // radius on rear end-plate
00092     double _rmid;                 // radius in the center of the chamber
00093     double _zend;                 // z position of end-plate (in the local reference system)
00094     double _stereo;               // stereo angle
00095     double _delphi;               // twist angle between mid and rear chamber
00096     double _phiOffset;            // offset of first cell
00097     double _cellHeight;           // cell height
00098     int  _view;                   // +1, 0, -1: U, axial, V
00099 
00100 //  private:
00101 //    friend class MdcDetector;
00102 //    void updateInfo(std::vector<MdcSWire *>::const_iterator it);
00103 
00104 };
00105 
00106 #endif /* MdcLayer_CLASS */
00107 

Generated on Tue Nov 29 23:13:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7