2#include "GaudiKernel/Kernel.h"
3#include "GaudiKernel/IInterface.h"
4#include "GaudiKernel/StatusCode.h"
5#include "GaudiKernel/SvcFactory.h"
6#include "GaudiKernel/MsgStream.h"
8#include "GaudiKernel/IIncidentSvc.h"
9#include "GaudiKernel/Incident.h"
10#include "GaudiKernel/IIncidentListener.h"
12#include "GaudiKernel/ISvcLocator.h"
13#include "GaudiKernel/Bootstrap.h"
15#include "GaudiKernel/IDataProviderSvc.h"
16#include "GaudiKernel/SmartDataPtr.h"
17#include "GaudiKernel/DataSvc.h"
23#include "GaudiKernel/SmartDataPtr.h"
36typedef map<int, double>::value_type
valType;
39 Service (name, svcloc), m_layInfSig(-1) {
42 declareProperty(
"CheckConst", m_checkConst =
false);
43 declareProperty(
"LayerInfSig", m_layInfSig);
44 declareProperty(
"XtMode", m_xtMode = 1);
45 declareProperty(
"NewXtFile", m_xtfile);
46 declareProperty(
"ReadWireEffDb", m_readWireEffDb =
true);
47 declareProperty(
"WireEffFile", m_wireEffFile);
48 declareProperty(
"LinearXT", m_linearXT =
false);
49 declareProperty(
"FixSigma", m_fixSigma =
false);
50 declareProperty(
"FixSigmaValue", m_fixSigmaValue = 130.0);
51 m_outputXtMode =
true;
58 if( IID_IMdcCalibFunSvc.versionMatch(riid) ){
61 return Service::queryInterface(riid, ppvInterface);
63 return StatusCode::SUCCESS;
67 MsgStream log(messageService(), name());
68 log << MSG::INFO <<
"MdcCalibFunSvc::initialize()" << endreq;
70 StatusCode sc = Service::initialize();
71 if( sc.isFailure() )
return sc;
74 sc = service(
"IncidentSvc", incsvc);
77 incsvc -> addListener(
this,
"NewRun", priority);
80 sc = service(
"CalibDataSvc", m_pCalDataSvc,
true);
81 if( sc == StatusCode::SUCCESS ){
82 log << MSG::INFO <<
"Retrieve IDataProviderSvc" << endreq;
84 log << MSG::FATAL <<
"can not get IDataProviderSvc" << endreq;
87 sc = service(
"MdcGeomSvc", m_pMdcGeomSvc);
88 if( sc != StatusCode::SUCCESS ){
89 log << MSG::ERROR <<
"can not use MdcGeomSvc" << endreq;
90 return StatusCode::FAILURE;
93 if(m_fixSigma) cout <<
"Fix MDC sigma to " << m_fixSigmaValue <<
" micron." << endl;
96 for(
int wir=0; wir<6796; wir++) m_wireEff[wir] = 1.0;
97 for(
int lay=0; lay<NLAYER; lay++){
98 for(
int iEntr=0; iEntr<NXTENTR; iEntr++){
99 for(
int lr=0; lr<2; lr++) m_nR2t[lay][iEntr][lr] = 0;
103 return StatusCode::SUCCESS;
107 MsgStream log(messageService(), name());
108 log << MSG::INFO <<
"MdcCalibFunSvc::finalize()" << endreq;
117 return StatusCode::SUCCESS;
121 MsgStream log( messageService(), name() );
122 log << MSG::DEBUG <<
"handle: " << inc.type() << endreq;
124 if ( inc.type() ==
"NewRun" ){
125 log << MSG::DEBUG <<
"NewRun" << endreq;
127 if( ! initCalibConst() ){
129 <<
"can not initilize Mdc Calib Constants" << endl
130 <<
" Please insert the following statement "
131 <<
"in your \"jobOption.txt\" "
132 <<
"before the include file of Mdc Reconstruction: "
134 <<
"#include \"$CALIBSVCROOT/share/job-CalibData.txt\""
136 <<
" If still error, please contact with Wu Linghui "
145 double tp = fabs(z - m_zst[lay]) / vp;
150 int lr,
double entrance)
const {
153 dist = t2dPoly(drifttime, layid, cellid, lr, entrance);
155 if((0==lr) || (1==lr)) dist = t2dInter(drifttime, layid, cellid, lr, entrance);
157 double dl = t2dInter(drifttime, layid, cellid, lr, entrance);
158 double dr = t2dInter(drifttime, layid, cellid, lr, entrance);
159 dist = (dl + dr) * 0.5;
163 if(m_linearXT) dist = 0.03 * drifttime;
167double MdcCalibFunSvc::t2dPoly(
double drifttime,
int layid,
int cellid,
168 int lr,
double entrance)
const {
176 if(drifttime < xtpar[6]){
177 for(ord=0; ord<6; ord++){
178 dist += xtpar[ord] * pow(drifttime, ord);
181 for(ord=0; ord<6; ord++){
182 dist += xtpar[ord] * pow(xtpar[6], ord);
184 dist += xtpar[7] * (drifttime - xtpar[6]);
190double MdcCalibFunSvc::t2dInter(
double drifttime,
int layid,
int cellid,
191 int lr,
double entrance)
const {
194 int nBin = m_nNewXt[layid][iEntr][lr];
195 if(drifttime < m_vt[layid][iEntr][lr][0]){
196 dist = m_vd[layid][iEntr][lr][0];
197 }
else if(drifttime < m_vt[layid][iEntr][lr][nBin-1]){
198 for(
int i=0; i<(nBin-1); i++){
199 if((drifttime>=m_vt[layid][iEntr][lr][i]) && (drifttime<m_vt[layid][iEntr][lr][i+1])){
200 double t1 = m_vt[layid][iEntr][lr][i];
201 double t2 = m_vt[layid][iEntr][lr][i+1];
202 double d1 = m_vd[layid][iEntr][lr][i];
203 double d2 = m_vd[layid][iEntr][lr][i+1];
204 dist = (drifttime-t1) * (d2-d1) / (t2-t1) + d1;
209 dist = m_vd[layid][iEntr][lr][nBin-1];
215 int lr,
double entrance)
const {
228 double tm1 = xtpar[6];
234 cout <<
"Warning in MdcCalibFunSvc: driftDist < 0" << endl;
236 }
else if(dist < xtpar[0]){
238 }
else if(dist < dm1){
239 for(ord=0; ord<5; ord++){
240 dxdtpar[ord] = (double)(ord+1) * xtpar[ord+1];
245 cout <<
"Warning in MdcCalibFunSvc: "
246 <<
"can not get the exact value in the dist-to-time conversion."
253 for(ord=0; ord<6; ord++)
254 x += xtpar[ord] * pow(
time, ord);
257 if( fabs(deltax) < 0.001 ){
262 for(ord=0; ord<5; ord++)
263 dxdt += dxdtpar[ord] * pow(
time, ord);
268 }
else if(dist < dm2){
269 time = (dist - dm1) * (tm2 - tm1) / (dm2 - dm1) + tm1;
274 if(m_linearXT)
time = dist / 0.03;
279 double entrance,
double tanlam,
280 double z,
double Q)
const {
282 if( (0 == lr) || (1 == lr) ){
283 sigma =
getSigmaLR(layid, lr, dist, entrance, tanlam, z, Q);
285 double sl =
getSigmaLR(layid, 0, dist, entrance, tanlam, z, Q);
286 double sr =
getSigmaLR(layid, 1, dist, entrance, tanlam, z, Q);
287 sigma = (sl + sr) * 0.5;
290 if(m_fixSigma) sigma = 0.001 * m_fixSigmaValue;
291 if(layid == m_layInfSig) sigma = 9999.0;
296 double entrance,
double tanlam,
297 double z,
double Q)
const {
299 double sigma = 9999.0;
315 double distAbs = fabs(dist);
319 int bin = (int)((distAbs - dmin) / dw);
321 sigma = par[nmaxBin];
325 dref[0] = (double)
bin * dw + 0.25;
326 dref[1] = (double)(
bin+1) * dw + 0.25;
327 if((dref[1] - dref[0]) <= 0){
330 sigma = (par[
bin+1] - par[
bin]) * (distAbs - dref[0]) /
331 (dref[1] - dref[0]) + par[
bin];
339 double entrance,
double tanlam,
340 double z,
double Q)
const {
341 double sigma1 =
getSigma(layid, lr, dist, entrance, tanlam, z, Q);
346 double entrance,
double tanlam,
347 double z,
double Q)
const {
353 double entrance,
double tanlam,
354 double z,
double Q)
const {
360 double tanlam,
double z,
double Q)
const{
362 cout <<
"ERROR: can not get sigma-time functions" << endl;
364 }
else if( (0 == lr) || (1 == lr) ){
365 return getSigmaToTLR(layid, lr, tdr, entrance, tanlam, z, Q);
367 double sl =
getSigmaToTLR(layid, 0, tdr, entrance, tanlam, z, Q);
368 double sr =
getSigmaToTLR(layid, 1, tdr, entrance, tanlam, z, Q);
369 double sigma = (sl + sr) * 0.5;
375 double tanlam,
double z,
double Q)
const{
378 int nBin = m_nR2t[layid][iEntr][lr];
379 if(tdr < m_tR2t[layid][iEntr][lr][0]){
380 sigma = m_sR2t[layid][iEntr][lr][0];
381 }
else if(tdr < m_tR2t[layid][iEntr][lr][nBin-1]){
382 for(
int i=0; i<(nBin-1); i++){
383 if((tdr>=m_tR2t[layid][iEntr][lr][i]) && (tdr<m_tR2t[layid][iEntr][lr][i+1])){
384 double t1 = m_tR2t[layid][iEntr][lr][i];
385 double t2 = m_tR2t[layid][iEntr][lr][i+1];
386 double s1 = m_sR2t[layid][iEntr][lr][i];
387 double s2 = m_sR2t[layid][iEntr][lr][i+1];
388 sigma = (tdr-t1) * (s2-s1) / (t2-t1) + s1;
393 sigma = m_sR2t[layid][iEntr][lr][nBin-1];
399 if( m_xtiter != m_xtmap.end() ){
400 key = (*m_xtiter).first;
401 par = (*m_xtiter).second;
410 for(
int ord=0; ord<8; ord++){
411 parId = getXtparId(layid, entr, lr, ord);
412 par[ord] = m_xtpar[parId];
417 MsgStream log(messageService(), name());
418 log << MSG::INFO <<
"read calib const from TCDS" << endreq;
420 for(
int layid=0; layid<NLAYER; layid++){
421 for(
int entr=0; entr<NXTENTR; entr++){
422 for(
int lr=0; lr<2; lr++){
425 if(!newXtTree)
return false;
428 int nEntries = newXtTree -> GetEntries();
429 if((nEntries<10) || (nEntries>=200)){
430 log << MSG::ERROR <<
"wrong X-T constants: layer " << layid
431 <<
", iEntr " << entr <<
", lr " << lr << endreq;
434 m_nNewXt[layid][entr][lr] = nEntries;
435 for(
int i=0; i<nEntries; i++){
436 newXtTree->GetEntry(i);
437 m_vt[layid][entr][lr][i] = br_t;
438 m_vd[layid][entr][lr][i] = br_d;
448 MsgStream log(messageService(), name());
449 string fullPath =
"/Calib/MdcCal";
450 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
452 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr" << endreq;
456 TTree* newXtTree = calConst->getNewXtpar(layid,entr,lr);
461 for(
int layid=0; layid<NLAYER; layid++){
465 if(!r2tTree)
return false;
470 int nEntries = r2tTree -> GetEntries();
471 for(
int i=0; i<nEntries; i++){
472 r2tTree->GetEntry(i);
473 int bin = m_nR2t[layid][br_iEntr][br_lr];
475 cout <<
"Error: number of sigma-time bins overflow" << endl;
478 m_tR2t[layid][br_iEntr][br_lr][
bin] = br_t;
479 m_sR2t[layid][br_iEntr][br_lr][
bin] = br_s;
480 m_nR2t[layid][br_iEntr][br_lr]++;
483 for(
int layid=0; layid<NLAYER; layid++){
484 for(
int iEntr=0; iEntr<NXTENTR; iEntr++){
485 for(
int lr=0; lr<2; lr++){
486 if((m_nR2t[layid][iEntr][lr]<10) || (m_nR2t[layid][iEntr][lr]>=200))
return false;
494 MsgStream log(messageService(), name());
495 string fullPath =
"/Calib/MdcCal";
496 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
498 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr" << endreq;
502 TTree* r2tTree = calConst->getR2tpar(layid);
508 int wireid = m_pMdcGeomSvc->
Wire(layid, cellid)->
Id();
509 double t0 =
getT0(wireid);
519 if(Q < 0.0001) Q = 0.0001;
521 for(ord=0; ord<2; ord++){
525 tw = qtpar[0] + qtpar[1] / sqrt( Q );
526 if(
m_run < 0) tw = 0.0;
532 int wireid = m_pMdcGeomSvc->
Wire(layid, cellid)->
Id();
533 return m_wireEff[wireid];
537 if(0 == ord)
return m_qtpar0[layid];
538 else if(1 == ord)
return m_qtpar1[layid];
540 cout <<
"wrong order number" << endl;
547 if( (entr < 0) || (entr >= 18) ){
551 parId = getSdparId(layid, entr, lr,
bin);
552 par[
bin] = m_sdpar[parId];
557 if( m_sditer != m_sdmap.end() ){
558 key = (*m_sditer).first;
559 par = (*m_sditer).second;
570 double aglpi = 3.141592653;
571 double aglmin = -1.570796327;
572 double aglmax = 1.570796327;
573 double delAngle = 0.174532925;
575 MsgStream log(messageService(), name());
576 if(entrance < aglmin){
577 log << MSG::WARNING <<
"entrance angle < -pi/2" << endreq;
580 if(entrance >= aglmin)
break;
582 }
else if(entrance > aglmax){
583 log << MSG::WARNING <<
"entrance angle > pi/2" << endreq;
586 if(entrance <= aglmax)
break;
590 index = (int)((entrance-aglmin) / delAngle);
591 if(index < 0) index = 0;
592 else if(index > idmax) index = idmax;
601 double aglpi = 3.141592653;
602 double aglmin = -1.570796327;
603 double aglmax = 1.570796327;
604 double delAngle = 0.523598776;
606 MsgStream log(messageService(), name());
607 if(entrance < aglmin){
608 log << MSG::WARNING <<
"entrance angle < -pi/2" << endreq;
611 if(entrance >= aglmin)
break;
613 }
else if(entrance > aglmax){
614 log << MSG::WARNING <<
"entrance angle > pi/2" << endreq;
617 if(entrance <= aglmax)
break;
621 index = (int)((entrance-aglmin) / delAngle);
622 if(index < 0) index = 0;
623 else if(index > idmax) index = idmax;
628bool MdcCalibFunSvc::initCalibConst(){
629 MsgStream log(messageService(), name());
630 log << MSG::INFO <<
"read calib const from TCDS" << endreq;
632 IDataProviderSvc* eventSvc = NULL;
633 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
634 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc,
"/Event/EventHeader");
636 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
637 return( StatusCode::FAILURE);
639 m_run = eventHeader->runNumber();
651 string fullPath =
"/Calib/MdcCal";
652 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
654 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr"
667 while( calConst->getNextXtpar(
key, par) ){
672 unsigned mapsize = m_xtmap.size();
673 m_xtpar.resize(mapsize);
674 log << MSG::INFO <<
"size of xtmap: " << mapsize << endreq;
677 while( calConst->getNextXtpar(
key, par) ){
678 layid = (
key >> XTLAYER_INDEX) & XTLAYER_DECO;
679 entr = (
key >> XTENTRA_INDEX) & XTENTRA_DECO;
680 lr = (
key >> XTLR_INDEX) & XTLR_DECO;
681 ord = (
key >> XTORDER_INDEX) & XTORDER_DECO;
683 parId = getXtparId(layid, entr, lr, ord);
684 m_xtpar[parId] = par;
691 for(wid=0; wid<NWIRE; wid++){
692 t0 = calConst->getT0(wid);
693 delt0 = calConst->getDelT0(wid);
696 m_delt0.push_back(delt0);
702 for(layid=0; layid<NLAYER; layid++){
703 qtpar0 = calConst -> getQtpar0(layid);
704 qtpar1 = calConst -> getQtpar1(layid);
706 m_qtpar0.push_back(qtpar0);
707 m_qtpar1.push_back(qtpar1);
717 mapsize = m_sdmap.size();
718 m_sdpar.resize(mapsize);
719 log << MSG::INFO <<
"size of sdmap: " << mapsize << endreq;
723 layid = (
key >> SDLAYER_INDEX) & SDLAYER_DECO;
724 entr = (
key >> SDENTRA_INDEX) & SDENTRA_DECO;
725 lr = (
key >> SDLR_INDEX) & SDLR_DECO;
726 ord = (
key >> SDBIN_INDEX) & SDBIN_DECO;
728 parId = getSdparId(layid, entr, lr, ord);
729 m_sdpar[parId] = par;
734 for(layid=0; layid<
NLAYER; layid++){
735 zwest = m_pMdcGeomSvc->
Wire(layid, 0)->
Forward().z();
738 if(0 == (layid % 2)) m_zst[layid] = zwest;
739 else m_zst[layid] = zeast;
743 log << MSG::INFO <<
"read new xt from TCDS" << endreq;
745 log << MSG::WARNING <<
"can not get MDC New XT Trees" << endreq;
748 if(
m_run < 0) m_xtMode = 0;
749 if(0 == m_xtMode) log << MSG::INFO <<
"use old X-T functions " << endreq;
750 else log << MSG::INFO <<
"use new X-T functions " << endreq;
752 if(0 == m_xtMode) cout <<
"use old X-T functions " << endl;
753 else cout <<
"use new X-T functions " << endl;
754 m_outputXtMode =
false;
758 for(layid=0; layid<
NLAYER; layid++){
759 for(entr=0; entr<NXTENTR; entr++){
760 for(lr=0; lr<2; lr++) m_nR2t[layid][entr][lr] = 0;
764 log << MSG::INFO <<
"read new sigma-time from TCDS" << endreq;
766 log << MSG::WARNING <<
"can not get sigma-time functions" << endreq;
769 log << MSG::INFO <<
"read sigma-time successfully " << endreq;
774 fullPath =
"/Calib/MdcDataConst";
775 log << MSG::INFO <<
"Read Wire Eff from TCDS: "<< fullPath << endreq;
776 log << MSG::INFO <<
"Read wire eff!" << endreq;
778 SmartDataPtr<CalibData::MdcDataConst> dataConst(m_pCalDataSvc, fullPath);
780 log << MSG::ERROR <<
"can not get MdcDataConst via SmartPtr" << endreq;
783 for(
int wir=0; wir<
NWIRE; wir++) {
784 m_wireEff[wir] = dataConst->getWireEff(wir);
787 log << MSG::INFO <<
"Read Wire Eff from file: "<< m_wireEffFile << endreq;
788 ifstream fEff(m_wireEffFile.c_str());
790 log << MSG::ERROR <<
"can not open wire eff file: " << m_wireEffFile << endreq;
794 for(
int i=0; i<4; i++) fEff >> strtmp;
795 for(
int wir=0; wir<NWIRE; wir++) fEff >> strtmp >> strtmp >> strtmp >> m_wireEff[wir];
799 if(m_checkConst) checkConst();
805int MdcCalibFunSvc::getXtKey(
int layid,
int lr,
int ord,
int entr)
const{
807 int key = ( (layid << XTLAYER_INDEX) & XTLAYER_MASK ) |
808 ( (entr << XTENTRA_INDEX) & XTENTRA_MASK ) |
809 ( (lr << XTLR_INDEX) & XTLR_MASK ) |
810 ( (ord << XTORDER_INDEX) & XTORDER_MASK );
815int MdcCalibFunSvc::getSdKey(
int layid,
int entr,
int lr,
int ord)
const {
816 int key = ( (layid << SDLAYER_INDEX) & SDLAYER_MASK ) |
817 ( (entr << SDENTRA_INDEX) & SDENTRA_MASK ) |
818 ( (lr << SDLR_INDEX) & SDLR_MASK ) |
819 ( (ord << SDBIN_INDEX) & SDBIN_MASK );
824void MdcCalibFunSvc::checkConst(){
826 sprintf(fname,
"checkXt_%d.txt", m_updateNum);
828 unsigned mapsize = m_xtmap.size();
829 unsigned vsize = m_xtpar.size();
830 fxt << setw(10) << mapsize << setw(10) << vsize << endl << endl;
833 std::map<int, double>::iterator xtiter = m_xtmap.begin();
834 while( xtiter != m_xtmap.end() ){
835 key = (*xtiter).first;
836 par = (*xtiter).second;
837 fxt << setw(20) <<
key << setw(20) << par << endl;
841 for(
unsigned i=0; i<vsize; i++){
842 fxt << setw(5) << i << setw(15) << m_xtpar[i] << endl;
846 sprintf(fname,
"checkT0_%d.txt", m_updateNum);
848 ft0 << setw(10) << m_t0.size() << setw(10) << m_delt0.size() << endl;
849 for(
unsigned i=0; i<m_t0.size(); i++){
850 ft0 << setw(5) << i << setw(15) << m_t0[i] << setw(15) << m_delt0[i] << endl;
854 sprintf(fname,
"checkQt_%d.txt", m_updateNum);
856 fqt << setw(10) << m_qtpar0.size() << setw(10) << m_qtpar1.size() << endl;
857 for(
unsigned i=0; i<m_qtpar0.size(); i++){
858 fqt << setw(5) << i << setw(15) << m_qtpar0[i] << setw(15) << m_qtpar1[i] << endl;
862 sprintf(fname,
"checkSd_%d.txt", m_updateNum);
864 mapsize = m_sdmap.size();
865 vsize = m_sdpar.size();
866 fsd << setw(10) << mapsize << setw(10) << vsize << endl << endl;
867 std::map<int, double>::iterator sditer = m_sdmap.begin();
868 while( sditer != m_sdmap.end() ){
869 key = (*sditer).first;
870 par = (*sditer).second;
871 fsd << setw(20) <<
key << setw(20) << par << endl;
875 for(
unsigned i=0; i<vsize; i++){
876 fsd << setw(5) << i << setw(15) << m_sdpar[i] << endl;
880 sprintf(fname,
"checkNewXt_%d.txt", m_updateNum);
882 for(
int lay=0; lay<43; lay++){
883 for(
int iEntr=0; iEntr<18; iEntr++){
884 for(
int lr=0; lr<2; lr++){
885 fnewxt << setw(5) << lay << setw(5) << iEntr << setw(3) << lr
886 << setw(5) << m_nNewXt[lay][iEntr][lr] << endl;
887 for(
int bin=0;
bin<m_nNewXt[lay][iEntr][lr];
bin++){
888 fnewxt << setw(15) << m_vt[lay][iEntr][lr][
bin]
889 << setw(15) << m_vd[lay][iEntr][lr][
bin] << endl;
896 sprintf(fname,
"checkR2t_%d.txt", m_updateNum);
898 for(
int lay=0; lay<43; lay++){
899 for(
int iEntr=0; iEntr<18; iEntr++){
900 for(
int lr=0; lr<2; lr++){
901 fr2t << setw(5) << lay << setw(5) << iEntr << setw(3) << lr
902 << setw(5) << m_nR2t[lay][iEntr][lr] << endl;
903 for(
int bin=0;
bin<m_nR2t[lay][iEntr][lr];
bin++){
904 fr2t << setw(15) << m_tR2t[lay][iEntr][lr][
bin]
905 << setw(15) << m_sR2t[lay][iEntr][lr][
bin] << endl;
data SetBranchAddress("time",&time)
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per bin
std::map< int, double >::value_type valType
map< int, double >::value_type valType
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
virtual const MdcGeoWire *const Wire(unsigned id)=0
int getNextXtpar(int &key, double &par)
virtual StatusCode finalize()
double getSigmaToT(int layid, int lr, double tdr, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
int getSdEntrIndex(double entrance) const
TTree * getR2tTree(int layid) const
double getSigmaToTLR(int layid, int lr, double tdr, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
void getSdpar(int layid, int entr, int lr, double par[]) const
double distToDriftTime(double dist, int layid, int cellid, int lr, double entrance=0.0) const
double getSigma2(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
double getWireEff(int layid, int cellid) const
double getSigma(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
double getT0(int layid, int cellid) const
double driftTimeToDist(double drifttime, int layid, int cellid, int lr, double entrance=0.0) const
double getSigmaLR(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
double getQtpar(int layid, int ord) const
TTree * getNewXtparTree(int layid, int entr, int lr) const
void getXtpar(int layid, int entr, int lr, double par[]) const
MdcCalibFunSvc(const std::string &name, ISvcLocator *svcloc)
double getSigma1(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
int getXtEntrIndex(double entrance) const
double getVprop(int lay) const
virtual StatusCode initialize()
void handle(const Incident &)
int getNextSdpar(int &key, double &par)
double getTprop(int lay, double z) const
double getF(int layid, int lr, double dist, double entrance=0.0, double tanlam=0.0, double z=0.0, double Q=1000.0) const
double getTimeWalk(int layid, double Q) const
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
HepPoint3D Forward(void) const
HepPoint3D Backward(void) const