/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/MdcGeomSvc/MdcGeomSvc-00-01-37/MdcGeomSvc/MdcGeomSvc.h

Go to the documentation of this file.
00001 // header file for a class called "MdcGeomSvc"
00002 #ifndef MDCGEOMSVC_H
00003 #define MDCGEOMSVC_H
00004 
00005 #include <CLHEP/Units/PhysicalConstants.h>  
00006 #include <CLHEP/Geometry/Point3D.h> 
00007 #include <vector>
00008 #include <iostream>
00009 #include "GaudiKernel/Algorithm.h"
00010 
00011 #include "MdcGeomSvc/MdcGeoWire.h"
00012 #include "MdcGeomSvc/MdcGeoLayer.h"
00013 #include "MdcGeomSvc/MdcGeoGeneral.h"
00014 #include "MdcGeomSvc/MdcGeoSuper.h"
00015 #include "MdcGeomSvc/MdcGeoMisc.h"
00016 #include "MdcGeomSvc/MdcGeoEnd.h"  
00017 #include "GaudiKernel/IIncidentListener.h"
00018 #include "GaudiKernel/Service.h"
00019 #include "GaudiKernel/IInterface.h"
00020 #include "MdcGeomSvc/IMdcGeomSvc.h"
00021 #include "GaudiKernel/IDataProviderSvc.h"
00022 #include "GaudiKernel/IIncidentListener.h"
00023 
00024 //class MdcGeomSvc : public Service, virtual public IMdcGeomSvc,virtual public IIncidentListener
00025 class MdcGeomSvc : public Service, virtual public IMdcGeomSvc, virtual public IIncidentListener
00026 {
00027  public:
00028    // Constructors and destructors
00029    MdcGeomSvc( const std::string& name, ISvcLocator* svcloc );
00030    ~MdcGeomSvc();
00031 
00032    virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
00033    virtual StatusCode initialize ( );
00034    virtual StatusCode finalize ( );
00035          void handle(const Incident& inc);
00036 
00037    // Access by others
00038    const MdcGeoWire * const Wire(unsigned id);
00039    const MdcGeoWire * const Wire(unsigned lyrid,unsigned wirid);  
00040    const MdcGeoLayer * const Layer(unsigned id);
00041    const MdcGeoSuper * const SuperLayer(unsigned id);
00042    const MdcGeoGeneral * const GeneralLayer(unsigned id);
00043    const MdcGeoMisc * const Misc(void);    
00044    const MdcGeoEnd * const End(unsigned id);    
00045    const int getWireSize();
00046    const int getLayerSize();
00047    const int getSuperLayerSize();
00048    const int getGeneralLayerSize(); 
00049    const int getSegmentNo();    
00050    void Dump();
00051    static bool getSagFlag(void); 
00052 
00053  public:
00054    static bool m_doSag;
00055    static bool m_readAlignParDataBase;
00056    static bool m_nomcalignment;
00057    
00058  // private method
00059  private:
00060    void clean();  // clean the fWires,fGenerals,fLayers,fSupers,,fEnd,etc... 
00061    void ReadFilePar();        //get geometry data from file SimUtil/dat/Mdc.txt
00062          void ReadTensionDataBase(std::vector<double> & wireTensionVec);
00063          void ReadWirePosDataBase(std::vector<vector<double> > & wirePosVec);
00064          void ReadAliParDataBase(vector<double>& Sx, vector<double>& Sy, vector<double>& Sz,
00065                                          vector<double>& Rx, vector<double>& Ry, vector<double>& Rz);
00066    void Fill();  //get geometry data from Database
00067    const int getAlignParIndexEast(int lyr) const;
00068    const int getAlignParIndexWest(int lyr) const;
00069  
00070 
00071    
00072  // private data members
00073  private:
00074    double m_wholeShiftX; 
00075    double m_wholeShiftY;
00076    double m_wholeShiftZ;
00077    double m_wholeRotatX;
00078    double m_wholeRotatY;
00079    double m_wholeRotatZ; 
00080    int    m_mindex;
00081    std::string m_alignFilePath;
00082    std::string m_wirePosFilePath;
00083    std::string m_wireTensionFilePath;
00084    bool m_updataalign;
00085    
00086    vector <MdcGeoWire*> fWires;  //wire list (6860)
00087    vector <MdcGeoGeneral> fGenerals; //general layer list (90)
00088    vector <MdcGeoLayer*> fLayers;        //sense wire layer list (43)
00089    vector <MdcGeoSuper*> fSupers;        //super layer list (11)
00090    MdcGeoMisc fMisc;                     // parms. of MDC misc
00091    vector <MdcGeoEnd*> fEnd;       // tube and endplate list (67)
00092    IDataProviderSvc* m_pCalibDataSvc;
00093 
00094 };
00095 
00096 
00097 #endif 
00098 
00099 

Generated on Tue Nov 29 23:12:53 2016 for BOSS_7.0.2 by  doxygen 1.4.7