CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
RecMdcTrack Class Reference

#include <RecMdcTrack.h>

+ Inheritance diagram for RecMdcTrack:

Public Member Functions

virtual const CLID & clID () const
 
 RecMdcTrack ()
 
 RecMdcTrack (const RecMdcTrack &)
 
 RecMdcTrack (const DstMdcTrack &)
 
RecMdcTrackoperator= (const RecMdcTrack &)
 
RecMdcTrackoperator= (const DstMdcTrack &)
 
 ~RecMdcTrack ()
 
const double getVX0 () const
 
const double getVY0 () const
 
const double getVZ0 () const
 
const int getNhits () const
 
const double getFiTerm () const
 
const HepPoint3DgetPivot () const
 
const HitRefVec getVecHits (void) const
 
const int getNcluster () const
 
const ClusterRefVec getVecClusters () const
 
const double getMatchChi2 () const
 
const map< int, int > getClusterFitStat ()
 
void setVX0 (double x0)
 
void setVY0 (double y0)
 
void setVZ0 (double z0)
 
void setFiTerm (double fiterm)
 
void setNhits (int nhits)
 
void setPivot (const HepPoint3D &pivot)
 
void setVecHits (HitRefVec vechits)
 
void setNcluster (int ncluster)
 
void setVecClusters (ClusterRefVec vecclusters)
 
void setVecClusters (ClusterRefVec vecclusters, map< int, int > clusterFitStat)
 
void setMatchChi2 (double MatchChi2)
 
void setClusterFitStat (map< int, int > clusterFitStat)
 
void updateStatistics ()
 
- Public Member Functions inherited from DstMdcTrack
 DstMdcTrack ()
 
 DstMdcTrack (const DstMdcTrack &)
 
DstMdcTrackoperator= (const DstMdcTrack &)
 
virtual ~DstMdcTrack ()
 
virtual const CLID & clID () const
 
const HepVector helix () const
 ......
 
const HepSymMatrix err () const
 
const HepLorentzVector p4 (const double mass) const
 
const HepPoint3D poca () const
 
const Hep3Vector p3 () const
 
const HepPoint3D x3 () const
 
const double helix (const int i) const
 
const double err (const int i) const
 
const int trackId () const
 
const int charge () const
 
const double pxy () const
 
const double px () const
 
const double py () const
 
const double pz () const
 
const double p () const
 
const double theta () const
 
const double phi () const
 
const double x () const
 
const double y () const
 
const double z () const
 
const double r () const
 
const int stat () const
 
const double chi2 () const
 
const int ndof () const
 
const int nster () const
 
const int firstLayer () const
 
const int lastLayer () const
 
const int nlayer () const
 
const int nCgemXCluster () const
 
const int nCgemVCluster () const
 
void setHelix (double helix[5])
 
void setPoca (double poca[3])
 
void setError (double err[15])
 
void setHelix (const HepVector &a)
 
void setPoca (const HepPoint3D &poca)
 
void setError (const HepSymMatrix &Ea)
 
void setTrackId (const int trackId)
 
void setCharge (const int charge)
 
void setPxy (const double pxy)
 
void setPx (const double px)
 
void setPy (const double py)
 
void setPz (const double pz)
 
void setP (const double p)
 
void setTheta (const double theta)
 
void setPhi (const double phi)
 
void setX (const double x)
 
void setY (const double y)
 
void setZ (const double z)
 
void setR (const double r)
 
void setStat (const int stat)
 
void setChi2 (const double chi)
 
void setNdof (const int ndof)
 
void setNster (const int ns)
 
void setFirstLayer (const int id)
 
void setLastLayer (const int id)
 
void setNlayer (const int nlayer)
 
void setNCgemXCluster (const int n)
 
void setNCgemVCluster (const int n)
 

Static Public Member Functions

static const CLID & classID ()
 
- Static Public Member Functions inherited from DstMdcTrack
static const CLID & classID ()
 

Additional Inherited Members

- Protected Attributes inherited from DstMdcTrack
int m_trackId
 
int m_charge
 
double m_helix [5]
 
double m_err [15]
 
double m_poca [3]
 
HepPoint3D m_poca3D
 
HepVector m_a
 
HepSymMatrix m_Ea
 
int m_stat
 
double m_chi2
 
int m_ndof
 
int m_nster
 
int m_nCgemXClusters
 
int m_nCgemVClusters
 
int m_firstLayer
 
int m_lastLayer
 
int m_nlayer
 
double m_pxy
 
double m_px
 
double m_py
 
double m_pz
 
double m_p
 
