CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
RecMucTrack Class Reference

#include <RecMucTrack.h>

+ Inheritance diagram for RecMucTrack:

Public Member Functions

virtual const CLID & clID () const
 
 RecMucTrack ()
 Constructor.
 
RecMucTrackoperator= (const RecMucTrack &orig)
 Assignment constructor.
 
 RecMucTrack (const RecMucTrack &source)
 Copy constructor.
 
RecMucTrackoperator= (const DstMucTrack &dstTrack)
 Assignment constructor from DstMucTrack.
 
 RecMucTrack (const DstMucTrack &dstTrack)
 Copy constructor from DstMucTrack.
 
 ~RecMucTrack ()
 Destructor.
 
void SetDefault ()
 
void setTrackId (const int trackId)
 set the index for this track.
 
void SetMdcPos (const float x, const float y, const float z)
 set start position of the track in Mdc.
 
void SetMdcMomentum (const float px, const float py, const float pz)
 set start moment of the track in Mdc.
 
void SetExtMucPos (const float x, const float y, const float z)
 set start position of ext track in Muc. (compute from MdcPos MdcMomentum or get from ExtTrack)
 
void SetExtMucMomentum (const float px, const float py, const float pz)
 set start moment of ext track in Muc.
 
void SetMucPos (const float x, const float y, const float z)
 set start position of the track in Muc. (after line fit and correction)
 
void SetMucPosSigma (const float sigmax, const float sigmay, const float sigmaz)
 
void SetMucMomentum (const float px, const float py, const float pz)
 set start moment of the track in Muc.
 
void SetCurrentPos (const float x, const float y, const float z)
 set current position of the trajectory.
 
void SetCurrentDir (const float x, const float y, const float z)
 set current direction of the trajectory.
 
void SetCurrentInsct (const float x, const float y, const float z)
 set current intersection of the trajectory with strip plane.
 
void SetExtTrack (RecExtTrack *extTrack)
 set Ext track point.
 
void SetExtTrackID (int id)
 set Ext track id. for compute from mdc myself
 
void GetMdcExtTrack (Hep3Vector mdcStartPos, Hep3Vector mdcStartMomentum, int charge, Hep3Vector &mucStartPos, Hep3Vector &mucStartMomentum)
 compute ext track myself from mdc.
 
bool IsInsideSuperConductor (Hep3Vector pos)
 
void AttachHit (MucRecHit *hit)
 set corresponding monte carlo track pointer.
 
void Project (const int &part, const int &gap, float &x, float &y, float &z, int &seg)
 Where does the trajectory of this track intersect a specific gap?
 
float GetHitDistance (const MucRecHit *hit)
 Calculate the distance of the hit to the intersection in read direction.
 
float GetHitDistance2 (const MucRecHit *hit)
 no abs value
 
Hep3Vector CalculateInsct (const int part, const int seg, const int gap)
 Calculate intersection from all hits attached on this gap.
 
void AttachInsct (Hep3Vector insct)
 Attach the intersection to this trajectory.
 
void AttachDirection (Hep3Vector dir)
 Attach the direction to this trajectory.
 
void CorrectDir ()
 Correct direction of this trajectory.
 
void CorrectPos ()
 Correct current position of this trajectory.
 
int getExtTrackID () const
 Where does the trajectory of this track intersect the reference plane?
 
Hep3Vector getExtMucPos () const
 start position of the Ext track in Muc.
 
Hep3Vector getExtMucMomentum () const
 Start momentum of the Ext track in Muc.
 
Hep3Vector getMucPos () const
 start position of this track in Muc.
 
Hep3Vector getMucPosSigma () const
 
Hep3Vector getMucMomentum () const
 Start momentum of this track in Muc.
 
Hep3Vector getMdcMomentum () const
 momentum of this track in Mdc
 
Hep3Vector GetCurrentPos () const
 Current position.
 
Hep3Vector GetCurrentDir () const
 Current direction.
 
Hep3Vector GetCurrentInsct () const
 Current intersection.
 
void ComputeLastGap ()
 Comute last gap in barrel and endcap.
 
int brFirstLayer () const
 Which gap on Barrel is the first one with hits attached to this track?
 
int ecFirstLayer () const
 Which gap on EndCap is the first one with hits attached to this track?
 
void LineFit (int fittingMethod)
 Line fit with hits on a seg with max hits.
 
void ComputeDepth ()
 chi2 of line fit
 
int ComputeDepth (int method)
 Compute depth.
 
void ComputeDistanceMatch ()
 Compute distance match //2006.11.08.
 
void Extend ()
 Extend mucpos and extmucpos to first layer of muc.
 
float GetDepth3 () const
 Length of the track penetrating in iron absorber.
 
void SetRecMode (int recmode)
 
int GetRecMode () const
 
Hep3Vector GetExtMucDistance () const
 Distance match of the ext track with muc track in first layer.
 
Hep3Vector GetMucStripPos () const
 
void ComputeNGapsWithHits ()
 ComputeNGapsWithHits;.
 
int GetNGapsWithHits () const
 How many gaps provide hits attached to this track?
 
int GetTotalHits () const
 How many hits in all does this track contain?
 
int GetHitInGap (const int part, const int gap) const
 How many hits per gap does this track contain?
 
int GetHitInSeg (const int part, const int seg) const
 How many hits does a segment contains.
 
int GetHitInSegOrient (const int part, const int seg, const int orient) const
 How many hits does a segment contains in one orient.
 
int FindSegWithMaxHits (int &part, int &seg)
 Find the segment which contains most hits, return max hits number.
 
void ComputeMaxHitsInGap ()
 ComputeMaxHitsInGap;.
 
bool HasHit (const int part, const int seg, const int gap, const int strip) const
 How many hits were attached in the gap with the most attached hits?
 
bool HasHitInGap (const int part, const int gap) const
 Does this track contain any hits in the given gap?
 
int GetNSharedHits (const RecMucTrack *track) const
 How many hits do two tracks share?
 
MucRecHitGetHit (const int part, const int gap) const
 Get a pointer to the first hit attached in a particular gap.
 
vector< MucRecHit * > GetHits () const
 Get all hits on this track.
 
vector< int > getVecHits () const
 
vector< MucRecHit * > GetExpectedHits () const
 
vector< int > getExpHits () const
 
vector< float > getDistHits () const
 
vector< float > getQuadDistHits () const
 
vector< float > getExtDistHits () const
 
vector< long > GetHitIndices () const
 Get indices of all hits in the track.
 
void ComputeTrackInfo (int fittingmethod)
 Get corresponding monte carlo track pointer.
 
void PrintHitsInfo () const
 Print Hits Infomation.
 
void OutputUnitChange ()
 change unit
 
void setVecHits (vector< MucRecHit * > &pHits)
 reload setVecHits
 
void setExpHits (vector< MucRecHit * > &pHits)
 
void setVecHits (vector< int > &vechits)
 
void setExpHits (vector< int > &exphits)
 
void setDistHits (vector< float > &disthits)
 
void setQuadDistHits (vector< float > &disthits)
 
void setExtDistHits (vector< float > &disthits)
 
void pushExtDistHits (float dist)
 
- Public Member Functions inherited from DstMucTrack
 DstMucTrack ()
 
virtual ~DstMucTrack ()
 Assignment constructor.
 
int trackId () const
 
int id () const
 
int status () const
 
int type () const
 
int startPart () const
 
int endPart () const
 
int brLastLayer () const
 
int ecLastLayer () const
 
int numHits () const
 
int numLayers () const
 
int maxHitsInLayer () const
 
double depth () const
 
double chi2 () const
 
int dof () const
 
double rms () const
 
double xPos () const
 
double yPos () const
 
double zPos () const
 
double xPosSigma () const
 
double yPosSigma () const
 
double zPosSigma () const
 
double px () const
 
double py () const
 
double pz () const
 
double distance () const
 
double deltaPhi () const
 
vector< int > vecHits () const
 
double kalRechi2 () const
 
int kaldof () const
 
double kaldepth () const
 
int kalbrLastLayer () const
 
int kalecLastLayer () const
 
void setTrackId (int trackId)
 
void setId (int id)
 
void setStatus (int st)
 
void setType (int type)
 
void setStartPart (int part)
 
void setEndPart (int part)
 
void setBrLastLayer (int layer)
 
void setEcLastLayer (int layer)
 
void setNumHits (int numHits)
 
void setNumLayers (int numLayers)
 
void setMaxHitsInLayer (int maxHits)
 
void setDepth (double depth)
 
void setChi2 (double chi2)
 
void setDof (int dof)
 
void setRms (double rms)
 
void setXPos (double x)
 
void setYPos (double y)
 
void setZPos (double z)
 
void setXPosSigma (double xsigma)
 
void setYPosSigma (double ysigma)
 
void setZPosSigma (double zsigma)
 
void setPx (double px)
 
void setPy (double py)
 
void setPz (double pz)
 
void setDistance (double dist)
 
void setDeltaPhi (double dphi)
 
void setVecHits (vector< int > &vecHits)
 
void setkalRechi2 (double ch)
 
void setkalDof (int f)
 
void setkalDepth (double de)
 
void setkalbrLastLayer (int br)
 
void setkalecLastLayer (int ec)
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from DstMucTrack
int m_trackId
 
int m_id
 
int m_status
 
int m_type
 
int m_startPart
 
int m_endPart
 
int m_brLastLayer
 
int m_ecLastLayer
 
int m_numHits
 
int m_numLayers
 
int m_maxHitsInLayer
 
double m_depth
 
double m_chi2
 
int m_dof
 
double m_rms
 
double m_xPos
 
double m_yPos
 
double m_zPos
 
double m_xPosSigma
 
double m_yPosSigma
 
double m_zPosSigma
 
double m_px
 
double m_py
 
double m_pz
 
double m_distance
 
double m_deltaPhi
 
vector< int > m_vecHits
 
double m_kalrechi2
 
int m_kaldof
 
double m_kaldepth
 
int m_kalbrLastLayer
 
int m_kalecLastLayer
 

Detailed Description

Definition at line 40 of file RecMucTrack.h.

Constructor & Destructor Documentation

◆ RecMucTrack() [1/3]

RecMucTrack::RecMucTrack ( )

Constructor.

Definition at line 26 of file RecMucTrack.cxx.

27 : //m_trackId(-1), //--------------->
28 m_ExtTrackID(-1),
29 m_MdcPos(0.0, 0.0, 0.0),
30 m_MdcMomentum(0.0, 0.0, 0.0),
31 m_MucPos(0.0, 0.0, 0.0),
32 m_MucPosSigma(0.0, 0.0, 0.0),
33 m_MucMomentum(0.0, 0.0, 0.0),
34 m_CurrentPos(0.0, 0.0, 0.0),
35 m_CurrentDir(0.0, 0.0, 0.0),
36 m_CurrentInsct(0.0, 0.0, 0.0),
37 m_Good3DLine(0),
38 m_pHits(0),
39 m_pExpectedHits(0),
40 m_Intersections(0),
41 m_Directions(0)
42{
43 // initialize m_IntersectionInner/Outer.
44 for(int igap = 0; igap < 9; igap++){
45 m_IntersectionInner[igap].set(-9999,-9999,-9999);
46 m_IntersectionOuter[igap].set(-9999,-9999,-9999);
47 }
48 m_id = 0;
49 m_status = -1;
50 m_type = -1;
51
52 m_numHits = 0;
53 m_startPart = -1;
54 m_endPart = -1;
55 m_brLastLayer = -1;
56 m_ecLastLayer = -1;
57 m_brFirstLayer = -1;
58 m_ecFirstLayer = -1;
59 m_ecPart = -1;
60 m_numLayers = 0;
62 m_depth = -99;
63 m_dof = 0;
64 m_chi2 = 0.0;
65 m_rms = 0.0;
66 m_deltaPhi = 0.0;
67
68 m_xPosSigma = 0.0;
69 m_yPosSigma = 0.0;
70 m_zPosSigma = 0.0;
71
72 m_changeUnit = false;
73 m_recmode = 0;
74 //added by LI Chunhua
75 m_kalrechi2 =0. ;
76 m_kaldof =0;
77 m_kaldepth = -99;
80}
int m_kalbrLastLayer
double m_xPosSigma
int m_kalecLastLayer
double m_kalrechi2
double m_depth
double m_zPosSigma
double m_deltaPhi
double m_kaldepth
double m_chi2
double m_yPosSigma
int m_maxHitsInLayer

◆ RecMucTrack() [2/3]

RecMucTrack::RecMucTrack ( const RecMucTrack & source)

