CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
bak_MdcGeomSvc-00-01-39/MdcGeomSvc/MdcGeomSvc.h
Go to the documentation of this file.
1// header file for a class called "MdcGeomSvc"
2#ifndef MDCGEOMSVC_H
3#define MDCGEOMSVC_H
4
5#include <CLHEP/Units/PhysicalConstants.h>
6#include <CLHEP/Geometry/Point3D.h>
7#include <vector>
8#include <iostream>
9#include "GaudiKernel/Algorithm.h"
10
11#include "MdcGeomSvc/MdcGeoWire.h"
12#include "MdcGeomSvc/MdcGeoLayer.h"
13#include "MdcGeomSvc/MdcGeoGeneral.h"
14#include "MdcGeomSvc/MdcGeoSuper.h"
15#include "MdcGeomSvc/MdcGeoMisc.h"
16#include "MdcGeomSvc/MdcGeoEnd.h"
17#include "GaudiKernel/IIncidentListener.h"
18#include "GaudiKernel/Service.h"
19#include "GaudiKernel/IInterface.h"
20#include "MdcGeomSvc/IMdcGeomSvc.h"
21#include "GaudiKernel/IDataProviderSvc.h"
22#include "GaudiKernel/IIncidentListener.h"
23
24//class MdcGeomSvc : public Service, virtual public IMdcGeomSvc,virtual public IIncidentListener
25class MdcGeomSvc : public Service, virtual public IMdcGeomSvc, virtual public IIncidentListener
26{
27 public:
28 // Constructors and destructors
29 MdcGeomSvc( const std::string& name, ISvcLocator* svcloc );
31
32 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
33 virtual StatusCode initialize ( );
34 virtual StatusCode finalize ( );
35 void handle(const Incident& inc);
36
37 // Access by others
38 const MdcGeoWire * const Wire(unsigned id);
39 const MdcGeoWire * const Wire(unsigned lyrid,unsigned wirid);
40 const MdcGeoLayer * const Layer(unsigned id);
41 const MdcGeoSuper * const SuperLayer(unsigned id);
42 const MdcGeoGeneral * const GeneralLayer(unsigned id);
43 const MdcGeoMisc * const Misc(void);
44 const MdcGeoEnd * const End(unsigned id);
45 const int getWireSize();
46 const int getLayerSize();
47 const int getSuperLayerSize();
48 const int getGeneralLayerSize();
49 const int getSegmentNo();
50 void Dump();
51 static bool getSagFlag(void);
52
53 public:
54 static bool m_doSag;
56 static bool m_nomcalignment;
57
58 // private method
59 private:
60 void clean(); // clean the fWires,fGenerals,fLayers,fSupers,,fEnd,etc...
61 void ReadFilePar(); //get geometry data from file SimUtil/dat/Mdc.txt
62 void ReadTensionDataBase(std::vector<double> & wireTensionVec);
63 void ReadWirePosDataBase(std::vector<vector<double> > & wirePosVec);
64 void ReadAliParDataBase(vector<double>& Sx, vector<double>& Sy, vector<double>& Sz,
65 vector<double>& Rx, vector<double>& Ry, vector<double>& Rz);
66 void Fill(); //get geometry data from Database
67 const int getAlignParIndexEast(int lyr) const;
68 const int getAlignParIndexWest(int lyr) const;
69
70
71
72 // private data members
73 private:
74 double m_wholeShiftX;
75 double m_wholeShiftY;
76 double m_wholeShiftZ;
77 double m_wholeRotatX;
78 double m_wholeRotatY;
79 double m_wholeRotatZ;
80 int m_mindex;
81 std::string m_alignFilePath;
82 std::string m_wirePosFilePath;
83 std::string m_wireTensionFilePath;
84 bool m_updataalign;
85 bool m_useCgem;
86
87 vector <MdcGeoWire*> fWires; //wire list (6860)
88 vector <MdcGeoGeneral> fGenerals; //general layer list (90)
89 vector <MdcGeoLayer*> fLayers; //sense wire layer list (43)
90 vector <MdcGeoSuper*> fSupers; //super layer list (11)
91 MdcGeoMisc fMisc; // parms. of MDC misc
92 vector <MdcGeoEnd*> fEnd; // tube and endplate list (67)
93 IDataProviderSvc* m_pCalibDataSvc;
94
95};
96
97
98#endif
99
100
MdcGeomSvc(const std::string &name, ISvcLocator *svcloc)
const MdcGeoSuper *const SuperLayer(unsigned id)
const MdcGeoWire *const Wire(unsigned id)
const MdcGeoGeneral *const GeneralLayer(unsigned id)
void handle(const Incident &inc)
this handle function is prepared for special use
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
const MdcGeoEnd *const End(unsigned id)
const MdcGeoLayer *const Layer(unsigned id)
const MdcGeoMisc *const Misc(void)