BOSS 8.0.0
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 "GaudiKernel/Algorithm.h"
6#include "GaudiKernel/IDataProviderSvc.h"
7#include "GaudiKernel/IIncidentListener.h"
8#include "GaudiKernel/IInterface.h"
9#include "GaudiKernel/Service.h"
10#include "MdcGeomSvc/IMdcGeomSvc.h"
11#include <CLHEP/Geometry/Point3D.h>
12#include <CLHEP/Units/PhysicalConstants.h>
13#include <iostream>
14#include <vector>
15
16#include "MdcGeomSvc/MdcGeoEnd.h"
17#include "MdcGeomSvc/MdcGeoGeneral.h"
18#include "MdcGeomSvc/MdcGeoLayer.h"
19#include "MdcGeomSvc/MdcGeoMisc.h"
20#include "MdcGeomSvc/MdcGeoSuper.h"
21#include "MdcGeomSvc/MdcGeoWire.h"
22
23// class MdcGeomSvc : public Service, virtual public IMdcGeomSvc,virtual public
24// IIncidentListener
25class MdcGeomSvc : public extends<Service, IMdcGeomSvc>, virtual public IIncidentListener {
26public:
27 // Constructors and destructors
28 MdcGeomSvc( const std::string& name, ISvcLocator* svcloc );
30
31 // virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
32 virtual StatusCode initialize();
33 virtual StatusCode finalize();
34 void handle( const Incident& inc );
35
36 // Access by others
37 const MdcGeoWire* const Wire( unsigned id );
38 const MdcGeoWire* const Wire( unsigned lyrid, unsigned wirid );
39 const MdcGeoLayer* const Layer( unsigned id );
40 const MdcGeoSuper* const SuperLayer( unsigned id );
41 const MdcGeoGeneral* const GeneralLayer( unsigned id );
42 const MdcGeoMisc* const Misc( void );
43 const MdcGeoEnd* const End( unsigned id );
44 const int getWireSize();
45 const int getLayerSize();
46 const int getSuperLayerSize();
47 const int getGeneralLayerSize();
48 const int getSegmentNo();
49 void Dump();
50 // static bool getSagFlag(void); // modified by mrli
51 virtual bool getSagFlag( void );
52
53public:
54 static bool m_doSag;
56 static bool m_nomcalignment;
57
58 // private method
59private:
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 // private data members
71private:
72 double m_wholeShiftX;
73 double m_wholeShiftY;
74 double m_wholeShiftZ;
75 double m_wholeRotatX;
76 double m_wholeRotatY;
77 double m_wholeRotatZ;
78 int m_mindex;
79 std::string m_alignFilePath;
80 std::string m_wirePosFilePath;
81 std::string m_wireTensionFilePath;
82 bool m_updataalign;
83
84 vector<MdcGeoWire*> fWires; // wire list (6860)
85 vector<MdcGeoGeneral> fGenerals; // general layer list (90)
86 vector<MdcGeoLayer*> fLayers; // sense wire layer list (43)
87 vector<MdcGeoSuper*> fSupers; // super layer list (11)
88 MdcGeoMisc fMisc; // parms. of MDC misc
89 vector<MdcGeoEnd*> fEnd; // tube and endplate list (67)
90 IDataProviderSvc* m_pCalibDataSvc;
91};
92
93#endif
static bool m_readAlignParDataBase
Definition MdcGeomSvc.h:55
MdcGeomSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode initialize()
virtual 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