Copy constructor.

Definition at line 134 of file RecMucTrack.cxx.

135 : //m_trackId (source.m_trackId), //--------------->
136 m_ExtTrackID (source.m_ExtTrackID),
137 m_MdcPos (source.m_MdcPos),
138 m_MdcMomentum (source.m_MdcMomentum),
139 m_MucPos (source.m_MucPos),
140 m_MucPosSigma (source.m_MucPosSigma),
141 m_MucMomentum (source.m_MucMomentum),
142 m_CurrentPos (source.m_CurrentPos),
143 m_CurrentDir (source.m_CurrentDir),
144 m_CurrentInsct (source.m_CurrentInsct),
145 m_pHits (source.m_pHits),
146 m_pExpectedHits(source.m_pExpectedHits),
147 m_Intersections(source.m_Intersections),
148 m_Directions (source.m_Directions)
149{
150 m_id = source.m_id;
151 m_status = source.m_status;
152 m_type = source.m_type;
153 m_numHits = source.m_numHits; //--------------->
154 m_startPart = source.m_startPart;
155 m_endPart = source.m_endPart;
158 m_numLayers = source.m_numLayers;
160 m_depth = source.m_depth;
161 m_dof = source.m_dof;
162 m_chi2 = source.m_chi2;
163 m_rms = source.m_rms;
164 m_deltaPhi = source.m_deltaPhi;
165 m_xPosSigma = source.m_xPosSigma;
166 m_yPosSigma = source.m_yPosSigma;
167 m_zPosSigma = source.m_zPosSigma;
168 m_changeUnit = source.m_changeUnit;
169 m_recmode = source.m_recmode;
170 //******
171 m_kalrechi2 = source.m_kalrechi2;
172 m_kaldof = source.m_kaldof;
173 m_kaldepth = source.m_kaldepth;
176}

◆ RecMucTrack() [3/3]

RecMucTrack::RecMucTrack ( const DstMucTrack & dstTrack)

Copy constructor from DstMucTrack.

Definition at line 178 of file RecMucTrack.cxx.

179 :DstMucTrack(dstTrack)
180{
181
182 SetDefault();
183
184}
void SetDefault()

◆ ~RecMucTrack()

RecMucTrack::~RecMucTrack ( )

Destructor.

Definition at line 201 of file RecMucTrack.cxx.

202{
203for(int i = 0 ; i < m_pExpectedHits.size(); i++)
204 delete m_pExpectedHits[i];
205}

Member Function Documentation

◆ AttachDirection()

void RecMucTrack::AttachDirection ( Hep3Vector dir)

Attach the direction to this trajectory.

Definition at line 614 of file RecMucTrack.cxx.

615{
616 m_Directions.push_back(dir);
617}

◆ AttachHit()

void RecMucTrack::AttachHit ( MucRecHit * hit)

set corresponding monte carlo track pointer.

Attach the given hit to this track.

Definition at line 392 of file RecMucTrack.cxx.

393{
394 // cout << "Muc2DRoad::AttachHit-I0 hit = " << hit << endl;
395
396 if (!hit) {
397 cout << "RecMucTrack::AttachHit-E1 null hit pointer!" << endl;
398 return ;
399 }
400
401 int part = hit->Part();
402 int gap = hit->Gap();
403 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
404 // The gap number of the hit is out of range.
405 cout << "Muc2DRoad::AttachHit(MucRecHit*), bad gap number = " << gap
406 << endl;
407 return;
408 }
409
410 // Attach the hit to the road.
411 m_pHits.push_back(hit);
412
413 // m_HitDistance[gap] = dX;
414
415 // Now recalculate the total number of hits and the max. number of
416 // hits per gap.
417 //CountHits();
418}
static value_type getGapNum(int part)
Definition MucID.cxx:171
int Part() const
Get Part.
Definition MucRecHit.h:71
int Gap() const
Get Gap.
Definition MucRecHit.h:77

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ AttachInsct()

void RecMucTrack::AttachInsct ( Hep3Vector insct)

Attach the intersection to this trajectory.

Definition at line 608 of file RecMucTrack.cxx.

609{
610 m_Intersections.push_back(insct);
611}

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ brFirstLayer()

int RecMucTrack::brFirstLayer ( ) const
inline

Which gap on Barrel is the first one with hits attached to this track?

Definition at line 221 of file RecMucTrack.h.

221{ return m_brFirstLayer; }

Referenced by ComputeDepth().

◆ CalculateInsct()

Hep3Vector RecMucTrack::CalculateInsct ( const int part,
const int seg,
const int gap )

Calculate intersection from all hits attached on this gap.

Definition at line 541 of file RecMucTrack.cxx.

544{
545 MucGeoGap *gapPtr = MucGeoGeneral::Instance()->GetGap(part, seg, gap);
546 vector<int> hitSeq;
547 for(int i = 0; i < (int)m_pHits.size(); i++) {
548 MucRecHit *aHit = m_pHits[i];
549 if(aHit->Part() == part &&
550 aHit->Seg() == seg &&
551 aHit->Gap() == gap) {
552 hitSeq.push_back(i);
553 }
554 }
555 int nHitInGap = hitSeq.size();
556 //cout << "nHitInGap " << nHitInGap << endl;
557
558 HepPoint3D insctLocal = gapPtr->TransformToGap(m_CurrentInsct);
559 //HepPoint3D newInsct(0.0, 0.0, 0.0);
560 HepPoint3D newInsctLocal = insctLocal;
561
562 vector<float> x;
563 for(int i = 0; i < nHitInGap; i++) x.push_back(0);
564 float xInsct = 0, xNewInsct = 0;
565
566
567 int orient = gapPtr->Orient();
568 if(orient == 1) xInsct = insctLocal.x();
569 if(orient == 0) xInsct = insctLocal.y();
570
571 for(int i = 0; i < nHitInGap; i++) {
572 float xStrip, yStrip, zStrip;
573 (m_pHits[hitSeq[i]])->GetStrip()->GetCenterPos(xStrip, yStrip, zStrip);
574 if(orient == 1) x[i] = xStrip;
575 if(orient == 0) x[i] = yStrip;
576 }
577 //cout << "local Old" << insctLocal << endl;
578
579 //if == 0, no direction change;
580 if(nHitInGap > 0) {
581 xNewInsct = xInsct * kInsctWeight;
582
583 //float minDist = kInfinity;
584 for(int i = 0; i < nHitInGap; i++) {
585 //if(fabs(x[i] - xInsct) < minDist) {
586 //xNewInsct = x[i]; //}
587 xNewInsct += x[i] * ((1.0 - kInsctWeight) / nHitInGap);
588 }
589
590 if(orient == 1) {
591 newInsctLocal.setX(xNewInsct);
592 newInsctLocal.setY(insctLocal.y());
593 }
594 if(orient == 0) {
595 newInsctLocal.setX(insctLocal.x());
596 newInsctLocal.setY(xNewInsct);
597 }
598 }
599
600 m_CurrentInsct = gapPtr->TransformToGlobal(newInsctLocal);
601 //cout << "local New" << newInsctLocal << endl;
602 //cout << "global New" << m_CurrentInsct << endl;
603
604 return m_CurrentInsct;
605}
Double_t x[10]
const double kInsctWeight
HepPoint3D TransformToGlobal(const HepPoint3D pPoint) const
Transform a point from gap coordinate to global coordinate.
HepPoint3D TransformToGap(const HepPoint3D gPoint) const
Transform a point from global coordinate to gap coordinate.
int Orient() const
Definition MucGeoGap.h:108
MucGeoGap * GetGap(const int part, const int seg, const int gap) const
Get a pointer to the gap identified by (part,seg,gap).
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
int Seg() const
Get Seg.
Definition MucRecHit.h:74

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ classID()

static const CLID & RecMucTrack::classID ( )
inlinestatic

Definition at line 49 of file RecMucTrack.h.

50 {
51 return CLID_RecMucTrack;
52 }
const CLID & CLID_RecMucTrack

Referenced by clID().

◆ clID()

virtual const CLID & RecMucTrack::clID ( ) const
inlinevirtual

Reimplemented from DstMucTrack.

Definition at line 44 of file RecMucTrack.h.

45 {
46 return RecMucTrack::classID();
47 }
static const CLID & classID()
Definition RecMucTrack.h:49

◆ ComputeDepth() [1/2]

void RecMucTrack::ComputeDepth ( )

chi2 of line fit

degree of freedom in line fit rms of distance from hit to track Compute depth.

Definition at line 796 of file RecMucTrack.cxx.

797{
798 m_depth = -99.0;
799 // Part 1 first.
800 float brThickness = 0.0;
801 for (int gap = 0; gap <= brLastLayer(); gap++) {
802 brThickness += MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
803 }
804
805 // second alg
806 float brThickness_2 = 0.0;
807 for (int gap = 0; gap <= brLastLayer(); gap++) {
808 if(HasHitInGap(1,gap)){
809 brThickness_2 += MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
810 }
811 }
812 // third alg
813 float brThickness_3 = 0.0;
814 vector<MucRecHit*>::const_iterator iHit;
815 int ngap = MucID::getGapMax();
816 int Seg[9]; int part, seg, gap, strip;
817 for(int gap = 0; gap < ngap; gap++){Seg[gap] = -1;}
818 for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
819 if(*iHit) { // Check for a null pointer.
820 part = (*iHit)->Part();
821 seg = (*iHit)->Seg();
822 gap = (*iHit)->Gap();
823 strip = (*iHit)->Strip();
824 if(part==1) Seg[gap] = seg;
825 }
826 }
827
828 float deltaPhi_3 = 0.0;
829 int betweenSeg = 0;
830
831 int segTrackBr = -1;
832 for(int gap = 0; gap <= brLastLayer(); gap++){
833 if(Seg[gap] != -1) segTrackBr = Seg[gap];
834 }
835
836 for(int gap = 0; gap <= brLastLayer(); gap++){
837 float thickness = 0.0;
838 if(Seg[gap] != -1 && Seg[brLastLayer()-1] != -1 && Seg[gap] != Seg[brLastLayer()-1]) betweenSeg = 1;
839 thickness = MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
840 if(sin(m_MucMomentum.theta()) != 0 ) thickness /= sin(m_MucMomentum.theta());
841 else cout<<"RecMucTrack::ComputeDepth, In Barrel,theta=0?"<<endl;
842 //if(Seg[gap] != -1) deltaPhi_3 = m_MucMomentum.phi() - Seg[gap]*kPi/4;
843 deltaPhi_3 = m_MucMomentum.phi() - segTrackBr*kPi/4; //some times, no hits in a gap, but a good track exist!
844 if(Seg[gap] == -1 && betweenSeg == 1) {
845 cout<<"between segment"<<endl;
846 thickness += 40; // gap width
847 }
848
849 if(cos(deltaPhi_3) != 0 ) thickness /= cos(deltaPhi_3);
850 else cout<<"RecMucTrack::ComputeDepth, In Barrel,Cos(phi)=0?"<<endl;
851
852 if(deltaPhi_3 == 0 && Seg[brLastLayer()-1]==2 ) thickness = 0;
853 //cout<<"in muctrack "<<thickness<<" "<<brThickness_3<<" theta "<<m_MucMomentum.theta()<<" phi="<<deltaPhi_3<<" "<<m_MucMomentum.phi()<<endl;
854 brThickness_3 += thickness;
855
856 }
857
858 //cout<<"in RecMucTrack: compare thickness "<<brThickness<<" "<<brThickness_2<<" "<<brThickness_3<<endl;
859
860 float phi = m_MucMomentum.phi();
861 float deltaPhi = phi - kPi/4*(int)(phi/(kPi/4));
862 if (deltaPhi > kPi/8) deltaPhi = kPi/4 - deltaPhi;
863 float theta = m_MucMomentum.theta();
864// cout << "br LastGap " << brLastLayer() << " Thick " << brThickness
865// << " 1/sin(theta) " << 1/sin(theta) << " 1/cos(deltaPhi) " << 1/cos(deltaPhi) << endl;
866
867 if (sin(theta) != 0.0) brThickness /= sin(theta);
868 else cout << "RecMucTrack::ComputeDepth, In Barrel, Track theta = 0.0 ? " << endl;
869
870 brThickness /= cos(deltaPhi);
871 brThickness = fabs(brThickness);
872 //cout << "br Depth " << brThickness << endl;
873
874 // EC, then
875 float ecThickness = 0.0;
876 for (int gap = 0; gap <= ecLastLayer(); gap++) {
877 ecThickness += MucGeoGeneral::Instance()->GetGap(0, 0, gap)->GetIronThickness();
878 }
879 //cout << "ec LastGap " << ecLastLayer() << " Thick " << ecThickness
880 // << " 1/cos(theta) " << 1/cos(theta) << endl;
881
882 if (cos(theta) != 0.0) ecThickness /= cos(theta);
883 else ; //cout << "RecMucTrack::ComputeDepth, In EndCap, Track theta = 90.0 ? " << endl;
884 ecThickness = fabs(ecThickness);
885 //cout << "ec Depth " << ecThickness << endl;
886
887 m_depth = brThickness + ecThickness;
888 m_depth_3 = brThickness_3 + ecThickness;
889 cout << "Depth " << m_depth << " Depth3 = "<<m_depth_3<<endl;
890 m_depth = m_depth_3;
891 double offset = 50.0;
892 if(GetTotalHits() > 0) m_depth += offset; // since brThickness on gap 0 is zero, give an offset for track arriving muc.
893
894}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
const double kPi
Definition MucConstant.h:6
int brLastLayer() const
Definition DstMucTrack.h:39
double deltaPhi() const
Definition DstMucTrack.h:63
int ecLastLayer() const
Definition DstMucTrack.h:40
float GetIronThickness() const
Definition MucGeoGap.h:116
static value_type getGapMax()
Definition MucID.cxx:195
int GetTotalHits() const
How many hits in all does this track contain?
bool HasHitInGap(const int part, const int gap) const
Does this track contain any hits in the given gap?