double m_theta
 
double m_phi
 
double m_x
 
double m_y
 
double m_z
 
double m_r
 

Detailed Description

Definition at line 30 of file RecMdcTrack.h.

Constructor & Destructor Documentation

◆ RecMdcTrack() [1/3]

RecMdcTrack::RecMdcTrack ( )

Definition at line 20 of file RecMdcTrack.cxx.

21 : m_pivot(0,0,0),
22 m_fiTerm(0.0),
23 m_nhits(0),
24 m_ncluster(0),
25 m_matchChi2(9999.0)
26 {
27 }

◆ RecMdcTrack() [2/3]

RecMdcTrack::RecMdcTrack ( const RecMdcTrack rectrk)

Definition at line 29 of file RecMdcTrack.cxx.

30 : DstMdcTrack(rectrk),
31 m_pivot(rectrk.m_pivot),
32 m_fiTerm(rectrk.m_fiTerm),
33 m_nhits(rectrk.m_nhits),
34 m_vechits(rectrk.m_vechits),
35 m_ncluster(rectrk.m_ncluster),
36 m_matchChi2(rectrk.m_matchChi2),
37 m_vecclusters(rectrk.m_vecclusters)
38 {
39 }

◆ RecMdcTrack() [3/3]

RecMdcTrack::RecMdcTrack ( const DstMdcTrack dstrk)

Definition at line 41 of file RecMdcTrack.cxx.

42 : DstMdcTrack(dstrk),
43 m_pivot(-99.,-99.,-99.),
44 m_fiTerm(-99.),
45 m_nhits(-99)
46 {
47 }

◆ ~RecMdcTrack()

RecMdcTrack::~RecMdcTrack ( )

Definition at line 77 of file RecMdcTrack.cxx.

77 {
78 }

Member Function Documentation

◆ classID()

const CLID & RecMdcTrack::classID ( )
static

Definition at line 16 of file RecMdcTrack.cxx.

16 {
17 return CLID_RecMdcTrack;
18 }
const CLID & CLID_RecMdcTrack
Definition: EventModel.cxx:339

Referenced by clID().

◆ clID()

const CLID & RecMdcTrack::clID ( ) const
virtual

Reimplemented from DstMdcTrack.

Definition at line 12 of file RecMdcTrack.cxx.

12 {
13 return RecMdcTrack::classID();
14 }
static const CLID & classID()
Definition: RecMdcTrack.cxx:16

◆ getClusterFitStat()

const map< int, int > RecMdcTrack::getClusterFitStat ( )
inline

Definition at line 72 of file RecMdcTrack.h.

72{return m_clusterFitStat;}

◆ getFiTerm()

const double RecMdcTrack::getFiTerm ( ) const
inline

Definition at line 59 of file RecMdcTrack.h.

59{ return m_fiTerm; }

Referenced by ExtMdcTrack::ReadTrk().

◆ getMatchChi2()

const double RecMdcTrack::getMatchChi2 ( ) const
inline

Definition at line 71 of file RecMdcTrack.h.

71{return m_matchChi2; }

◆ getNcluster()

const int RecMdcTrack::getNcluster ( ) const
inline

Definition at line 69 of file RecMdcTrack.h.

69{ return m_ncluster; }

◆ getNhits()

const int RecMdcTrack::getNhits ( ) const
inline

◆ getPivot()

const HepPoint3D & RecMdcTrack::getPivot ( ) const
inline

Definition at line 63 of file RecMdcTrack.h.

63{ return m_pivot; }

Referenced by ExtMdcTrack::ReadTrk().

◆ getVecClusters()

const ClusterRefVec RecMdcTrack::getVecClusters ( ) const
inline

Definition at line 70 of file RecMdcTrack.h.

70{ return m_vecclusters;}

Referenced by TestTrack::execute(), and CgemMdcFitAlg::fit().

◆ getVecHits()

◆ getVX0()

const double RecMdcTrack::getVX0 ( ) const
inline

Definition at line 50 of file RecMdcTrack.h.

50{ return m_pivot[0]; }

Referenced by MdcMergeDups::testByOverlapHit().

◆ getVY0()

const double RecMdcTrack::getVY0 ( ) const
inline

Definition at line 51 of file RecMdcTrack.h.

51{ return m_pivot[1]; }

Referenced by MdcMergeDups::testByOverlapHit().

◆ getVZ0()

const double RecMdcTrack::getVZ0 ( ) const
inline

Definition at line 52 of file RecMdcTrack.h.

52{ return m_pivot[2]; }

