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;
41 base_class (name, svcloc), m_layInfSig(-1) {
44 declareProperty(
"CheckConst", m_checkConst =
false);
45 declareProperty(
"LayerInfSig", m_layInfSig);
46 declareProperty(
"XtMode", m_xtMode = 1);
47 declareProperty(
"NewXtFile", m_xtfile);
48 declareProperty(
"ReadWireEffDb", m_readWireEffDb =
true);
49 declareProperty(
"WireEffFile", m_wireEffFile);
50 declareProperty(
"LinearXT", m_linearXT =
false);
51 declareProperty(
"FixSigma", m_fixSigma =
false);
52 declareProperty(
"FixSigmaValue", m_fixSigmaValue = 130.0);
53 m_outputXtMode =
true;
69 MsgStream log(messageService(), name());
70 log << MSG::INFO <<
"MdcCalibFunSvc::initialize()" << endreq;
72 StatusCode sc = Service::initialize();
73 if( sc.isFailure() )
return sc;
76 sc = service(
"IncidentSvc", incsvc);
79 incsvc -> addListener(
this,
"NewRun", priority);
82 sc = service(
"CalibDataSvc", m_pCalDataSvc,
true);
83 if( sc == StatusCode::SUCCESS ){
84 log << MSG::INFO <<
"Retrieve IDataProviderSvc" << endreq;
86 log << MSG::FATAL <<
"can not get IDataProviderSvc" << endreq;
89 sc = service(
"MdcGeomSvc", m_pMdcGeomSvc);
90 if( sc != StatusCode::SUCCESS ){
91 log << MSG::ERROR <<
"can not use MdcGeomSvc" << endreq;
92 return StatusCode::FAILURE;
95 if(m_fixSigma) cout <<
"Fix MDC sigma to " << m_fixSigmaValue <<
" micron." << endl;
98 for(
int wir=0; wir<6796; wir++) m_wireEff[wir] = 1.0;
99 for(
int lay=0; lay<NLAYER; lay++){
100 for(
int iEntr=0; iEntr<NXTENTR; iEntr++){
101 for(
int lr=0; lr<2; lr++) m_nR2t[lay][iEntr][lr] = 0;
105 return StatusCode::SUCCESS;
109 MsgStream log(messageService(), name());
110 log << MSG::INFO <<
"MdcCalibFunSvc::finalize()" << endreq;
119 return StatusCode::SUCCESS;
123 MsgStream log( messageService(), name() );
124 log << MSG::DEBUG <<
"handle: " << inc.type() << endreq;
126 if ( inc.type() ==
"NewRun" ){
127 log << MSG::DEBUG <<
"NewRun" << endreq;
129 if( ! initCalibConst() ){
131 <<
"can not initilize Mdc Calib Constants" << endl
132 <<
" Please insert the following statement "
133 <<
"in your \"jobOption.txt\" "
134 <<
"before the include file of Mdc Reconstruction: "
136 <<
"#include \"$CALIBSVCROOT/share/job-CalibData.txt\""
138 <<
" If still error, please contact with Wu Linghui "
147 double tp = fabs(z - m_zst[lay]) / vp;
152 int lr,
double entrance)
const {
155 dist = t2dPoly(drifttime, layid, cellid, lr, entrance);
157 if((0==lr) || (1==lr)) dist = t2dInter(drifttime, layid, cellid, lr, entrance);
159 double dl = t2dInter(drifttime, layid, cellid, lr, entrance);
160 double dr = t2dInter(drifttime, layid, cellid, lr, entrance);
161 dist = (dl + dr) * 0.5;
165 if(m_linearXT) dist = 0.03 * drifttime;
169double MdcCalibFunSvc::t2dPoly(
double drifttime,
int layid,
int cellid,
170 int lr,
double entrance)
const {
178 if(drifttime < xtpar[6]){
179 for(ord=0; ord<6; ord++){
180 dist += xtpar[ord] * pow(drifttime, ord);
183 for(ord=0; ord<6; ord++){
184 dist += xtpar[ord] * pow(xtpar[6], ord);
186 dist += xtpar[7] * (drifttime - xtpar[6]);
192double MdcCalibFunSvc::t2dInter(
double drifttime,
int layid,
int cellid,
193 int lr,
double entrance)
const {
196 int nBin = m_nNewXt[layid][iEntr][lr];
197 if(drifttime < m_vt[layid][iEntr][lr][0]){
198 dist = m_vd[layid][iEntr][lr][0];
199 }
else if(drifttime < m_vt[layid][iEntr][lr][nBin-1]){
200 for(
int i=0; i<(nBin-1); i++){
201 if((drifttime>=m_vt[layid][iEntr][lr][i]) && (drifttime<m_vt[layid][iEntr][lr][i+1])){
202 double t1 = m_vt[layid][iEntr][lr][i];
203 double t2 = m_vt[layid][iEntr][lr][i+1];
204 double d1 = m_vd[layid][iEntr][lr][i];
205 double d2 = m_vd[layid][iEntr][lr][i+1];
206 dist = (drifttime-t1) * (d2-d1) / (t2-t1) + d1;
211 dist = m_vd[layid][iEntr][lr][nBin-1];
217 int lr,
double entrance)
const {
230 double tm1 = xtpar[6];
236 cout <<
"Warning in MdcCalibFunSvc: driftDist < 0" << endl;
238 }
else if(dist < xtpar[0]){
240 }
else if(dist < dm1){
241 for(ord=0; ord<5; ord++){
242 dxdtpar[ord] = (double)(ord+1) * xtpar[ord+1];
247 cout <<
"Warning in MdcCalibFunSvc: "
248 <<
"can not get the exact value in the dist-to-time conversion."
255 for(ord=0; ord<6; ord++)
256 x += xtpar[ord] * pow(
time, ord);
259 if( fabs(deltax) < 0.001 ){
264 for(ord=0; ord<5; ord++)
265 dxdt += dxdtpar[ord] * pow(
time, ord);
270 }
else if(dist < dm2){
271 time = (dist - dm1) * (tm2 - tm1) / (dm2 - dm1) + tm1;
276 if(m_linearXT)
time = dist / 0.03;
281 double entrance,
double tanlam,
282 double z,
double Q)
const {
284 if( (0 == lr) || (1 == lr) ){
287 double sl =
getSigmaLR(layid, 0, dist, entrance, tanlam, z, Q);
288 double sr =
getSigmaLR(layid, 1, dist, entrance, tanlam, z, Q);
289 sigma = (sl + sr) * 0.5;
292 if(m_fixSigma)
sigma = 0.001 * m_fixSigmaValue;
293 if(layid == m_layInfSig)
sigma = 9999.0;
298 double entrance,
double tanlam,
299 double z,
double Q)
const {
301 double sigma = 9999.0;
317 double distAbs = fabs(dist);
321 int bin = (int)((distAbs -
dmin) / dw);
323 sigma = par[nmaxBin];
327 dref[0] = (double)
bin * dw + 0.25;
328 dref[1] = (double)(
bin+1) * dw + 0.25;
329 if((dref[1] - dref[0]) <= 0){
332 sigma = (par[
bin+1] - par[
bin]) * (distAbs - dref[0]) /
333 (dref[1] - dref[0]) + par[
bin];
341 double entrance,
double tanlam,
342 double z,
double Q)
const {
343 double sigma1 =
getSigma(layid, lr, dist, entrance, tanlam, z, Q);
348 double entrance,
double tanlam,
349 double z,
double Q)
const {
355 double entrance,
double tanlam,
356 double z,
double Q)
const {
362 double tanlam,
double z,
double Q)
const{
364 cout <<
"ERROR: can not get sigma-time functions" << endl;
366 }
else if( (0 == lr) || (1 == lr) ){
367 return getSigmaToTLR(layid, lr, tdr, entrance, tanlam, z, Q);
369 double sl =
getSigmaToTLR(layid, 0, tdr, entrance, tanlam, z, Q);
370 double sr =
getSigmaToTLR(layid, 1, tdr, entrance, tanlam, z, Q);
371 double sigma = (sl + sr) * 0.5;
377 double tanlam,
double z,
double Q)
const{
380 int nBin = m_nR2t[layid][iEntr][lr];
381 if(tdr < m_tR2t[layid][iEntr][lr][0]){
382 sigma = m_sR2t[layid][iEntr][lr][0];
383 }
else if(tdr < m_tR2t[layid][iEntr][lr][nBin-1]){
384 for(
int i=0; i<(nBin-1); i++){
385 if((tdr>=m_tR2t[layid][iEntr][lr][i]) && (tdr<m_tR2t[layid][iEntr][lr][i+1])){
386 double t1 = m_tR2t[layid][iEntr][lr][i];
387 double t2 = m_tR2t[layid][iEntr][lr][i+1];
388 double s1 = m_sR2t[layid][iEntr][lr][i];
389 double s2 = m_sR2t[layid][iEntr][lr][i+1];
390 sigma = (tdr-t1) * (s2-s1) / (t2-t1) + s1;
395 sigma = m_sR2t[layid][iEntr][lr][nBin-1];
401 if( m_xtiter != m_xtmap.end() ){
402 key = (*m_xtiter).first;
403 par = (*m_xtiter).second;
412 for(
int ord=0; ord<8; ord++){
413 parId = getXtparId(layid, entr, lr, ord);
414 par[ord] = m_xtpar[parId];
419 MsgStream log(messageService(), name());
420 log << MSG::INFO <<
"read calib const from TCDS" << endreq;
422 for(
int layid=0; layid<NLAYER; layid++){
423 for(
int entr=0; entr<NXTENTR; entr++){
424 for(
int lr=0; lr<2; lr++){
427 if(!newXtTree)
return false;
430 int nEntries = newXtTree -> GetEntries();
431 if((nEntries<10) || (nEntries>=200)){
432 log << MSG::ERROR <<
"wrong X-T constants: layer " << layid
433 <<
", iEntr " << entr <<
", lr " << lr << endreq;
436 m_nNewXt[layid][entr][lr] = nEntries;
437 for(
int i=0; i<nEntries; i++){
438 newXtTree->GetEntry(i);
439 m_vt[layid][entr][lr][i] = br_t;
440 m_vd[layid][entr][lr][i] = br_d;
450 MsgStream log(messageService(), name());
451 string fullPath =
"/Calib/MdcCal";
452 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
454 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr" << endreq;
458 TTree* newXtTree = calConst->getNewXtpar(layid,entr,lr);
463 for(
int layid=0; layid<NLAYER; layid++){
467 if(!r2tTree)
return false;
472 int nEntries = r2tTree -> GetEntries();
473 for(
int i=0; i<nEntries; i++){
474 r2tTree->GetEntry(i);
475 int bin = m_nR2t[layid][br_iEntr][br_lr];
477 cout <<
"Error: number of sigma-time bins overflow" << endl;
480 m_tR2t[layid][br_iEntr][br_lr][
bin] = br_t;
481 m_sR2t[layid][br_iEntr][br_lr][
bin] = br_s;
482 m_nR2t[layid][br_iEntr][br_lr]++;
485 for(
int layid=0; layid<
NLAYER; layid++){
486 for(
int iEntr=0; iEntr<NXTENTR; iEntr++){
487 for(
int lr=0; lr<2; lr++){
488 if((m_nR2t[layid][iEntr][lr]<10) || (m_nR2t[layid][iEntr][lr]>=200))
return false;
496 MsgStream log(messageService(), name());
497 string fullPath =
"/Calib/MdcCal";
498 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
500 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr" << endreq;
504 TTree* r2tTree = calConst->getR2tpar(layid);
510 int wireid = m_pMdcGeomSvc->
Wire(layid, cellid)->
Id();
511 double t0 =
getT0(wireid);
521 if(Q < 0.0001) Q = 0.0001;
523 for(ord=0; ord<2; ord++){
527 tw = qtpar[0] + qtpar[1] / sqrt( Q );
528 if(
m_run < 0) tw = 0.0;
534 int wireid = m_pMdcGeomSvc->
Wire(layid, cellid)->
Id();
535 return m_wireEff[wireid];
539 if(0 == ord)
return m_qtpar0[layid];
540 else if(1 == ord)
return m_qtpar1[layid];
542 cout <<
"wrong order number" << endl;
549 if( (entr < 0) || (entr >= 18) ){
553 parId = getSdparId(layid, entr, lr,
bin);
554 par[
bin] = m_sdpar[parId];
559 if( m_sditer != m_sdmap.end() ){
560 key = (*m_sditer).first;
561 par = (*m_sditer).second;
572 double aglpi = 3.141592653;
573 double aglmin = -1.570796327;
574 double aglmax = 1.570796327;
575 double delAngle = 0.174532925;
577 MsgStream log(messageService(), name());
578 if(entrance < aglmin){
579 log << MSG::WARNING <<
"entrance angle < -pi/2" << endreq;
582 if(entrance >= aglmin)
break;
584 }
else if(entrance > aglmax){
585 log << MSG::WARNING <<
"entrance angle > pi/2" << endreq;
588 if(entrance <= aglmax)
break;
592 index = (int)((entrance-aglmin) / delAngle);
593 if(index < 0) index = 0;
594 else if(index > idmax) index = idmax;
603 double aglpi = 3.141592653;
604 double aglmin = -1.570796327;
605 double aglmax = 1.570796327;
606 double delAngle = 0.523598776;
608 MsgStream log(messageService(), name());
609 if(entrance < aglmin){
610 log << MSG::WARNING <<
"entrance angle < -pi/2" << endreq;
613 if(entrance >= aglmin)
break;
615 }
else if(entrance > aglmax){
616 log << MSG::WARNING <<
"entrance angle > pi/2" << endreq;
619 if(entrance <= aglmax)
break;
623 index = (int)((entrance-aglmin) / delAngle);
624 if(index < 0) index = 0;
625 else if(index > idmax) index = idmax;
630bool MdcCalibFunSvc::initCalibConst(){
631 MsgStream log(messageService(), name());
632 log << MSG::INFO <<
"read calib const from TCDS" << endreq;
634 IDataProviderSvc* eventSvc =
NULL;
635 Gaudi::svcLocator()->service(
"EventDataSvc", eventSvc);
636 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc,
"/Event/EventHeader");
638 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
639 return( StatusCode::FAILURE);
641 m_run = eventHeader->runNumber();
653 string fullPath =
"/Calib/MdcCal";
654 SmartDataPtr<CalibData::MdcCalibData> calConst(m_pCalDataSvc, fullPath);
656 log << MSG::ERROR <<
"can not get MdcCalibConst via SmartPtr"
669 while( calConst->getNextXtpar(
key, par) ){
674 unsigned mapsize = m_xtmap.size();
675 m_xtpar.resize(mapsize);
676 log << MSG::INFO <<
"size of xtmap: " << mapsize << endreq;
679 while( calConst->getNextXtpar(
key, par) ){
680 layid = (
key >> XTLAYER_INDEX) & XTLAYER_DECO;
681 entr = (
key >> XTENTRA_INDEX) & XTENTRA_DECO;
682 lr = (
key >> XTLR_INDEX) & XTLR_DECO;
683 ord = (
key >> XTORDER_INDEX) & XTORDER_DECO;
685 parId = getXtparId(layid, entr, lr, ord);
686 m_xtpar[parId] = par;
693 for(wid=0; wid<NWIRE; wid++){
694 t0 = calConst->getT0(wid);
695 delt0 = calConst->getDelT0(wid);
698 m_delt0.push_back(delt0);
704 for(layid=0; layid<NLAYER; layid++){
705 qtpar0 = calConst -> getQtpar0(layid);
706 qtpar1 = calConst -> getQtpar1(layid);
708 m_qtpar0.push_back(qtpar0);
709 m_qtpar1.push_back(qtpar1);
719 mapsize = m_sdmap.size();
720 m_sdpar.resize(mapsize);
721 log << MSG::INFO <<
"size of sdmap: " << mapsize << endreq;
725 layid = (
key >> SDLAYER_INDEX) & SDLAYER_DECO;
726 entr = (
key >> SDENTRA_INDEX) & SDENTRA_DECO;
727 lr = (
key >> SDLR_INDEX) & SDLR_DECO;
728 ord = (
key >> SDBIN_INDEX) & SDBIN_DECO;
730 parId = getSdparId(layid, entr, lr, ord);
731 m_sdpar[parId] = par;
736 for(layid=0; layid<
NLAYER; layid++){
737 zwest = m_pMdcGeomSvc->
Wire(layid, 0)->
Forward().z();
740 if(0 == (layid % 2)) m_zst[layid] = zwest;
741 else m_zst[layid] = zeast;
745 log << MSG::INFO <<
"read new xt from TCDS" << endreq;
747 log << MSG::WARNING <<
"can not get MDC New XT Trees" << endreq;
750 if(
m_run < 0) m_xtMode = 0;
751 if(0 == m_xtMode) log << MSG::INFO <<
"use old X-T functions " << endreq;
752 else log << MSG::INFO <<
"use new X-T functions " << endreq;
754 if(0 == m_xtMode) cout <<
"use old X-T functions " << endl;
755 else cout <<
"use new X-T functions " << endl;
756 m_outputXtMode =
false;
760 for(layid=0; layid<
NLAYER; layid++){
761 for(entr=0; entr<NXTENTR; entr++){
762 for(lr=0; lr<2; lr++) m_nR2t[layid][entr][lr] = 0;
766 log << MSG::INFO <<
"read new sigma-time from TCDS" << endreq;
768 log << MSG::WARNING <<
"can not get sigma-time functions" << endreq;
771 log << MSG::INFO <<
"read sigma-time successfully " << endreq;
776 fullPath =
"/Calib/MdcDataConst";
777 log << MSG::INFO <<
"Read Wire Eff from TCDS: "<< fullPath << endreq;
778 log << MSG::INFO <<
"Read wire eff!" << endreq;
780 SmartDataPtr<CalibData::MdcDataConst> dataConst(m_pCalDataSvc, fullPath);
782 log << MSG::ERROR <<
"can not get MdcDataConst via SmartPtr" << endreq;
785 for(
int wir=0; wir<
NWIRE; wir++) {
786 m_wireEff[wir] = dataConst->getWireEff(wir);
789 log << MSG::INFO <<
"Read Wire Eff from file: "<< m_wireEffFile << endreq;
790 ifstream fEff(m_wireEffFile.c_str());
792 log << MSG::ERROR <<
"can not open wire eff file: " << m_wireEffFile << endreq;
796 for(
int i=0; i<4; i++) fEff >> strtmp;
797 for(
int wir=0; wir<NWIRE; wir++) fEff >> strtmp >> strtmp >> strtmp >> m_wireEff[wir];
801 if(m_checkConst) checkConst();
807int MdcCalibFunSvc::getXtKey(
int layid,
int lr,
int ord,
int entr)
const{
809 int key = ( (layid << XTLAYER_INDEX) & XTLAYER_MASK ) |
810 ( (entr << XTENTRA_INDEX) & XTENTRA_MASK ) |
811 ( (lr << XTLR_INDEX) & XTLR_MASK ) |
812 ( (ord << XTORDER_INDEX) & XTORDER_MASK );
817int MdcCalibFunSvc::getSdKey(
int layid,
int entr,
int lr,
int ord)
const {
818 int key = ( (layid << SDLAYER_INDEX) & SDLAYER_MASK ) |
819 ( (entr << SDENTRA_INDEX) & SDENTRA_MASK ) |
820 ( (lr << SDLR_INDEX) & SDLR_MASK ) |
821 ( (ord << SDBIN_INDEX) & SDBIN_MASK );
826void MdcCalibFunSvc::checkConst(){
828 sprintf(fname,
"checkXt_%d.txt", m_updateNum);
830 unsigned mapsize = m_xtmap.size();
831 unsigned vsize = m_xtpar.size();
832 fxt << setw(10) << mapsize << setw(10) << vsize << endl << endl;
835 std::map<int, double>::iterator xtiter = m_xtmap.begin();
836 while( xtiter != m_xtmap.end() ){
837 key = (*xtiter).first;
838 par = (*xtiter).second;
839 fxt << setw(20) <<
key << setw(20) << par << endl;
843 for(
unsigned i=0; i<vsize; i++){
844 fxt << setw(5) << i << setw(15) << m_xtpar[i] << endl;
848 sprintf(fname,
"checkT0_%d.txt", m_updateNum);
850 ft0 << setw(10) << m_t0.size() << setw(10) << m_delt0.size() << endl;
851 for(
unsigned i=0; i<m_t0.size(); i++){
852 ft0 << setw(5) << i << setw(15) << m_t0[i] << setw(15) << m_delt0[i] << endl;
856 sprintf(fname,
"checkQt_%d.txt", m_updateNum);
858 fqt << setw(10) << m_qtpar0.size() << setw(10) << m_qtpar1.size() << endl;
859 for(
unsigned i=0; i<m_qtpar0.size(); i++){
860 fqt << setw(5) << i << setw(15) << m_qtpar0[i] << setw(15) << m_qtpar1[i] << endl;
864 sprintf(fname,
"checkSd_%d.txt", m_updateNum);
866 mapsize = m_sdmap.size();
867 vsize = m_sdpar.size();
868 fsd << setw(10) << mapsize << setw(10) << vsize << endl << endl;
869 std::map<int, double>::iterator sditer = m_sdmap.begin();
870 while( sditer != m_sdmap.end() ){
871 key = (*sditer).first;
872 par = (*sditer).second;
873 fsd << setw(20) <<
key << setw(20) << par << endl;
877 for(
unsigned i=0; i<vsize; i++){
878 fsd << setw(5) << i << setw(15) << m_sdpar[i] << endl;
882 sprintf(fname,
"checkNewXt_%d.txt", m_updateNum);
883 ofstream fnewxt(fname);
884 for(
int lay=0; lay<43; lay++){
885 for(
int iEntr=0; iEntr<18; iEntr++){
886 for(
int lr=0; lr<2; lr++){
887 fnewxt << setw(5) << lay << setw(5) << iEntr << setw(3) << lr
888 << setw(5) << m_nNewXt[lay][iEntr][lr] << endl;
889 for(
int bin=0;
bin<m_nNewXt[lay][iEntr][lr];
bin++){
890 fnewxt << setw(15) << m_vt[lay][iEntr][lr][
bin]
891 << setw(15) << m_vd[lay][iEntr][lr][
bin] << endl;
898 sprintf(fname,
"checkR2t_%d.txt", m_updateNum);
899 ofstream fr2t(fname);
900 for(
int lay=0; lay<43; lay++){
901 for(
int iEntr=0; iEntr<18; iEntr++){
902 for(
int lr=0; lr<2; lr++){
903 fr2t << setw(5) << lay << setw(5) << iEntr << setw(3) << lr
904 << setw(5) << m_nR2t[lay][iEntr][lr] << endl;
905 for(
int bin=0;
bin<m_nR2t[lay][iEntr][lr];
bin++){
906 fr2t << setw(15) << m_tR2t[lay][iEntr][lr][
bin]
907 << setw(15) << m_sR2t[lay][iEntr][lr][
bin] << endl;
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
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
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
HepPoint3D Forward(void) const
HepPoint3D Backward(void) const