Referenced by ComputeTrackInfo().

◆ ComputeDepth() [2/2]

int RecMucTrack::ComputeDepth ( int method)

Compute depth.

Definition at line 673 of file RecMucTrack.cxx.

674{
675 if( m_numLayers == 0 ) {
676 m_depth = m_depth_3 = -99; return 0;
677 }
678 else if( m_numLayers == 1 && (m_brLastLayer == 0 || m_ecLastLayer == 0) ) {
679 m_depth = m_depth_3 = 0; return 0;
680 }
681
682 m_depth_3 = 0.0;
683
684 float brThickness = 0.0; float ecThickness = 0.0; float deltaPhi = 0.0;
685 int betweenSeg = 0;
686
687 float phi = m_MucMomentum.phi();
688 float theta = m_MucMomentum.theta();
689
690 vector<MucRecHit*>::const_iterator iHit;
691 int ngap = MucID::getGapMax();
692 //cout<<"ngap:\t"<<ngap<<endl;
693
694 int Seg[9]; int part, seg, gap, strip;
695 for(int gap = 0; gap < ngap; gap++){Seg[gap] = -1;}
696 for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
697 if(*iHit) { // Check for a null pointer.
698 part = (*iHit)->Part();
699 seg = (*iHit)->Seg();
700 gap = (*iHit)->Gap();
701 strip = (*iHit)->Strip();
702 if(part==1) Seg[gap] = seg;
703 }
704 }
705
706 int segTrackBr = -1;
707 for(int gap = 0; gap <= brLastLayer(); gap++){
708 if(Seg[gap] != -1) segTrackBr = Seg[gap];
709 }
710 // BR, the innermost layer is RPC module
711 for(int gap = 0; gap <= brLastLayer(); gap++){
712 float thickness = 0.0;
713 if(Seg[gap] != -1 && Seg[brLastLayer()-1] != -1 && Seg[gap] != Seg[brLastLayer()-1]) betweenSeg = 1;
714 thickness = MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
715 //cout<<"RecMucTrack gap="<<gap<<" brlastgap="<<brLastLayer()<<" "<<thickness<<endl;
716 if(sin(m_MucMomentum.theta()) != 0 ) thickness /= sin(m_MucMomentum.theta());
717 else ;//cout<<"RecMucTrack::ComputeDepth, In Barrel,theta=0?"<<endl;
718 deltaPhi = m_MucMomentum.phi() - segTrackBr*kPi/4;
719 if(Seg[gap] == -1 && betweenSeg == 1) {
720 thickness += 40; // gap width
721 }
722 if(cos(deltaPhi) != 0 ) thickness /= cos(deltaPhi);
723 else ;//cout<<"RecMucTrack::ComputeDepth, In Barrel,Cos(phi)=0?"<<endl;
724 if(deltaPhi == 0 && Seg[brLastLayer()-1]==2 ) thickness = 0;
725 //cout<<"in muctrack "<<thickness<<" "<<brThickness<<" theta "<<m_MucMomentum.theta()<<" phi="<<deltaPhi<<" "<<m_MucMomentum.phi()<<endl;
726
727 if(brFirstLayer()<brLastLayer()) brThickness += thickness;
728 else if(brFirstLayer()==brLastLayer()) { //only one gap
729 if(m_MucMomentum.mag()>1000 || brFirstLayer()<2) brThickness += thickness; //high momentum or only one or two gap
730 //cout<<"mom="<<m_MucMomentum.mag()<<" "<<brFirstLayer()<<" "<<brThickness<<" "<<thickness<<endl;
731 }
732 else cout<<"in RecMucTrack: Wrong Gap Info"<<endl;
733
734 //cout<<brThickness<<endl;
735 }
736
737 //cout<<"eclastgap= "<<ecLastLayer()<<" ecfirstgap= "<<ecFirstLayer()<<endl;
738
739 // EC, the innermost layer is Iron
740 //for (int gap = ecFirstLayer(); gap!=-1&&gap <= ecLastLayer(); gap++) {
741 for (int gap = 0; gap!=-1&&gap <= ecLastLayer(); gap++) {
742 ecThickness += MucGeoGeneral::Instance()->GetGap(0, 0, gap)->GetIronThickness();
743 }
744
745 if (cos(theta) != 0.0) ecThickness /= cos(theta);
746 else ;//cout << "RecMucTrack::ComputeDepth, In EndCap, Track theta = 90.0 ? " << endl;
747 ecThickness = fabs(ecThickness);
748
749 //cout<<"eclastgap= "<<ecLastLayer()<<" ecthickness="<<ecThickness<<endl;
750
751 if(method == 2){
752 //barrel first
753 if((m_Good3DLine == 1) &&(m_Good3DPart == 1)){
754 if(m_IntersectionInner[0].x()!=-9999){
755 for(int gap = 1;gap <= brLastLayer(); gap++)//Inner[gap1]-Outer[gap0] ...
756 {
757 if(m_IntersectionInner[gap].x() != -9999 && m_IntersectionInner[gap-1].x() != -9999)
758 m_depth_3 += (m_IntersectionInner[gap] - m_IntersectionOuter[gap-1]).mag();
759 }
760 //may be pass some gap in endcap!
761 m_depth_3 += ecThickness;
762 }
763 else m_depth_3 = brThickness + ecThickness;
764 }
765 if((m_Good3DLine == 1) &&(m_Good3DPart != 1)){
766 for(int gap = 1;gap <= ecLastLayer(); gap++)//Inner[gap1]-Outer[gap0] ...
767 {
768 if(m_IntersectionInner[gap].x() != -9999 && m_IntersectionInner[gap-1].x() != -9999)
769 m_depth_3 += (m_IntersectionInner[gap] - m_IntersectionOuter[gap-1]).mag();
770 }
771 //may be pass some gap in barrel!
772 m_depth_3 += brThickness;
773 if (cos(theta) != 0.0) m_depth_3 += 40/cos(theta); //there is 1 absorber before first gap in endcap!
774 }
775 if(m_Good3DLine == 0) m_depth_3 = brThickness + ecThickness;
776 if(m_depth_3>2000) m_depth_3 = brThickness + ecThickness; //unreasonable depth! so use previous method!
777 }
778 else //method == 1 linefit
779 {
780 m_depth_3 = brThickness + ecThickness;
781
782 }
783
784 double offset = 50.0;
785 //if(GetTotalHits() > 0) m_depth_3 += offset;
786
787 m_depth = m_depth_3;
788
789 //if(m_depth<0||m_depth>2000) m_depth = 0;
790 if(m_depth>2000) m_depth = -99;
791 //cout<<"depth= "<<m_depth<<endl;
792
793}
int brFirstLayer() const
Which gap on Barrel is the first one with hits attached to this track?

◆ ComputeDistanceMatch()

void RecMucTrack::ComputeDistanceMatch ( )

Compute distance match //2006.11.08.

Definition at line 897 of file RecMucTrack.cxx.

898{
899 bool firstHitFound = false;
900 MucGeoGap *firstGap = 0;
901 vector<MucRecHit*>::const_iterator iHit;
902 vector<MucRecHit*> hitsGap0;
903 float stripLocal[3]={0.0, 0.0, 0.0};
904 float stripGlobal[3]={0.0, 0.0, 0.0};
905 int nStrip = 0;
906
907 int part, seg, gap, strip;
908 int barrel_gap0_exist = 0;
909
910 for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
911 if(*iHit) { // Check for a null pointer.
912 part = (*iHit)->Part();
913 seg = (*iHit)->Seg();
914 gap = (*iHit)->Gap();
915 strip = (*iHit)->Strip();
916 if(!firstHitFound && gap == 0) {
917 firstGap = MucGeoGeneral::Instance()->GetGap(part, seg, gap);
918 firstHitFound = true;
919 }
920 if(firstGap && part == firstGap->Part() && seg == firstGap->Seg() && gap == firstGap->Gap()) {
921 //cout<<"in RecMucTrack "<<part<<" "<<seg<<" "<<gap<<" "<<strip<<endl;
922 HepPoint3D posHit = (*iHit)->GetCenterPos();
923 HepPoint3D posHitLocal = (*iHit)->GetGap()->TransformToGap(posHit);
924 if(part==1&&gap==0) barrel_gap0_exist = 1; //exist
925
926 stripLocal[0] += posHitLocal.x();
927 stripLocal[1] += posHitLocal.y();
928 stripLocal[2] += posHitLocal.z();
929
930 stripGlobal[0] += posHit.x(); //to calc phi of this strip
931 stripGlobal[1] += posHit.y();
932 stripGlobal[2] += posHit.z();
933
934 nStrip++;
935 }
936 }
937 }
938
939 //cout<<"in RecMucTrack: extpos "<<m_ExtMucPos<<" mucpos "<< m_MucPos<<endl;
940
941 int apart = -1, aseg = -1;
942 int nHits = FindSegWithMaxHits(apart, aseg);
943 MucGeoGap *fakefirstGap = 0; // maybe not exist!
944 if(apart == -1 && aseg== -1)
945 {m_Dist_muc_ext.set(0,0,0);}
946 else {
947 fakefirstGap = MucGeoGeneral::Instance()->GetGap(apart, aseg, 0);
948 HepPoint3D fextLocal = fakefirstGap->TransformToGap(m_ExtMucPos);
949 HepPoint3D fmucLocal = fakefirstGap->TransformToGap(m_MucPos);
950 float dist_x = fextLocal.x() - fmucLocal.x();
951 float dist_y = fextLocal.y() - fmucLocal.y();
952 float dist_z = fextLocal.z() - fmucLocal.z();
953 m_Dist_muc_ext.set(dist_x,dist_y,dist_z);
954 //cout<<"in RecMucTrack dist = "<<dist_x<<" "<<dist_y<<" "<<dist_z<<endl;
955 if (fakefirstGap->Orient() == 0) { // part 0,2
956 //cout<<"in RecMucTrack "<< extLocal.y()<<" "<<stripLocal[1]<<endl;
957 }
958 else {
959 //cout<<"in RecMucTrack1 "<< extLocal.x()<<" "<<stripLocal[0]<<endl;
960 }
961 }
962
963 float distance = -9990;
964
965 if (nStrip == 0 || !firstGap) {
966 distance = -9990;
967 //cout << "no hits on first gap" << endl;
968 }
969 else{
970 for (int k = 0; k < 3; k++) stripLocal[k] /= nStrip;
971 for (int k = 0; k < 3; k++) stripGlobal[k] /= nStrip;
972
973 m_StripPhi.set(stripGlobal[0],stripGlobal[1],stripGlobal[2]);
974
975 HepPoint3D extLocal = firstGap->TransformToGap(m_ExtMucPos);
976 // extmucpos may be can be used to identify mu/pion
977
978// cout<<"in RecMucTrack mom "<<m_MucMomentum.x()<<" "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
979// cout<<"in RecMucTrack extpos "<<m_ExtMucPos.x()<<" "<<m_ExtMucPos.y()<<" "<<m_ExtMucPos.z()<<endl;
980// cout<<"in RecMucTrack extpos2 "<<ExtMucPos_2.x()<<" "<<ExtMucPos_2.y()<<" "<<ExtMucPos_2.z()<<endl;
981// cout<<"in RecMucTrack extloc "<<extLocal.x()<<" "<<extLocal.y()<<" "<<extLocal.z()<<endl;
982 if (firstGap->Orient() == 0) { // part 0,2
983 distance = extLocal.y() - stripLocal[1];
984 //cout<<"in RecMucTrack "<< extLocal.y()<<" "<<stripLocal[1]<<endl;
985 }
986 else {
987 distance = extLocal.x() - stripLocal[0];
988 //cout<<"in RecMucTrack1 "<< extLocal.x()<<" "<<stripLocal[0]<<endl;
989 }
990 }
991
993
994 //use m_chi2 temporary
995 //m_chi2 = distance;
996 // cout<<"in RecMucTrack distance= "<<m_distance<<" n= "<<nStrip<<endl;
997}
double m_distance
double distance() const
Definition DstMucTrack.h:62
int Seg() const
Get seg identifier (0-7).
Definition MucGeoGap.h:101
int Gap() const
Get gap identifier (0-8).
Definition MucGeoGap.h:104
int Part() const
Get part identifier (0,2 for cap, 1 for barrel).
Definition MucGeoGap.h:98
int FindSegWithMaxHits(int &part, int &seg)
Find the segment which contains most hits, return max hits number.

Referenced by ComputeTrackInfo().

◆ ComputeLastGap()

void RecMucTrack::ComputeLastGap ( )

Comute last gap in barrel and endcap.

Definition at line 635 of file RecMucTrack.cxx.

636{
637 int lastGap1, lastGap2;
638 int firstGap1, firstGap2;
639 lastGap1 = lastGap2 = -1;
640 firstGap1 = firstGap2 = 99;
641 vector<MucRecHit*>::const_iterator iHit;
642 iHit = m_pHits.begin();
643 for( ;iHit != m_pHits.end(); iHit++)
644 {
645 if(*iHit)
646 { // Check for a null pointer.
647 int part = (*iHit)->Part();
648 int gap = (*iHit)->Gap();
649
650 if(part == 1) {
651 if(gap > lastGap1) lastGap1 = gap;
652 if(gap < firstGap1) firstGap1 = gap;
653 }
654 else {
655 if(gap > lastGap2) { m_ecPart = part; m_endPart = part; lastGap2 = gap; }
656 if(gap < firstGap2) firstGap2 = gap;
657 }
658 }
659 }
660
661 m_brLastLayer = lastGap1;
662 if(firstGap1 == 99) m_brFirstLayer = -1;
663 else if(firstGap1>=0&&firstGap1<9) m_brFirstLayer = firstGap1;
664
665 m_ecLastLayer = lastGap2;
666 if(firstGap2 == 99) m_ecFirstLayer = -1;
667 else if(firstGap2>=0&&firstGap2<8) m_ecFirstLayer = firstGap2;
668
669 //cout<<"MucTrack, br: "<<m_brFirstLayer<<", "<<m_brLastLayer<<"\tec: "<<m_ecFirstLayer<<", "<<m_ecLastLayer<<endl;
670}

Referenced by ComputeTrackInfo(), and LineFit().

◆ ComputeMaxHitsInGap()

void RecMucTrack::ComputeMaxHitsInGap ( )

ComputeMaxHitsInGap;.

Definition at line 1527 of file RecMucTrack.cxx.

1528{
1529 int maxHits = 0;
1530 int hits = 0;
1531 for(int part = 0; part < (int)MucID::getPartNum(); part++) {
1532 for(int gap = 0; gap < (int)MucID::getGapNum(part); gap++) {
1533 hits = GetHitInGap(part, gap);
1534 if(hits > maxHits) maxHits = hits;
1535 }
1536 }
1537
1538 m_maxHitsInLayer = maxHits;
1539}
static value_type getPartNum()
Definition MucID.cxx:159
int GetHitInGap(const int part, const int gap) const
How many hits per gap does this track contain?

Referenced by ComputeTrackInfo().

◆ ComputeNGapsWithHits()

void RecMucTrack::ComputeNGapsWithHits ( )

ComputeNGapsWithHits;.

Definition at line 1411 of file RecMucTrack.cxx.

1412{
1413 int ngap = MucID::getGapMax();
1414 int gap, count = 0;
1415 vector<int> firedGap;
1416 for(gap = 0; gap < ngap; gap++) firedGap.push_back(0);
1417
1418 vector<MucRecHit*>::const_iterator iHit;
1419 for (iHit=m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1420 if (*iHit) { // Check for a null pointer.
1421 gap = (*iHit)->Gap();
1422 firedGap[gap] = 1;
1423 }
1424 }
1425
1426 for ( gap = 0; gap < ngap; gap++) {
1427 count += firedGap[gap];
1428 }
1429
1430 m_numHits = m_pHits.size();
1432 //cout<<"nLayer:\t"<<m_numLayers<<endl;
1433}
uint32_t count(const node_t &list)
Definition node.cxx:42

Referenced by ComputeTrackInfo().

◆ ComputeTrackInfo()

void RecMucTrack::ComputeTrackInfo ( int fittingmethod)

Get corresponding monte carlo track pointer.

Compute all infomation of this track;

Definition at line 1669 of file RecMucTrack.cxx.

1670{
1671 setVecHits(m_pHits);
1672 setExpHits(m_pExpectedHits);
1676 //ComputeDepth();
1677 ComputeDepth(fittingmethod);
1680}
void setExpHits(vector< MucRecHit * > &pHits)
void ComputeNGapsWithHits()
ComputeNGapsWithHits;.
void ComputeDepth()
chi2 of line fit
void ComputeMaxHitsInGap()
ComputeMaxHitsInGap;.
void setVecHits(vector< MucRecHit * > &pHits)
reload setVecHits
void ComputeDistanceMatch()
Compute distance match //2006.11.08.
void OutputUnitChange()
change unit
void ComputeLastGap()
Comute last gap in barrel and endcap.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ CorrectDir()

void RecMucTrack::CorrectDir ( )

Correct direction of this trajectory.

Definition at line 620 of file RecMucTrack.cxx.

621{
622 //cout << "Before CorrectDir(), fCurrentDir " << m_CurrentDir << endl;
623 m_CurrentDir = m_CurrentInsct - m_CurrentPos;
624 m_CurrentDir.setMag(1.0);
625 //cout << "After CorrectDir(), fCurrentDir " << m_CurrentDir << endl;
626}

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ CorrectPos()

void RecMucTrack::CorrectPos ( )

Correct current position of this trajectory.

Definition at line 629 of file RecMucTrack.cxx.

630{
631 m_CurrentPos = m_CurrentInsct;
632}

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ ecFirstLayer()

int RecMucTrack::ecFirstLayer ( ) const
inline

Which gap on EndCap is the first one with hits attached to this track?

Definition at line 224 of file RecMucTrack.h.

224{ return m_ecFirstLayer; }

◆ Extend()

void RecMucTrack::Extend ( )

Extend mucpos and extmucpos to first layer of muc.

Definition at line 1000 of file RecMucTrack.cxx.

1001{
1002 float x = m_ExtMucPos.x(), y = m_ExtMucPos.y(), z = m_ExtMucPos.z();
1003 //cout<<"in MucTrac, MucPos= "<<x<<" "<<y<<" "<<z<<endl;
1004 float step = 0.005;
1005 float myMucR = 1720.0;
1006 float myMucZ = 2110.0;
1007
1008 while ( ( (fabs(x)<=myMucR) && (fabs(y)<=myMucR) && ((fabs(x-y)/sqrt(2.))<=myMucR) && ((fabs(x+y)/sqrt(2.))<=myMucR) && (fabs(z)<=myMucZ) ) ) {
1009 x += step * m_MucMomentum.x();
1010 y += step * m_MucMomentum.y();
1011 z += step * m_MucMomentum.z();
1012 //cout << "in RecMucTrack+ x " << x << " y " << y << " z " << z <<" mom "<< m_MucMomentum.x()<< " "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
1013 }
1014
1015 int count = 0;
1016 while( !( (fabs(x)<=myMucR) && (fabs(y)<=myMucR) && ((fabs(x-y)/sqrt(2.))<=myMucR) && ((fabs(x+y)/sqrt(2.))<=myMucR) && (fabs(z)<=myMucZ) )&&count<1000 ) {
1017 x -= step * m_MucMomentum.x();
1018 y -= step * m_MucMomentum.y();
1019 z -= step * m_MucMomentum.z();
1020 count++;
1021 //cout << "in RecMucTrack- x " << x << " y " << y << " z " << z <<" mom "<< m_MucMomentum.x()<< " "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
1022 }
1023
1024 if(count<1000){
1025 if(fabs(x)<2600&&fabs(y)<2600&&fabs(z)<2800){
1026 m_ExtMucPos.set(x, y, z);
1027 m_MucPos.set(x,y,z);
1028 m_xPos = x;
1029 m_yPos = y;
1030 m_zPos = z;
1031 }
1032 }
1033
1034}
double m_zPos
double m_xPos
double m_yPos

Referenced by LineFit().

◆ FindSegWithMaxHits()

int RecMucTrack::FindSegWithMaxHits ( int & part,
int & seg )

Find the segment which contains most hits, return max hits number.

Definition at line 1508 of file RecMucTrack.cxx.

1509{
1510 int maxHits = 0;
1511 int hits = 0;
1512 for(int part = 0; part < (int)MucID::getPartNum(); part++) {
1513 for(int seg = 0; seg < (int)MucID::getSegNum(part); seg++) {
1514 hits = GetHitInSeg(part, seg);
1515 if (hits > maxHits) {
1516 maxHits = hits;
1517 findPart = part;
1518 findSeg = seg;
1519 }
1520 }
1521 }
1522
1523 return maxHits;
1524}
static value_type getSegNum(int part)
Definition MucID.cxx:164
int GetHitInSeg(const int part, const int seg) const
How many hits does a segment contains.

Referenced by ComputeDistanceMatch(), and LineFit().

◆ GetCurrentDir()

Hep3Vector RecMucTrack::GetCurrentDir ( ) const
inline

Current direction.

Definition at line 212 of file RecMucTrack.h.

212{ return m_CurrentDir/1000; }

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ GetCurrentInsct()

Hep3Vector RecMucTrack::GetCurrentInsct ( ) const
inline

Current intersection.

Definition at line 215 of file RecMucTrack.h.

215{ return m_CurrentInsct; } //internal

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ GetCurrentPos()

Hep3Vector RecMucTrack::GetCurrentPos ( ) const
inline

Current position.

Definition at line 209 of file RecMucTrack.h.

209{ return m_CurrentPos/10; }

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ GetDepth3()

float RecMucTrack::GetDepth3 ( ) const
inline

Length of the track penetrating in iron absorber.

Definition at line 252 of file RecMucTrack.h.

252{ return m_depth_3/10; }

◆ getDistHits()

vector< float > RecMucTrack::getDistHits ( ) const
inline

Definition at line 311 of file RecMucTrack.h.

311{ return m_distHits ;}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ GetExpectedHits()

vector< MucRecHit * > RecMucTrack::GetExpectedHits ( ) const

Definition at line 1642 of file RecMucTrack.cxx.

1643{
1644 return m_pExpectedHits;
1645}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ getExpHits()

vector< int > RecMucTrack::getExpHits ( ) const
inline

Definition at line 309 of file RecMucTrack.h.

309{ return m_expHits ;}

◆ getExtDistHits()

vector< float > RecMucTrack::getExtDistHits ( ) const
inline

Definition at line 315 of file RecMucTrack.h.

315{ return m_distHits_ext ;}

Referenced by MucRecTrkExt::execute().

◆ GetExtMucDistance()

Hep3Vector RecMucTrack::GetExtMucDistance ( ) const
inline

Distance match of the ext track with muc track in first layer.

Definition at line 259 of file RecMucTrack.h.

259{ return m_Dist_muc_ext;}

Referenced by MucRecTrkExt::execute().

◆ getExtMucMomentum()

Hep3Vector RecMucTrack::getExtMucMomentum ( ) const
inline

Start momentum of the Ext track in Muc.

Definition at line 195 of file RecMucTrack.h.

195{ return m_ExtMucMomentum/1000; }

◆ getExtMucPos()

Hep3Vector RecMucTrack::getExtMucPos ( ) const
inline

start position of the Ext track in Muc.

Definition at line 192 of file RecMucTrack.h.

192{ return m_ExtMucPos/10; }

◆ getExtTrackID()