Referenced by MdcMergeDups::testByOverlapHit().

◆ operator=() [1/2]

RecMdcTrack & RecMdcTrack::operator= ( const DstMdcTrack dstrk)

Definition at line 64 of file RecMdcTrack.cxx.

65 {
66 if( &dstrk != this ){
68 m_pivot[0] = -99.;
69 m_pivot[1] = -99.;
70 m_pivot[2] = -99.;
71 m_fiTerm = -99.;
72 m_nhits = -99;
73 }
74 return *this;
75 }
DstMdcTrack & operator=(const DstMdcTrack &)
Definition: DstMdcTrack.cxx:69

◆ operator=() [2/2]

RecMdcTrack & RecMdcTrack::operator= ( const RecMdcTrack rectrk)

Definition at line 49 of file RecMdcTrack.cxx.

50 {
51 if( &rectrk != this ){
53 m_pivot = rectrk.m_pivot;
54 m_fiTerm = rectrk. m_fiTerm;
55 m_nhits = rectrk. m_nhits;
56 m_vechits = rectrk.m_vechits;
57 m_ncluster = rectrk.m_ncluster;
58 m_matchChi2 = rectrk.m_matchChi2;
59 m_vecclusters = rectrk.m_vecclusters;
60 }
61 return *this;
62 }

◆ setClusterFitStat()

void RecMdcTrack::setClusterFitStat ( map< int, int >  clusterFitStat)
inline

Definition at line 88 of file RecMdcTrack.h.

88{m_clusterFitStat = clusterFitStat;}

◆ setFiTerm()

void RecMdcTrack::setFiTerm ( double  fiterm)
inline

◆ setMatchChi2()

void RecMdcTrack::setMatchChi2 ( double  MatchChi2)
inline

Definition at line 87 of file RecMdcTrack.h.

87{ m_matchChi2 = MatchChi2; }

◆ setNcluster()

void RecMdcTrack::setNcluster ( int  ncluster)
inline

Definition at line 83 of file RecMdcTrack.h.

83{ m_ncluster = ncluster;}

Referenced by CgemLineFit::Store_Trk(), MdcTrack::storeTrack(), updateStatistics(), and CgemMdcFitAlg::updateTracks().

◆ setNhits()

void RecMdcTrack::setNhits ( int  nhits)
inline

◆ setPivot()

void RecMdcTrack::setPivot ( const HepPoint3D pivot)
inline

◆ setVecClusters() [1/2]

void RecMdcTrack::setVecClusters ( ClusterRefVec  vecclusters)

◆ setVecClusters() [2/2]

void RecMdcTrack::setVecClusters ( ClusterRefVec  vecclusters,
map< int, int >  clusterFitStat 
)

Definition at line 92 of file RecMdcTrack.cxx.

93{
94 m_vecclusters = vecclusters;
95 m_clusterFitStat = clusterFitStat;
97}

◆ setVecHits()

void RecMdcTrack::setVecHits ( HitRefVec  vechits)

◆ setVX0()

void RecMdcTrack::setVX0 ( double  x0)
inline

◆ setVY0()

void RecMdcTrack::setVY0 ( double  y0)
inline

◆ setVZ0()

void RecMdcTrack::setVZ0 ( double  z0)
inline

◆ updateStatistics()

void RecMdcTrack::updateStatistics ( )

Definition at line 99 of file RecMdcTrack.cxx.

