1#ifndef RecCgemKalTrackCnv_CXX
2#define RecCgemKalTrackCnv_CXX 1
4#include "GaudiKernel/MsgStream.h"
5#include "GaudiKernel/DataObject.h"
6#include "GaudiKernel/ObjectVector.h"
7#include "TClonesArray.h"
8#include "TClonesArray.h"
9#include "Identifier/CgemID.h"
10#include "Identifier/Identifier.h"
12#include "EventModel/EventModel.h"
13#include "CgemRecEvent/RecCgemKalTrack.h"
14#include "CgemRecEvent/RecCgemKalHelixSeg.h"
15#include "ReconEvent/ReconEvent.h"
17#include "RootEventData/TRecTrackEvent.h"
18#include "RootEventData/TRecCgemKalTrack.h"
20#include "RootCnvSvc/Rec/RecTrackCnv.h"
21#include "RootCnvSvc/Rec/RecCgemKalTrackCnv.h"
22#include "RootCnvSvc/RootAddress.h"
38 MsgStream log(
msgSvc(),
"RecCgemKalTrackCnv");
41 m_rootBranchname =
"m_recCgemKalTrackCol";
43 m_adresses.push_back(&m_recCgemKalTrackCol);
44 m_recCgemKalTrackCol = 0;
49 MsgStream log(
msgSvc(),
"RecCgemKalTrackCnv");
50 log << MSG::DEBUG <<
"RecCgemKalTrackCnv::TObjectToDataObject" << endreq;
51 StatusCode sc = StatusCode::SUCCESS;
55 refpObject = recCgemKalTrackCol;
58 if (!m_recCgemKalTrackCol)
return sc;
59 TIter recCgemKalTrackIter(m_recCgemKalTrackCol);
61 IDataProviderSvc* dataSvc = 0;
62 sc = serviceLocator()->getService (
"EventDataSvc",
63 IDataProviderSvc::interfaceID(), (IInterface*&)dataSvc);
64 if (!sc.isSuccess()) {
65 log << MSG::FATAL <<
"Could not get EventDataSvc in RecCgemTrackCnv" << endreq;
66 return( StatusCode::FAILURE);
68 SmartDataPtr<RecCgemKalHelixSegCol> recCgemKalHelixSegCol(dataSvc,
"/Event/Recon/RecCgemKalHelixSegCol");
69 if (!recCgemKalHelixSegCol) {
70 log << MSG::FATAL <<
"Could not find RecCgemKalHelixSegCol" << endreq;
71 return( StatusCode::FAILURE);
75 while ((recCgemKalTrackRoot = (
TRecCgemKalTrack*)recCgemKalTrackIter.Next())) {
77 std::vector<HepVector> zhelixs;
78 std::vector<HepSymMatrix> zerrors;
79 std::vector<HepVector> fhelixs;
80 std::vector<HepSymMatrix> ferrors;
81 std::vector<HepVector> lhelixs;
82 std::vector<HepSymMatrix> lerrors;
83 std::vector<HepPoint3D> pocas;
84 std::vector<HepPoint3D> lpivots;
85 std::vector<HepPoint3D> lpoints;
89 HepSymMatrix zerror(5);
91 HepSymMatrix ferror(5);
93 HepSymMatrix lerror(5);
95 HepSymMatrix terror(5);
101 HepVector zhelix_e(5);
102 HepSymMatrix zerror_e(5);
103 HepVector fhelix_e(5);
104 HepSymMatrix ferror_e(5);
105 HepVector lhelix_e(5);
106 HepSymMatrix lerror_e(5);
112 HepVector zhelix_mu(5);
113 HepSymMatrix zerror_mu(5);
114 HepVector fhelix_mu(5);
115 HepSymMatrix ferror_mu(5);
116 HepVector lhelix_mu(5);
117 HepSymMatrix lerror_mu(5);
123 HepVector zhelix_k(5);
124 HepSymMatrix zerror_k(5);
125 HepVector fhelix_k(5);
126 HepSymMatrix ferror_k(5);
127 HepVector lhelix_k(5);
128 HepSymMatrix lerror_k(5);
134 HepVector zhelix_p(5);
135 HepSymMatrix zerror_p(5);
136 HepVector fhelix_p(5);
137 HepSymMatrix ferror_p(5);
138 HepVector lhelix_p(5);
139 HepSymMatrix lerror_p(5);
167 for (
int u=0; u<5; u++){
169 length[u] = recCgemKalTrackRoot->
getLength(u);
170 tof[u] = recCgemKalTrackRoot->
getTof(u);
171 nhits[u] = recCgemKalTrackRoot->
getNhits(u);
172 fiTerm[u]=recCgemKalTrackRoot->
getfiTerm(u);
173 pathSM[u]=recCgemKalTrackRoot->
getPathSM(u);
176 recCgemKalTrackTds->
setLength(length[u],u);
177 recCgemKalTrackTds->
setTof(tof[u],u);
178 recCgemKalTrackTds->
setNhits(nhits[u],u);
179 recCgemKalTrackTds->
setFiTerm(fiTerm[u],u);
180 recCgemKalTrackTds->
setPathSM(pathSM[u],u);
184 for(
int v=0;
v<3;
v++){
187 poca[
v] = recCgemKalTrackRoot->
getPoca(
v);
206 for (
int i=0, k=0; i<5; i++){
207 zhelix[i] = recCgemKalTrackRoot->
getZHelix(i);
208 zhelix_e[i] = recCgemKalTrackRoot->
getZHelixE(i);
209 zhelix_mu[i] = recCgemKalTrackRoot->
getZHelixMu(i);
210 zhelix_k[i] = recCgemKalTrackRoot->
getZHelixK(i);
211 zhelix_p[i] = recCgemKalTrackRoot->
getZHelixP(i);
214 fhelix[i] = recCgemKalTrackRoot->
getFHelix(i);
215 fhelix_e[i] = recCgemKalTrackRoot->
getFHelixE(i);
216 fhelix_mu[i] = recCgemKalTrackRoot->
getFHelixMu(i);
217 fhelix_k[i] = recCgemKalTrackRoot->
getFHelixK(i);
218 fhelix_p[i] = recCgemKalTrackRoot->
getFHelixP(i);
220 lhelix[i] = recCgemKalTrackRoot->
getLHelix(i);
221 lhelix_e[i] = recCgemKalTrackRoot->
getLHelixE(i);
222 lhelix_mu[i] = recCgemKalTrackRoot->
getLHelixMu(i);
223 lhelix_k[i] = recCgemKalTrackRoot->
getLHelixK(i);
224 lhelix_p[i] = recCgemKalTrackRoot->
getLHelixP(i);
226 thelix[i] = recCgemKalTrackRoot->
getTHelix(i);
228 for (
int j=0; j<=i; j++){
230 zerror[i][j] = recCgemKalTrackRoot->
getZError(i,j);
231 zerror_e[i][j] = recCgemKalTrackRoot->
getZErrorE(i,j);
232 zerror_mu[i][j] = recCgemKalTrackRoot->
getZErrorMu(i,j);
233 zerror_k[i][j] = recCgemKalTrackRoot->
getZErrorK(i,j);
234 zerror_p[i][j] = recCgemKalTrackRoot->
getZErrorP(i,j);
235 zerror[j][i] = zerror[i][j];
236 zerror_e[j][i] = zerror_e[i][j];
237 zerror_mu[j][i] = zerror_mu[i][j];
238 zerror_k[j][i] = zerror_k[i][j];
239 zerror_p[j][i] = zerror_p[i][j];
241 ferror[i][j] = recCgemKalTrackRoot->
getFError(i,j);
242 ferror_e[i][j] = recCgemKalTrackRoot->
getFErrorE(i,j);
243 ferror_mu[i][j] = recCgemKalTrackRoot->
getFErrorMu(i,j);
244 ferror_k[i][j] = recCgemKalTrackRoot->
getFErrorK(i,j);
245 ferror_p[i][j] = recCgemKalTrackRoot->
getFErrorP(i,j);
246 ferror[j][i] = ferror[i][j];
247 ferror_e[j][i] = ferror_e[i][j];
248 ferror_mu[j][i] = ferror_mu[i][j];
249 ferror_k[j][i] = ferror_k[i][j];
250 ferror_p[j][i] = ferror_p[i][j];
252 lerror[i][j] = recCgemKalTrackRoot->
getLError(i,j);
253 lerror_e[i][j] = recCgemKalTrackRoot->
getLErrorE(i,j);
254 lerror_mu[i][j] = recCgemKalTrackRoot->
getLErrorMu(i,j);
255 lerror_k[i][j] = recCgemKalTrackRoot->
getLErrorK(i,j);
256 lerror_p[i][j] = recCgemKalTrackRoot->
getLErrorP(i,j);
257 lerror[j][i] = lerror[i][j];
258 lerror_e[j][i] = lerror_e[i][j];
259 lerror_mu[j][i] = lerror_mu[i][j];
260 lerror_k[j][i] = lerror_k[i][j];
261 lerror_p[j][i] = lerror_p[i][j];
263 terror[i][j] = recCgemKalTrackRoot->
getTError(k++);
264 terror[j][i] = terror[i][j];
275 zhelixs.push_back(zhelix_e);
276 zhelixs.push_back(zhelix_mu);
277 zhelixs.push_back(zhelix);
278 zhelixs.push_back(zhelix_k);
279 zhelixs.push_back(zhelix_p);
280 zerrors.push_back(zerror_e);
281 zerrors.push_back(zerror_mu);
282 zerrors.push_back(zerror);
283 zerrors.push_back(zerror_k);
284 zerrors.push_back(zerror_p);
286 fhelixs.push_back(fhelix_e);
287 fhelixs.push_back(fhelix_mu);
288 fhelixs.push_back(fhelix);
289 fhelixs.push_back(fhelix_k);
290 fhelixs.push_back(fhelix_p);
291 ferrors.push_back(ferror_e);
292 ferrors.push_back(ferror_mu);
293 ferrors.push_back(ferror);
294 ferrors.push_back(ferror_k);
295 ferrors.push_back(ferror_p);
297 lhelixs.push_back(lhelix_e);
298 lhelixs.push_back(lhelix_mu);
299 lhelixs.push_back(lhelix);
300 lhelixs.push_back(lhelix_k);
301 lhelixs.push_back(lhelix_p);
302 lerrors.push_back(lerror_e);
303 lerrors.push_back(lerror_mu);
304 lerrors.push_back(lerror);
305 lerrors.push_back(lerror_k);
306 lerrors.push_back(lerror_p);
309 pocas.push_back(poca_e);
310 pocas.push_back(poca_mu);
311 pocas.push_back(poca);
312 pocas.push_back(poca_k);
313 pocas.push_back(poca_p);
314 lpivots.push_back(lpivot_e);
315 lpivots.push_back(lpivot_mu);
316 lpivots.push_back(lpivot);
317 lpivots.push_back(lpivot_k);
318 lpivots.push_back(lpivot_p);
319 lpoints.push_back(lpoint_e);
320 lpoints.push_back(lpoint_mu);
321 lpoints.push_back(lpoint);
322 lpoints.push_back(lpoint_k);
323 lpoints.push_back(lpoint_p);
325 for(
int m=0; m<5; m++){
327 double pxy(0.),px(0.),py(0.),pz(0.),ptot(0.),dr(0.),phi0(0.),kappa(0.),dz(0.),tanl(0.),
x(0.),y(0.),z(0.),vx0(0.),vy0(0.),vz0(0.);
329 phi0 = zhelixs[m][1];
330 kappa = zhelixs[m][2];
332 tanl = zhelixs[m][4];
342 if (kappa > 0.0000000001)
344 else if (kappa < -0.0000000001)
349 if(kappa!=0) pxy = 1.0/fabs(kappa);
352 px = pxy * (-
sin(phi0));
353 py = pxy *
cos(phi0);
355 ptot = sqrt(px*px+py*py+pz*pz);
358 recCgemKalTrackTds->
setPxy(pxy,m);
359 recCgemKalTrackTds->
setPx(px,m);
360 recCgemKalTrackTds->
setPy(py,m);
361 recCgemKalTrackTds->
setPz(pz,m);
362 recCgemKalTrackTds->
setP(ptot,m);
363 recCgemKalTrackTds->
setTheta(acos(pz/ptot),m);
364 recCgemKalTrackTds->
setPhi(atan2(py,px),m);
365 recCgemKalTrackTds->
setX(x,m);
366 recCgemKalTrackTds->
setY(y,m);
367 recCgemKalTrackTds->
setZ(z,m);
368 recCgemKalTrackTds->
setR(sqrt(x*x+y*y),m);
371 for(
int n=0;
n<2;
n++){
372 int stat = recCgemKalTrackRoot->
getStat(
n,m);
373 int chisq = recCgemKalTrackRoot->
getChisq(
n,m);
374 int ndf = recCgemKalTrackRoot->
getNdf(
n,m);
375 recCgemKalTrackTds->
setStat(stat,
n,m);
377 recCgemKalTrackTds->
setNdf(ndf,
n,m);
385 for(
int jj=0; jj<5; jj++){
389 recCgemKalTrackTds->
setZHelix(zhelixs[jj],jj);
392 recCgemKalTrackTds->
setZError(zerrors[jj],jj);
393 recCgemKalTrackTds->
setFHelix(fhelixs[jj],jj);
394 recCgemKalTrackTds->
setFError(ferrors[jj],jj);
397 recCgemKalTrackTds->
setLHelix(lhelixs[jj],jj);
398 recCgemKalTrackTds->
setLError(lerrors[jj],jj);
399 recCgemKalTrackTds->
setPoca(pocas[jj],jj);
402 recCgemKalTrackTds->
setLPoint(lpoints[jj],jj);
403 recCgemKalTrackTds->
setLPivot(lpivots[jj],jj);
411 log<<MSG::DEBUG<<
"T to REC TDS, zhelix: "<<zhelix<<endreq;
412 log<<MSG::DEBUG<<
"T to REC TDS, zerror: "<<zerror<<endreq;
418 RecCgemKalHelixSegCol::iterator
iter = recCgemKalHelixSegCol->begin();
419 for (;
iter != recCgemKalHelixSegCol->end();
iter++){
422 if((*iter)->getTrackId() == trackId){
423 SmartRef<RecCgemKalHelixSeg> refhit(*
iter);
424 theKalHelixSegRefVec.push_back(refhit);
434 for(
int ii=0; ii <nhelixsegs ; ii++)
445 recCgemKalTrackCol->push_back(recCgemKalTrackTds);
449 delete m_recCgemKalTrackCol;
451 m_recCgemKalTrackCol = 0;
453 return StatusCode::SUCCESS;
461 MsgStream log(
msgSvc(),
"RecCgemKalTrackCnv");
462 log << MSG::DEBUG <<
"RecCgemKalTrackCnv::DataObjectToTObject" << endreq;
463 StatusCode sc=StatusCode::SUCCESS;
466 if (!cgemKalTrackColTds) {
467 log << MSG::ERROR <<
"Could not downcast to RecCgemKalTrackCol" << endreq;
468 return StatusCode::FAILURE;
474 log << MSG::ERROR <<
"Could not get ReconEvent in TDS " << endreq;
475 return StatusCode::FAILURE;
480 log << MSG::ERROR <<
"CgemKalTrackCnv:Could not downcast to TDS Recon Event" << endreq;
482 IOpaqueAddress *addr;
489 if (!m_recCgemKalTrackCol)
return sc;
492 RecCgemKalTrackCol::const_iterator cgemKalTrackTds;
494 for (cgemKalTrackTds = cgemKalTrackColTds->begin(); cgemKalTrackTds != cgemKalTrackColTds->end(); cgemKalTrackTds++) {
504 Double_t chisq[2][5];
516 Double_t zerror[5][5];
517 Double_t zhelix_e[5];
518 Double_t zerror_e[5][5];
519 Double_t zhelix_mu[5];
520 Double_t zerror_mu[5][5];
521 Double_t zhelix_k[5];
522 Double_t zerror_k[5][5];
523 Double_t zhelix_p[5];
524 Double_t zerror_p[5][5];
527 Double_t ferror[5][5];
528 Double_t fhelix_e[5];
529 Double_t ferror_e[5][5];
530 Double_t fhelix_mu[5];
531 Double_t ferror_mu[5][5];
532 Double_t fhelix_k[5];
533 Double_t ferror_k[5][5];
534 Double_t fhelix_p[5];
535 Double_t ferror_p[5][5];
538 Double_t lerror[5][5];
539 Double_t lhelix_e[5];
540 Double_t lerror_e[5][5];
541 Double_t lhelix_mu[5];
542 Double_t lerror_mu[5][5];
543 Double_t lhelix_k[5];
544 Double_t lerror_k[5][5];
545 Double_t lhelix_p[5];
546 Double_t lerror_p[5][5];
551 Double_t lpoint_e[3];
552 Double_t lpoint_mu[3];
554 Double_t lpoint_k[3];
555 Double_t lpoint_p[3];
557 Double_t lpivot_e[3];
558 Double_t lpivot_mu[3];
560 Double_t lpivot_k[3];
561 Double_t lpivot_p[3];
565 trackId = (*cgemKalTrackTds)->getTrackId();
566 for (Int_t i = 0 ; i < 5 ; i++){
567 mass[i] = (*cgemKalTrackTds)->getMass(i);
568 length[i] = (*cgemKalTrackTds)->getLength(i);
569 tof[i] = (*cgemKalTrackTds)->getTof(i);
570 nhits[i] = (*cgemKalTrackTds)->getNhits(i);
571 fiTerm[i]=(*cgemKalTrackTds)->getFiTerm(i);
572 pathSM[i]=(*cgemKalTrackTds)->getPathSM(i);
574 for (Int_t j = 0 ; j< 2 ; j++){
575 stat[j][i] = (*cgemKalTrackTds)->getStat(j,i);
576 chisq[j][i] = (*cgemKalTrackTds)->getChisq(j,i);
577 ndf[j][i] = (*cgemKalTrackTds)->getNdf(j,i);
578 cgemKalTrackRoot->
setStat(stat[j][i],j,i);
579 cgemKalTrackRoot->
setChisq(chisq[j][i],j,i);
580 cgemKalTrackRoot->
setNdf(ndf[j][i],j,i);
583 for(Int_t i=0;i<5;i++){
584 log<<MSG::INFO<<
" recCgemKalTrack.helix("<<i<<
"): "<<(*cgemKalTrackTds)->getTHelix(i)<<endreq;
585 thelix[i] = (*cgemKalTrackTds)->getTHelix(i);
587 for(Int_t i=0; i<15; i++){
588 terror[i] = (*cgemKalTrackTds)->getTError(i);
590 HepPoint3D h_poca_e = (*cgemKalTrackTds)->getPocaE();
591 HepPoint3D h_poca_mu = (*cgemKalTrackTds)->getPocaMu();
592 HepPoint3D h_poca = (*cgemKalTrackTds)->getPoca();
593 HepPoint3D h_poca_k = (*cgemKalTrackTds)->getPocaK();
594 HepPoint3D h_poca_p = (*cgemKalTrackTds)->getPocaP();
595 HepPoint3D h_lpoint_e = (*cgemKalTrackTds)->getLPointE();
596 HepPoint3D h_lpoint_mu = (*cgemKalTrackTds)->getLPointMu();
597 HepPoint3D h_lpoint = (*cgemKalTrackTds)->getLPoint();
598 HepPoint3D h_lpoint_k = (*cgemKalTrackTds)->getLPointK();
599 HepPoint3D h_lpoint_p = (*cgemKalTrackTds)->getLPointP();
600 HepPoint3D h_lpivot_e = (*cgemKalTrackTds)->getLPivotE();
601 HepPoint3D h_lpivot_mu = (*cgemKalTrackTds)->getLPivotMu();
602 HepPoint3D h_lpivot = (*cgemKalTrackTds)->getLPivot();
603 HepPoint3D h_lpivot_k = (*cgemKalTrackTds)->getLPivotK();
604 HepPoint3D h_lpivot_p = (*cgemKalTrackTds)->getLPivotP();
612 HepVector h_zhelix = (*cgemKalTrackTds)->getZHelix();
613 HepSymMatrix h_zerror = (*cgemKalTrackTds)->getZError();
614 HepVector h_zhelix_e = (*cgemKalTrackTds)->getZHelixE();
615 HepSymMatrix h_zerror_e = (*cgemKalTrackTds)->getZErrorE();
616 HepVector h_zhelix_mu = (*cgemKalTrackTds)->getZHelixMu();
617 HepSymMatrix h_zerror_mu= (*cgemKalTrackTds)->getZErrorMu();
618 HepVector h_zhelix_k = (*cgemKalTrackTds)->getZHelixK();
619 HepSymMatrix h_zerror_k = (*cgemKalTrackTds)->getZErrorK();
620 HepVector h_zhelix_p = (*cgemKalTrackTds)->getZHelixP();
621 HepSymMatrix h_zerror_p = (*cgemKalTrackTds)->getZErrorP();
623 HepVector h_fhelix = (*cgemKalTrackTds)->getFHelix();
624 HepSymMatrix h_ferror = (*cgemKalTrackTds)->getFError();
625 HepVector h_fhelix_e = (*cgemKalTrackTds)->getFHelixE();
626 HepSymMatrix h_ferror_e = (*cgemKalTrackTds)->getFErrorE();
627 HepVector h_fhelix_mu = (*cgemKalTrackTds)->getFHelixMu();
628 HepSymMatrix h_ferror_mu= (*cgemKalTrackTds)->getFErrorMu();
629 HepVector h_fhelix_k = (*cgemKalTrackTds)->getFHelixK();
630 HepSymMatrix h_ferror_k = (*cgemKalTrackTds)->getFErrorK();
631 HepVector h_fhelix_p = (*cgemKalTrackTds)->getFHelixP();
632 HepSymMatrix h_ferror_p = (*cgemKalTrackTds)->getFErrorP();
634 HepVector h_lhelix = (*cgemKalTrackTds)->getLHelix();
635 HepSymMatrix h_lerror = (*cgemKalTrackTds)->getLError();
636 HepVector h_lhelix_e = (*cgemKalTrackTds)->getLHelixE();
637 HepSymMatrix h_lerror_e = (*cgemKalTrackTds)->getLErrorE();
638 HepVector h_lhelix_mu = (*cgemKalTrackTds)->getLHelixMu();
639 HepSymMatrix h_lerror_mu= (*cgemKalTrackTds)->getLErrorMu();
640 HepVector h_lhelix_k = (*cgemKalTrackTds)->getLHelixK();
641 HepSymMatrix h_lerror_k = (*cgemKalTrackTds)->getLErrorK();
642 HepVector h_lhelix_p = (*cgemKalTrackTds)->getLHelixP();
643 HepSymMatrix h_lerror_p = (*cgemKalTrackTds)->getLErrorP();
648 cgemKalTrackRoot->
setTof(tof);
654 for(
int s=0;
s<3;
s++){
655 poca_e[
s] = h_poca_e[
s];
656 poca_mu[
s] = h_poca_mu[
s];
658 poca_k[
s] = h_poca_k[
s];
659 poca_p[
s] = h_poca_p[
s];
660 lpoint_e[
s] = h_lpoint_e[
s];
661 lpoint_mu[
s] = h_lpoint_mu[
s];
662 lpoint[
s] = h_lpoint[
s];
663 lpoint_k[
s] = h_lpoint_k[
s];
664 lpoint_p[
s] = h_lpoint_p[
s];
665 lpivot_e[
s] = h_lpivot_e[
s];
666 lpivot_mu[
s] = h_lpivot_mu[
s];
667 lpivot[
s] = h_lpivot[
s];
668 lpivot_k[
s] = h_lpivot_k[
s];
669 lpivot_p[
s] = h_lpivot_p[
s];
672 for (
int i=0; i<5; i++){
673 zhelix[i] = h_zhelix[i];
674 zhelix_e[i] = h_zhelix_e[i];
675 zhelix_mu[i] = h_zhelix_mu[i];
676 zhelix_p[i] = h_zhelix_p[i];
677 zhelix_k[i] = h_zhelix_k[i];
679 fhelix[i] = h_fhelix[i];
680 fhelix_e[i] = h_fhelix_e[i];
681 fhelix_mu[i] = h_fhelix_mu[i];
682 fhelix_p[i] = h_fhelix_p[i];
683 fhelix_k[i] = h_fhelix_k[i];
685 lhelix[i] = h_lhelix[i];
686 lhelix_e[i] = h_lhelix_e[i];
687 lhelix_mu[i] = h_lhelix_mu[i];
688 lhelix_p[i] = h_lhelix_p[i];
689 lhelix_k[i] = h_lhelix_k[i];
691 for (
int j=0; j<=i; j++){
692 zerror[i][j] = h_zerror[i][j];
693 zerror_e[i][j] = h_zerror_e[i][j];
694 zerror_mu[i][j] = h_zerror_mu[i][j];
695 zerror_p[i][j] = h_zerror_p[i][j];
696 zerror_k[i][j] = h_zerror_k[i][j];
699 ferror[i][j] = h_ferror[i][j];
700 ferror_e[i][j] = h_ferror_e[i][j];
701 ferror_mu[i][j] = h_ferror_mu[i][j];
702 ferror_p[i][j] = h_ferror_p[i][j];
703 ferror_k[i][j] = h_ferror_k[i][j];
706 lerror[i][j] = h_lerror[i][j];
707 lerror_e[i][j] = h_lerror_e[i][j];
708 lerror_mu[i][j] = h_lerror_mu[i][j];
709 lerror_p[i][j] = h_lerror_p[i][j];
710 lerror_k[i][j] = h_lerror_k[i][j];
712 zerror[j][i] = h_zerror[i][j];
713 zerror_e[j][i] = h_zerror_e[i][j];
714 zerror_mu[j][i] = h_zerror_mu[i][j];
715 zerror_p[j][i] = h_zerror_p[i][j];
716 zerror_k[j][i] = h_zerror_k[i][j];
719 ferror[j][i] = h_ferror[i][j];
720 ferror_e[j][i] = h_ferror_e[i][j];
721 ferror_mu[j][i] = h_ferror_mu[i][j];
722 ferror_p[j][i] = h_ferror_p[i][j];
723 ferror_k[j][i] = h_ferror_k[i][j];
726 lerror[j][i] = h_lerror[i][j];
727 lerror_e[j][i] = h_lerror_e[i][j];
728 lerror_mu[j][i] = h_lerror_mu[i][j];
729 lerror_p[j][i] = h_lerror_p[i][j];
730 lerror_k[j][i] = h_lerror_k[i][j];
737 for(
int k=0; k<5; k++){
738 log<<MSG::INFO<<
" RecCgemKalTrackRoot.ZHelix "<<
"["<<k<<
"]"
739 <<cgemKalTrackRoot->
getZHelix(k)<<endreq;
776 cgemKalTrackRoot->
setPoca(poca);
797 return StatusCode::SUCCESS;
SmartRefVector< RecCgemKalHelixSeg > RecCgemHelixSegRefVec
ObjectVector< RecCgemKalTrack > RecCgemKalTrackCol
double sin(const BesAngle a)
double cos(const BesAngle a)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
static int strip(const Identifier &id)
static int sheet(const Identifier &id)
static int layer(const Identifier &id)
void setStat(int stat, int i, int pid)
void setCharge(const int charge, const int pid)
void setChisq(double chisq, int i, int pid)
void setZ(const double z, const int pid)
void setX(const double x, const int pid)
void setPy(const double py, const int pid)
void setR(const double r, const int pid)
void setPoca(const HepPoint3D &poca, const int pid)
void setP(const double p, const int pid)
void setTrackId(int trackId)
void setPz(const double pz, const int pid)
void setZHelix(const HepVector &helix, const int pid)
void setY(const double y, const int pid)
void setTheta(const double theta, const int pid)
void setPhi(const double phi, const int pid)
void setNdf(int ndf, int i, int pid)
void setZError(const HepSymMatrix &error, const int pid)
void setPxy(const double pxy, const int pid)
void setFError(const HepSymMatrix &ferror, const int pid)
void setPx(const double px, const int pid)
void setFHelix(const HepVector &fhelix, const int pid)
virtual StatusCode TObjectToDataObject(DataObject *&obj)
transformation from root
RecCgemKalTrackCnv(ISvcLocator *svc)
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation to root
void setFiTerm(double fi, const int pid)
RecCgemHelixSegRefVec getVecHelixSegs(void) const
void setPathSM(double length, int pid)
void setLPoint(const HepPoint3D &point, const int pid)
void setTof(double tof, int pid)
void setMass(double mass, int pid)
void setTError(const HepSymMatrix &error)
void setLPivot(const HepPoint3D &pivot, const int pid)
void setLength(double length, int pid)
void setLError(const HepSymMatrix &error, const int pid)
void setLHelix(const HepVector &helix, const int pid)
void setTHelix(const HepVector &helix)
void setVecHelixSegs(const RecCgemHelixSegRefVec &vechelixsegs)
void setNhits(int nhits, int pid)
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
Definition of a Root address, derived from IOpaqueAddress.
RecTrackCnv * getRecTrackCnv()
Base class for all Root Converters.
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setTrackId(const Int_t trackId)
const Double_t getChisq(Int_t i, Int_t pid) const
const Double_t getZErrorMu(Int_t i, Int_t j) const
void setLError(const Double_t lerror[5][5])
const Double_t getLPointMu(Int_t i) const
const Double_t getLHelixE(Int_t i) const
void setLHelixMu(const Double_t lhelix_mu[5])
void setFHelixMu(const Double_t fhelix_mu[5])
const Double_t getPocaMu(Int_t i) const
void setLPointK(const Double_t lpoint_k[3])
const Double_t getLPivot(Int_t i) const
const Double_t getLErrorMu(Int_t i, Int_t j) const
void setLPointP(const Double_t lpoint_p[3])
const Double_t getLHelixP(Int_t i) const
const Double_t getLPivotK(Int_t i) const
const Double_t getMass(Int_t pid) const
void setLHelix(const Double_t lhelix[5])
void setTof(const Double_t tof[5])
void setLPivot(const Double_t lpivot[3])
const Double_t getFErrorK(Int_t i, Int_t j) const
void setFHelix(const Double_t fhelix[5])
void setLPointE(const Double_t lpoint_e[3])
void setZHelixE(const Double_t zhelix_e[5])
void setNhits(const Int_t nhits[5])
const Double_t getFErrorP(Int_t i, Int_t j) const
const Int_t getTrackId() const
void setTError(const Double_t terror[15])
const Double_t getZErrorE(Int_t i, Int_t j) const
const Double_t getLPivotP(Int_t i) const
void setPathSM(const Double_t pathSM[5])
const Double_t getLPivotE(Int_t i) const
void setMass(const Double_t mass[5])
const Double_t getPocaK(Int_t i) const
const Int_t getStat(Int_t i, Int_t pid) const
void setLPoint(const Double_t lpoint[3])
void setLErrorE(const Double_t lerror_e[5][5])
const Double_t getFErrorE(Int_t i, Int_t j) const
void setLErrorK(const Double_t lerror_k[5][5])
void setFErrorMu(const Double_t ferror_mu[5][5])
void setPocaE(const Double_t poca_e[3])
void setPocaMu(const Double_t poca_mu[3])
const Double_t getLPoint(Int_t i) const
void setLength(const Double_t length[5])
void setLHelixK(const Double_t lhelix_k[5])
void setFHelixK(const Double_t fhelix_k[5])
const Double_t getLErrorP(Int_t i, Int_t j) const
const Double_t getZHelixK(Int_t i) const
void setLPivotP(const Double_t lpivot_p[3])
const Double_t getLPointK(Int_t i) const
const Double_t getFHelix(Int_t i) const
const Double_t getLHelix(Int_t i) const
void setZHelixP(const Double_t zhelix_p[5])
const Double_t getPoca(Int_t i) const
void setFiTerm(const Double_t fiTerm[5])
void setFError(const Double_t ferror[5][5])
void setFErrorE(const Double_t ferror_e[5][5])
const Double_t getTHelix(Int_t i) const
const Double_t getLError(Int_t i, Int_t j) const
const Double_t getZHelixMu(Int_t i) const
void setStat(const Int_t stat, Int_t i, Int_t pid)
void setZError(const Double_t zerror[5][5])
const Double_t getLHelixMu(Int_t i) const
const Double_t getLErrorK(Int_t i, Int_t j) const
void setLErrorP(const Double_t lerror_p[5][5])
void setLPivotK(const Double_t lpivot_k[3])
void setPoca(const Double_t poca[3])
void setZErrorP(const Double_t zerror_p[5][5])
const Int_t getNdf(Int_t i, Int_t pid) const
const Double_t getLPivotMu(Int_t i) const
void setFHelixP(const Double_t fhelix_p[5])
const Double_t getFError(Int_t i, Int_t j) const
void setZHelixK(const Double_t zhelix_k[5])
const Double_t getZErrorK(Int_t i, Int_t j) const
const Double_t getFHelixMu(Int_t i) const
void setZErrorMu(const Double_t zerror_mu[5][5])
const Double_t getLErrorE(Int_t i, Int_t j) const
const Double_t getZHelixE(Int_t i) const
const Double_t getZErrorP(Int_t i, Int_t j) const
void setLHelixE(const Double_t lhelix_e[5])
void setZHelixMu(const Double_t zhelix_mu[5])
const Double_t getPocaE(Int_t i) const
void setFHelixE(const Double_t fhelix_e[5])
void setChisq(const Double_t chisq, Int_t i, Int_t pid)
const Double_t getFHelixE(Int_t i) const
const Double_t getPocaP(Int_t i) const
const Double_t getLPointP(Int_t i) const
void setPocaK(const Double_t poca_k[3])
const Double_t getZHelixP(Int_t i) const
const Double_t getFHelixK(Int_t i) const
void setLErrorMu(const Double_t lerror_mu[5][5])
void setZHelix(const Double_t zhelix[5])
void setLPointMu(const Double_t lpoint_mu[3])
const Double_t getfiTerm(Int_t pid) const
const Double_t getFErrorMu(Int_t i, Int_t j) const
const Double_t getTof(Int_t pid) const
void setNdf(const Int_t ndf, Int_t i, Int_t pid)
void setPocaP(const Double_t poca_p[3])
void setLHelixP(const Double_t lhelix_p[5])
const Double_t getLHelixK(Int_t i) const
void setTHelix(const Double_t thelix[5])
void setLPivotE(const Double_t lpivot_e[3])
void setFErrorK(const Double_t ferror_k[5][5])
void setFErrorP(const Double_t ferror_p[5][5])
const Double_t getPathSM(Int_t pid) const
const Double_t getLength(Int_t pid) const
const Double_t getZHelix(Int_t i) const
const Double_t getZError(Int_t i, Int_t j) const
void setZErrorE(const Double_t zerror_e[5][5])
void setLPivotMu(const Double_t lpivot_mu[3])
const Double_t getLPointE(Int_t i) const
const Int_t getNhits(Int_t pid) const
const Double_t getFHelixP(Int_t i) const
const Double_t getTError(Int_t i) const
void setZErrorK(const Double_t zerror_k[5][5])
const TObjArray * getRecCgemKalTrackCol() const
void addRecCgemKalTrack(TRecCgemKalTrack *Track)
void clearRecCgemKalTrackCol()
static std::map< const TObject *, const RecCgemKalTrack * > m_rootRecCgemKalTrackMap
_EXTERN_ std::string Event