int RecMucTrack::getExtTrackID ( ) const
inline

Where does the trajectory of this track intersect the reference plane?

Where does the trajectory of this track intersect a z=const plane? Transform the Phi, ZR cord. to ZX, ZY cord. The identifier of the Ext track as seed.

Definition at line 189 of file RecMucTrack.h.

189{ return m_ExtTrackID; }

◆ GetHit()

MucRecHit * RecMucTrack::GetHit ( const int part,
const int gap ) const

Get a pointer to the first hit attached in a particular gap.

Definition at line 1614 of file RecMucTrack.cxx.

1615{
1616 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
1617 cout << "RecMucTrack::Hit-E1 invalid gap = " << gap << endl;
1618 return 0;
1619 }
1620
1621 vector<MucRecHit*>::const_iterator iHit;
1622
1623 for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1624 if (*iHit) { // Check for a null pointer.
1625 if ( (*iHit)->Part() == part &&
1626 (*iHit)->Gap() == gap) {
1627 return (*iHit);
1628 }
1629 }
1630 }
1631
1632 return 0L;
1633}

◆ GetHitDistance()

float RecMucTrack::GetHitDistance ( const MucRecHit * hit)

Calculate the distance of the hit to the intersection in read direction.

Definition at line 483 of file RecMucTrack.cxx.

484{
485 if (!hit) {
486 cout << "RecMucTrack:GetHitDistance-E1 null hit pointer!" << endl;
487 return kInfinity;
488 }
489
490 int part = hit->Part();
491 int gap = hit->Gap();
492 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
493 cout << "RecMucTrack::GetHitDistance() bad gap number = " << gap << endl;
494 return kInfinity;
495 }
496
497 HepPoint3D posHit = hit->GetCenterPos();
498 HepPoint3D posHitLocal = hit->GetGap()->TransformToGap(posHit);
499 HepPoint3D posInsctLocal = hit->GetGap()->TransformToGap(m_CurrentInsct);
500 int orient = hit->GetGap()->Orient();
501
502 float distance = -9990;
503 if(orient == 1) distance = fabs(posInsctLocal.x() - posHitLocal.x());
504 if(orient == 0) distance = fabs(posInsctLocal.y() - posHitLocal.y());
505
506 return distance;
507}
MucGeoGap * GetGap() const
Get geometry data for the gap containing this hit.
Definition MucRecHit.h:83
Hep3Vector GetCenterPos() const
Get Center position of the strip (global coords).

Referenced by MucRecRoadFinder::TrackFinding().

◆ GetHitDistance2()

float RecMucTrack::GetHitDistance2 ( const MucRecHit * hit)

no abs value

Definition at line 511 of file RecMucTrack.cxx.

512{
513 if (!hit) {
514 cout << "RecMucTrack:GetHitDistance-E1 null hit pointer!" << endl;
515 return kInfinity;
516 }
517
518 int part = hit->Part();
519 int gap = hit->Gap();
520 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
521 cout << "RecMucTrack::GetHitDistance() bad gap number = " << gap << endl;
522 return kInfinity;
523 }
524
525 HepPoint3D posHit = hit->GetCenterPos();
526 HepPoint3D posHitLocal = hit->GetGap()->TransformToGap(posHit);
527 HepPoint3D posInsctLocal = hit->GetGap()->TransformToGap(m_CurrentInsct);
528 int orient = hit->GetGap()->Orient();
529
530 float distance = -9990;
531 if(orient == 1) distance = (posInsctLocal.x() - posHitLocal.x());
532 if(orient == 0) distance = (posInsctLocal.y() - posHitLocal.y());
533
534 //cout<<"========in RecMucTrack: line insct: "<<posInsctLocal.x()<<" "<<posInsctLocal.y()<<" -> "<<posHitLocal.x()<<" "<<posHitLocal.y()<<endl;
535
536 return distance;
537}

Referenced by MucRecTrkExt::execute(), LineFit(), and MucRecTrkExt::TrackFinding().

◆ GetHitIndices()

vector< long > RecMucTrack::GetHitIndices ( ) const

Get indices of all hits in the track.

Definition at line 1648 of file RecMucTrack.cxx.

1649{
1650 vector<long> v;
1651
1652 vector<MucRecHit*>::const_iterator iHit;
1653 for ( iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1654 if (*iHit) { // Check for a null pointer.
1655 long index = (*iHit)->GetID();
1656 v.push_back(index);
1657 /*
1658 cout << " Muc2DRoad::HitIndices gap orientation twopack= "
1659 << (*iHit)->ChannelID().Plane() << " "
1660 << (*iHit)->ChannelID().Orient() << " "
1661 << (*iHit)->ChannelID().TwoPack() << endl;
1662 */
1663 }
1664 }
1665 return v;
1666}
**********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
Definition KarLud.h:35

◆ GetHitInGap()

int RecMucTrack::GetHitInGap ( const int part,
const int gap ) const

How many hits per gap does this track contain?

Definition at line 1442 of file RecMucTrack.cxx.

1443{
1444 if ( part < 0 || part > 2 ) {
1445 cout << "RecMucTrack::GetHitInGap(), invalid part " << part << endl;
1446 return 0;
1447 }
1448 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
1449 cout << "RecMucTrack::GetHitInGap(), invalid gap " << gap << endl;
1450 return 0;
1451 }
1452
1453 vector<MucRecHit*>::const_iterator iHit;
1454 int hitsInGap = 0;
1455
1456 for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1457
1458 if ( !(*iHit) ) {
1459 cout << "RecMucTrack::GetHitInGap() null hit pointer !" << endl;
1460 return 0;
1461 }
1462 else {
1463 if( part == (*iHit)->Part() && gap == (*iHit)->Gap() ) hitsInGap++;
1464 }
1465 }
1466
1467 return hitsInGap;
1468}

Referenced by ComputeMaxHitsInGap().

◆ GetHitInSeg()

int RecMucTrack::GetHitInSeg ( const int part,
const int seg ) const

How many hits does a segment contains.

Definition at line 1471 of file RecMucTrack.cxx.

1472{
1473 int num = GetHitInSegOrient(part, seg, 0) + GetHitInSegOrient(part, seg, 1);
1474 return num;
1475}
int GetHitInSegOrient(const int part, const int seg, const int orient) const
How many hits does a segment contains in one orient.
int num[96]
Definition ranlxd.c:373

Referenced by FindSegWithMaxHits().

◆ GetHitInSegOrient()

int RecMucTrack::GetHitInSegOrient ( const int part,
const int seg,
const int orient ) const

How many hits does a segment contains in one orient.

Definition at line 1478 of file RecMucTrack.cxx.

1479{
1480 if ( part < 0 || part > 2 ) {
1481 cout << "RecMucTrack::GetHitInSeg(), invalid part " << part << endl;
1482 return 0;
1483 }
1484 if ( (seg < 0) || (seg >= (int)MucID::getSegNum(part)) ) {
1485 cout << "RecMucTrack::GetHitInSeg(), invalid seg = " << seg << endl;
1486 return 0;
1487 }
1488
1489 vector<MucRecHit*>::const_iterator iHit;
1490 int hitsInSeg = 0;
1491
1492 for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1493
1494 if ( !(*iHit) ) {
1495 cout << "RecMucTrack::GetHitInSeg(), null hit pointer !" << endl;
1496 return 0;
1497 }
1498 else {
1499 if( part == (*iHit)->Part() && seg == (*iHit)->Seg() &&
1500 orient == (*iHit)->GetGap()->Orient() ) hitsInSeg++;
1501 }
1502 }
1503
1504 return hitsInSeg;
1505}

Referenced by GetHitInSeg().

◆ GetHits()

vector< MucRecHit * > RecMucTrack::GetHits ( ) const

Get all hits on this track.

Definition at line 1636 of file RecMucTrack.cxx.

1637{
1638 return m_pHits;
1639}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ GetMdcExtTrack()

void RecMucTrack::GetMdcExtTrack ( Hep3Vector mdcStartPos,
Hep3Vector mdcStartMomentum,
int charge,
Hep3Vector & mucStartPos,
Hep3Vector & mucStartMomentum )

compute ext track myself from mdc.

Definition at line 337 of file RecMucTrack.cxx.

339{
340
341 //cm->mm; GeV->MeV//
342 mdcStartPos*=10;
343 mdcStartMomentum*=1000;
344 ////////////////////
345
346
347 Hep3Vector pt = mdcStartMomentum;
348 pt.setZ(0);
349 //cout << "pt " << pt.mag() << endl;
350 double radius = (pt.mag() * 1e6 / kvC * 1e3) / (fabs(charge * kMagnetField)) ;
351 //double startPhi = startP.phi();
352 double deltaPhi = -1.0 * (charge / abs(charge)) * kDeltaPhi;
353 double deltaZ = (mdcStartMomentum.z() * 1e6 / kvC * 1e3) * kDeltaPhi / (abs(charge) * kMagnetField);
354
355 //cout << "r = " << radius << endl;
356 mucStartPos = mdcStartPos;
357 mucStartMomentum = mdcStartMomentum;
358 double phi;
359 int iter = 0;
360 do {
361 phi = mucStartMomentum.getPhi() + deltaPhi;
362 mucStartPos.setX(mucStartPos.x() + radius * kDeltaPhi * cos(phi));
363 mucStartPos.setY(mucStartPos.y() + radius * kDeltaPhi * sin(phi));
364 mucStartPos.setZ(mucStartPos.z() + deltaZ);
365
366 mucStartMomentum.setPhi(mucStartMomentum.phi() + deltaPhi);
367 iter++;
368 //cout << endP << " " << mucStartPos << endl;
369 }
370 while(IsInsideSuperConductor(mucStartPos) && iter < kMdcExtIterMax);
371
372 //mm->cm; MeV->GeV//
373 mucStartPos/=10;
374 mucStartMomentum/=1000;
375 ////////////////////
376}
double abs(const EvtComplex &c)
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
const double kMagnetField
Definition MucConstant.h:13
const double kvC
const int kMdcExtIterMax
const double kDeltaPhi
bool IsInsideSuperConductor(Hep3Vector pos)

Referenced by MucRecTrkExt::execute().

◆ getMdcMomentum()

Hep3Vector RecMucTrack::getMdcMomentum ( ) const
inline

momentum of this track in Mdc

Definition at line 206 of file RecMucTrack.h.

206{ return m_MdcMomentum/1000; }

Referenced by MucRecTrkExt::execute(), and MucRecTrkExt::TrackFinding().

◆ getMucMomentum()

Hep3Vector RecMucTrack::getMucMomentum ( ) const
inline

Start momentum of this track in Muc.

Definition at line 203 of file RecMucTrack.h.

203{ return m_MucMomentum/1000; }

Referenced by MucRecRoadFinder::execute().

◆ getMucPos()

Hep3Vector RecMucTrack::getMucPos ( ) const
inline

start position of this track in Muc.

Definition at line 198 of file RecMucTrack.h.

198{ return m_MucPos/10; }

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ getMucPosSigma()

Hep3Vector RecMucTrack::getMucPosSigma ( ) const
inline

Definition at line 200 of file RecMucTrack.h.

200{ return m_MucPosSigma/10; }

Referenced by MucRecTrkExt::execute().

◆ GetMucStripPos()

Hep3Vector RecMucTrack::GetMucStripPos ( ) const
inline

Definition at line 261 of file RecMucTrack.h.

261{ return m_StripPhi;}

Referenced by MucRecTrkExt::execute().

◆ GetNGapsWithHits()

int RecMucTrack::GetNGapsWithHits ( ) const
inline

How many gaps provide hits attached to this track?

Definition at line 267 of file RecMucTrack.h.

267{ return m_numLayers; }

Referenced by LineFit().

◆ GetNSharedHits()

int RecMucTrack::GetNSharedHits ( const RecMucTrack * track) const

How many hits do two tracks share?

Definition at line 1585 of file RecMucTrack.cxx.

1586{
1587 if (!track2) {
1588 return 0;
1589 }
1590
1591 int count = 0;
1592 vector<MucRecHit*>::const_iterator iHit1;
1593 vector<MucRecHit*>::const_iterator iHit2;
1594 MucRecHit *hit1, *hit2;
1595
1596 for( iHit1 = m_pHits.begin(); iHit1 != m_pHits.end(); iHit1++){
1597 for( iHit2 = track2->m_pHits.begin();
1598 iHit2 != track2->m_pHits.end(); iHit2++){
1599 hit1 = (*iHit1);
1600 hit2 = (*iHit2);
1601
1602 if ( (hit1 != 0) && (hit2 != 0) ) {
1603 if (hit1->GetID() == hit2->GetID()) {
1604 count++;
1605 }
1606 }
1607 }
1608 }
1609
1610 return count;
1611}
Identifier GetID() const
Get soft identifier of this hit.
Definition MucRecHit.h:68

