1#include "GaudiKernel/Algorithm.h"
2#include "GaudiKernel/Bootstrap.h"
3#include "GaudiKernel/IDataProviderSvc.h"
4#include "GaudiKernel/IIncidentListener.h"
5#include "GaudiKernel/IIncidentSvc.h"
6#include "GaudiKernel/IInterface.h"
7#include "GaudiKernel/ISvcLocator.h"
8#include "GaudiKernel/Incident.h"
9#include "GaudiKernel/Kernel.h"
10#include "GaudiKernel/MsgStream.h"
11#include "GaudiKernel/PropertyMgr.h"
12#include "GaudiKernel/SmartDataPtr.h"
13#include "GaudiKernel/StatusCode.h"
17#include "CalibData/CalibModel.h"
18#include "CalibData/Mdc/MdcAlignData.h"
19#include "EventModel/Event.h"
20#include "EventModel/EventHeader.h"
32 : base_class( name, svcloc ) {
33 if ( getenv(
"MDCGEOMSVCROOT" ) )
36 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/MdcAlignPar.dat" );
40 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/WirePosCalib.dat" );
43 m_wireTensionFilePath =
44 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/mdcWireTension.dat" );
47 else { std::cout <<
"A fatal error, contact wangjk..." << std::endl; }
49 declareProperty(
"doSag",
m_doSag =
true );
52 declareProperty(
"wholeShiftX", m_wholeShiftX = 0. );
53 declareProperty(
"wholeShiftY", m_wholeShiftY = 0. );
54 declareProperty(
"wholeShiftZ", m_wholeShiftZ = 0. );
55 declareProperty(
"wholeRotatX", m_wholeRotatX = 0. );
56 declareProperty(
"wholeRotatY", m_wholeRotatY = 0. );
57 declareProperty(
"wholeRotatZ", m_wholeRotatZ = 0. );
58 declareProperty(
"alignFilePath", m_alignFilePath );
59 declareProperty(
"wirePosFilePath", m_wirePosFilePath );
60 declareProperty(
"wireTensionFilePath", m_wireTensionFilePath );
74 MsgStream log(
msgSvc(), name() );
75 log << MSG::INFO << name() <<
": Start of run initialisation" << endmsg;
77 StatusCode sc = Service::initialize();
78 if ( sc.isFailure() )
return sc;
80 m_updataalign =
false;
82 sc = service(
"IncidentSvc", incsvc );
84 if ( sc.isSuccess() ) { incsvc->addListener(
this,
"NewRun", priority ); }
89 sc = service(
"CalibDataSvc", m_pCalibDataSvc,
true );
91 if ( !sc.isSuccess() )
93 log << MSG::ERROR <<
"Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
98 { log << MSG::DEBUG <<
"Retrieved IDataProviderSvc interface of CalibXmlCnvSvc" << endmsg; }
100 return StatusCode::SUCCESS;
104 MsgStream log(
msgSvc(), name() );
105 log << MSG::INFO << name() <<
": End of Run" << endmsg;
106 return StatusCode::SUCCESS;
110 for ( vector<MdcGeoLayer*>::iterator it1 = fLayers.begin(); it1 != fLayers.end(); it1++ )
112 for ( vector<MdcGeoSuper*>::iterator it2 = fSupers.begin(); it2 != fSupers.end(); it2++ )
114 for ( vector<MdcGeoWire*>::iterator it3 = fWires.begin(); it3 != fWires.end(); it3++ )
116 for ( vector<MdcGeoEnd*>::iterator it4 = fEnd.begin(); it4 != fEnd.end(); it4++ )
125void MdcGeomSvc::clean() {
126 for ( vector<MdcGeoLayer*>::iterator it1 = fLayers.begin(); it1 != fLayers.end(); it1++ )
128 for ( vector<MdcGeoSuper*>::iterator it2 = fSupers.begin(); it2 != fSupers.end(); it2++ )
130 for ( vector<MdcGeoWire*>::iterator it3 = fWires.begin(); it3 != fWires.end(); it3++ )
132 for ( vector<MdcGeoEnd*>::iterator it4 = fEnd.begin(); it4 != fEnd.end(); it4++ )
141void MdcGeomSvc::ReadFilePar() {
142 std::string geometryFilePath = getenv(
"MDCSIMROOT" );
143 geometryFilePath +=
"/dat/Mdc.txt";
144 std::ifstream inFile( geometryFilePath.c_str() );
146 if ( !inFile.good() )
148 std::cout <<
"Error, mdc parameters file not exist" << std::endl;
151 std::string alignFilePath;
152 std::string wirePosFilePath;
153 std::string wireTensionFilePath;
154 if ( !m_updataalign )
157 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/MdcAlignPar.dat" );
159 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/WirePosCalib.dat" );
160 wireTensionFilePath =
161 std::string( getenv(
"MDCGEOMSVCROOT" ) ) + std::string(
"/share/mdcWireTension.dat" );
165 alignFilePath = m_alignFilePath;
166 wirePosFilePath = m_wirePosFilePath;
167 wireTensionFilePath = m_wireTensionFilePath;
169 std::ifstream alignFile( alignFilePath.c_str() );
170 std::ifstream wirePosFile( wirePosFilePath.c_str() );
171 std::ifstream wireTensionFile( wireTensionFilePath.c_str() );
174 { std::cout <<
"Error, mdc wire position file not exist..." << std::endl; }
176 if ( !wireTensionFile )
177 { std::cout <<
"Error, mdc wire tension file not exist..." << std::endl; }
179 std::vector<double> wireTensionVec;
185 cout <<
"Read wireTension from file:" << wireTensionFilePath.c_str() << endl;
188 for (
int ii = 0; ii < 6796; ii++ )
190 wireTensionFile >> idd >> tension;
192 if (
getSagFlag() ) { wireTensionVec.push_back( tension ); }
196 wireTensionVec.push_back( tension );
201 std::vector<vector<double>> wirePosVec( 6796 );
205 cout <<
"Read wirePosition from file:" << wirePosFilePath.c_str() << endl;
206 double dxe, dye, dze, dxw, dyw, dzw;
209 getline( wirePosFile,
title );
210 wirePosFile.seekg( 1, ios::cur );
211 for (
int j = 0; j < 6796; j++ )
213 wirePosFile >> wid >> dxe >> dye >> dze >> dxw >> dyw >> dzw;
214 wirePosVec[j].push_back( dxe );
215 wirePosVec[j].push_back( dye );
216 wirePosVec[j].push_back( dze );
217 wirePosVec[j].push_back( dxw );
218 wirePosVec[j].push_back( dyw );
219 wirePosVec[j].push_back( dzw );
231 double signalWireR, fieldWireR;
232 int TLayerNo, TWireNo, TSignalLayerNo, fSignalLayer[50];
233 int i,
wireNo, firstWire, segmentNo, signalLayer;
234 double length, nomphi, phi, r, nomaadiv2, aadiv2, nomaa, aa, nomrotateCell, rotateCell,
235 wlength, innerR, outR, z;
236 std::string layer, name, line;
238 vector<int> WireNo, fSegmentNo;
239 vector<double> wLength,
R, nomPhi,
Phi, nomadiv2, adiv2,
First, noma, a, nomebusing, ebusing,
240 nomsigma, sigma, nomdeltaz, deltaz, nomRotate, Rotate, fLength, fInnerR, fOutR, fZ;
241 vector<string> LayerName, fName;
242 vector<double> Sx, Sy, Sz, Rx, Ry, Rz;
243 double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
248 { ReadAliParDataBase( Sx, Sy, Sz, Rx, Ry, Rz ); }
251 cout <<
"Read alignment parameters from file:" << alignFilePath.c_str() << endl;
252 getline( alignFile, line );
253 alignFile.seekg( 1, ios::cur );
254 for (
int k = 0; k < 16; k++ )
256 alignFile >> line >> tmp1 >> tmp2 >> tmp3 >> tmp4 >> tmp5 >> tmp6;
266 Sx.push_back( m_wholeShiftX + tmp1 );
267 Sy.push_back( m_wholeShiftY + tmp2 );
268 Sz.push_back( m_wholeShiftZ + tmp3 );
269 Rx.push_back( m_wholeRotatX + tmp4 );
270 Ry.push_back( m_wholeRotatY + tmp5 );
271 Rz.push_back( m_wholeRotatZ + tmp6 );
277 getline( inFile, line );
278 inFile >> TLayerNo >> TWireNo >> TSignalLayerNo >> signalWireR >> fieldWireR;
279 inFile.seekg( 1, ios::cur );
280 getline( inFile, line );
281 for ( i = 0; i < TSignalLayerNo; i++ )
283 inFile >> signalLayer;
285 fSignalLayer[i] = signalLayer - 1;
288 inFile.seekg( 1, ios::cur );
289 getline( inFile, line );
290 getline( inFile, line );
293 double delta_rotateCell;
295 for ( i = 0; i < TLayerNo; i++ )
297 i_east = getAlignParIndexEast( i );
298 i_west = getAlignParIndexWest( i );
300 inFile >> layer >>
wireNo >> wlength >> r >> nomphi >> firstWire >> nomrotateCell;
301 getline( inFile, line );
305 nomaadiv2 = 2 *
pi * nomrotateCell /
wireNo;
307 nomaa = 2 * r *
sin( nomaadiv2 );
308 delta_rotateCell = ( Rz[i_west] - Rz[i_east] ) *
wireNo / ( 4 *
pi );
309 rotateCell = nomrotateCell + delta_rotateCell;
310 aadiv2 = 2 *
pi * rotateCell /
wireNo;
311 aa = 2 * r *
sin( aadiv2 );
313 double shiftPhi = twopi /
wireNo;
315 if ( nomphi < 0 ) nomphi += shiftPhi;
318 LayerName.push_back( layer );
319 WireNo.push_back(
wireNo );
320 wLength.push_back( wlength );
322 nomPhi.push_back( nomphi );
323 Phi.push_back( phi );
326 First.push_back( firstWire );
334 nomebusing.push_back( atan( nomaa / wlength ) );
335 ebusing.push_back( atan( aa / wlength ) );
341 nomRotate.push_back( nomrotateCell );
342 Rotate.push_back( rotateCell );
345 getline( inFile, line );
347 inFile.seekg( 1, ios::cur );
348 getline( inFile, line );
349 getline( inFile, line );
351 for ( i = 0; i < segmentNo; i++ )
353 inFile >> length >> innerR >> outR >> z >> name;
354 getline( inFile, line );
355 fLength.push_back( length );
356 fInnerR.push_back( innerR );
357 fOutR.push_back( outR );
359 fName.push_back( name );
371 double a1, a2, a3, nomphi0, phi0, cellphi;
372 double noma1, noma2, noma3;
373 for ( i = 0; i < TLayerNo; i++ )
375 i_east = getAlignParIndexEast( i );
376 i_west = getAlignParIndexWest( i );
381 hlh.
NCell( WireNo[i] / 2 );
388 hlh.
First( (
int)First[i] );
389 HepPoint3D offF( Sx[i_west], Sy[i_west], Sz[i_west] );
390 HepPoint3D offB( Sx[i_east], Sy[i_east], Sz[i_east] );
397 hlh.
Shift( Rotate[i] );
412 fGenerals.push_back( hlh );
416 for ( i = 0; i < TSignalLayerNo; i++ )
419 MdcGeoLayer* lh =
new MdcGeoLayer();
421 int lyr = fSignalLayer[i];
424 i_east = getAlignParIndexEast( lyr );
425 i_west = getAlignParIndexWest( lyr );
429 suph =
new MdcGeoSuper();
430 suph->
LowerR( R[lyr - 1] );
431 if ( i == 40 ) { suph->
UpperR( R[lyr + 5] ); }
432 else { suph->
UpperR( R[lyr + 7] ); }
435 case 0: suph->
Type( -1 );
break;
436 case 1: suph->
Type( 1 );
break;
437 case 2: suph->
Type( 0 );
break;
438 case 3: suph->
Type( 0 );
break;
439 case 4: suph->
Type( 0 );
break;
440 case 5: suph->
Type( -1 );
break;
441 case 6: suph->
Type( 1 );
break;
442 case 7: suph->
Type( -1 );
break;
443 case 8: suph->
Type( 1 );
break;
444 case 9: suph->
Type( 0 );
break;
445 case 10: suph->
Type( 0 );
break;
449 fSupers.push_back( suph );
452 cellphi = 2 * twopi / WireNo[lyr];
454 phi0 =
Phi[lyr] +
abs( First[lyr] - 1 ) * ( cellphi / 2 );
455 nomphi0 = nomPhi[lyr] +
abs( First[lyr] - 1 ) * ( cellphi / 2 );
458 for (
int wk = 0; wk < i; wk++ )
460 int lyrwk = fSignalLayer[wk];
461 wircount = wircount + WireNo[lyrwk] / 2;
465 lh->
Wirst( wircount );
466 lh->
Slant( ebusing[lyr] );
469 lh->
Length( wLength[lyr] );
470 lh->
RCSiz1( R[lyr] - R[lyr - 1] );
471 lh->
RCSiz2( R[lyr + 1] - R[lyr] );
472 lh->
PCSiz( R[lyr] * cellphi );
473 lh->
NCell( WireNo[lyr] / 2 );
475 lh->
Shift( Rotate[lyr] );
479 vector<MdcGeoSuper*>::iterator it1 = fSupers.end() - 1;
481 fLayers.push_back( lh );
483 if ( i < 8 ) { geo = i * 2 + 1; }
484 else if ( i < 20 ) { geo = i * 2 + 2; }
485 else if ( i < 36 ) { geo = i * 2 + 3; }
486 else { geo = i * 2 + 4; }
489 for (
int j = 0; j < WireNo[lyr] / 2; j++ )
492 MdcGeoWire* wh =
new MdcGeoWire();
493 const int wireId = wircount + j;
497 noma1 =
R[lyr] *
cos( nomphi0 + j * cellphi );
498 noma2 =
R[lyr] *
sin( nomphi0 + j * cellphi );
499 noma3 = wLength[lyr] / 2;
502 double sin_Ab =
sin( Rx[i_east] );
503 double cos_Ab =
cos( Rx[i_east] );
504 double sin_Bb =
sin( Ry[i_east] );
505 double cos_Bb =
cos( Ry[i_east] );
506 double sin_Rb =
sin( Rz[i_east] );
507 double cos_Rb =
cos( Rz[i_east] );
508 a1 = noma1 * cos_Rb * cos_Bb + noma2 * ( cos_Rb * sin_Bb * sin_Ab - sin_Rb * cos_Ab ) +
509 noma3 * ( cos_Rb * sin_Bb * cos_Ab + sin_Rb * sin_Ab );
510 a2 = noma1 * sin_Rb * cos_Bb + noma2 * ( sin_Rb * sin_Bb * sin_Ab + cos_Rb * cos_Ab ) +
511 noma3 * ( sin_Rb * sin_Bb * cos_Ab - cos_Rb * sin_Ab );
512 a3 = noma1 * ( -sin_Bb ) + noma2 * cos_Bb * sin_Ab + noma3 * cos_Bb * cos_Ab;
514 double xbnew = a1 + Sx[i_east] + wirePosVec[wireId][0];
515 double ybnew = a2 + Sy[i_east] + wirePosVec[wireId][1];
516 double zbnew = a3 + Sz[i_east] + wirePosVec[wireId][2];
521 HepPoint3D wireposb( wirePosVec[wireId][0], wirePosVec[wireId][1],
522 wirePosVec[wireId][2] );
528 noma1 =
R[lyr] *
cos( nomphi0 + ( j + lh->
nomShift() ) * cellphi );
529 noma2 =
R[lyr] *
sin( nomphi0 + ( j + lh->
nomShift() ) * cellphi );
530 noma3 = -wLength[lyr] / 2;
532 double sin_Af =
sin( Rx[i_west] );
533 double cos_Af =
cos( Rx[i_west] );
534 double sin_Bf =
sin( Ry[i_west] );
535 double cos_Bf =
cos( Ry[i_west] );
536 double sin_Rf =
sin( Rz[i_west] );
537 double cos_Rf =
cos( Rz[i_west] );
538 a1 = noma1 * cos_Rf * cos_Bf + noma2 * ( cos_Rf * sin_Bf * sin_Af - sin_Rf * cos_Af ) +
539 noma3 * ( cos_Rf * sin_Bf * cos_Af + sin_Rf * sin_Af );
540 a2 = noma1 * sin_Rf * cos_Bf + noma2 * ( sin_Rf * sin_Bf * sin_Af + cos_Rf * cos_Af ) +
541 noma3 * ( sin_Rf * sin_Bf * cos_Af - cos_Rf * sin_Af );
542 a3 = noma1 * ( -sin_Bf ) + noma2 * cos_Bf * sin_Af + noma3 * cos_Bf * cos_Af;
544 double xfnew = a1 + Sx[i_west] + wirePosVec[wireId][3];
545 double yfnew = a2 + Sy[i_west] + wirePosVec[wireId][4];
546 double zfnew = a3 + Sz[i_west] + wirePosVec[wireId][5];
551 HepPoint3D wireposf( wirePosVec[wireId][3], wirePosVec[wireId][4],
552 wirePosVec[wireId][5] );
560 wh->
Slant( ebusing[lyr] );
564 wh->
Tension( wireTensionVec[wireId] );
571 vector<MdcGeoLayer*>::iterator it2 = fLayers.end() - 1;
573 fWires.push_back( wh );
577 fMisc.OuterR( fOutR[1] );
578 fMisc.InnerR( fInnerR[2] );
579 fMisc.OuterTk( fOutR[1] - fInnerR[1] );
580 fMisc.InnerTk( fOutR[2] - fInnerR[2] );
581 fMisc.NSWire( fWires.size() );
582 fMisc.NFWire( TWireNo - fWires.size() );
584 fMisc.LayerNo( TLayerNo );
585 fMisc.WireNo( TWireNo );
586 fMisc.SLayerNo( TSignalLayerNo );
587 fMisc.SWireR( signalWireR );
588 fMisc.FWireR( fieldWireR );
590 for ( i = 0; i < segmentNo; i++ )
592 MdcGeoEnd* end =
new MdcGeoEnd();
594 end->
Length( fLength[i] );
595 end->
InnerR( fInnerR[i] );
596 end->
OutR( fOutR[i] );
598 end->
Name( fName[i] );
599 fEnd.push_back( end );
603void MdcGeomSvc::ReadTensionDataBase( std::vector<double>& wireTensionVec ) {
604 std::string fullPath =
"/Calib/MdcAlign";
605 MsgStream log(
msgSvc(), name() );
606 log << MSG::INFO <<
"ReadTensionDataBase() wireTensionPath = " << fullPath << endmsg;
607 cout <<
"Read wireTension from Calibration Database!" << endl;
609 SmartDataPtr<CalibData::MdcAlignData> tension( m_pCalibDataSvc, fullPath );
612 log << MSG::ERROR <<
"can not get MdcAlignConst via SmartPtr" << endmsg;
615 for (
int i = 0; i < 6796; i++ )
617 double tens = tension->gettension( i );
618 wireTensionVec.push_back( tens );
621void MdcGeomSvc::ReadWirePosDataBase( std::vector<vector<double>>& wirePosVec ) {
622 std::string fullPath =
"/Calib/MdcAlign";
623 MsgStream log(
msgSvc(), name() );
624 log << MSG::INFO <<
"ReadWirePosDataBase() wirePositionPath = " << fullPath << endmsg;
626 cout <<
"Read wirePosition from Calibration Database!" << endl;
627 SmartDataPtr<CalibData::MdcAlignData> wirepos( m_pCalibDataSvc, fullPath );
630 log << MSG::ERROR <<
"can not get MdcAlignConst via SmartPtr" << endmsg;
633 double dxe, dye, dze, dxw, dyw, dzw;
634 for (
int j = 0; j < 6796; j++ )
637 dxe = wirepos->getdxWireEast( j );
638 dye = wirepos->getdyWireEast( j );
639 dze = wirepos->getdzWireEast( j );
640 dxw = wirepos->getdxWireWest( j );
641 dyw = wirepos->getdyWireWest( j );
642 dzw = wirepos->getdzWireWest( j );
644 wirePosVec[j].push_back( dxe );
645 wirePosVec[j].push_back( dye );
646 wirePosVec[j].push_back( dze );
647 wirePosVec[j].push_back( dxw );
648 wirePosVec[j].push_back( dyw );
649 wirePosVec[j].push_back( dzw );
652void MdcGeomSvc::ReadAliParDataBase( vector<double>& Sx, vector<double>& Sy,
653 vector<double>& Sz, vector<double>& Rx,
654 vector<double>& Ry, vector<double>& Rz ) {
655 MsgStream log(
msgSvc(), name() );
656 std::string fullPath =
"/Calib/MdcAlign";
657 log << MSG::INFO <<
"ReadAliParDataBase() alignParPath = " << fullPath << endmsg;
658 cout <<
"Read alignment parameters from Calibration Database!" << endl;
660 SmartDataPtr<CalibData::MdcAlignData> alignpar( m_pCalibDataSvc, fullPath );
663 log << MSG::ERROR <<
"can not get MdcAlignConst via SmartPtr" << endmsg;
666 double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
667 for (
int k = 0; k < 16; k++ )
669 tmp1 = alignpar->getdxEP( k );
670 tmp2 = alignpar->getdyEP( k );
671 tmp3 = alignpar->getdzEP( k );
672 tmp4 = alignpar->getrxEP( k );
673 tmp5 = alignpar->getryEP( k );
674 tmp6 = alignpar->getrzEP( k );
676 Sx.push_back( m_wholeShiftX + tmp1 );
677 Sy.push_back( m_wholeShiftY + tmp2 );
678 Sz.push_back( m_wholeShiftZ + tmp3 );
679 Rx.push_back( m_wholeRotatX + tmp4 );
680 Ry.push_back( m_wholeRotatY + tmp5 );
681 Rz.push_back( m_wholeRotatZ + tmp6 );
696const int MdcGeomSvc::getAlignParIndexEast(
int lyr )
const {
698 if ( ( lyr >= 0 ) && ( lyr <= 16 ) )
return 0;
700 else if ( ( lyr >= 17 ) && ( lyr <= 20 ) )
return 1;
702 else if ( ( lyr >= 21 ) && ( lyr <= 24 ) )
return 2;
704 else if ( ( lyr >= 25 ) && ( lyr <= 28 ) )
return 3;
706 else if ( ( lyr >= 29 ) && ( lyr <= 32 ) )
return 4;
708 else if ( ( lyr >= 33 ) && ( lyr <= 36 ) )
return 5;
710 else if ( ( lyr >= 37 ) && ( lyr <= 41 ) )
return 6;
712 else if ( lyr >= 42 )
return 7;
713 else std::cout <<
" Hi, ERROR OCCUR !!!" << std::endl;
717const int MdcGeomSvc::getAlignParIndexWest(
int lyr )
const {
719 if ( ( lyr >= 0 ) && ( lyr <= 16 ) )
return 8;
721 else if ( ( lyr >= 17 ) && ( lyr <= 20 ) )
return 9;
723 else if ( ( lyr >= 21 ) && ( lyr <= 24 ) )
return 10;
725 else if ( ( lyr >= 25 ) && ( lyr <= 28 ) )
return 11;
727 else if ( ( lyr >= 29 ) && ( lyr <= 32 ) )
return 12;
729 else if ( ( lyr >= 33 ) && ( lyr <= 36 ) )
return 13;
731 else if ( ( lyr >= 37 ) && ( lyr <= 41 ) )
return 14;
733 else if ( lyr >= 42 )
return 15;
734 else std::cout <<
" Hi, ERROR OCCUR !!!" << std::endl;
740 MsgStream log(
msgSvc(), name() );
741 log << MSG::DEBUG <<
"handle: " << inc.type() << endmsg;
742 IDataProviderSvc* m_eventSvc;
743 Gaudi::svcLocator()->service(
"EventDataSvc", m_eventSvc,
true );
744 SmartDataPtr<Event::EventHeader> eventHeader( m_eventSvc,
"/Event/EventHeader" );
745 if ( !eventHeader ) { log << MSG::FATAL <<
"Could not find Event Header" << endmsg; }
746 if ( m_updataalign )
return;
747 if ( inc.type() ==
"NewRun" )
749 log << MSG::DEBUG <<
"Begin Event" << endmsg;
751 m_updataalign =
true;
754 int RunNo = eventHeader->runNumber();
758 cout <<
"m__RunNo=" << RunNo <<
"m_mindex=" << m_mindex << endl;
766 if (
id < fWires.size() )
return fWires[id];
772 if ( ( lyrid < fLayers.size() ) && ( (
int)wirid <
Layer( lyrid )->NCell() ) )
773 return fWires[
Layer( lyrid )->
Wirst() + wirid];
779 if (
id < fLayers.size() )
return fLayers[id];
785 if (
id < fSupers.size() )
return fSupers[id];
791 if (
id < fGenerals.size() )
return &fGenerals[id];
799 if (
id < fEnd.size() )
return fEnd[id];
DECLARE_COMPONENT(BesBdkRc)
double Phi(RecMdcKalTrack *trk)
HepGeom::Point3D< double > HepPoint3D
double sin(const BesAngle a)
double cos(const BesAngle a)
double Length(void) const
double InnerR(void) const
double Length(void) const
double nomShift(void) const
double TwistB(void) const
double SzWest(void) const
HepPoint3D OffB(void) const
double nomPhi(void) const
double RxEast(void) const
double SxEast(void) const
double TwistF(void) const
double Offset(void) const
double SyWest(void) const
double SxWest(void) const
string LayerName(void) const
double RxWest(void) const
double nomOffset(void) const
double RyWest(void) const
HepPoint3D OffF(void) const
double SzEast(void) const
double RzWest(void) const
double RzEast(void) const
double SyEast(void) const
double RyEast(void) const
double Radius(void) const
double Radius(void) const
double RCSiz2(void) const
double Length(void) const
MdcGeoSuper * Sup(void) const
double nomShift(void) const
double nomSlant(void) const
double RCSiz1(void) const
double Offset(void) const
double nomOffset(void) const
double LowerR(void) const
double UpperR(void) const
HepPoint3D FWirePos(void) const
HepPoint3D BWirePos(void) const
MdcGeoLayer * Lyr(void) const
HepPoint3D nomForward(void) const
HepPoint3D Forward(void) const
HepPoint3D nomBackward(void) const
HepPoint3D Backward(void) const
double Tension(void) const
double nomSlant(void) const
static bool m_readAlignParDataBase
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)
const int getGeneralLayerSize()
const MdcGeoMisc *const Misc(void)
static bool m_nomcalignment
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)