100{
101 set<int> mdc_layers;
102 set<int> cgem_layers;
103
104 int nDof = 0;
105 int nSter = 0;
106 int maxLayerId = -1;
107 int minLayerId = 43;
108 int nLayer = 0;
109 double fiTerm = 999.;
110
111 MdcID* mdcID = new MdcID();
112 int nHits = m_vechits.size();
113 HitRefVec::iterator iterHit = m_vechits.begin();
114 for( ; iterHit != m_vechits.end(); iterHit++){
115 Identifier mdcid = (*iterHit)->getMdcId();
116 int layerId = MdcID::layer(mdcid);
117 //count nDof
118 //cout<< (*iterHit)->getStat()<<endl;
119 if ((*iterHit)->getStat()==1){
120 nDof++;
121 }
122 //count nSter
123 //cout<<layerId<<" "<<mdcID->is_axial(mdcid)<<endl;
124 if (!(mdcID->is_axial(mdcid))){
125 //if (layerId >=20 &&layerId <36){
126 nSter++;
127 }
128 // find maxLayerId and minLayerId
129 if (layerId >= maxLayerId){
130 maxLayerId = layerId;
131 //fiTerm=(1./sqrt(1.+m_helix[4]*m_helix[4]))*(*iterHit)->getFltLen()*m_helix[3]/333.567;
132 }
133 if (layerId < minLayerId){
134 minLayerId = layerId;
135 }
136 //count nlayer
137 mdc_layers.insert(layerId);
138 //count nHits
139 //nHits++;
140 }
141
142 //cout<<__FILE__ <<" "<<__LINE__ << endl;
143 //cout<<"nDof "<<nDof-5<<endl;
144 //cout<<"nSter "<<nSter<<endl;
145 //cout<<"maxLayerId "<<maxLayerId<<endl;
146 //cout<<"minLayerId "<<minLayerId<<endl;
147 //cout<<"nHits "<<nHits<<endl;
148 //cout<<endl;
149
150 int nCgemXClusters=0;
151 int nCgemVClusters=0;
152 int nCluster=m_vecclusters.size();
153 ClusterRefVec::iterator iterCluster = m_vecclusters.begin();
154 for( ; iterCluster != m_vecclusters.end(); iterCluster++){
155 (*iterCluster)->setTrkId(trackId());
156 int flag = (*iterCluster)->getflag();
157 int clusterid = (*iterCluster)->getclusterid();
158 map<int,int>::iterator iter = m_clusterFitStat.find(clusterid);
159 int stat =1;
160 if(iter != m_clusterFitStat.end())stat = iter->second;
161 switch(flag){
162 case 0:
163 nCgemXClusters++;
164 if(stat)nDof++;
165 break;
166 case 1:
167 nCgemVClusters++;
168 if(stat)nDof++;
169 nSter++;
170 break;
171 case 2:
172 nCgemXClusters++;
173 nCgemVClusters++;
174 if(stat)nDof+=2;
175 nSter++;
176 break;
177 case 3:
178 nCgemXClusters++;
179 nCgemVClusters++;
180 if(stat)nDof+=2;
181 nSter++;
182 break;
183 default: break;
184 }
185 int layerId = (*iterCluster)->getlayerid();
186 if (layerId >= maxLayerId){
187 maxLayerId = layerId;
188 //fiTerm=(1./sqrt(1.+m_helix[4]*m_helix[4]))*(*iterHit)->getFltLen()*m_helix[3]/333.567;
189 }
190 if (layerId < minLayerId){
191 minLayerId = layerId;
192 }
193 cgem_layers.insert(layerId);
194 nCluster++;
195 }
196
197 nLayer = mdc_layers.size() + cgem_layers.size();
198
199 //cout<<__FILE__ <<" "<<__LINE__ << endl;
200 //cout<<"nDof "<<nDof-5<<endl;
201 //cout<<"nSter "<<nSter<<endl;
202 //cout<<"maxLayerId "<<maxLayerId<<endl;
203 //cout<<"minLayerId "<<minLayerId<<endl;
204 //cout<<"nCluster "<<nCluster<<endl;
205 //cout<<"nLayer "<<nLayer<<endl;
206 //cout<<endl;
207
208 setNdof(nDof-5);
209 setNster(nSter);
210 setFirstLayer(minLayerId);
211 setLastLayer(maxLayerId);
212 setNlayer(nLayer);
213 setNCgemXCluster(nCgemXClusters);
214 setNCgemVCluster(nCgemVClusters);
215 setNhits(nHits);
216 setNcluster(nCluster);
217
218 //cout<<"mdc nlayer:"<<mdc_layers.size()<<endl;
219 //cout<<"cgem nlayer:"<<cgem_layers.size()<<endl;
220}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
void setFirstLayer(const int id)
Definition: DstMdcTrack.h:101
void setNster(const int ns)
Definition: DstMdcTrack.h:100
void setNCgemXCluster(const int n)
Definition: DstMdcTrack.h:104
void setNdof(const int ndof)
Definition: DstMdcTrack.h:99
const int trackId() const
Definition: DstMdcTrack.h:52
void setNlayer(const int nlayer)
Definition: DstMdcTrack.h:103
void setLastLayer(const int id)
Definition: DstMdcTrack.h:102
const int stat() const
Definition: DstMdcTrack.h:65
void setNCgemVCluster(const int n)
Definition: DstMdcTrack.h:105
Definition: MdcID.h:9
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
Definition: MdcID.cxx:43
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
void setNhits(int nhits)
Definition: RecMdcTrack.h:78
void setNcluster(int ncluster)
Definition: RecMdcTrack.h:83

Referenced by setVecClusters(), and setVecHits().


The documentation for this class was generated from the following files: