BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
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
16#include "MdcGeomSvc/MdcGeoEnd.h"
17#include "GaudiKernel/IIncidentListener.h"
18#include "GaudiKernel/Service.h"
19#include "GaudiKernel/IInterface.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 extends<Service, 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
86 vector <MdcGeoWire*> fWires; //wire list (6860)
87 vector <MdcGeoGeneral> fGenerals; //general layer list (90)
88 vector <MdcGeoLayer*> fLayers; //sense wire layer list (43)
89 vector <MdcGeoSuper*> fSupers; //super layer list (11)
90 MdcGeoMisc fMisc; // parms. of MDC misc
91 vector <MdcGeoEnd*> fEnd; // tube and endplate list (67)
92 IDataProviderSvc* m_pCalibDataSvc;
93
94};
95
96
97#endif
98
99
static bool m_readAlignParDataBase
Definition MdcGeomSvc.h:55
MdcGeomSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode initialize()
static bool getSagFlag(void)
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
const int getSuperLayerSize()
virtual StatusCode finalize()
const MdcGeoEnd *const End(unsigned id)
const MdcGeoLayer *const Layer(unsigned id)
static bool m_doSag
Definition MdcGeomSvc.h:54
const int getSegmentNo()
const int getWireSize()
const int getGeneralLayerSize()
const int getLayerSize()
const MdcGeoMisc *const Misc(void)
static bool m_nomcalignment
Definition MdcGeomSvc.h:56