◆ getQuadDistHits()

vector< float > RecMucTrack::getQuadDistHits ( ) const
inline

Definition at line 313 of file RecMucTrack.h.

313{ return m_distHits_quad ;}

Referenced by MucRecTrkExt::execute().

◆ GetRecMode()

int RecMucTrack::GetRecMode ( ) const
inline

Definition at line 256 of file RecMucTrack.h.

256{return m_recmode;}

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ GetTotalHits()

int RecMucTrack::GetTotalHits ( ) const

How many hits in all does this track contain?

Definition at line 1436 of file RecMucTrack.cxx.

1437{
1438 return m_pHits.size();
1439}

Referenced by ComputeDepth(), MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ getVecHits()

vector< int > RecMucTrack::getVecHits ( ) const
inline

Definition at line 305 of file RecMucTrack.h.

305{ return m_vecHits ;}

◆ HasHit()

bool RecMucTrack::HasHit ( const int part,
const int seg,
const int gap,
const int strip ) const

How many hits were attached in the gap with the most attached hits?

Does this track contains an assigned hit?

Definition at line 1542 of file RecMucTrack.cxx.

1543{
1544 bool found = false;
1545 vector<MucRecHit*>::const_iterator iHit;
1546
1547 for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1548 if (*iHit) { // Check for a null pointer.
1549 if ( (*iHit)->Part() == part &&
1550 (*iHit)->Seg() == seg &&
1551 (*iHit)->Gap() == gap &&
1552 (*iHit)->Strip() == strip ) {
1553 found = true;
1554 }
1555 }
1556 }
1557
1558 return found;
1559}

◆ HasHitInGap()

bool RecMucTrack::HasHitInGap ( const int part,
const int gap ) const

Does this track contain any hits in the given gap?

Definition at line 1562 of file RecMucTrack.cxx.

1563{
1564 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
1565 cout << "RecMucTrack::HasHitInGap-E2 invalid gap = " << gap << endl;
1566 return false;
1567 }
1568
1569 bool found = false;
1570 vector<MucRecHit*>::const_iterator iHit;
1571
1572 for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1573 if (*iHit) { // Check for a null pointer.
1574 if ( (*iHit)->Part() == part &&
1575 (*iHit)->Gap() == gap ) {
1576 found = true;
1577 }
1578 }
1579 }
1580
1581 return found;
1582}

Referenced by ComputeDepth().

◆ IsInsideSuperConductor()

bool RecMucTrack::IsInsideSuperConductor ( Hep3Vector pos)

Definition at line 379 of file RecMucTrack.cxx.

380{
381 if(pos.mag() < kSuperConductorR && fabs(pos.z()) < kSuperConductorZ) {
382 return true;
383 }
384 else {
385 return false;
386 }
387}
const double kSuperConductorR
Definition MucConstant.h:11
const double kSuperConductorZ
Definition MucConstant.h:12

Referenced by GetMdcExtTrack().

◆ LineFit()

void RecMucTrack::LineFit ( int fittingMethod)

Line fit with hits on a seg with max hits.

Definition at line 1037 of file RecMucTrack.cxx.

