CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemAliRecTrk.cxx
Go to the documentation of this file.
2
3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/IMessageSvc.h"
5#include "GaudiKernel/StatusCode.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/Bootstrap.h"
8#include "GaudiKernel/SmartDataPtr.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10
11const double CgemAliRecTrk::m_df = 10.0;
12
14 unsigned int i;
15 for(i=0; i<m_rechit.size(); i++){
16 delete m_rechit[i];
17 }
18 m_rechit.clear();
19}
20
21void CgemAliRecTrk::setRecTrk(RecMdcTrackCol::iterator it_trk){
22 IMessageSvc *msgSvc;
23 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
24 MsgStream log(msgSvc, "CgemAliRecTrk");
25 log << MSG::DEBUG << "CgemAliRecTrk::setRecTrk()" << endreq;
26
27 m_stat = (*it_trk) -> stat();
28 m_dr = (*it_trk) -> helix(0);
29 m_phi0 = (*it_trk) -> helix(1);
30 m_kappa = (*it_trk) -> helix(2);
31 m_dz = (*it_trk) -> helix(3);
32 m_tanl = (*it_trk) -> helix(4);
33
34 m_helix = (*it_trk)->helix();
35 m_helixerr = (*it_trk)->err();
36
37 m_chisq = (*it_trk) -> chi2();
38 m_nhits = (*it_trk) -> getNhits();
39 m_ncluster = (*it_trk) -> getNcluster();
40
41 if(m_kappa < 0.01){ // no magnetic field
42 m_pt = 0.0;
43 m_p = 0.0;
44 }else{
45 m_pt = 1.0 / m_kappa;
46 m_p = m_pt * sqrt(m_tanl * m_tanl + 1.0);
47 }
48
49 ClusterRefVec gothits = (*it_trk) -> getVecClusters();
50 ClusterRefVec::iterator it_hit = gothits.begin();
51 CgemAliRecHit* rechit;
52 for(; it_hit != gothits.end(); it_hit++){
53 rechit = new CgemAliRecHit();
54 rechit->setRecHit(it_hit);
55 m_rechit.push_back(rechit);
56 }
57}
58
59void CgemAliRecTrk::setKalTrk(RecMdcKalTrackCol::iterator it_trk){
60 IMessageSvc *msgSvc;
61 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
62 MsgStream log(msgSvc, "CgemAliRecTrk");
63 log << MSG::DEBUG << "CgemAliRecTrk::setKalTrk()" << endreq;
64
65 int m_pid = 1;
69
70 m_stat = 0;
71 m_dr = (*it_trk)->dr();
72 m_phi0 = (*it_trk)->fi0();
73 m_kappa = (*it_trk)->kappa();
74 m_dz = (*it_trk)->dz();
75 m_tanl = (*it_trk)->tanl();
76 m_chisq = (*it_trk)->chi2();
77
78 m_dr *= 10.0; // cm -> mm
79 m_dz *= 10.0; // cm -> mm
80
81 m_pt = 1.0 / fabs(m_kappa);
82 m_p = m_pt * sqrt( m_tanl * m_tanl + 1.0 );
83
84 HelixSegRefVec gothelixsegs = (*it_trk)->getVecHelixSegs();
85 HelixSegRefVec::iterator it_hit = gothelixsegs.begin();
86 CgemAliRecHit* rechit;
87
88 int k = 0;
89 m_nhits = k;
90}
SmartRefVector< RecMdcKalHelixSeg > HelixSegRefVec
SmartRefVector< RecCgemCluster > ClusterRefVec
Definition RecMdcTrack.h:28
IMessageSvc * msgSvc()
void setRecHit(ClusterRefVec::iterator it_hit)
void setRecTrk(RecMdcTrackCol::iterator it_trk)
void setKalTrk(RecMdcKalTrackCol::iterator it_trk)
const int getNcluster() const
static void setPidType(PidType pidType)