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

Go to the documentation of this file.
00001 // $Id: MdcDetector.h,v 1.2 2009/05/31 11:50:46 zhangy Exp $ // -*-c++-*-
00002 // header file for a class called "MdcDetector"
00003 #ifndef MDCDETECTOR_H
00004 #define MDCDETECTOR_H
00005 
00006 #include <CLHEP/Units/PhysicalConstants.h>                                      
00007 #include <CLHEP/Geometry/Point3D.h> 
00008 #include <vector>
00009 #include <iostream>
00010 
00011 #include "MdcGeom/MdcSWire.h"
00012 #include "MdcGeom/MdcLayer.h"
00013 #include "MdcGeom/MdcSuperLayer.h"
00014 #include "Identifier/Identifier.h"
00015 
00016 
00017 using namespace std;
00018 
00019 class MdcDetector
00020 {
00021   public:
00022     // Constructors and destructors
00023     MdcDetector();
00024     ~MdcDetector();
00025     static MdcDetector * instance(bool doSag);
00026     static MdcDetector * instance();
00027 
00028     const MdcSWire    * Wire(unsigned id) const { return _senseWire[id];}
00029     const MdcSWire    * Wire(const Identifier&  id) const;
00030     const MdcSWire    * Wire(unsigned lyrid, unsigned wirid) const 
00031     { return getMdcLayer(lyrid)->getWire(wirid); }  
00032 
00033     const MdcLayer    * Layer(unsigned id) const { return _dclayer[id]; }
00034     const MdcLayer    * Layer(const Identifier&  id) const;
00035     MdcLayer* getMdcLayer(int laynum) const { return _dclayer[laynum]; }
00036     const MdcLayer *firstLayer() const { return Layer(0); }
00037     const MdcLayer *lastLayer () const { return Layer(_nLayer - 1); }
00038     const MdcLayer* nextLayer(int lay) const { return _nextlay[lay]; }
00039     const MdcLayer* prevLayer(int lay) const { return _prevlay[lay]; }
00040     const MdcLayer* nextLayer(const MdcLayer* layer) const
00041     { return _nextlay[layer->layNum()]; } 
00042     const MdcLayer* prevLayer(const MdcLayer* layer) const
00043     { return _prevlay[layer->layNum()]; } 
00044 
00045     const MdcSuperLayer * SuperLayer(unsigned id) const { return _slayList[id];}
00046     const MdcSuperLayer* firstSlay(void) const             {return _firstSlay;}
00047     const MdcSuperLayer* lastSlay(void) const               {return _lastSlay;}
00048     const MdcSuperLayer* firstSlayInView(int iview) const
00049     {return _firstSlayInView[iview+1];}
00050     const MdcSuperLayer* lastSlayInView(int iview) const
00051     {return _lastSlayInView[iview+1];}
00052 
00053     int nSuper()              const { return _nSlay; }
00054     int nLayer()              const { return _nLayer;}
00055     int nAxialSuper(void) const {return _nAxSlay;}
00056     int nStereoSuper(int iview) const 
00057     { return iview == 0 ? 0 : _nSterSlay[(iview+1)/2]; }
00058 
00059     void Dump();
00060 
00061 
00062   private:
00063     static MdcDetector * _myself;
00064     static bool _doSag;
00065     void buildpointers(void);           // make the Layer & sLayer pointers
00066     void buildSuperLayers(void);        // build super-layers
00067 
00068     MdcSWire** _senseWire;              // pointer to all the sense wires
00069     MdcLayer** _dclayer;                // 40 layers for chamber                                       
00070     int    _wires_in_layer[43];         // # of wires per layer
00071     const MdcLayer* _nextlay[43];       // pointer to next layer
00072     const MdcLayer* _nextlayinvw[43];   // pointer to next layer in same view
00073     const MdcLayer* _prevlay[43];       // pointer to previous layer in view
00074     const MdcLayer* _prevlayinvw[43];   // pointer to previous layer in same view
00075     MdcSuperLayer** _slayList;          // array of pointers to slayers
00076     const MdcSuperLayer* _firstSlayInView[3];
00077     const MdcSuperLayer* _lastSlayInView[3];
00078     const MdcSuperLayer* _firstSlay;
00079     const MdcSuperLayer* _lastSlay;
00080 
00081     // description
00082     int  _version;
00083     bool _debug;
00084     int  _firstLayer;
00085     int  _nSWire;       // total number of sense wires             
00086     int  _nLayer;       // total number of layers 
00087     int  _firstSlayNum;
00088     int  _lastSlayNum;
00089     int  _nSlay;         // number of super layers
00090     int  _nAxSlay;       // number of axial super layers
00091     int  _nSterSlay[2];  // number of stero super layers(U V)
00092 };
00093 
00094 #endif /* MDCDETECTOR_H */
00095 
00096 

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