1038{
1039 Extend();
1040
1041 int part = -1, seg = -1;
1042 int nHits = FindSegWithMaxHits(part, seg);
1043// cout << "RecMucTrack::ComputeDepth(), part " << part << " seg " << seg
1044// << " contains most hits " << nHits << endl;
1045 if (part < 0 || seg < 0) {
1046 m_depth = 0;
1047 //cout << "No hit in this track" << endl;
1048 return;
1049 }
1050
1051 float startPos[3] = {0.0, 0.0, 0.0};
1052 MucRec2DRoad road2D[2];
1053 vector<MucRecHit*>::const_iterator iHit;
1054 for (int orient = 0; orient <= 1; orient++) {
1055 road2D[orient] = MucRec2DRoad(part, seg, orient, startPos[0], startPos[1], startPos[2],fittingMethod );
1056 for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1057 if(*iHit) { // Check for a null pointer.
1058 int hitPart = (*iHit)->Part();
1059 int hitSeg = (*iHit)->Seg();
1060 int hitOrient = (*iHit)->GetGap()->Orient();
1061 if (hitPart == part && hitSeg == seg && hitOrient == orient) {
1062 road2D[orient].AttachHit(*iHit);
1063 }
1064 }
1065 }
1066 //cout << "Orient " << orient
1067 // << " Slope " << road2D[orient].GetSlope()
1068 // << " Intercept " << road2D[orient].GetIntercept()
1069 // << " LastGap " << road2D[orient].GetLastGap()
1070 // << endl;
1071
1072 }
1073 MucRec3DRoad road3D(&road2D[0], &road2D[1]);
1074 float vx, vy, x0, y0;
1075 if ( road3D.GetPart() == 1 ){
1076 road3D.TransformPhiRToXY( road2D[1].GetSlope(), road2D[0].GetSlope(),
1077 road2D[1].GetIntercept(), road2D[0].GetIntercept(),
1078 vx, vy, x0, y0);
1079 }
1080 else {
1081 vx = road2D[1].GetSlope();
1082 x0 = road2D[1].GetIntercept();
1083 vy = road2D[0].GetSlope();
1084 y0 = road2D[0].GetIntercept();
1085 }
1086
1087 //cout << "road3D Last Gap " << road3D.GetLastGap() << endl;
1088 //cout << "vx " << vx << " x0 " << x0 << " vy " << vy << " y0 " << y0 << endl;
1089
1090 // if number of gaps with hits >= 2 on both orient, change muc pos and momentum
1091 if (road2D[0].GetNGapsWithHits() >= 2 && road2D[1].GetNGapsWithHits() >= 2) {
1092
1093 //good 3d road!!!
1094 m_Good3DLine = 1;
1095 m_status = 1;
1096
1097 m_Good3DPart = road3D.GetPart();
1098 road3D.SetSimpleFitParams(vx, x0, vy, y0);
1099 //road3D.PrintHitsInfo();
1100
1101 float startx = 0.0, starty = 0.0, startz = 0.0;
1102 float startxSigma = 0.0, startySigma = 0.0, startzSigma = 0.0;
1103 float x1 = 0.0, y1 = 0.0, z1 = 0.0, x2 = 0.0, y2 = 0.0, z2 = 0.0;
1104 int gap = 0;
1105
1106 if(fittingMethod==2){ //if choose quadratic fitting method!
1107 for(int igap=0; igap<9;igap++){
1108 road3D.Project(igap, x1, y1, z1, x2, y2, z2);
1109 m_IntersectionInner[igap].set(x1,y1,z1);
1110 m_IntersectionOuter[igap].set(x2,y2,z2);
1111 //cout<<"3dproject sur "<<x1<<" "<<y1<<" "<<z1<<" "<<x2<<" "<<y2<<" "<<z2<<endl;
1112 }
1113 }
1114
1115 do {
1116 //road3D.Project(gap, startx, starty, startz);
1117 road3D.ProjectWithSigma(gap, startx, starty, startz, startxSigma, startySigma, startzSigma);
1118 gap++;
1119 }
1120 while ( (startx*startx + starty*starty + startz*startz) < kMinor &&
1121 gap < (int)MucID::getGapNum(part) );
1122
1123 if(fabs(startx)<2600&&fabs(starty)<2600&&fabs(startz)<2800){
1124 Hep3Vector MucPos_self;
1125 MucPos_self.set(startx, starty, startz);
1126 float dist = (MucPos_self - m_MucPos).mag();
1127
1128 if(dist < 1000 ){ // (mm) maybe the fit is bad, if the dist is too big.
1129 m_MucPos.set(startx, starty, startz);
1130 m_xPos = startx;
1131 m_yPos = starty;
1132 m_zPos = startz;
1133 }
1134 }
1135 m_MucPosSigma.set(startxSigma, startySigma, startzSigma);
1136 m_xPosSigma = startxSigma;
1137 m_yPosSigma = startySigma;
1138 m_zPosSigma = startzSigma;
1139
1140 //cout<<"in RecMucTrack gap= "<<gap<<" start= "<<startx<<" "<<starty<<" "<<startz<<" "<<endl;
1141 float momentum = m_MucMomentum.mag();
1142 float zDir = 1.0;
1143 if (m_MucMomentum.z() != 0.0) zDir = m_MucMomentum.z() / fabs(m_MucMomentum.z());
1144
1145 float px = road3D.GetSlopeZX()*zDir;
1146 float py = road3D.GetSlopeZY()*zDir;
1147 float pz = zDir;
1148 float segPhi = 0.25*kPi*seg;
1149 // if vr is opposite to original, but both are very small, e.x. -0.01 -> + 0.01, or you can say, pt~p, change it to guarantee vx, vy is correct.
1150 if (part == 1 && px*cos(segPhi)+py*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
1151 px *= -1.0;
1152 py *= -1.0;
1153 pz *= -1.0;
1154 }
1155
1156 //if(sqrt(px*px+py*py)>0.01)m_MucMomentum.set(px, py, pz);
1157 m_MucMomentum.set(px, py, pz);
1158 m_MucMomentum.setMag(momentum);
1159
1160 m_px = px; m_py = py; m_pz = pz;
1161 Hep3Vector phi_mdc, phi_muc;
1162 phi_mdc.set(m_MdcMomentum.x(),m_MdcMomentum.y(),0);
1163 phi_muc.set(px,py,0);
1164 double deltaPhi = phi_mdc.angle(phi_muc);
1165
1167 m_dof = road3D.GetDegreesOfFreedom();
1168 m_chi2 = road3D.GetReducedChiSquare();
1169 if(m_chi2<0||m_chi2>1000) m_chi2 = 0;
1170 m_rms = 0.0; // road3D.GetReducedChiSquare(); // ??? in MucRecRoad3D
1171
1172
1173 if(road2D[0].GetNGapsWithHits() >= 3 && road2D[1].GetNGapsWithHits() >= 3){ //need 3+ gap to do refit
1174 //calc distance between each hit with this track.
1175 //use GetHitDistance(), so we should provide m_CurrentInsct.
1176 float xInsct = 0.0, yInsct = 0.0, zInsct = 0.0, sigmax = 0.0, sigmay = 0.0, sigmaz = 0.0;
1177 float quad_x1 = 0.0, quad_y1 = 0.0, quad_z1 = 0.0, quad_x2 = 0.0, quad_y2 = 0.0, quad_z2 = 0.0;
1178 for(int ihit = 0; ihit < m_pHits.size(); ihit++){
1179 int igap = (m_pHits[ihit])->Gap();
1180 road3D.ProjectNoCurrentGap(igap, xInsct, yInsct, zInsct, sigmax, sigmay, sigmaz,
1181 quad_x1, quad_y1, quad_z1, quad_x2, quad_y2, quad_z2);
1182
1183 SetCurrentInsct(xInsct, yInsct, zInsct);
1184
1185 float dist_hit_track = GetHitDistance2(m_pHits[ihit]);
1186 m_distHits.push_back(dist_hit_track);
1187
1188 //cout<<"===========in RecMucTrack: line dist: "<<dist_hit_track<<endl;
1189
1190 if(fittingMethod==2) // ------calc local insct in a gap with quad line.
1191 {
1192
1193 Hep3Vector center = m_pHits[ihit]->GetCenterPos();
1194 int iPart = m_pHits[ihit]->Part();
1195 int iSeg = m_pHits[ihit]->Seg();
1196 int iGap = m_pHits[ihit]->Gap();
1197 float xHit, yHit, zHit = 0.;
1198 if (iPart == 1) {
1199 if ( iGap %2 == 1) {
1200 xHit = center.z();
1201 yHit = sqrt(center.x()*center.x()
1202 + center.y()*center.y());
1203 if(iSeg==2) yHit = center.y(); //deal with seg2 seperately! because there is a hole here. 2006.11.9
1204 }
1205 else {
1206 xHit = center.x();
1207 yHit = center.y();
1208 }
1209 }
1210 else {
1211 if ( iGap %2 == 0) {
1212 xHit = center.z();
1213 yHit = center.y();
1214 }
1215 else {
1216 xHit = center.z();
1217 yHit = center.x();
1218 }
1219 }
1220
1221 float distance1 = fabs(xHit - quad_x1)/(xHit - quad_x1) * sqrt((xHit - quad_x1)*(xHit - quad_x1) + (yHit - quad_y1)*(yHit - quad_y1));
1222 float distance2 = fabs(xHit - quad_x2)/(xHit - quad_x2) * sqrt((xHit - quad_x2)*(xHit - quad_x2) + (yHit - quad_y2)*(yHit - quad_y2));
1223
1224 float dist_quad = distance1;
1225 if(fabs(distance1) > fabs(distance2)) dist_quad = distance2;
1226
1227 //cout<<"============in RecMucTrack: quad xyz: "<<quad_x1<<" "<<quad_y1<<" "<<quad_z1<<" "<<quad_x2<<" "<<quad_y2<<endl;
1228 //cout<<"============in RecMucTrack: hit pos: "<<xHit<<" "<<yHit<<" "<<zHit<<endl;
1229 //cout<<"============in RecMucTrack: dist1 = "<<distance1<<" dist2 = "<<distance2<<" dist ="<<dist_quad<<endl;
1230
1231 if(quad_x1 == -9999) m_distHits_quad.push_back(-99);
1232 else m_distHits_quad.push_back(dist_quad);
1233
1234 }
1235 }
1236 }
1237 else{
1238 for(int ihit = 0; ihit < m_pHits.size(); ihit++){
1239 m_distHits.push_back(-99);
1240 m_distHits_quad.push_back(-99);
1241 }
1242 }
1243 //////////////////////////////////////
1244
1245 ///////////////find expected strips for this 3D road
1247 //HepPoint3D initPos(startx, starty,startz);
1248 HepPoint3D initPos(startx-m_MucMomentum.x()/momentum, starty-m_MucMomentum.y()/momentum,startz-m_MucMomentum.z()/momentum);
1249
1250 //for(int igap = 0; igap <= m_brLastLayer; igap++){
1251 for(int igap = 0; igap < 9 ; igap++){
1252 vector<int> padID;
1253 vector<float> intersect_x;
1254 vector<float> intersect_y;
1255 vector<float> intersect_z;
1256
1257 //refit---------------------------------
1258 float zx, zy, x0, y0;
1259 int status = road3D.RefitNoCurrentGap(igap,zx,x0,zy,y0);
1260 Hep3Vector mom_refit;
1261 if(status == 0){ //refit succeed
1262 float zDir = 1.0;
1263 if (m_MucMomentum.z() != 0.0) zDir = m_MucMomentum.z() / fabs(m_MucMomentum.z());
1264 float px_refit = zx * zDir;
1265 float py_refit = zy * zDir;
1266 float pz_refit = zDir;
1267 float segPhi = 0.25*kPi*seg;
1268 // if vr is opposite to original, but both are very small, e.x. -0.01 -> + 0.01, or you can say, pt~p, change it to guarantee vx, vy is correct.
1269 if (part == 1 && px_refit*cos(segPhi)+py_refit*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
1270 px_refit *= -1.0;
1271 py_refit *= -1.0;
1272 pz_refit *= -1.0;
1273 }
1274
1275 mom_refit.setX(px_refit);
1276 mom_refit.setY(py_refit);
1277 mom_refit.setZ(pz_refit);
1278 mom_refit.setMag(momentum);
1279 }
1280 else mom_refit = m_MucMomentum; //use the former momentum
1281
1282 HepPoint3D initPos_refit;
1283 if(status == 0){
1284 float initPosx_refit, initPosy_refit, initPosz_refit;
1285 float sigmax_refit, sigmay_refit, sigmaz_refit;
1286 road3D.Project(0, zx, x0, zy, y0, initPosx_refit, initPosy_refit, initPosz_refit);
1287 initPos_refit.setX(initPosx_refit-mom_refit.x()/momentum);
1288 initPos_refit.setY(initPosy_refit-mom_refit.y()/momentum);
1289 initPos_refit.setZ(initPosz_refit-mom_refit.z()/momentum);
1290 }
1291 else initPos_refit = initPos;
1292
1293 //cout<<"initPos: "<<initPos<<" "<<initPos_refit<<endl;
1294 //if((initPos - initPos_refit).mag()>100) cout<<"--------=====------to far"<<endl;
1295 //refit---------------------------------
1296 //cout<<"no gap: "<<igap<<" mom: "<<m_MucMomentum<<" refit: "<<mom_refit<<endl;
1297
1298 //vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos,m_MucMomentum,padID,intersect_x,intersect_y,intersect_z);
1299 vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos_refit,mom_refit,padID,intersect_x,intersect_y,intersect_z);
1300
1301 //vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos,mom_refit,padID,intersect_x,intersect_y,intersect_z);
1302
1303 vector<Identifier>::const_iterator mucid;
1304 int i = 0;
1305 for(mucid = MuId.begin(); mucid != MuId.end(); mucid++,i++)
1306 {
1307 MucRecHit *pHit = new MucRecHit(MucID::part(*mucid),MucID::seg(*mucid),MucID::gap(*mucid),MucID::strip(*mucid));
1308 pHit->SetPadID(padID[i]);
1309 pHit->SetIntersectX(intersect_x[i]);
1310 pHit->SetIntersectY(intersect_y[i]);
1311 pHit->SetIntersectZ(intersect_z[i]);
1312
1313 m_pExpectedHits.push_back(pHit);
1314 }
1315 }
1316
1317 if(m_endPart!=-1&&m_ecLastLayer!=-1)
1318 {
1319 //for(int igap = 0; igap <= m_ecLastLayer; igap++){
1320 for(int igap = 0; igap < 8; igap++){
1321 vector<int> padID;
1322 vector<float> intersect_x;
1323 vector<float> intersect_y;
1324 vector<float> intersect_z;
1325
1326 //refit---------------------------------
1327 float zx, zy, x0, y0;
1328 //int status = road3D.RefitNoCurrentGap(igap,zy,y0,zx,x0); //!!!!!different sequence
1329 int status = road3D.RefitNoCurrentGap(igap,zx,x0,zy,y0);
1330 Hep3Vector mom_refit;
1331 if(status == 0){ //refit succeed
1332 float zDir = 1.0;
1333 if (m_MucMomentum.z() != 0.0) zDir = m_MucMomentum.z() / fabs(m_MucMomentum.z());
1334 float px_refit = zx * zDir;
1335 float py_refit = zy * zDir;
1336 float pz_refit = zDir;
1337 float segPhi = 0.25*kPi*seg;
1338 // if vr is opposite to original, but both are very small, e.x. -0.01 -> + 0.01, or you can say, pt~p, change it to guarantee vx, vy is correct.
1339 if (part == 1 && px_refit*cos(segPhi)+py_refit*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
1340 px_refit *= -1.0;
1341 py_refit *= -1.0;
1342 pz_refit *= -1.0;
1343 }
1344
1345 mom_refit.setX(px_refit);
1346 mom_refit.setY(py_refit);
1347 mom_refit.setZ(pz_refit);
1348 mom_refit.setMag(momentum);
1349 }
1350 else mom_refit = m_MucMomentum; //use the former momentum
1351
1352 HepPoint3D initPos_refit;
1353 if(status == 0){
1354 float initPosx_refit, initPosy_refit, initPosz_refit;
1355 float sigmax_refit, sigmay_refit, sigmaz_refit;
1356 road3D.Project(0, zx, x0, zy, y0, initPosx_refit, initPosy_refit, initPosz_refit);
1357 initPos_refit.setX(initPosx_refit-mom_refit.x()/momentum);
1358 initPos_refit.setY(initPosy_refit-mom_refit.y()/momentum);
1359 initPos_refit.setZ(initPosz_refit-mom_refit.z()/momentum);
1360 }
1361 else initPos_refit = initPos;
1362 //refit---------------------------------
1363 //cout<<"mom: "<<m_MucMomentum<<" "<<mom_refit<<" pos: "<<initPos<<" "<<initPos_refit<<endl;
1364 //vector<Identifier> MuId = road3D.ProjectToStrip(m_endPart,igap,initPos,m_MucMomentum,padID,intersect_x,intersect_y,intersect_z);
1365
1366 vector<Identifier> MuId = road3D.ProjectToStrip(m_endPart,igap,initPos_refit,mom_refit,padID,intersect_x,intersect_y,intersect_z);
1367
1368 vector<Identifier>::const_iterator mucid;
1369 int i = 0;
1370 for(mucid = MuId.begin(); mucid != MuId.end(); mucid++,i++)
1371 {
1372 MucRecHit *pHit = new MucRecHit(MucID::part(*mucid),MucID::seg(*mucid),MucID::gap(*mucid),MucID::strip(*mucid));
1373 pHit->SetPadID(padID[i]);
1374 pHit->SetIntersectX(intersect_x[i]);
1375 pHit->SetIntersectY(intersect_y[i]);
1376 pHit->SetIntersectZ(intersect_z[i]);
1377
1378 m_pExpectedHits.push_back(pHit);
1379 }
1380 }
1381 }
1382
1383 //cout<<"in RecMucTrack push back expected hits size= "<<m_pExpectedHits.size()<<" ? "<<m_pHits.size()<<endl;
1384 for(int i=0; i< m_pExpectedHits.size(); i++)
1385 {
1386 MucRecHit *ihit = m_pExpectedHits[i];
1387 //cout<<"expected Hits: "<<ihit->Part()<<" "<<ihit->Seg()<<" "<<ihit->Gap()<<" "<<ihit->Strip()<<endl;
1388 //cout<<"pad: "<<ihit->GetPadID()<<" pos: "<<ihit->GetIntersectX()<<" "<<ihit->GetIntersectY()<<" "<<ihit->GetIntersectZ()<<" "<<endl;
1389 }
1390
1391 for(int i=0; i< m_pHits.size(); i++)
1392 {
1393 MucRecHit *ihit = m_pHits[i];
1394 //cout<<"attachedd Hits: "<<ihit->Part()<<" "<<ihit->Seg()<<" "<<ihit->Gap()<<" "<<ihit->Strip()<<" isseed: "<<ihit->HitIsSeed()<<endl;
1395 }
1396 //cout<<"1st: "<<brFirstLayer()<<" "<<ecFirstLayer()<<" last: "<<brLastLayer()<<" "<<ecLastLayer()<<endl;
1397
1398 }
1399 else {
1400 //calc distance between each hit with this track.
1401 //initialize distHits
1402 for(int ihit = 0; ihit < m_pHits.size(); ihit++){
1403 m_distHits.push_back(-99);
1404 m_distHits_quad.push_back(-99);
1405 }
1406 }
1407 //cout << "Muc Pos: x " << m_MucPos.x() << " y " << m_MucPos.y() << " z " << m_MucPos.z() << endl;
1408}
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
const double kMinor
Definition MucConstant.h:8
double pz() const
Definition DstMucTrack.h:60
double py() const
Definition DstMucTrack.h:59
int status() const
Definition DstMucTrack.h:34
double px() const
Definition DstMucTrack.h:58
static int part(const Identifier &id)
Definition MucID.cxx:46
static int gap(const Identifier &id)
Definition MucID.cxx:66
static int seg(const Identifier &id)
Definition MucID.cxx:56
static int strip(const Identifier &id)
Definition MucID.cxx:76
float GetIntercept() const
Intercept of trajectory.
void AttachHit(MucRecHit *hit)
Attach the given hit to this road.
float GetSlope() const
Slope of trajectory.
void SetIntersectZ(float z)
Definition MucRecHit.h:105
void SetIntersectY(float y)
Definition MucRecHit.h:104
void SetIntersectX(float x)
Definition MucRecHit.h:103
void SetPadID(int padID)
Definition MucRecHit.h:102
int GetNGapsWithHits() const
How many gaps provide hits attached to this track?
void SetCurrentInsct(const float x, const float y, const float z)
set current intersection of the trajectory with strip plane.
float GetHitDistance2(const MucRecHit *hit)
no abs value
void Extend()
Extend mucpos and extmucpos to first layer of muc.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ operator=() [1/2]

RecMucTrack & RecMucTrack::operator= ( const DstMucTrack & dstTrack)

Assignment constructor from DstMucTrack.

Definition at line 186 of file RecMucTrack.cxx.

187{
188 SetDefault();
189 DstMucTrack::operator=(dstTrack);
190 return *this;
191}

◆ operator=() [2/2]

RecMucTrack & RecMucTrack::operator= ( const RecMucTrack & orig)

Assignment constructor.

Definition at line 84 of file RecMucTrack.cxx.

