00001 #include <iostream> 00002 #include "MdcGeomSvc/MdcGeomSvc.h" 00003 #include "MdcGeom/MdcSagTraj.h" 00004 #include "CLHEP/Geometry/Point3D.h" 00005 #include "MdcGeom/MdcSWire.h" 00006 #include "MdcGeom/MdcDetector.h" 00007 using namespace std; 00008 00009 int main(){ 00010 /* const std::string& name = " "; 00011 ISvcLocator* svcloc = NULL ; 00012 MdcGeomSvc fGeom(name, svcloc); 00013 fGeom.initialize(); 00014 cout <<"dump"<<endl; 00015 fGeom.Dump(); 00016 cout<<"Hi, event routine is running"<<endl; 00017 cout<<"1st wire id:"<<fGeom.Wire(0)->Id()<<endl; 00018 cout<<"2nd wire lyr id:"<<fGeom.Wire(1)->Lyr()->Id()<<endl; 00019 cout<<"6860th wire lyr id:"<<fGeom.Wire(6859)->Lyr()->Id()<<endl; 00020 fGeom.finalize(); 00021 */ 00022 MdcDetector det(); 00023 // HepPoint3D p1(78.906,6.21,393.); 00024 // HepPoint3D p2(76.9631,-18.4772,-393.); 00025 // HepPoint3D p2(76.906,6.21,-393.); 00026 HepPoint3D p1(0.0,0.0,393.); 00027 HepPoint3D p2(0.0,0.0,-393.); 00028 MdcSWire wire(p1,p2,0.5); 00029 const MdcSagTraj *trr = wire.getTraj(); 00030 MdcSagTraj tr(0.5,p1,p2); 00031 cout << tr.sag()<<endl; 00032 cout << tr.rawDirection() <<endl; 00033 cout << tr.position(300.0) <<endl; 00034 cout << trr->sag()<<endl; 00035 cout << trr->rawDirection() <<endl; 00036 cout << trr->position(300.0) <<endl; 00037 00038 } 00039