85{
86 // Assignment operator.
87 if ( this != &orig ) { // Watch out for self-assignment!
88 //m_trackId = orig.m_trackId; //--------------->
89 m_ExtTrackID = orig.m_ExtTrackID;
90 m_MdcPos = orig.m_MdcPos;
91 m_MdcMomentum = orig.m_MdcMomentum;
92 m_MucPos = orig.m_MucPos;
93 m_MucPosSigma = orig.m_MucPosSigma;
94 m_MucMomentum = orig.m_MucMomentum;
95 m_CurrentPos = orig.m_CurrentPos;
96 m_CurrentDir = orig.m_CurrentDir;
97 m_CurrentInsct = orig.m_CurrentInsct;
98 m_id = orig.m_id;
99 m_status = orig.m_status;
100 m_type = orig.m_type;
101 m_numHits = orig.m_numHits; //--------------->
103 m_endPart = orig.m_endPart;
108 m_depth = orig.m_depth;
109 m_dof = orig.m_dof;
110 m_chi2 = orig.m_chi2;
111 m_rms = orig.m_rms;
112 m_deltaPhi = orig.m_deltaPhi;
113 m_pHits = orig.m_pHits;
114 m_pExpectedHits = orig.m_pExpectedHits;
115 m_Intersections = orig.m_Intersections;
116 m_Directions = orig.m_Directions;
120 m_changeUnit = orig.m_changeUnit;
121 m_recmode = orig.m_recmode;
122 //*******
124 m_kaldof = orig.m_kaldof;
128 }
129
130 return *this;
131}

◆ OutputUnitChange()

void RecMucTrack::OutputUnitChange ( )

change unit

Definition at line 1705 of file RecMucTrack.cxx.

1706{
1707 if(m_changeUnit == false){
1708 m_depth/=10;
1709
1710 m_xPos /=10;
1711 m_yPos /=10;
1712 m_zPos /=10;
1713
1714 m_xPosSigma/=10;
1715 m_yPosSigma/=10;
1716 m_zPosSigma/=10;
1717
1718 m_px /= 1000;
1719 m_py /= 1000;
1720 m_pz /= 1000;
1721
1722 m_distance /= 10;
1723 }
1724
1725 m_changeUnit = true;
1726
1727}

Referenced by ComputeTrackInfo().

◆ PrintHitsInfo()

void RecMucTrack::PrintHitsInfo ( ) const

Print Hits Infomation.

Definition at line 1683 of file RecMucTrack.cxx.

1684{
1685 vector<MucRecHit*>::const_iterator iHit;
1686 for ( iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
1687 if (*iHit) { // Check for a null pointer.
1688 float xl, yl, zl;
1689 (*iHit)->GetStrip()->GetCenterPos(xl, yl, zl);
1690 HepPoint3D vl(xl, yl, zl);
1691 HepPoint3D vg = (*iHit)->GetGap()->TransformToGlobal(vl);
1692
1693 cout << " part " << (*iHit)->Part()
1694 << " seg " << (*iHit)->Seg()
1695 << " gap " << (*iHit)->Gap()
1696 << " strip " << (*iHit)->Strip()
1697 << " pos (" << vg.x() << ", " << vg.y() << ", " << vg.z() << ")"
1698 << endl;
1699 }
1700 }
1701
1702}

◆ Project()

void RecMucTrack::Project ( const int & part,
const int & gap,
float & x,
float & y,
float & z,
int & seg )

Where does the trajectory of this track intersect a specific gap?

Definition at line 422 of file RecMucTrack.cxx.

425{
426 seg = -1;
427 x = 0.0; y = 0.0; z = 0.0;
428
429 if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
430 cout << "Muc2DRoad::Project(), invalid gap = " << gap << endl;
431 return;
432 }
433
434 HepPoint3D pos = m_CurrentPos;
435 Hep3Vector dir = m_CurrentDir;
436
437 vector<HepPoint3D> insctCon = MucGeoGeneral::Instance()->FindIntersections(part, gap, pos, dir);
438 if( insctCon.size() == 0 ) {
439 return;
440 }
441
442 HepPoint3D intersection = insctCon[0];
443
444 x = intersection.x();
445 y = intersection.y();
446 z = intersection.z();
447
448 //cout << " x " << x << " y " << y << " z " << z << endl;
449
450 float phi;
451 if( (x*x+y*y+z*z) < kMinor) {
452 return;
453 }
454 else {
455 if(part == 1) {
456 phi = acos(x/sqrt(x*x+y*y));
457 if(y < 0) phi = 2.0*kPi - phi;
458 phi = fmod((phi + kPi/8.0), 2.0*kPi);
459 seg = int(phi/(kPi/4.0));
460 }
461 else {
462 if(x >= 0.0) {
463 if(y >= 0.0) {
464 seg = 0;
465 }
466 else {
467 seg = 3;
468 }
469 }
470 else {
471 if(y >= 0.0) {
472 seg = 1;
473 }
474 else {
475 seg = 2;
476 }
477 }
478 }
479 }
480}
int intersection(const HepPoint3D &c1, double r1, const HepPoint3D &c2, double r2, double eps, HepPoint3D &x1, HepPoint3D &x2)
Circle utilities.
Definition TMDCUtil.cxx:99
vector< HepPoint3D > FindIntersections(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ pushExtDistHits()

void RecMucTrack::pushExtDistHits ( float dist)
inline

Definition at line 347 of file RecMucTrack.h.

347{m_distHits_ext.push_back(dist);}

Referenced by MucRecTrkExt::execute().

◆ SetCurrentDir()

void RecMucTrack::SetCurrentDir ( const float x,
const float y,
const float z )

set current direction of the trajectory.

Definition at line 292 of file RecMucTrack.cxx.

295{
296 m_CurrentDir.set(x*1000, y*1000, z*1000); //unnecessary, because it's dir, not mom
297}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetCurrentInsct()

void RecMucTrack::SetCurrentInsct ( const float x,
const float y,
const float z )

set current intersection of the trajectory with strip plane.

Definition at line 300 of file RecMucTrack.cxx.

303{
304 m_CurrentInsct.set(x, y, z); /////this is intenal function, it receive "mm", so need not convert.
305}

Referenced by MucRecTrkExt::execute(), LineFit(), MucRecRoadFinder::TrackFinding(), and MucRecTrkExt::TrackFinding().

◆ SetCurrentPos()

void RecMucTrack::SetCurrentPos ( const float x,
const float y,
const float z )

set current position of the trajectory.

Definition at line 284 of file RecMucTrack.cxx.

287{
288 m_CurrentPos.set(x*10, y*10, z*10);
289}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetDefault()

void RecMucTrack::SetDefault ( )

Definition at line 193 of file RecMucTrack.cxx.

194{
195 m_brFirstLayer = -99;
196 m_ecFirstLayer = -99;
197 m_Good3DPart = -99;
198}

Referenced by operator=(), and RecMucTrack().

◆ setDistHits()

void RecMucTrack::setDistHits ( vector< float > & disthits)
inline

Definition at line 341 of file RecMucTrack.h.

341{ m_distHits = disthits;}

Referenced by RecMucTrackCnv::TObjectToDataObject().

◆ setExpHits() [1/2]

void RecMucTrack::setExpHits ( vector< int > & exphits)
inline

Definition at line 339 of file RecMucTrack.h.

339{ m_expHits = exphits;}

◆ setExpHits() [2/2]

void RecMucTrack::setExpHits ( vector< MucRecHit * > & pHits)

Definition at line 330 of file RecMucTrack.cxx.

331{
332 for(int i = 0 ; i < pHits.size(); i++)
333 m_expHits.push_back((pHits[i]->GetID()).get_value());
334}

Referenced by ComputeTrackInfo(), and RecMucTrackCnv::TObjectToDataObject().

◆ setExtDistHits()

void RecMucTrack::setExtDistHits ( vector< float > & disthits)
inline

Definition at line 345 of file RecMucTrack.h.

345{ m_distHits_ext = disthits;}

◆ SetExtMucMomentum()

void RecMucTrack::SetExtMucMomentum ( const float px,
const float py,
const float pz )

set start moment of ext track in Muc.

Definition at line 276 of file RecMucTrack.cxx.

279{
280 m_ExtMucMomentum.set(px*1000, py*1000, pz*1000);
281}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetExtMucPos()

void RecMucTrack::SetExtMucPos ( const float x,
const float y,
const float z )

set start position of ext track in Muc. (compute from MdcPos MdcMomentum or get from ExtTrack)

Definition at line 268 of file RecMucTrack.cxx.

271{
272 m_ExtMucPos.set(x*10, y*10, z*10);
273}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetExtTrack()

void RecMucTrack::SetExtTrack ( RecExtTrack * extTrack)

set Ext track point.

Definition at line 314 of file RecMucTrack.cxx.

315{
316 m_ExtTrack = extTrack;
317 if (m_ExtTrack) m_ExtTrackID = extTrack->GetTrackId();
318}
const int GetTrackId() const
Definition DstExtTrack.h:42

Referenced by MucRecTrkExt::execute().

◆ SetExtTrackID()

void RecMucTrack::SetExtTrackID ( int id)
inline

set Ext track id. for compute from mdc myself

Definition at line 132 of file RecMucTrack.h.

132{ m_ExtTrackID = id; }
int id() const
Definition DstMucTrack.h:33

Referenced by MucRecTrkExt::execute().

◆ SetMdcMomentum()

void RecMucTrack::SetMdcMomentum ( const float px,
const float py,
const float pz )

set start moment of the track in Mdc.

Definition at line 227 of file RecMucTrack.cxx.

230{
231 m_MdcMomentum.set(px*1000, py*1000, pz*1000);
232}

Referenced by MucRecTrkExt::execute().

◆ SetMdcPos()

void RecMucTrack::SetMdcPos ( const float x,
const float y,
const float z )

set start position of the track in Mdc.

Definition at line 219 of file RecMucTrack.cxx.

222{
223 m_MdcPos.set(x*10, y*10, z*10);
224}

Referenced by MucRecTrkExt::execute().

◆ SetMucMomentum()

void RecMucTrack::SetMucMomentum ( const float px,
const float py,
const float pz )

set start moment of the track in Muc.

Definition at line 257 of file RecMucTrack.cxx.

260{
261 m_MucMomentum.set(px*1000, py*1000, pz*1000);
262 m_px = px*1000;
263 m_py = py*1000;
264 m_pz = pz*1000;
265}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetMucPos()

void RecMucTrack::SetMucPos ( const float x,
const float y,
const float z )

set start position of the track in Muc. (after line fit and correction)

Definition at line 235 of file RecMucTrack.cxx.

238{
239 m_MucPos.set(x*10, y*10, z*10);
240 m_xPos = x*10;
241 m_yPos = y*10;
242 m_zPos = z*10;
243}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ SetMucPosSigma()

void RecMucTrack::SetMucPosSigma ( const float sigmax,
const float sigmay,
const float sigmaz )

Definition at line 246 of file RecMucTrack.cxx.

249{
250 m_MucPosSigma.set(x*10, y*10, z*10);
251 m_xPosSigma = x*10;
252 m_yPosSigma = y*10;
253 m_zPosSigma = z*10;
254}

◆ setQuadDistHits()

void RecMucTrack::setQuadDistHits ( vector< float > & disthits)
inline

Definition at line 343 of file RecMucTrack.h.

343{ m_distHits_quad = disthits;}

◆ SetRecMode()

void RecMucTrack::SetRecMode ( int recmode)
inline

Definition at line 254 of file RecMucTrack.h.

254{m_recmode = recmode;}

Referenced by MucRecRoadFinder::execute(), and MucRecTrkExt::execute().

◆ setTrackId()

void RecMucTrack::setTrackId ( const int trackId)

set the index for this track.

Definition at line 209 of file RecMucTrack.cxx.

210{
211 if(trackId >= 0) {
213 }
214}
int trackId() const
Definition DstMucTrack.h:32

Referenced by MucRecRoadFinder::execute(), MucRecTrkExt::execute(), and RecMucTrackCnv::TObjectToDataObject().

◆ setVecHits() [1/2]

void RecMucTrack::setVecHits ( vector< int > & vechits)
inline

Definition at line 337 of file RecMucTrack.h.

337{ m_vecHits = vechits;}

◆ setVecHits() [2/2]

void RecMucTrack::setVecHits ( vector< MucRecHit * > & pHits)

reload setVecHits

Definition at line 323 of file RecMucTrack.cxx.

324{
325 for(int i = 0 ; i < pHits.size(); i++)
326 m_vecHits.push_back((pHits[i]->GetID()).get_value());
327}

Referenced by ComputeTrackInfo(), and RecMucTrackCnv::TObjectToDataObject().


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