RecMucTrack Class Reference

#include <RecMucTrack.h>

Inheritance diagram for RecMucTrack:

DstMucTrack ContainedObject List of all members.

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)
 Attach the given hit to this track.
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
 The identifier of the Ext track as seed.
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 ()
 Compute depth.
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
 Does this track contains an assigned hit?
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)
 Compute all infomation of this track;.
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)
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 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 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 ()

Protected Attributes

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
double m_kalrechi2
int m_kaldof
double m_kaldepth
int m_kalbrLastLayer
int m_kalecLastLayer

Private Attributes

int m_ExtTrackID
RecExtTrackm_ExtTrack
Hep3Vector m_MdcPos
Hep3Vector m_MdcMomentum
Hep3Vector m_ExtMucPos
Hep3Vector m_ExtMucMomentum
Hep3Vector m_MucPos
Hep3Vector m_MucMomentum
Hep3Vector m_MucPosSigma
Hep3Vector m_CurrentPos
Hep3Vector m_CurrentDir
Hep3Vector m_CurrentInsct
Hep3Vector m_Dist_muc_ext
Hep3Vector m_StripPhi
int m_brFirstLayer
int m_ecFirstLayer
int m_ecPart
float m_depth_3
int m_recmode
int m_Good3DLine
int m_Good3DPart
bool m_changeUnit
Hep3Vector m_IntersectionInner [9]
Hep3Vector m_IntersectionOuter [9]
vector< int > m_vecHits
vector< int > m_expHits
vector< float > m_distHits
vector< float > m_distHits_quad
vector< float > m_distHits_ext
vector< MucRecHit * > m_pHits
vector< MucRecHit * > m_pExpectedHits
vector< Hep3Vector > m_Intersections
vector< Hep3Vector > m_Directions

Detailed Description

Definition at line 40 of file RecMucTrack.h.


Constructor & Destructor Documentation

RecMucTrack::RecMucTrack (  ) 

Constructor.

Definition at line 26 of file RecMucTrack.cxx.

References m_brFirstLayer, DstMucTrack::m_brLastLayer, m_changeUnit, DstMucTrack::m_chi2, DstMucTrack::m_deltaPhi, DstMucTrack::m_depth, DstMucTrack::m_dof, m_ecFirstLayer, DstMucTrack::m_ecLastLayer, m_ecPart, DstMucTrack::m_endPart, DstMucTrack::m_id, m_IntersectionInner, m_IntersectionOuter, DstMucTrack::m_kalbrLastLayer, DstMucTrack::m_kaldepth, DstMucTrack::m_kaldof, DstMucTrack::m_kalecLastLayer, DstMucTrack::m_kalrechi2, DstMucTrack::m_maxHitsInLayer, DstMucTrack::m_numHits, DstMucTrack::m_numLayers, m_recmode, DstMucTrack::m_rms, DstMucTrack::m_startPart, DstMucTrack::m_status, DstMucTrack::m_type, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPosSigma, DstMucTrack::m_zPosSigma, and eformat::write::set().

00027   : //m_trackId(-1),    //--------------->
00028   m_ExtTrackID(-1),
00029   m_MdcPos(0.0, 0.0, 0.0),
00030   m_MdcMomentum(0.0, 0.0, 0.0),
00031   m_MucPos(0.0, 0.0, 0.0),
00032   m_MucPosSigma(0.0, 0.0, 0.0),
00033   m_MucMomentum(0.0, 0.0, 0.0),
00034   m_CurrentPos(0.0, 0.0, 0.0),
00035   m_CurrentDir(0.0, 0.0, 0.0),
00036   m_CurrentInsct(0.0, 0.0, 0.0),
00037   m_Good3DLine(0),
00038   m_pHits(0),
00039   m_pExpectedHits(0),
00040   m_Intersections(0),
00041   m_Directions(0)
00042 { 
00043   // initialize m_IntersectionInner/Outer.
00044   for(int igap = 0; igap < 9; igap++){
00045     m_IntersectionInner[igap].set(-9999,-9999,-9999);
00046     m_IntersectionOuter[igap].set(-9999,-9999,-9999);    
00047   }
00048   m_id = 0;
00049   m_status = -1;
00050   m_type = -1;
00051 
00052   m_numHits = 0;  
00053   m_startPart = -1;
00054   m_endPart = -1;
00055   m_brLastLayer = -1;
00056   m_ecLastLayer = -1;
00057   m_brFirstLayer = -1;
00058   m_ecFirstLayer = -1;
00059   m_ecPart = -1;
00060   m_numLayers = 0;
00061   m_maxHitsInLayer = 0;
00062   m_depth = -99;
00063   m_dof = 0;
00064   m_chi2 = 0.0;
00065   m_rms = 0.0;
00066   m_deltaPhi = 0.0; 
00067 
00068   m_xPosSigma = 0.0;
00069   m_yPosSigma = 0.0;
00070   m_zPosSigma = 0.0;
00071 
00072   m_changeUnit = false;
00073   m_recmode = 0;
00074   //added by LI Chunhua
00075   m_kalrechi2 =0. ;
00076   m_kaldof =0;
00077   m_kaldepth = -99;
00078   m_kalbrLastLayer = -1;
00079   m_kalecLastLayer = -1;
00080 }

RecMucTrack::RecMucTrack ( const RecMucTrack source  ) 

Copy constructor.

Definition at line 134 of file RecMucTrack.cxx.

References DstMucTrack::m_brLastLayer, m_changeUnit, DstMucTrack::m_chi2, DstMucTrack::m_deltaPhi, DstMucTrack::m_depth, DstMucTrack::m_dof, DstMucTrack::m_ecLastLayer, DstMucTrack::m_endPart, DstMucTrack::m_id, DstMucTrack::m_kalbrLastLayer, DstMucTrack::m_kaldepth, DstMucTrack::m_kaldof, DstMucTrack::m_kalecLastLayer, DstMucTrack::m_kalrechi2, DstMucTrack::m_maxHitsInLayer, DstMucTrack::m_numHits, DstMucTrack::m_numLayers, m_recmode, DstMucTrack::m_rms, DstMucTrack::m_startPart, DstMucTrack::m_status, DstMucTrack::m_type, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPosSigma, and DstMucTrack::m_zPosSigma.

00135   : //m_trackId        (source.m_trackId),    //--------------->
00136     m_ExtTrackID   (source.m_ExtTrackID),
00137     m_MdcPos       (source.m_MdcPos),
00138     m_MdcMomentum  (source.m_MdcMomentum),
00139     m_MucPos       (source.m_MucPos),
00140     m_MucPosSigma  (source.m_MucPosSigma),
00141     m_MucMomentum  (source.m_MucMomentum),
00142     m_CurrentPos   (source.m_CurrentPos),
00143     m_CurrentDir   (source.m_CurrentDir),
00144     m_CurrentInsct (source.m_CurrentInsct),
00145     m_pHits        (source.m_pHits),
00146     m_pExpectedHits(source.m_pExpectedHits),
00147     m_Intersections(source.m_Intersections),
00148     m_Directions   (source.m_Directions)
00149 { 
00150     m_id           = source.m_id;
00151     m_status       = source.m_status;
00152     m_type         = source.m_type;
00153     m_numHits      = source.m_numHits;    //--------------->
00154     m_startPart    = source.m_startPart;
00155     m_endPart      = source.m_endPart;
00156     m_brLastLayer  = source.m_brLastLayer;
00157     m_ecLastLayer  = source.m_ecLastLayer;
00158     m_numLayers    = source.m_numLayers;
00159     m_maxHitsInLayer= source.m_maxHitsInLayer;
00160     m_depth        = source.m_depth;
00161     m_dof          = source.m_dof;
00162     m_chi2         = source.m_chi2;
00163     m_rms          = source.m_rms;
00164     m_deltaPhi     = source.m_deltaPhi;
00165     m_xPosSigma    = source.m_xPosSigma;
00166     m_yPosSigma    = source.m_yPosSigma;
00167     m_zPosSigma    = source.m_zPosSigma;
00168     m_changeUnit   = source.m_changeUnit;
00169     m_recmode      = source.m_recmode;
00170     //******
00171     m_kalrechi2     = source.m_kalrechi2;
00172     m_kaldof        = source.m_kaldof;
00173     m_kaldepth      = source.m_kaldepth;
00174     m_kalbrLastLayer= source.m_kalbrLastLayer;
00175     m_kalecLastLayer= source.m_kalecLastLayer;
00176 }

RecMucTrack::RecMucTrack ( const DstMucTrack dstTrack  ) 

Copy constructor from DstMucTrack.

Definition at line 178 of file RecMucTrack.cxx.

References SetDefault().

00179   :DstMucTrack(dstTrack)
00180 {
00181 
00182   SetDefault();
00183   
00184 }

RecMucTrack::~RecMucTrack (  ) 

Destructor.

Definition at line 201 of file RecMucTrack.cxx.

References genRecEmupikp::i, and m_pExpectedHits.

00202 { 
00203 for(int i = 0 ; i < m_pExpectedHits.size(); i++)
00204           delete m_pExpectedHits[i];
00205 }


Member Function Documentation

void RecMucTrack::AttachDirection ( Hep3Vector  dir  ) 

Attach the direction to this trajectory.

Definition at line 614 of file RecMucTrack.cxx.

References m_Directions.

00615 {
00616   m_Directions.push_back(dir);
00617 }

void RecMucTrack::AttachHit ( MucRecHit hit  ) 

Attach the given hit to this track.

Definition at line 392 of file RecMucTrack.cxx.

References MucRecHit::Gap(), MucID::getGapNum(), m_pHits, and MucRecHit::Part().

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

00393 {
00394   //  cout << "Muc2DRoad::AttachHit-I0  hit = " << hit << endl;
00395 
00396   if (!hit) {
00397     cout << "RecMucTrack::AttachHit-E1  null hit pointer!" << endl;
00398     return ;
00399   }
00400   
00401   int part = hit->Part();
00402   int gap  = hit->Gap();
00403   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
00404     // The gap number of the hit is out of range.
00405     cout << "Muc2DRoad::AttachHit(MucRecHit*), bad gap number = " << gap
00406          << endl;
00407     return;
00408   }
00409 
00410   // Attach the hit to the road.
00411   m_pHits.push_back(hit);
00412   
00413   //  m_HitDistance[gap] = dX;
00414 
00415   // Now recalculate the total number of hits and the max. number of
00416   // hits per gap.
00417   //CountHits();
00418 }

void RecMucTrack::AttachInsct ( Hep3Vector  insct  ) 

Attach the intersection to this trajectory.

Definition at line 608 of file RecMucTrack.cxx.

References m_Intersections.

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

00609 {
00610   m_Intersections.push_back(insct);
00611 }

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.

References m_brFirstLayer.

Referenced by ComputeDepth().

00221 { return m_brFirstLayer; }

int DstMucTrack::brLastLayer (  )  const [inline, inherited]

Definition at line 39 of file DstMucTrack.h.

References DstMucTrack::m_brLastLayer.

Referenced by ComputeDepth().

00039 { return   m_brLastLayer;  } // last layer with hits in barrel 

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.

References MucGeoGeneral::GetGap(), genRecEmupikp::i, MucGeoGeneral::Instance(), kInsctWeight, m_CurrentInsct, m_pHits, MucGeoGap::Orient(), MucGeoGap::TransformToGap(), MucGeoGap::TransformToGlobal(), and x.

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

00544 {
00545   MucGeoGap *gapPtr = MucGeoGeneral::Instance()->GetGap(part, seg, gap);
00546   vector<int> hitSeq;
00547   for(int i = 0; i < (int)m_pHits.size(); i++) {
00548     MucRecHit *aHit = m_pHits[i];
00549     if(aHit->Part() == part &&
00550        aHit->Seg()  == seg  &&
00551        aHit->Gap()  == gap) {
00552       hitSeq.push_back(i);
00553     }  
00554   }    
00555   int nHitInGap = hitSeq.size();
00556   //cout << "nHitInGap " << nHitInGap << endl;
00557   
00558   HepPoint3D insctLocal = gapPtr->TransformToGap(m_CurrentInsct);
00559   //HepPoint3D newInsct(0.0, 0.0, 0.0);
00560   HepPoint3D newInsctLocal = insctLocal;
00561 
00562   vector<float> x;
00563   for(int i = 0; i < nHitInGap; i++) x.push_back(0);
00564   float xInsct = 0, xNewInsct = 0;
00565 
00566 
00567   int orient = gapPtr->Orient();
00568   if(orient == 1) xInsct = insctLocal.x();
00569   if(orient == 0) xInsct = insctLocal.y();
00570   
00571   for(int i = 0; i < nHitInGap; i++) {
00572     float xStrip, yStrip, zStrip;
00573     (m_pHits[hitSeq[i]])->GetStrip()->GetCenterPos(xStrip, yStrip, zStrip);
00574     if(orient == 1) x[i] = xStrip;
00575     if(orient == 0) x[i] = yStrip;
00576   }
00577   //cout << "local Old" << insctLocal << endl;
00578 
00579   //if == 0, no direction change;
00580   if(nHitInGap > 0) {
00581     xNewInsct = xInsct * kInsctWeight;
00582 
00583     //float minDist = kInfinity;
00584     for(int i = 0; i < nHitInGap; i++) {
00585       //if(fabs(x[i] - xInsct) < minDist) {
00586       //xNewInsct = x[i];    //}
00587       xNewInsct += x[i] * ((1.0 - kInsctWeight) / nHitInGap);
00588     }
00589     
00590     if(orient == 1) {
00591       newInsctLocal.setX(xNewInsct);
00592       newInsctLocal.setY(insctLocal.y());
00593     }
00594     if(orient == 0) {
00595       newInsctLocal.setX(insctLocal.x());
00596       newInsctLocal.setY(xNewInsct);
00597     }
00598   }
00599 
00600   m_CurrentInsct = gapPtr->TransformToGlobal(newInsctLocal);
00601   //cout << "local  New" << newInsctLocal << endl;
00602   //cout << "global New" << m_CurrentInsct << endl;
00603   
00604   return m_CurrentInsct;
00605 }

double DstMucTrack::chi2 (  )  const [inline, inherited]

Definition at line 46 of file DstMucTrack.h.

References DstMucTrack::m_chi2.

Referenced by MucRecTrkExt::execute(), and MucPID::particleIDCalculation().

00046 { return   m_chi2;   }

static const CLID& RecMucTrack::classID (  )  [inline, static]

Reimplemented from DstMucTrack.

Definition at line 49 of file RecMucTrack.h.

References CLID_RecMucTrack.

Referenced by clID().

00050     {
00051       return CLID_RecMucTrack;
00052     }

virtual const CLID& RecMucTrack::clID (  )  const [inline, virtual]

Reimplemented from DstMucTrack.

Definition at line 44 of file RecMucTrack.h.

References classID().

00045     {
00046       return RecMucTrack::classID();
00047     }

int RecMucTrack::ComputeDepth ( int  method  ) 

Compute depth.

Definition at line 673 of file RecMucTrack.cxx.

References brFirstLayer(), DstMucTrack::brLastLayer(), cos(), DstMucTrack::deltaPhi(), DstMucTrack::ecLastLayer(), MucGeoGeneral::GetGap(), MucID::getGapMax(), MucGeoGap::GetIronThickness(), MucGeoGeneral::Instance(), kPi, DstMucTrack::m_brLastLayer, DstMucTrack::m_depth, m_depth_3, DstMucTrack::m_ecLastLayer, m_Good3DLine, m_Good3DPart, m_IntersectionInner, m_IntersectionOuter, m_MucMomentum, DstMucTrack::m_numLayers, m_pHits, sin(), and x.

00674 {
00675   if( m_numLayers == 0 ) {
00676     m_depth = m_depth_3 = -99; return 0; 
00677   } 
00678   else if( m_numLayers == 1 && (m_brLastLayer == 0 || m_ecLastLayer == 0) ) {
00679     m_depth = m_depth_3 = 0; return 0;
00680   }
00681   
00682   m_depth_3 = 0.0;
00683   
00684   float brThickness = 0.0;  float ecThickness = 0.0;  float deltaPhi = 0.0;
00685   int betweenSeg = 0;
00686 
00687   float phi = m_MucMomentum.phi();
00688   float theta = m_MucMomentum.theta();
00689 
00690   vector<MucRecHit*>::const_iterator iHit;
00691   int ngap = MucID::getGapMax();
00692   //cout<<"ngap:\t"<<ngap<<endl;
00693   
00694   int Seg[9]; int part, seg, gap, strip;
00695   for(int gap = 0; gap < ngap; gap++){Seg[gap] = -1;}
00696   for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
00697     if(*iHit) {  // Check for a null pointer.
00698       part   = (*iHit)->Part();
00699       seg    = (*iHit)->Seg();
00700       gap    = (*iHit)->Gap();
00701       strip  = (*iHit)->Strip();
00702       if(part==1) Seg[gap] = seg;
00703     }
00704   }
00705 
00706   int segTrackBr = -1;
00707   for(int gap = 0; gap <= brLastLayer(); gap++){
00708     if(Seg[gap] != -1) segTrackBr = Seg[gap];
00709   }
00710   // BR, the innermost layer is RPC module
00711   for(int gap = 0; gap <= brLastLayer(); gap++){
00712     float thickness = 0.0;
00713     if(Seg[gap] != -1 && Seg[brLastLayer()-1] != -1 && Seg[gap] != Seg[brLastLayer()-1]) betweenSeg = 1; 
00714     thickness = MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
00715     //cout<<"RecMucTrack  gap="<<gap<<" brlastgap="<<brLastLayer()<<" "<<thickness<<endl;
00716     if(sin(m_MucMomentum.theta()) != 0 ) thickness /= sin(m_MucMomentum.theta());
00717     else ;//cout<<"RecMucTrack::ComputeDepth, In Barrel,theta=0?"<<endl;
00718     deltaPhi = m_MucMomentum.phi() - segTrackBr*kPi/4;
00719     if(Seg[gap] == -1 && betweenSeg == 1) {
00720       thickness += 40;  // gap width
00721     }
00722     if(cos(deltaPhi) != 0 ) thickness /= cos(deltaPhi);
00723     else ;//cout<<"RecMucTrack::ComputeDepth, In Barrel,Cos(phi)=0?"<<endl;
00724     if(deltaPhi == 0 && Seg[brLastLayer()-1]==2 ) thickness = 0;
00725     //cout<<"in muctrack "<<thickness<<" "<<brThickness<<" theta "<<m_MucMomentum.theta()<<" phi="<<deltaPhi<<" "<<m_MucMomentum.phi()<<endl;
00726 
00727     if(brFirstLayer()<brLastLayer())  brThickness += thickness; 
00728     else if(brFirstLayer()==brLastLayer()) {  //only one gap
00729       if(m_MucMomentum.mag()>1000 || brFirstLayer()<2)  brThickness += thickness;  //high momentum or only one or two gap
00730       //cout<<"mom="<<m_MucMomentum.mag()<<" "<<brFirstLayer()<<" "<<brThickness<<" "<<thickness<<endl;
00731     }
00732     else cout<<"in RecMucTrack: Wrong Gap Info"<<endl;
00733 
00734     //cout<<brThickness<<endl;
00735   }
00736 
00737   //cout<<"eclastgap= "<<ecLastLayer()<<"  ecfirstgap= "<<ecFirstLayer()<<endl;
00738 
00739   // EC, the innermost layer is Iron
00740   //for (int gap = ecFirstLayer(); gap!=-1&&gap <= ecLastLayer(); gap++) {
00741   for (int gap = 0; gap!=-1&&gap <= ecLastLayer(); gap++) {
00742     ecThickness += MucGeoGeneral::Instance()->GetGap(0, 0, gap)->GetIronThickness();
00743   }
00744   
00745   if (cos(theta) != 0.0) ecThickness /= cos(theta);
00746   else ;//cout << "RecMucTrack::ComputeDepth, In EndCap, Track theta = 90.0 ? " << endl;
00747   ecThickness  = fabs(ecThickness);
00748   
00749   //cout<<"eclastgap= "<<ecLastLayer()<<" ecthickness="<<ecThickness<<endl;
00750 
00751   if(method == 2){
00752     //barrel first
00753     if((m_Good3DLine == 1) &&(m_Good3DPart == 1)){
00754       if(m_IntersectionInner[0].x()!=-9999){
00755         for(int gap = 1;gap <= brLastLayer(); gap++)//Inner[gap1]-Outer[gap0] ...
00756           {
00757           if(m_IntersectionInner[gap].x() != -9999 && m_IntersectionInner[gap-1].x() != -9999)
00758             m_depth_3 += (m_IntersectionInner[gap] - m_IntersectionOuter[gap-1]).mag();
00759           }
00760         //may be pass some gap in endcap!
00761         m_depth_3 += ecThickness;
00762       }
00763       else m_depth_3 = brThickness + ecThickness;
00764     }
00765     if((m_Good3DLine == 1) &&(m_Good3DPart != 1)){
00766       for(int gap = 1;gap <= ecLastLayer(); gap++)//Inner[gap1]-Outer[gap0] ...
00767       {
00768         if(m_IntersectionInner[gap].x() != -9999 && m_IntersectionInner[gap-1].x() != -9999)
00769           m_depth_3 += (m_IntersectionInner[gap] - m_IntersectionOuter[gap-1]).mag();
00770       }
00771       //may be pass some gap in barrel!
00772       m_depth_3 += brThickness;
00773       if (cos(theta) != 0.0) m_depth_3 += 40/cos(theta); //there is 1 absorber before first gap in endcap!
00774     }
00775     if(m_Good3DLine == 0) m_depth_3 = brThickness + ecThickness;
00776     if(m_depth_3>2000) m_depth_3 = brThickness + ecThickness;  //unreasonable depth! so use previous method!
00777   }
00778   else  //method == 1 linefit
00779     {
00780       m_depth_3 = brThickness + ecThickness;
00781 
00782     }
00783   
00784   double offset = 50.0;
00785   //if(GetTotalHits() > 0) m_depth_3 += offset;
00786 
00787   m_depth = m_depth_3; 
00788 
00789   //if(m_depth<0||m_depth>2000) m_depth = 0;
00790   if(m_depth>2000) m_depth = -99;
00791   //cout<<"depth= "<<m_depth<<endl;
00792 
00793 }

void RecMucTrack::ComputeDepth (  ) 

Compute depth.

Definition at line 796 of file RecMucTrack.cxx.

References DstMucTrack::brLastLayer(), cos(), DstMucTrack::deltaPhi(), DstMucTrack::ecLastLayer(), MucGeoGeneral::GetGap(), MucID::getGapMax(), MucGeoGap::GetIronThickness(), GetTotalHits(), HasHitInGap(), MucGeoGeneral::Instance(), kPi, DstMucTrack::m_depth, m_depth_3, m_MucMomentum, m_pHits, and sin().

Referenced by ComputeTrackInfo().

00797 {
00798   m_depth = -99.0;
00799   // Part 1 first.
00800   float brThickness = 0.0;
00801   for (int gap = 0; gap <= brLastLayer(); gap++) {
00802     brThickness += MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
00803   }
00804 
00805   // second alg
00806   float brThickness_2 = 0.0;
00807   for (int gap = 0; gap <= brLastLayer(); gap++) {
00808     if(HasHitInGap(1,gap)){
00809       brThickness_2 += MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
00810     }
00811   }
00812   // third alg
00813   float brThickness_3 = 0.0;
00814   vector<MucRecHit*>::const_iterator iHit;
00815   int ngap = MucID::getGapMax();
00816   int Seg[9]; int part, seg, gap, strip;
00817   for(int gap = 0; gap < ngap; gap++){Seg[gap] = -1;}
00818   for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
00819     if(*iHit) {  // Check for a null pointer.
00820       part   = (*iHit)->Part();
00821       seg    = (*iHit)->Seg();
00822       gap    = (*iHit)->Gap();
00823       strip  = (*iHit)->Strip();
00824       if(part==1) Seg[gap] = seg;
00825     }
00826   }
00827   
00828   float deltaPhi_3 = 0.0;
00829   int betweenSeg = 0;
00830 
00831   int segTrackBr = -1;
00832   for(int gap = 0; gap <= brLastLayer(); gap++){
00833     if(Seg[gap] != -1) segTrackBr = Seg[gap];
00834   }
00835 
00836   for(int gap = 0; gap <= brLastLayer(); gap++){
00837     float thickness = 0.0;
00838     if(Seg[gap] != -1 && Seg[brLastLayer()-1] != -1 && Seg[gap] != Seg[brLastLayer()-1]) betweenSeg = 1; 
00839     thickness = MucGeoGeneral::Instance()->GetGap(1, 0, gap)->GetIronThickness();
00840     if(sin(m_MucMomentum.theta()) != 0 ) thickness /= sin(m_MucMomentum.theta());
00841     else cout<<"RecMucTrack::ComputeDepth, In Barrel,theta=0?"<<endl;
00842     //if(Seg[gap] != -1) deltaPhi_3 = m_MucMomentum.phi() - Seg[gap]*kPi/4;
00843     deltaPhi_3 = m_MucMomentum.phi() - segTrackBr*kPi/4;   //some times, no hits in a gap, but a good track exist!
00844     if(Seg[gap] == -1 && betweenSeg == 1) {
00845       cout<<"between segment"<<endl;
00846       thickness += 40;  // gap width
00847     }
00848 
00849     if(cos(deltaPhi_3) != 0 ) thickness /= cos(deltaPhi_3);
00850     else cout<<"RecMucTrack::ComputeDepth, In Barrel,Cos(phi)=0?"<<endl;
00851 
00852     if(deltaPhi_3 == 0 && Seg[brLastLayer()-1]==2 ) thickness = 0;
00853     //cout<<"in muctrack "<<thickness<<" "<<brThickness_3<<" theta "<<m_MucMomentum.theta()<<" phi="<<deltaPhi_3<<" "<<m_MucMomentum.phi()<<endl;
00854     brThickness_3 += thickness;
00855     
00856   }
00857 
00858   //cout<<"in RecMucTrack: compare thickness "<<brThickness<<" "<<brThickness_2<<" "<<brThickness_3<<endl;
00859 
00860   float phi = m_MucMomentum.phi();
00861   float deltaPhi = phi - kPi/4*(int)(phi/(kPi/4));
00862   if (deltaPhi > kPi/8) deltaPhi = kPi/4 - deltaPhi;
00863   float theta = m_MucMomentum.theta();
00864 //   cout << "br LastGap " << brLastLayer() << " Thick " << brThickness 
00865 //     << " 1/sin(theta) " << 1/sin(theta) << " 1/cos(deltaPhi) " << 1/cos(deltaPhi) << endl;
00866 
00867   if (sin(theta) != 0.0) brThickness /= sin(theta);
00868   else cout << "RecMucTrack::ComputeDepth, In Barrel, Track theta = 0.0 ? " << endl; 
00869 
00870   brThickness /= cos(deltaPhi);
00871   brThickness  = fabs(brThickness);
00872   //cout << "br Depth " << brThickness << endl;
00873   
00874   // EC, then
00875   float ecThickness = 0.0;
00876   for (int gap = 0; gap <= ecLastLayer(); gap++) {
00877     ecThickness += MucGeoGeneral::Instance()->GetGap(0, 0, gap)->GetIronThickness();
00878   }
00879   //cout << "ec LastGap " << ecLastLayer() << " Thick " << ecThickness
00880   //   << " 1/cos(theta) " << 1/cos(theta) << endl;
00881   
00882   if (cos(theta) != 0.0) ecThickness /= cos(theta);
00883   else ; //cout << "RecMucTrack::ComputeDepth, In EndCap, Track theta = 90.0 ? " << endl;
00884   ecThickness  = fabs(ecThickness);
00885   //cout << "ec Depth " << ecThickness << endl;
00886 
00887   m_depth = brThickness + ecThickness;
00888   m_depth_3 = brThickness_3 + ecThickness;
00889   cout << "Depth " << m_depth << " Depth3 = "<<m_depth_3<<endl;
00890   m_depth = m_depth_3;
00891   double offset = 50.0;
00892   if(GetTotalHits() > 0) m_depth += offset; // since brThickness on gap 0 is zero, give an offset for track arriving muc.
00893 
00894 }

void RecMucTrack::ComputeDistanceMatch (  ) 

Compute distance match //2006.11.08.

Definition at line 897 of file RecMucTrack.cxx.

References DstMucTrack::distance(), FindSegWithMaxHits(), MucGeoGap::Gap(), MucGeoGeneral::GetGap(), MucGeoGeneral::Instance(), m_Dist_muc_ext, DstMucTrack::m_distance, m_ExtMucPos, m_MucPos, m_pHits, m_StripPhi, MucGeoGap::Orient(), MucGeoGap::Part(), MucGeoGap::Seg(), and MucGeoGap::TransformToGap().

Referenced by ComputeTrackInfo().

00898 {
00899   bool firstHitFound = false;
00900   MucGeoGap *firstGap = 0; 
00901   vector<MucRecHit*>::const_iterator iHit;
00902   vector<MucRecHit*> hitsGap0;
00903   float stripLocal[3]={0.0, 0.0, 0.0};
00904   float stripGlobal[3]={0.0, 0.0, 0.0};
00905   int nStrip = 0;
00906 
00907   int part, seg, gap, strip;
00908   int barrel_gap0_exist = 0;
00909 
00910   for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
00911     if(*iHit) {  // Check for a null pointer.
00912       part   = (*iHit)->Part();
00913       seg    = (*iHit)->Seg();
00914       gap    = (*iHit)->Gap();
00915       strip  = (*iHit)->Strip();
00916       if(!firstHitFound && gap == 0) {
00917         firstGap = MucGeoGeneral::Instance()->GetGap(part, seg, gap);
00918         firstHitFound = true;
00919       }
00920       if(firstGap && part == firstGap->Part() && seg == firstGap->Seg() && gap == firstGap->Gap()) {
00921         //cout<<"in RecMucTrack "<<part<<" "<<seg<<" "<<gap<<" "<<strip<<endl;
00922         HepPoint3D posHit        = (*iHit)->GetCenterPos();
00923         HepPoint3D posHitLocal   = (*iHit)->GetGap()->TransformToGap(posHit);
00924         if(part==1&&gap==0) barrel_gap0_exist = 1;  //exist
00925         
00926         stripLocal[0] += posHitLocal.x();
00927         stripLocal[1] += posHitLocal.y();
00928         stripLocal[2] += posHitLocal.z(); 
00929 
00930         stripGlobal[0] += posHit.x();   //to calc phi of this strip 
00931         stripGlobal[1] += posHit.y();
00932         stripGlobal[2] += posHit.z();
00933  
00934         nStrip++;
00935       }
00936     }
00937   }
00938 
00939   //cout<<"in RecMucTrack: extpos "<<m_ExtMucPos<<" mucpos "<< m_MucPos<<endl;
00940   
00941   int apart = -1, aseg = -1;
00942   int nHits = FindSegWithMaxHits(apart, aseg);
00943   MucGeoGap *fakefirstGap = 0;   // maybe not exist!
00944   if(apart == -1 && aseg== -1)
00945     {m_Dist_muc_ext.set(0,0,0);}
00946   else {
00947     fakefirstGap = MucGeoGeneral::Instance()->GetGap(apart, aseg, 0);
00948     HepPoint3D fextLocal = fakefirstGap->TransformToGap(m_ExtMucPos);
00949     HepPoint3D fmucLocal = fakefirstGap->TransformToGap(m_MucPos);
00950     float dist_x = fextLocal.x() - fmucLocal.x();
00951     float dist_y = fextLocal.y() - fmucLocal.y();
00952     float dist_z = fextLocal.z() - fmucLocal.z();
00953     m_Dist_muc_ext.set(dist_x,dist_y,dist_z);
00954     //cout<<"in RecMucTrack dist = "<<dist_x<<" "<<dist_y<<" "<<dist_z<<endl;
00955     if (fakefirstGap->Orient() == 0) { // part 0,2
00956       //cout<<"in RecMucTrack "<< extLocal.y()<<" "<<stripLocal[1]<<endl;
00957     }
00958     else {
00959       //cout<<"in RecMucTrack1 "<< extLocal.x()<<" "<<stripLocal[0]<<endl;
00960     }
00961   }
00962 
00963   float distance = -9990;
00964 
00965   if (nStrip == 0 || !firstGap) {
00966     distance = -9990;
00967     //cout << "no hits on first gap" << endl;
00968   }  
00969   else{
00970     for (int k = 0; k < 3; k++) stripLocal[k] /= nStrip;
00971     for (int k = 0; k < 3; k++) stripGlobal[k] /= nStrip;
00972     
00973     m_StripPhi.set(stripGlobal[0],stripGlobal[1],stripGlobal[2]);
00974 
00975     HepPoint3D extLocal = firstGap->TransformToGap(m_ExtMucPos);
00976     // extmucpos may be can be used to identify mu/pion
00977 
00978 //     cout<<"in RecMucTrack mom "<<m_MucMomentum.x()<<" "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
00979 //     cout<<"in RecMucTrack extpos "<<m_ExtMucPos.x()<<" "<<m_ExtMucPos.y()<<" "<<m_ExtMucPos.z()<<endl;
00980 //     cout<<"in RecMucTrack extpos2 "<<ExtMucPos_2.x()<<" "<<ExtMucPos_2.y()<<" "<<ExtMucPos_2.z()<<endl;
00981 //     cout<<"in RecMucTrack extloc "<<extLocal.x()<<" "<<extLocal.y()<<" "<<extLocal.z()<<endl;
00982     if (firstGap->Orient() == 0) { // part 0,2
00983       distance = extLocal.y() - stripLocal[1];
00984       //cout<<"in RecMucTrack "<< extLocal.y()<<" "<<stripLocal[1]<<endl;
00985     }
00986     else {
00987       distance = extLocal.x() - stripLocal[0];
00988       //cout<<"in RecMucTrack1 "<< extLocal.x()<<" "<<stripLocal[0]<<endl;
00989     }
00990   }
00991 
00992   m_distance = distance;
00993 
00994   //use m_chi2 temporary 
00995   //m_chi2 = distance;
00996   // cout<<"in RecMucTrack  distance= "<<m_distance<<" n= "<<nStrip<<endl;
00997 }

void RecMucTrack::ComputeLastGap (  ) 

Comute last gap in barrel and endcap.

Definition at line 635 of file RecMucTrack.cxx.

References m_brFirstLayer, DstMucTrack::m_brLastLayer, m_ecFirstLayer, DstMucTrack::m_ecLastLayer, m_ecPart, DstMucTrack::m_endPart, and m_pHits.

Referenced by ComputeTrackInfo(), and LineFit().

00636 {
00637   int lastGap1, lastGap2;
00638   int firstGap1, firstGap2;
00639   lastGap1 = lastGap2 = -1;
00640   firstGap1 = firstGap2 = 99;
00641   vector<MucRecHit*>::const_iterator iHit;
00642   iHit = m_pHits.begin();
00643   for( ;iHit != m_pHits.end(); iHit++) 
00644   {
00645     if(*iHit) 
00646     {  // Check for a null pointer.
00647       int part = (*iHit)->Part();
00648       int gap  = (*iHit)->Gap();
00649       
00650       if(part == 1) {
00651         if(gap > lastGap1)  lastGap1 = gap;      
00652         if(gap < firstGap1) firstGap1 = gap;
00653       }
00654       else {
00655         if(gap > lastGap2)  { m_ecPart = part; m_endPart = part; lastGap2 = gap; }
00656         if(gap < firstGap2) firstGap2 = gap;
00657       }
00658     }
00659   }
00660   
00661   m_brLastLayer = lastGap1;
00662   if(firstGap1 == 99) m_brFirstLayer = -1;
00663   else if(firstGap1>=0&&firstGap1<9) m_brFirstLayer = firstGap1;
00664 
00665   m_ecLastLayer = lastGap2;
00666   if(firstGap2 == 99) m_ecFirstLayer = -1;
00667   else if(firstGap2>=0&&firstGap2<8) m_ecFirstLayer = firstGap2;
00668 
00669   //cout<<"MucTrack, br: "<<m_brFirstLayer<<", "<<m_brLastLayer<<"\tec: "<<m_ecFirstLayer<<", "<<m_ecLastLayer<<endl;
00670 }

void RecMucTrack::ComputeMaxHitsInGap (  ) 

ComputeMaxHitsInGap;.

Definition at line 1528 of file RecMucTrack.cxx.

References MucID::getGapNum(), GetHitInGap(), MucID::getPartNum(), and DstMucTrack::m_maxHitsInLayer.

Referenced by ComputeTrackInfo().

01529 {
01530   int maxHits = 0;
01531   int hits = 0;
01532   for(int part = 0; part < (int)MucID::getPartNum(); part++) {
01533     for(int gap = 0; gap < (int)MucID::getGapNum(part); gap++) {
01534       hits = GetHitInGap(part, gap);
01535       if(hits > maxHits) maxHits = hits;
01536     }
01537   }
01538 
01539   m_maxHitsInLayer = maxHits;
01540 }

void RecMucTrack::ComputeNGapsWithHits (  ) 

ComputeNGapsWithHits;.

Definition at line 1412 of file RecMucTrack.cxx.

References count, MucID::getGapMax(), DstMucTrack::m_numHits, DstMucTrack::m_numLayers, and m_pHits.

Referenced by ComputeTrackInfo().

01413 {
01414   int ngap = MucID::getGapMax();
01415   int gap, count = 0;
01416   vector<int> firedGap;
01417   for(gap = 0; gap < ngap; gap++) firedGap.push_back(0);
01418 
01419   vector<MucRecHit*>::const_iterator iHit;
01420   for (iHit=m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01421     if (*iHit) {  // Check for a null pointer.
01422       gap = (*iHit)->Gap();
01423       firedGap[gap] = 1;
01424     }
01425   }
01426   
01427   for ( gap = 0; gap < ngap; gap++) {
01428     count += firedGap[gap];
01429   }
01430 
01431   m_numHits   = m_pHits.size();
01432   m_numLayers = count;
01433   //cout<<"nLayer:\t"<<m_numLayers<<endl;
01434 }

void RecMucTrack::ComputeTrackInfo ( int  fittingmethod  ) 

Compute all infomation of this track;.

Definition at line 1670 of file RecMucTrack.cxx.

References ComputeDepth(), ComputeDistanceMatch(), ComputeLastGap(), ComputeMaxHitsInGap(), ComputeNGapsWithHits(), m_pExpectedHits, m_pHits, OutputUnitChange(), setExpHits(), and setVecHits().

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

01671 {
01672   setVecHits(m_pHits);
01673   setExpHits(m_pExpectedHits);
01674   ComputeLastGap();
01675   ComputeNGapsWithHits(); 
01676   ComputeMaxHitsInGap();
01677   //ComputeDepth();
01678   ComputeDepth(fittingmethod);
01679   ComputeDistanceMatch();
01680   OutputUnitChange();
01681 }

void RecMucTrack::CorrectDir (  ) 

Correct direction of this trajectory.

Definition at line 620 of file RecMucTrack.cxx.

References m_CurrentDir, m_CurrentInsct, and m_CurrentPos.

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

00621 {
00622   //cout << "Before CorrectDir(), fCurrentDir " << m_CurrentDir << endl;
00623   m_CurrentDir = m_CurrentInsct - m_CurrentPos;
00624   m_CurrentDir.setMag(1.0);
00625   //cout << "After CorrectDir(), fCurrentDir " << m_CurrentDir << endl;
00626 }

void RecMucTrack::CorrectPos (  ) 

Correct current position of this trajectory.

Definition at line 629 of file RecMucTrack.cxx.

References m_CurrentInsct, and m_CurrentPos.

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

00630 {
00631   m_CurrentPos = m_CurrentInsct;
00632 }

double DstMucTrack::deltaPhi (  )  const [inline, inherited]

Definition at line 63 of file DstMucTrack.h.

References DstMucTrack::m_deltaPhi.

Referenced by ComputeDepth(), GetMdcExtTrack(), LineFit(), and MucPID::particleIDCalculation().

00063 { return m_deltaPhi;}

double DstMucTrack::depth (  )  const [inline, inherited]

Definition at line 45 of file DstMucTrack.h.

References DstMucTrack::m_depth.

Referenced by MucRecTrkExt::execute(), BestDTagSvc::isMuon(), DTagTool::isMuon(), and MucPID::particleIDCalculation().

00045 { return   m_depth;  }    // depth of the track transport in iron

double DstMucTrack::distance (  )  const [inline, inherited]

Definition at line 62 of file DstMucTrack.h.

References DstMucTrack::m_distance.

Referenced by ComputeDistanceMatch(), MucRecTrkExt::execute(), GetHitDistance(), GetHitDistance2(), and MucPID::particleIDCalculation().

00062 { return m_distance;}

int DstMucTrack::dof (  )  const [inline, inherited]

Definition at line 47 of file DstMucTrack.h.

References DstMucTrack::m_dof.

00047 { return   m_dof;    }

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.

References m_ecFirstLayer.

00224 { return m_ecFirstLayer; }

int DstMucTrack::ecLastLayer (  )  const [inline, inherited]

Definition at line 40 of file DstMucTrack.h.

References DstMucTrack::m_ecLastLayer.

Referenced by ComputeDepth().

00040 { return   m_ecLastLayer;  } // last layer with hits in end cap

int DstMucTrack::endPart (  )  const [inline, inherited]

Definition at line 38 of file DstMucTrack.h.

References DstMucTrack::m_endPart.

00038 { return   m_endPart; }      // end   position of track locates in which part

void RecMucTrack::Extend (  ) 

Extend mucpos and extmucpos to first layer of muc.

Definition at line 1000 of file RecMucTrack.cxx.

References count, m_ExtMucPos, m_MucMomentum, m_MucPos, DstMucTrack::m_xPos, DstMucTrack::m_yPos, DstMucTrack::m_zPos, and x.

Referenced by LineFit().

01001 {
01002   float x = m_ExtMucPos.x(), y = m_ExtMucPos.y(), z = m_ExtMucPos.z();
01003   //cout<<"in MucTrac, MucPos= "<<x<<" "<<y<<" "<<z<<endl;
01004   float step = 0.005;
01005   float myMucR = 1720.0;
01006   float myMucZ = 2110.0;
01007    int count_=0; //added by LI Chunhua to avoid loop infinitely
01008    while ( ( (fabs(x)<=myMucR) && (fabs(y)<=myMucR) && ((fabs(x-y)/sqrt(2.))<=myMucR) && ((fabs(x+y)/sqrt(2.))<=myMucR) && (fabs(z)<=myMucZ) )&&count_<1000 ) {
01009     x += step * m_MucMomentum.x();
01010     y += step * m_MucMomentum.y();
01011     z += step * m_MucMomentum.z();
01012     count_++;
01013     //cout << "in RecMucTrack+ x " << x << " y " << y << " z " << z <<" mom "<< m_MucMomentum.x()<< " "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
01014   }
01015 
01016    int count = 0; 
01017   while( !( (fabs(x)<=myMucR) && (fabs(y)<=myMucR) && ((fabs(x-y)/sqrt(2.))<=myMucR) && ((fabs(x+y)/sqrt(2.))<=myMucR) && (fabs(z)<=myMucZ) )&&count<1000 ) {
01018     x -= step * m_MucMomentum.x();
01019     y -= step * m_MucMomentum.y();
01020     z -= step * m_MucMomentum.z();
01021     count++;
01022     //cout << "in RecMucTrack- x " << x << " y " << y << " z " << z <<" mom "<< m_MucMomentum.x()<< " "<<m_MucMomentum.y()<<" "<<m_MucMomentum.z()<<endl;
01023   } 
01024  
01025   if(count<1000&&count_<1000){
01026     if(fabs(x)<2600&&fabs(y)<2600&&fabs(z)<2800){
01027       m_ExtMucPos.set(x, y, z);
01028       m_MucPos.set(x,y,z);
01029       m_xPos = x;
01030       m_yPos = y;
01031       m_zPos = z;
01032     }
01033   }
01034  
01035 }

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

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

Definition at line 1509 of file RecMucTrack.cxx.

References GetHitInSeg(), MucID::getPartNum(), and MucID::getSegNum().

Referenced by ComputeDistanceMatch(), and LineFit().

01510 {
01511   int maxHits = 0;
01512   int hits = 0;
01513   for(int part = 0; part < (int)MucID::getPartNum(); part++) {
01514     for(int seg = 0; seg < (int)MucID::getSegNum(part); seg++) {
01515       hits = GetHitInSeg(part, seg);
01516       if (hits > maxHits) {
01517         maxHits  = hits;
01518         findPart = part;
01519         findSeg  = seg;
01520       }
01521     }
01522   }
01523 
01524   return maxHits;
01525 }

Hep3Vector RecMucTrack::GetCurrentDir (  )  const [inline]

Current direction.

Definition at line 212 of file RecMucTrack.h.

References m_CurrentDir.

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

00212 { return m_CurrentDir/1000; }  

Hep3Vector RecMucTrack::GetCurrentInsct (  )  const [inline]

Current intersection.

Definition at line 215 of file RecMucTrack.h.

References m_CurrentInsct.

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

00215 { return m_CurrentInsct; } //internal  

Hep3Vector RecMucTrack::GetCurrentPos (  )  const [inline]

Current position.

Definition at line 209 of file RecMucTrack.h.

References m_CurrentPos.

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

00209 { return m_CurrentPos/10; }  

float RecMucTrack::GetDepth3 (  )  const [inline]

Length of the track penetrating in iron absorber.

Definition at line 252 of file RecMucTrack.h.

References m_depth_3.

00252 { return m_depth_3/10; }

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

Definition at line 311 of file RecMucTrack.h.

References m_distHits.

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

00311 { return  m_distHits ;}

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

Definition at line 1643 of file RecMucTrack.cxx.

References m_pExpectedHits.

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

01644 {
01645     return m_pExpectedHits;
01646 }

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

Definition at line 309 of file RecMucTrack.h.

References m_expHits.

00309 { return  m_expHits ;}

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

Definition at line 315 of file RecMucTrack.h.

References m_distHits_ext.

Referenced by MucRecTrkExt::execute().

00315 { return  m_distHits_ext ;} 

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.

References m_Dist_muc_ext.

Referenced by MucRecTrkExt::execute().

00259 { return m_Dist_muc_ext;}

Hep3Vector RecMucTrack::getExtMucMomentum (  )  const [inline]

Start momentum of the Ext track in Muc.

Definition at line 195 of file RecMucTrack.h.

References m_ExtMucMomentum.

00195 { return m_ExtMucMomentum/1000; }

Hep3Vector RecMucTrack::getExtMucPos (  )  const [inline]

start position of the Ext track in Muc.

Definition at line 192 of file RecMucTrack.h.

References m_ExtMucPos.

00192 { return m_ExtMucPos/10; }

int RecMucTrack::getExtTrackID (  )  const [inline]

The identifier of the Ext track as seed.

Definition at line 189 of file RecMucTrack.h.

References m_ExtTrackID.

00189 { return m_ExtTrackID; }

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 1615 of file RecMucTrack.cxx.

References MucID::getGapNum(), and m_pHits.

01616 {
01617   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
01618     cout << "RecMucTrack::Hit-E1  invalid gap = " << gap << endl;
01619     return 0;
01620   }
01621   
01622   vector<MucRecHit*>::const_iterator iHit;
01623   
01624   for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01625     if (*iHit) {  // Check for a null pointer.
01626       if ( (*iHit)->Part() == part &&
01627            (*iHit)->Gap()  == gap) { 
01628         return (*iHit);
01629       }
01630     }
01631   }
01632   
01633   return 0L;
01634 }

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.

References DstMucTrack::distance(), MucRecHit::Gap(), MucRecHit::GetCenterPos(), MucRecHit::GetGap(), MucID::getGapNum(), m_CurrentInsct, MucGeoGap::Orient(), MucRecHit::Part(), and MucGeoGap::TransformToGap().

Referenced by MucRecRoadFinder::TrackFinding().

00484 {
00485   if (!hit) {
00486     cout << "RecMucTrack:GetHitDistance-E1  null hit pointer!" << endl;
00487     return kInfinity;
00488   }
00489 
00490   int part = hit->Part();
00491   int gap  = hit->Gap();
00492   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
00493     cout << "RecMucTrack::GetHitDistance()  bad gap number = " << gap << endl;
00494     return kInfinity;
00495   }
00496 
00497   HepPoint3D posHit        = hit->GetCenterPos();
00498   HepPoint3D posHitLocal   = hit->GetGap()->TransformToGap(posHit);
00499   HepPoint3D posInsctLocal = hit->GetGap()->TransformToGap(m_CurrentInsct);
00500   int orient = hit->GetGap()->Orient();
00501 
00502   float distance = -9990;
00503   if(orient == 1) distance = fabs(posInsctLocal.x() - posHitLocal.x());
00504   if(orient == 0) distance = fabs(posInsctLocal.y() - posHitLocal.y());
00505 
00506   return distance;
00507 }

float RecMucTrack::GetHitDistance2 ( const MucRecHit hit  ) 

no abs value

Definition at line 511 of file RecMucTrack.cxx.

References DstMucTrack::distance(), MucRecHit::Gap(), MucRecHit::GetCenterPos(), MucRecHit::GetGap(), MucID::getGapNum(), m_CurrentInsct, MucGeoGap::Orient(), MucRecHit::Part(), and MucGeoGap::TransformToGap().

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

00512 {
00513   if (!hit) {
00514     cout << "RecMucTrack:GetHitDistance-E1  null hit pointer!" << endl;
00515     return kInfinity;
00516   } 
00517 
00518   int part = hit->Part();
00519   int gap  = hit->Gap();
00520   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
00521     cout << "RecMucTrack::GetHitDistance()  bad gap number = " << gap << endl;
00522     return kInfinity;
00523   }
00524   
00525   HepPoint3D posHit        = hit->GetCenterPos();
00526   HepPoint3D posHitLocal   = hit->GetGap()->TransformToGap(posHit);
00527   HepPoint3D posInsctLocal = hit->GetGap()->TransformToGap(m_CurrentInsct);
00528   int orient = hit->GetGap()->Orient();
00529       
00530   float distance = -9990;
00531   if(orient == 1) distance = (posInsctLocal.x() - posHitLocal.x());
00532   if(orient == 0) distance = (posInsctLocal.y() - posHitLocal.y());
00533  
00534   //cout<<"========in RecMucTrack: line insct: "<<posInsctLocal.x()<<" "<<posInsctLocal.y()<<"   ->  "<<posHitLocal.x()<<" "<<posHitLocal.y()<<endl;
00535  
00536   return distance;
00537 } 

vector< long > RecMucTrack::GetHitIndices (  )  const

Get indices of all hits in the track.

Definition at line 1649 of file RecMucTrack.cxx.

References m_pHits, and v.

01650 {
01651   vector<long> v;
01652   
01653   vector<MucRecHit*>::const_iterator iHit;
01654   for ( iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01655     if (*iHit) {  // Check for a null pointer.
01656       long index = (*iHit)->GetID();
01657       v.push_back(index);
01658       /*
01659       cout << " Muc2DRoad::HitIndices  gap  orientation  twopack= "
01660            <<  (*iHit)->ChannelID().Plane() << "   "
01661            <<  (*iHit)->ChannelID().Orient()  << "   "
01662            <<  (*iHit)->ChannelID().TwoPack() << endl; 
01663       */
01664     }
01665   }
01666   return v;
01667 }

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

How many hits per gap does this track contain?

Definition at line 1443 of file RecMucTrack.cxx.

References MucID::getGapNum(), and m_pHits.

Referenced by ComputeMaxHitsInGap().

01444 {
01445   if ( part < 0 || part > 2 ) {
01446     cout << "RecMucTrack::GetHitInGap(), invalid part " << part << endl;
01447     return 0;
01448   }
01449   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
01450     cout << "RecMucTrack::GetHitInGap(), invalid gap " << gap << endl;
01451     return 0;
01452   } 
01453   
01454   vector<MucRecHit*>::const_iterator iHit;
01455   int hitsInGap = 0;
01456   
01457   for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01458     
01459     if ( !(*iHit) ) {
01460       cout << "RecMucTrack::GetHitInGap() null hit pointer !"  << endl;
01461       return 0;
01462     }
01463     else {
01464       if( part == (*iHit)->Part() && gap  == (*iHit)->Gap() ) hitsInGap++;
01465     }
01466   }
01467   
01468   return hitsInGap;
01469 }

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

How many hits does a segment contains.

Definition at line 1472 of file RecMucTrack.cxx.

References GetHitInSegOrient(), and num.

Referenced by FindSegWithMaxHits().

01473 {
01474   int num = GetHitInSegOrient(part, seg, 0) + GetHitInSegOrient(part, seg, 1);
01475   return num;
01476 }

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 1479 of file RecMucTrack.cxx.

References MucID::getSegNum(), and m_pHits.

Referenced by GetHitInSeg().

01480 {
01481   if ( part < 0 || part > 2 ) {
01482     cout << "RecMucTrack::GetHitInSeg(), invalid part " << part << endl;
01483     return 0;
01484   }
01485   if ( (seg < 0) || (seg >= (int)MucID::getSegNum(part)) ) {
01486     cout << "RecMucTrack::GetHitInSeg(), invalid seg = " << seg << endl;
01487     return 0;
01488   } 
01489   
01490   vector<MucRecHit*>::const_iterator iHit;
01491   int hitsInSeg = 0;
01492   
01493   for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01494     
01495     if ( !(*iHit) ) {
01496       cout << "RecMucTrack::GetHitInSeg(), null hit pointer !"  << endl;
01497       return 0;
01498     }
01499     else {
01500       if( part == (*iHit)->Part() && seg == (*iHit)->Seg() && 
01501           orient == (*iHit)->GetGap()->Orient() ) hitsInSeg++;
01502     }
01503   }
01504   
01505   return hitsInSeg;
01506 }

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

Get all hits on this track.

Definition at line 1637 of file RecMucTrack.cxx.

References m_pHits.

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

01638 {
01639   return m_pHits;
01640 }

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.

References abs, cos(), DstMucTrack::deltaPhi(), IsInsideSuperConductor(), iter(), kDeltaPhi, kMagnetField, kMdcExtIterMax, kvC, and sin().

Referenced by MucRecTrkExt::execute().

00339 {
00340 
00341   //cm->mm; GeV->MeV//
00342   mdcStartPos*=10;
00343   mdcStartMomentum*=1000;
00345 
00346 
00347   Hep3Vector pt = mdcStartMomentum;
00348   pt.setZ(0);
00349   //cout << "pt " << pt.mag() << endl;
00350   double radius = (pt.mag() * 1e6 / kvC * 1e3) / (fabs(charge * kMagnetField)) ;
00351   //double startPhi = startP.phi();
00352   double deltaPhi = -1.0 * (charge / abs(charge)) * kDeltaPhi;
00353   double deltaZ = (mdcStartMomentum.z() * 1e6 / kvC * 1e3) * kDeltaPhi / (abs(charge) * kMagnetField);
00354 
00355   //cout << "r = " << radius << endl;
00356   mucStartPos = mdcStartPos;
00357   mucStartMomentum = mdcStartMomentum;
00358   double phi;
00359   int    iter = 0;
00360   do {
00361     phi = mucStartMomentum.getPhi() + deltaPhi;
00362     mucStartPos.setX(mucStartPos.x() + radius * kDeltaPhi * cos(phi));
00363     mucStartPos.setY(mucStartPos.y() + radius * kDeltaPhi * sin(phi));
00364     mucStartPos.setZ(mucStartPos.z() + deltaZ);
00365     
00366     mucStartMomentum.setPhi(mucStartMomentum.phi() + deltaPhi);
00367     iter++;
00368     //cout << endP << "  " << mucStartPos << endl;
00369   }
00370   while(IsInsideSuperConductor(mucStartPos) && iter < kMdcExtIterMax);
00371 
00372   //mm->cm; MeV->GeV//
00373   mucStartPos/=10;
00374   mucStartMomentum/=1000;
00376 }

Hep3Vector RecMucTrack::getMdcMomentum (  )  const [inline]

momentum of this track in Mdc

Definition at line 206 of file RecMucTrack.h.

References m_MdcMomentum.

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

00206 { return m_MdcMomentum/1000; }

Hep3Vector RecMucTrack::getMucMomentum (  )  const [inline]

Start momentum of this track in Muc.

Definition at line 203 of file RecMucTrack.h.

References m_MucMomentum.

Referenced by MucRecRoadFinder::execute().

00203 { return m_MucMomentum/1000; }

Hep3Vector RecMucTrack::getMucPos (  )  const [inline]

start position of this track in Muc.

Definition at line 198 of file RecMucTrack.h.

References m_MucPos.

Referenced by MucRecRoadFinder::execute().

00198 { return m_MucPos/10; }

Hep3Vector RecMucTrack::getMucPosSigma (  )  const [inline]

Definition at line 200 of file RecMucTrack.h.

References m_MucPosSigma.

00200 { return m_MucPosSigma/10; }

Hep3Vector RecMucTrack::GetMucStripPos (  )  const [inline]

Definition at line 261 of file RecMucTrack.h.

References m_StripPhi.

Referenced by MucRecTrkExt::execute().

00261 { return m_StripPhi;}

int RecMucTrack::GetNGapsWithHits (  )  const [inline]

How many gaps provide hits attached to this track?

Definition at line 267 of file RecMucTrack.h.

References DstMucTrack::m_numLayers.

Referenced by LineFit().

00267 { return m_numLayers; }

int RecMucTrack::GetNSharedHits ( const RecMucTrack track  )  const

How many hits do two tracks share?

Definition at line 1586 of file RecMucTrack.cxx.

References count, MucRecHit::GetID(), and m_pHits.

01587 {
01588   if (!track2) {
01589     return 0;
01590   }
01591 
01592   int count = 0;
01593   vector<MucRecHit*>::const_iterator iHit1;
01594   vector<MucRecHit*>::const_iterator iHit2;
01595   MucRecHit *hit1, *hit2;
01596 
01597   for( iHit1 = m_pHits.begin(); iHit1 != m_pHits.end(); iHit1++){
01598     for( iHit2 = track2->m_pHits.begin(); 
01599          iHit2 != track2->m_pHits.end(); iHit2++){
01600       hit1 = (*iHit1);
01601       hit2 = (*iHit2);
01602       
01603       if ( (hit1 != 0) && (hit2 != 0) ) {
01604         if (hit1->GetID() == hit2->GetID()) {
01605           count++;
01606         }
01607       }
01608     }
01609   }
01610   
01611   return count;
01612 }

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

Definition at line 313 of file RecMucTrack.h.

References m_distHits_quad.

Referenced by MucRecTrkExt::execute().

00313 { return  m_distHits_quad ;}

int RecMucTrack::GetRecMode (  )  const [inline]

Definition at line 256 of file RecMucTrack.h.

References m_recmode.

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

00256 {return m_recmode;}

int RecMucTrack::GetTotalHits (  )  const

How many hits in all does this track contain?

Definition at line 1437 of file RecMucTrack.cxx.

References m_pHits.

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

01438 { 
01439   return m_pHits.size();
01440 }

vector<int> RecMucTrack::getVecHits ( void   )  const [inline]

Definition at line 305 of file RecMucTrack.h.

References m_vecHits.

00305 { return  m_vecHits ;}

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

Does this track contains an assigned hit?

Definition at line 1543 of file RecMucTrack.cxx.

References m_pHits.

01544 {
01545   bool found = false;
01546   vector<MucRecHit*>::const_iterator iHit;
01547 
01548   for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01549     if (*iHit) {  // Check for a null pointer.
01550       if ( (*iHit)->Part()  == part &&
01551            (*iHit)->Seg()   == seg &&
01552            (*iHit)->Gap()   == gap &&
01553            (*iHit)->Strip() == strip ) {
01554         found = true;
01555       }
01556     }
01557   }
01558 
01559   return found;
01560 }

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

Does this track contain any hits in the given gap?

Definition at line 1563 of file RecMucTrack.cxx.

References MucID::getGapNum(), and m_pHits.

Referenced by ComputeDepth().

01564 {
01565   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
01566     cout << "RecMucTrack::HasHitInGap-E2  invalid gap = " << gap << endl;
01567     return false;
01568   }
01569   
01570   bool found = false;
01571   vector<MucRecHit*>::const_iterator iHit;
01572 
01573   for (iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01574     if (*iHit) {  // Check for a null pointer.
01575       if ( (*iHit)->Part() == part &&
01576            (*iHit)->Gap() == gap ) {
01577         found = true;
01578       }
01579     }
01580   }
01581 
01582   return found;
01583 }

int DstMucTrack::id (  )  const [inline, inherited]

Definition at line 33 of file DstMucTrack.h.

References DstMucTrack::m_id.

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

00033 { return   m_id; }

bool RecMucTrack::IsInsideSuperConductor ( Hep3Vector  pos  ) 

Definition at line 379 of file RecMucTrack.cxx.

References kSuperConductorR, and kSuperConductorZ.

Referenced by GetMdcExtTrack().

00380 {
00381   if(pos.mag() < kSuperConductorR && fabs(pos.z()) < kSuperConductorZ) {
00382     return true;
00383   }
00384   else {
00385     return false;
00386   }
00387 }

int DstMucTrack::kalbrLastLayer (  )  const [inline, inherited]

Definition at line 71 of file DstMucTrack.h.

References DstMucTrack::m_kalbrLastLayer.

00071 {return m_kalbrLastLayer;}

double DstMucTrack::kaldepth (  )  const [inline, inherited]

Definition at line 70 of file DstMucTrack.h.

References DstMucTrack::m_kaldepth.

00070 {return m_kaldepth;}

int DstMucTrack::kaldof (  )  const [inline, inherited]

Definition at line 69 of file DstMucTrack.h.

References DstMucTrack::m_kaldof.

00069 {return m_kaldof;}

int DstMucTrack::kalecLastLayer (  )  const [inline, inherited]

Definition at line 72 of file DstMucTrack.h.

References DstMucTrack::m_kalecLastLayer.

00072 {return m_kalecLastLayer;}

double DstMucTrack::kalRechi2 (  )  const [inline, inherited]

Definition at line 68 of file DstMucTrack.h.

References DstMucTrack::m_kalrechi2.

00068 {return m_kalrechi2;}

void RecMucTrack::LineFit ( int  fittingMethod  ) 

Line fit with hits on a seg with max hits.

Definition at line 1038 of file RecMucTrack.cxx.

References MucRec2DRoad::AttachHit(), ComputeLastGap(), cos(), DstMucTrack::deltaPhi(), check_raw_filter::dist, Extend(), FindSegWithMaxHits(), MucID::gap(), MucRec3DRoad::GetDegreesOfFreedom(), MucID::getGapNum(), GetHitDistance2(), MucRec2DRoad::GetIntercept(), GetNGapsWithHits(), MucRec3DRoad::GetPart(), MucRec3DRoad::GetReducedChiSquare(), MucRec2DRoad::GetSlope(), MucRec3DRoad::GetSlopeZX(), MucRec3DRoad::GetSlopeZY(), genRecEmupikp::i, kMinor, kPi, DstMucTrack::m_chi2, DstMucTrack::m_deltaPhi, DstMucTrack::m_depth, m_distHits, m_distHits_quad, DstMucTrack::m_dof, DstMucTrack::m_ecLastLayer, DstMucTrack::m_endPart, m_Good3DLine, m_Good3DPart, m_IntersectionInner, m_IntersectionOuter, m_MdcMomentum, m_MucMomentum, m_MucPos, m_MucPosSigma, m_pExpectedHits, m_pHits, DstMucTrack::m_px, DstMucTrack::m_py, DstMucTrack::m_pz, DstMucTrack::m_rms, DstMucTrack::m_status, DstMucTrack::m_xPos, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPos, DstMucTrack::m_yPosSigma, DstMucTrack::m_zPos, DstMucTrack::m_zPosSigma, momentum, MucID::part(), MucRec3DRoad::Project(), MucRec3DRoad::ProjectNoCurrentGap(), MucRec3DRoad::ProjectToStrip(), MucRec3DRoad::ProjectWithSigma(), DstMucTrack::px(), DstMucTrack::py(), DstMucTrack::pz(), MucRec3DRoad::RefitNoCurrentGap(), MucID::seg(), SetCurrentInsct(), MucRec3DRoad::SetSimpleFitParams(), sin(), DstMucTrack::status(), MucID::strip(), and MucRec3DRoad::TransformPhiRToXY().

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

01039 {
01040   Extend();
01041 
01042   int part = -1, seg = -1;
01043   int nHits = FindSegWithMaxHits(part, seg);
01044 //   cout << "RecMucTrack::ComputeDepth(), part " << part << " seg " << seg 
01045 //     << " contains most hits " << nHits << endl;
01046   if (part < 0 || seg < 0) {
01047     m_depth = 0;
01048     //cout << "No hit in this track" << endl;
01049     return;
01050   }
01051 
01052   float startPos[3] = {0.0, 0.0, 0.0};
01053   MucRec2DRoad road2D[2];
01054   vector<MucRecHit*>::const_iterator iHit;
01055   for (int orient = 0; orient <= 1; orient++) {
01056     road2D[orient] = MucRec2DRoad(part, seg, orient, startPos[0], startPos[1], startPos[2],fittingMethod );
01057     for(iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01058       if(*iHit) {  // Check for a null pointer.
01059         int hitPart   = (*iHit)->Part();
01060         int hitSeg    = (*iHit)->Seg();
01061         int hitOrient = (*iHit)->GetGap()->Orient();
01062         if (hitPart == part && hitSeg == seg && hitOrient == orient) {
01063           road2D[orient].AttachHit(*iHit);
01064         }
01065       }
01066     }
01067     //cout << "Orient " << orient
01068     // << " Slope " << road2D[orient].GetSlope()
01069     // << " Intercept " << road2D[orient].GetIntercept()
01070     // << " LastGap " << road2D[orient].GetLastGap()
01071     // << endl;
01072 
01073   }
01074   MucRec3DRoad road3D(&road2D[0], &road2D[1]);
01075   float vx, vy, x0, y0;
01076   if ( road3D.GetPart() == 1 ){
01077     road3D.TransformPhiRToXY( road2D[1].GetSlope(),     road2D[0].GetSlope(),     
01078         road2D[1].GetIntercept(), road2D[0].GetIntercept(),
01079         vx, vy, x0, y0);
01080   }
01081   else {
01082     vx = road2D[1].GetSlope();
01083     x0 = road2D[1].GetIntercept();
01084     vy = road2D[0].GetSlope();
01085     y0 = road2D[0].GetIntercept();
01086   }
01087   
01088   //cout << "road3D Last Gap " << road3D.GetLastGap() << endl;
01089   //cout << "vx " << vx << " x0 " << x0 << " vy " << vy << " y0 " << y0 << endl;
01090 
01091   // if number of gaps with hits >= 2 on both orient, change muc pos and momentum
01092   if (road2D[0].GetNGapsWithHits() >= 2 && road2D[1].GetNGapsWithHits() >= 2) {
01093 
01094     //good 3d road!!!
01095     m_Good3DLine = 1;
01096     m_status     = 1;
01097 
01098     m_Good3DPart = road3D.GetPart();
01099     road3D.SetSimpleFitParams(vx, x0, vy, y0);
01100     //road3D.PrintHitsInfo();
01101     
01102     float startx = 0.0, starty = 0.0, startz = 0.0;
01103     float startxSigma = 0.0, startySigma = 0.0, startzSigma = 0.0;
01104     float x1 = 0.0, y1 = 0.0, z1 = 0.0, x2 = 0.0, y2 = 0.0, z2 = 0.0;
01105     int gap = 0;
01106     
01107     if(fittingMethod==2){    //if choose quadratic fitting method!
01108       for(int igap=0; igap<9;igap++){
01109         road3D.Project(igap, x1, y1, z1, x2, y2, z2);
01110         m_IntersectionInner[igap].set(x1,y1,z1);
01111         m_IntersectionOuter[igap].set(x2,y2,z2);
01112         //cout<<"3dproject sur "<<x1<<" "<<y1<<" "<<z1<<" "<<x2<<" "<<y2<<" "<<z2<<endl;      
01113       }
01114     }
01115 
01116     do {
01117       //road3D.Project(gap, startx, starty, startz);
01118       road3D.ProjectWithSigma(gap, startx, starty, startz, startxSigma, startySigma, startzSigma);
01119       gap++;
01120     }
01121     while ( (startx*startx + starty*starty + startz*startz) < kMinor &&
01122               gap < (int)MucID::getGapNum(part) );
01123     
01124     if(fabs(startx)<2600&&fabs(starty)<2600&&fabs(startz)<2800){
01125       Hep3Vector MucPos_self;
01126       MucPos_self.set(startx, starty, startz);
01127       float dist = (MucPos_self - m_MucPos).mag();
01128     
01129       if(dist < 1000 ){  // (mm) maybe the fit is bad, if the dist is too big.
01130         m_MucPos.set(startx, starty, startz);
01131         m_xPos = startx;
01132         m_yPos = starty;
01133         m_zPos = startz;
01134       }
01135     }
01136     m_MucPosSigma.set(startxSigma, startySigma, startzSigma);
01137     m_xPosSigma = startxSigma;
01138     m_yPosSigma = startySigma;
01139     m_zPosSigma = startzSigma;
01140     
01141     //cout<<"in RecMucTrack gap= "<<gap<<" start= "<<startx<<" "<<starty<<" "<<startz<<" "<<endl;
01142     float momentum = m_MucMomentum.mag();
01143     float zDir = 1.0;
01144     if (m_MucMomentum.z() != 0.0) zDir  = m_MucMomentum.z() / fabs(m_MucMomentum.z());
01145     
01146     float px = road3D.GetSlopeZX()*zDir;
01147     float py = road3D.GetSlopeZY()*zDir;
01148     float pz = zDir;
01149     float segPhi = 0.25*kPi*seg;
01150     // 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.
01151     if (part == 1 && px*cos(segPhi)+py*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
01152       px *= -1.0;
01153       py *= -1.0;
01154       pz *= -1.0;
01155     }
01156 
01157     //if(sqrt(px*px+py*py)>0.01)m_MucMomentum.set(px, py, pz);
01158     m_MucMomentum.set(px, py, pz);
01159     m_MucMomentum.setMag(momentum);
01160 
01161     m_px = px; m_py = py; m_pz = pz;
01162     Hep3Vector phi_mdc, phi_muc;
01163     phi_mdc.set(m_MdcMomentum.x(),m_MdcMomentum.y(),0);
01164     phi_muc.set(px,py,0);
01165     double deltaPhi = phi_mdc.angle(phi_muc);
01166 
01167     m_deltaPhi = deltaPhi;
01168     m_dof  = road3D.GetDegreesOfFreedom();
01169     m_chi2 = road3D.GetReducedChiSquare();
01170     if(m_chi2<0||m_chi2>1000)  m_chi2 = 0;
01171     m_rms  = 0.0; // road3D.GetReducedChiSquare(); // ??? in MucRecRoad3D
01172 
01173 
01174    if(road2D[0].GetNGapsWithHits() >= 3 && road2D[1].GetNGapsWithHits() >= 3){ //need 3+ gap to do refit
01175       //calc distance between each hit with this track.
01176       //use GetHitDistance(), so we should provide m_CurrentInsct. 
01177       float xInsct = 0.0, yInsct = 0.0, zInsct = 0.0, sigmax = 0.0, sigmay = 0.0, sigmaz = 0.0;
01178       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;
01179       for(int ihit = 0; ihit < m_pHits.size(); ihit++){
01180         int igap = (m_pHits[ihit])->Gap();
01181         road3D.ProjectNoCurrentGap(igap, xInsct, yInsct, zInsct, sigmax, sigmay, sigmaz, 
01182                                    quad_x1, quad_y1, quad_z1, quad_x2, quad_y2, quad_z2);
01183 
01184         SetCurrentInsct(xInsct, yInsct, zInsct);
01185 
01186         float dist_hit_track = GetHitDistance2(m_pHits[ihit]);
01187         m_distHits.push_back(dist_hit_track);
01188 
01189         //cout<<"===========in RecMucTrack: line dist: "<<dist_hit_track<<endl;
01190 
01191         if(fittingMethod==2) // ------calc local insct in a gap with quad line.
01192           {
01193            
01194             Hep3Vector center = m_pHits[ihit]->GetCenterPos();
01195             int iPart = m_pHits[ihit]->Part();
01196             int iSeg  = m_pHits[ihit]->Seg();
01197             int iGap  = m_pHits[ihit]->Gap();
01198             float xHit, yHit, zHit = 0.;
01199             if (iPart == 1) {
01200                     if ( iGap %2  == 1) {
01201                             xHit = center.z();
01202                             yHit = sqrt(center.x()*center.x()
01203                                             + center.y()*center.y());
01204                             if(iSeg==2) yHit = center.y();  //deal with seg2 seperately! because there is a hole here. 2006.11.9
01205                     } 
01206                     else {
01207                             xHit = center.x();
01208                             yHit = center.y();
01209                     }
01210             }
01211             else {
01212                     if ( iGap %2 == 0) {
01213                             xHit = center.z();
01214                             yHit = center.y();
01215                     }
01216                     else {
01217                             xHit = center.z();
01218                             yHit = center.x();
01219                     }
01220             }
01221             
01222             float distance1 = fabs(xHit - quad_x1)/(xHit - quad_x1) * sqrt((xHit - quad_x1)*(xHit - quad_x1) + (yHit - quad_y1)*(yHit - quad_y1));
01223             float distance2 = fabs(xHit - quad_x2)/(xHit - quad_x2) * sqrt((xHit - quad_x2)*(xHit - quad_x2) + (yHit - quad_y2)*(yHit - quad_y2));
01224 
01225             float dist_quad = distance1;
01226             if(fabs(distance1) > fabs(distance2)) dist_quad = distance2;
01227             
01228       //cout<<"============in RecMucTrack: quad xyz: "<<quad_x1<<" "<<quad_y1<<" "<<quad_z1<<" "<<quad_x2<<" "<<quad_y2<<endl;
01229             //cout<<"============in RecMucTrack: hit pos: "<<xHit<<" "<<yHit<<" "<<zHit<<endl;
01230             //cout<<"============in RecMucTrack: dist1 = "<<distance1<<" dist2 = "<<distance2<<" dist ="<<dist_quad<<endl; 
01231 
01232             if(quad_x1 == -9999) m_distHits_quad.push_back(-99);
01233             else m_distHits_quad.push_back(dist_quad);
01234 
01235           }
01236       }
01237     }
01238     else{
01239         for(int ihit = 0; ihit < m_pHits.size(); ihit++){
01240             m_distHits.push_back(-99);
01241             m_distHits_quad.push_back(-99);
01242         }
01243     }
01245 
01247     ComputeLastGap();
01248     //HepPoint3D initPos(startx, starty,startz);
01249     HepPoint3D initPos(startx-m_MucMomentum.x()/momentum, starty-m_MucMomentum.y()/momentum,startz-m_MucMomentum.z()/momentum);
01250 
01251     //for(int igap = 0; igap <= m_brLastLayer; igap++){
01252     for(int igap = 0; igap < 9 ; igap++){
01253       vector<int> padID;
01254       vector<float> intersect_x;
01255       vector<float> intersect_y;
01256       vector<float> intersect_z;
01257 
01258       //refit---------------------------------
01259       float zx, zy, x0, y0;
01260       int status = road3D.RefitNoCurrentGap(igap,zx,x0,zy,y0);
01261       Hep3Vector mom_refit;
01262       if(status == 0){ //refit succeed
01263               float zDir = 1.0;
01264               if (m_MucMomentum.z() != 0.0) zDir  = m_MucMomentum.z() / fabs(m_MucMomentum.z());
01265               float px_refit = zx * zDir;  
01266               float py_refit = zy * zDir;       
01267               float pz_refit = zDir;
01268               float segPhi = 0.25*kPi*seg;
01269               // 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.
01270               if (part == 1 && px_refit*cos(segPhi)+py_refit*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
01271                       px_refit *= -1.0;
01272                       py_refit *= -1.0;
01273                       pz_refit *= -1.0;
01274               }
01275 
01276               mom_refit.setX(px_refit);
01277               mom_refit.setY(py_refit);
01278               mom_refit.setZ(pz_refit);
01279               mom_refit.setMag(momentum);
01280       }
01281       else mom_refit = m_MucMomentum;  //use the former momentum
01282 
01283       HepPoint3D initPos_refit;
01284       if(status == 0){
01285               float initPosx_refit, initPosy_refit, initPosz_refit;
01286               float sigmax_refit, sigmay_refit, sigmaz_refit;
01287               road3D.Project(0, zx, x0, zy, y0, initPosx_refit, initPosy_refit, initPosz_refit);
01288               initPos_refit.setX(initPosx_refit-mom_refit.x()/momentum);
01289               initPos_refit.setY(initPosy_refit-mom_refit.y()/momentum);
01290               initPos_refit.setZ(initPosz_refit-mom_refit.z()/momentum);
01291       }
01292       else initPos_refit = initPos;
01293 
01294       //cout<<"initPos: "<<initPos<<"  "<<initPos_refit<<endl;
01295       //if((initPos - initPos_refit).mag()>100) cout<<"--------=====------to far"<<endl;
01296       //refit---------------------------------
01297       //cout<<"no gap: "<<igap<<"  mom: "<<m_MucMomentum<<"  refit: "<<mom_refit<<endl; 
01298       
01299       //vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos,m_MucMomentum,padID,intersect_x,intersect_y,intersect_z);
01300       vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos_refit,mom_refit,padID,intersect_x,intersect_y,intersect_z);
01301 
01302       //vector<Identifier> MuId = road3D.ProjectToStrip(1,igap,initPos,mom_refit,padID,intersect_x,intersect_y,intersect_z);
01303 
01304       vector<Identifier>::const_iterator mucid;
01305       int i = 0;
01306       for(mucid = MuId.begin(); mucid != MuId.end(); mucid++,i++)
01307       {
01308         MucRecHit *pHit = new MucRecHit(MucID::part(*mucid),MucID::seg(*mucid),MucID::gap(*mucid),MucID::strip(*mucid));
01309         pHit->SetPadID(padID[i]);
01310         pHit->SetIntersectX(intersect_x[i]);
01311         pHit->SetIntersectY(intersect_y[i]);
01312         pHit->SetIntersectZ(intersect_z[i]);
01313 
01314         m_pExpectedHits.push_back(pHit);
01315       }
01316     }
01317 
01318     if(m_endPart!=-1&&m_ecLastLayer!=-1)
01319     {
01320       //for(int igap = 0; igap <= m_ecLastLayer; igap++){
01321       for(int igap = 0; igap < 8; igap++){
01322         vector<int> padID;
01323         vector<float> intersect_x;
01324         vector<float> intersect_y;
01325         vector<float> intersect_z;
01326 
01327         //refit---------------------------------
01328         float zx, zy, x0, y0;
01329         //int status = road3D.RefitNoCurrentGap(igap,zy,y0,zx,x0);  //!!!!!different sequence
01330         int status = road3D.RefitNoCurrentGap(igap,zx,x0,zy,y0); 
01331         Hep3Vector mom_refit;
01332         if(status == 0){ //refit succeed
01333                 float zDir = 1.0;
01334                 if (m_MucMomentum.z() != 0.0) zDir  = m_MucMomentum.z() / fabs(m_MucMomentum.z());
01335                 float px_refit = zx * zDir;
01336                 float py_refit = zy * zDir;
01337                 float pz_refit = zDir;
01338                 float segPhi = 0.25*kPi*seg;
01339                 // 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.
01340                 if (part == 1 && px_refit*cos(segPhi)+py_refit*sin(segPhi) < 0.0) { // when in barrel, pt dot segPhi < 0, angle between them > 90deg
01341                         px_refit *= -1.0;
01342                         py_refit *= -1.0;
01343                         pz_refit *= -1.0;
01344                 }
01345 
01346                 mom_refit.setX(px_refit);
01347                 mom_refit.setY(py_refit);
01348                 mom_refit.setZ(pz_refit);
01349                 mom_refit.setMag(momentum);
01350         }
01351         else mom_refit = m_MucMomentum;  //use the former momentum
01352 
01353         HepPoint3D initPos_refit;
01354         if(status == 0){
01355                 float initPosx_refit, initPosy_refit, initPosz_refit;
01356                 float sigmax_refit, sigmay_refit, sigmaz_refit;
01357                 road3D.Project(0, zx, x0, zy, y0, initPosx_refit, initPosy_refit, initPosz_refit);
01358                 initPos_refit.setX(initPosx_refit-mom_refit.x()/momentum);
01359                 initPos_refit.setY(initPosy_refit-mom_refit.y()/momentum);
01360                 initPos_refit.setZ(initPosz_refit-mom_refit.z()/momentum);
01361         }
01362         else initPos_refit = initPos;
01363         //refit---------------------------------
01364         //cout<<"mom: "<<m_MucMomentum<<" "<<mom_refit<<" pos: "<<initPos<<"  "<<initPos_refit<<endl;  
01365         //vector<Identifier> MuId = road3D.ProjectToStrip(m_endPart,igap,initPos,m_MucMomentum,padID,intersect_x,intersect_y,intersect_z);
01366 
01367         vector<Identifier> MuId = road3D.ProjectToStrip(m_endPart,igap,initPos_refit,mom_refit,padID,intersect_x,intersect_y,intersect_z);
01368 
01369         vector<Identifier>::const_iterator mucid;
01370         int i = 0;
01371         for(mucid = MuId.begin(); mucid != MuId.end(); mucid++,i++)
01372         {
01373           MucRecHit *pHit = new MucRecHit(MucID::part(*mucid),MucID::seg(*mucid),MucID::gap(*mucid),MucID::strip(*mucid));
01374           pHit->SetPadID(padID[i]);
01375           pHit->SetIntersectX(intersect_x[i]);
01376           pHit->SetIntersectY(intersect_y[i]);
01377           pHit->SetIntersectZ(intersect_z[i]);
01378 
01379           m_pExpectedHits.push_back(pHit);
01380         }
01381       }
01382     }
01383 
01384     //cout<<"in RecMucTrack push back expected hits  size= "<<m_pExpectedHits.size()<<" ? "<<m_pHits.size()<<endl;
01385     for(int i=0; i< m_pExpectedHits.size(); i++)
01386     {
01387       MucRecHit *ihit = m_pExpectedHits[i];
01388       //cout<<"expected Hits: "<<ihit->Part()<<"  "<<ihit->Seg()<<"  "<<ihit->Gap()<<"  "<<ihit->Strip()<<endl;
01389       //cout<<"pad: "<<ihit->GetPadID()<<"  pos: "<<ihit->GetIntersectX()<<" "<<ihit->GetIntersectY()<<" "<<ihit->GetIntersectZ()<<" "<<endl;
01390     }
01391 
01392     for(int i=0; i< m_pHits.size(); i++)
01393     {
01394       MucRecHit *ihit = m_pHits[i];
01395       //cout<<"attachedd Hits: "<<ihit->Part()<<"  "<<ihit->Seg()<<"  "<<ihit->Gap()<<"  "<<ihit->Strip()<<" isseed: "<<ihit->HitIsSeed()<<endl;
01396     }
01397     //cout<<"1st: "<<brFirstLayer()<<"  "<<ecFirstLayer()<<"  last: "<<brLastLayer()<<"  "<<ecLastLayer()<<endl;
01398   
01399   }
01400   else {
01401     //calc distance between each hit with this track.
01402     //initialize distHits
01403     for(int ihit = 0; ihit < m_pHits.size(); ihit++){
01404       m_distHits.push_back(-99);
01405       m_distHits_quad.push_back(-99);
01406     }
01407   }
01408   //cout << "Muc Pos: x " << m_MucPos.x() << " y " << m_MucPos.y() << " z " << m_MucPos.z() << endl;
01409 }

int DstMucTrack::maxHitsInLayer (  )  const [inline, inherited]

Definition at line 43 of file DstMucTrack.h.

References DstMucTrack::m_maxHitsInLayer.

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

00043 { return   m_maxHitsInLayer; }

int DstMucTrack::numHits (  )  const [inline, inherited]

Definition at line 41 of file DstMucTrack.h.

References DstMucTrack::m_numHits.

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

00041 { return   m_numHits;      } // total hits on the track   

int DstMucTrack::numLayers (  )  const [inline, inherited]

Definition at line 42 of file DstMucTrack.h.

References DstMucTrack::m_numLayers.

Referenced by MucRecRoadFinder::execute(), DQARhopi::execute(), and Ppjrhopi::execute().

00042 { return   m_numLayers;    } // number of layers with hits 

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

Assignment constructor from DstMucTrack.

Definition at line 186 of file RecMucTrack.cxx.

References SetDefault().

00187 {
00188   SetDefault();
00189   DstMucTrack::operator=(dstTrack);
00190   return *this;
00191 }

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

Assignment constructor.

Definition at line 84 of file RecMucTrack.cxx.

References DstMucTrack::m_brLastLayer, m_changeUnit, DstMucTrack::m_chi2, m_CurrentDir, m_CurrentInsct, m_CurrentPos, DstMucTrack::m_deltaPhi, DstMucTrack::m_depth, m_Directions, DstMucTrack::m_dof, DstMucTrack::m_ecLastLayer, DstMucTrack::m_endPart, m_ExtTrackID, DstMucTrack::m_id, m_Intersections, DstMucTrack::m_kalbrLastLayer, DstMucTrack::m_kaldepth, DstMucTrack::m_kaldof, DstMucTrack::m_kalecLastLayer, DstMucTrack::m_kalrechi2, DstMucTrack::m_maxHitsInLayer, m_MdcMomentum, m_MdcPos, m_MucMomentum, m_MucPos, m_MucPosSigma, DstMucTrack::m_numHits, DstMucTrack::m_numLayers, m_pExpectedHits, m_pHits, m_recmode, DstMucTrack::m_rms, DstMucTrack::m_startPart, DstMucTrack::m_status, DstMucTrack::m_type, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPosSigma, and DstMucTrack::m_zPosSigma.

00085 {
00086   // Assignment operator.
00087   if ( this != &orig ) {             // Watch out for self-assignment!
00088     //m_trackId         = orig.m_trackId;    //--------------->
00089     m_ExtTrackID    = orig.m_ExtTrackID;
00090     m_MdcPos        = orig.m_MdcPos;
00091     m_MdcMomentum   = orig.m_MdcMomentum;
00092     m_MucPos        = orig.m_MucPos;
00093     m_MucPosSigma   = orig.m_MucPosSigma;
00094     m_MucMomentum   = orig.m_MucMomentum;
00095     m_CurrentPos    = orig.m_CurrentPos;
00096     m_CurrentDir    = orig.m_CurrentDir;
00097     m_CurrentInsct  = orig.m_CurrentInsct;
00098     m_id            = orig.m_id;
00099     m_status        = orig.m_status;
00100     m_type          = orig.m_type;
00101     m_numHits       = orig.m_numHits;    //--------------->
00102     m_startPart     = orig.m_startPart;
00103     m_endPart       = orig.m_endPart;
00104     m_brLastLayer   = orig.m_brLastLayer;
00105     m_ecLastLayer   = orig.m_ecLastLayer;
00106     m_numLayers     = orig.m_numLayers;
00107     m_maxHitsInLayer= orig.m_maxHitsInLayer;
00108     m_depth         = orig.m_depth;
00109     m_dof           = orig.m_dof;
00110     m_chi2          = orig.m_chi2;
00111     m_rms           = orig.m_rms;
00112     m_deltaPhi      = orig.m_deltaPhi;
00113     m_pHits         = orig.m_pHits;
00114     m_pExpectedHits = orig.m_pExpectedHits;
00115     m_Intersections = orig.m_Intersections;
00116     m_Directions    = orig.m_Directions;
00117     m_xPosSigma     = orig.m_xPosSigma;
00118     m_yPosSigma     = orig.m_yPosSigma;
00119     m_zPosSigma     = orig.m_zPosSigma;
00120     m_changeUnit    = orig.m_changeUnit;
00121     m_recmode       = orig.m_recmode;
00122     //*******
00123     m_kalrechi2     = orig.m_kalrechi2;
00124     m_kaldof        = orig.m_kaldof;
00125     m_kaldepth      =orig.m_kaldepth;
00126     m_kalbrLastLayer=orig.m_kalbrLastLayer;
00127     m_kalecLastLayer=orig.m_kalecLastLayer;
00128   }
00129 
00130   return *this;
00131 }

void RecMucTrack::OutputUnitChange (  ) 

change unit

Definition at line 1706 of file RecMucTrack.cxx.

References m_changeUnit, DstMucTrack::m_depth, DstMucTrack::m_distance, DstMucTrack::m_px, DstMucTrack::m_py, DstMucTrack::m_pz, DstMucTrack::m_xPos, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPos, DstMucTrack::m_yPosSigma, DstMucTrack::m_zPos, and DstMucTrack::m_zPosSigma.

Referenced by ComputeTrackInfo().

01707 {
01708   if(m_changeUnit == false){
01709     m_depth/=10;
01710 
01711     m_xPos /=10;
01712     m_yPos /=10;
01713     m_zPos /=10; 
01714 
01715     m_xPosSigma/=10;
01716     m_yPosSigma/=10;
01717     m_zPosSigma/=10;
01718 
01719     m_px /= 1000;
01720     m_py /= 1000;
01721     m_pz /= 1000;
01722 
01723     m_distance /= 10;
01724   }
01725 
01726   m_changeUnit = true;
01727 
01728 }

void RecMucTrack::PrintHitsInfo (  )  const

Print Hits Infomation.

Definition at line 1684 of file RecMucTrack.cxx.

References m_pHits.

01685 {
01686   vector<MucRecHit*>::const_iterator iHit;
01687   for ( iHit = m_pHits.begin(); iHit != m_pHits.end(); iHit++) {
01688     if (*iHit) {  // Check for a null pointer.
01689       float xl, yl, zl;
01690       (*iHit)->GetStrip()->GetCenterPos(xl, yl, zl);
01691       HepPoint3D vl(xl, yl, zl);
01692       HepPoint3D vg = (*iHit)->GetGap()->TransformToGlobal(vl);
01693       
01694       cout << " part "   << (*iHit)->Part() 
01695            << " seg  "   << (*iHit)->Seg()
01696            << " gap  "   << (*iHit)->Gap()
01697            << " strip "  << (*iHit)->Strip()
01698            << " pos ("   << vg.x() << ", " << vg.y() << ", " << vg.z() << ")"  
01699            << endl;
01700     }
01701   }
01702 
01703 }

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.

References MucGeoGeneral::FindIntersections(), MucID::getGapNum(), MucGeoGeneral::Instance(), intersection(), kMinor, kPi, m_CurrentDir, m_CurrentPos, and boss::pos.

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

00425 {
00426   seg = -1;
00427   x = 0.0; y = 0.0; z = 0.0;
00428   
00429   if ( (gap < 0) || (gap >= (int)MucID::getGapNum(part)) ) {
00430     cout << "Muc2DRoad::Project(), invalid gap = " << gap << endl;
00431     return;
00432   }
00433 
00434   HepPoint3D pos = m_CurrentPos;
00435   Hep3Vector dir = m_CurrentDir;
00436 
00437   vector<HepPoint3D> insctCon = MucGeoGeneral::Instance()->FindIntersections(part, gap, pos, dir);
00438   if( insctCon.size() == 0 ) {
00439     return;
00440   }
00441 
00442   HepPoint3D intersection = insctCon[0];
00443   
00444   x = intersection.x();
00445   y = intersection.y();
00446   z = intersection.z();
00447 
00448   //cout << " x " << x << " y " << y << " z " << z << endl;
00449 
00450   float phi;
00451   if( (x*x+y*y+z*z) < kMinor) {
00452     return;
00453   }
00454   else {
00455     if(part == 1) {
00456       phi = acos(x/sqrt(x*x+y*y));
00457       if(y < 0) phi = 2.0*kPi - phi;
00458       phi = fmod((phi + kPi/8.0), 2.0*kPi);
00459       seg = int(phi/(kPi/4.0)); 
00460     }
00461     else {
00462       if(x >= 0.0) {
00463         if(y >= 0.0) {
00464           seg = 0;
00465         } 
00466         else {
00467           seg = 3;
00468         }
00469       }
00470       else {
00471         if(y >= 0.0) {
00472           seg = 1;
00473         }
00474         else {
00475           seg = 2;
00476         }
00477       }
00478     }
00479   }
00480 }

void RecMucTrack::pushExtDistHits ( float  dist  )  [inline]

Definition at line 347 of file RecMucTrack.h.

References m_distHits_ext.

Referenced by MucRecTrkExt::execute().

00347 {m_distHits_ext.push_back(dist);}

double DstMucTrack::px (  )  const [inline, inherited]

Definition at line 58 of file DstMucTrack.h.

References DstMucTrack::m_px.

Referenced by LineFit().

00058 { return m_px; }   // momentum on the start of track in muc

double DstMucTrack::py (  )  const [inline, inherited]

Definition at line 59 of file DstMucTrack.h.

References DstMucTrack::m_py.

Referenced by LineFit().

00059 { return m_py; }

double DstMucTrack::pz (  )  const [inline, inherited]

Definition at line 60 of file DstMucTrack.h.

References DstMucTrack::m_pz.

Referenced by LineFit().

00060 { return m_pz; }

double DstMucTrack::rms (  )  const [inline, inherited]

Definition at line 48 of file DstMucTrack.h.

References DstMucTrack::m_rms.

00048 { return   m_rms;    }

void DstMucTrack::setBrLastLayer ( int  layer  )  [inline, inherited]

Definition at line 82 of file DstMucTrack.h.

References DstMucTrack::m_brLastLayer.

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

00082 {m_brLastLayer = layer; }

void DstMucTrack::setChi2 ( double  chi2  )  [inline, inherited]

Definition at line 89 of file DstMucTrack.h.

References DstMucTrack::m_chi2.

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

00089 { m_chi2   = chi2; }

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.

References m_CurrentDir.

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

00295 {
00296   m_CurrentDir.set(x*1000, y*1000, z*1000);  //unnecessary, because it's dir, not mom
00297 }

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.

References m_CurrentInsct.

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

00303 {
00304   m_CurrentInsct.set(x, y, z);  
00305 }

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.

References m_CurrentPos.

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

00287 {
00288   m_CurrentPos.set(x*10, y*10, z*10);
00289 }

void RecMucTrack::SetDefault (  ) 

Definition at line 193 of file RecMucTrack.cxx.

References m_brFirstLayer, m_ecFirstLayer, and m_Good3DPart.

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

00194 {
00195   m_brFirstLayer = -99;
00196   m_ecFirstLayer = -99;
00197   m_Good3DPart   = -99;
00198 }

void DstMucTrack::setDeltaPhi ( double  dphi  )  [inline, inherited]

Definition at line 106 of file DstMucTrack.h.

References DstMucTrack::m_deltaPhi.

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

00106 {m_deltaPhi = dphi; }

void DstMucTrack::setDepth ( double  depth  )  [inline, inherited]

Definition at line 88 of file DstMucTrack.h.

References DstMucTrack::m_depth.

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

00088 { m_depth  = depth; }

void DstMucTrack::setDistance ( double  dist  )  [inline, inherited]

Definition at line 105 of file DstMucTrack.h.

References DstMucTrack::m_distance.

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

00105 {m_distance = dist; }

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

Definition at line 341 of file RecMucTrack.h.

References m_distHits.

Referenced by RecMucTrackCnv::TObjectToDataObject().

00341 { m_distHits = disthits;}

void DstMucTrack::setDof ( int  dof  )  [inline, inherited]

Definition at line 90 of file DstMucTrack.h.

References DstMucTrack::m_dof.

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

00090 { m_dof    = dof ; }

void DstMucTrack::setEcLastLayer ( int  layer  )  [inline, inherited]

Definition at line 83 of file DstMucTrack.h.

References DstMucTrack::m_ecLastLayer.

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

00083 {m_ecLastLayer = layer; }

void DstMucTrack::setEndPart ( int  part  )  [inline, inherited]

Definition at line 81 of file DstMucTrack.h.

References DstMucTrack::m_endPart.

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

00081 {m_endPart = part;   }

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

Definition at line 339 of file RecMucTrack.h.

References m_expHits.

00339 { m_expHits = exphits;}  

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

Definition at line 330 of file RecMucTrack.cxx.

References genRecEmupikp::i, and m_expHits.

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

00331 { 
00332     for(int i = 0 ; i < pHits.size(); i++)
00333           m_expHits.push_back((pHits[i]->GetID()).get_value());
00334 }

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

Definition at line 345 of file RecMucTrack.h.

References m_distHits_ext.

00345 { m_distHits_ext = disthits;}

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.

References m_ExtMucMomentum.

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

00279 {
00280   m_ExtMucMomentum.set(px*1000, py*1000, pz*1000);
00281 }

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.

References m_ExtMucPos.

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

00271 {
00272   m_ExtMucPos.set(x*10, y*10, z*10);
00273 }

void RecMucTrack::SetExtTrack ( RecExtTrack extTrack  ) 

set Ext track point.

Definition at line 314 of file RecMucTrack.cxx.

References DstExtTrack::GetTrackId(), m_ExtTrack, and m_ExtTrackID.

Referenced by MucRecTrkExt::execute().

00315 {
00316   m_ExtTrack = extTrack;
00317   if (m_ExtTrack) m_ExtTrackID = extTrack->GetTrackId(); 
00318 }

void RecMucTrack::SetExtTrackID ( int  id  )  [inline]

set Ext track id. for compute from mdc myself

Definition at line 132 of file RecMucTrack.h.

References m_ExtTrackID.

Referenced by MucRecTrkExt::execute().

00132 { m_ExtTrackID = id; }

void DstMucTrack::setId ( int  id  )  [inline, inherited]

Definition at line 76 of file DstMucTrack.h.

References DstMucTrack::m_id.

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

00076 { m_id = id ; }

void DstMucTrack::setkalbrLastLayer ( int  br  )  [inline, inherited]

Definition at line 113 of file DstMucTrack.h.

References DstMucTrack::m_kalbrLastLayer.

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

00113 {m_kalbrLastLayer = br;}

void DstMucTrack::setkalDepth ( double  de  )  [inline, inherited]

Definition at line 112 of file DstMucTrack.h.

References DstMucTrack::m_kaldepth.

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

00112 {m_kaldepth = de;}

void DstMucTrack::setkalDof ( int  f  )  [inline, inherited]

Definition at line 111 of file DstMucTrack.h.

References DstMucTrack::m_kaldof.

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

00111 {m_kaldof = f;}

void DstMucTrack::setkalecLastLayer ( int  ec  )  [inline, inherited]

Definition at line 114 of file DstMucTrack.h.

References DstMucTrack::m_kalecLastLayer.

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

00114 {m_kalecLastLayer = ec;}

void DstMucTrack::setkalRechi2 ( double  ch  )  [inline, inherited]

Definition at line 110 of file DstMucTrack.h.

References DstMucTrack::m_kalrechi2.

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

00110 {m_kalrechi2=ch;}

void DstMucTrack::setMaxHitsInLayer ( int  maxHits  )  [inline, inherited]

Definition at line 86 of file DstMucTrack.h.

References DstMucTrack::m_maxHitsInLayer.

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

00086 { m_maxHitsInLayer = maxHits; }

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.

References m_MdcMomentum.

Referenced by MucRecTrkExt::execute().

00230 {
00231   m_MdcMomentum.set(px*1000, py*1000, pz*1000);
00232 }

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.

References m_MdcPos.

Referenced by MucRecTrkExt::execute().

00222 {
00223   m_MdcPos.set(x*10, y*10, z*10);
00224 }

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.

References m_MucMomentum, DstMucTrack::m_px, DstMucTrack::m_py, and DstMucTrack::m_pz.

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

00260 {
00261   m_MucMomentum.set(px*1000, py*1000, pz*1000);
00262   m_px = px*1000;
00263   m_py = py*1000;
00264   m_pz = pz*1000;
00265 }

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.

References m_MucPos, DstMucTrack::m_xPos, DstMucTrack::m_yPos, and DstMucTrack::m_zPos.

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

00238 {
00239   m_MucPos.set(x*10, y*10, z*10);
00240   m_xPos = x*10;
00241   m_yPos = y*10;
00242   m_zPos = z*10;
00243 }

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

Definition at line 246 of file RecMucTrack.cxx.

References m_MucPosSigma, DstMucTrack::m_xPosSigma, DstMucTrack::m_yPosSigma, and DstMucTrack::m_zPosSigma.

00249 {
00250   m_MucPosSigma.set(x*10, y*10, z*10);
00251   m_xPosSigma = x*10;
00252   m_yPosSigma = y*10;
00253   m_zPosSigma = z*10;
00254 }

void DstMucTrack::setNumHits ( int  numHits  )  [inline, inherited]

Definition at line 84 of file DstMucTrack.h.

References DstMucTrack::m_numHits.

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

00084 { m_numHits  = numHits; }

void DstMucTrack::setNumLayers ( int  numLayers  )  [inline, inherited]

Definition at line 85 of file DstMucTrack.h.

References DstMucTrack::m_numLayers.

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

00085 { m_numLayers = numLayers; }

void DstMucTrack::setPx ( double  px  )  [inline, inherited]

Definition at line 101 of file DstMucTrack.h.

References DstMucTrack::m_px.

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

00101 { m_px = px;  }

void DstMucTrack::setPy ( double  py  )  [inline, inherited]

Definition at line 102 of file DstMucTrack.h.

References DstMucTrack::m_py.

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

00102 { m_py = py;  }

void DstMucTrack::setPz ( double  pz  )  [inline, inherited]

Definition at line 103 of file DstMucTrack.h.

References DstMucTrack::m_pz.

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

00103 { m_pz = pz;  }

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

Definition at line 343 of file RecMucTrack.h.

References m_distHits_quad.

00343 { m_distHits_quad = disthits;}

void RecMucTrack::SetRecMode ( int  recmode  )  [inline]

Definition at line 254 of file RecMucTrack.h.

References m_recmode.

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

00254 {m_recmode = recmode;}

void DstMucTrack::setRms ( double  rms  )  [inline, inherited]

Definition at line 91 of file DstMucTrack.h.

References DstMucTrack::m_rms.

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

00091 { m_rms    = rms ; }

void DstMucTrack::setStartPart ( int  part  )  [inline, inherited]

Definition at line 80 of file DstMucTrack.h.

References DstMucTrack::m_startPart.

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

00080 {m_startPart = part; }

void DstMucTrack::setStatus ( int  st  )  [inline, inherited]

Definition at line 77 of file DstMucTrack.h.

References DstMucTrack::m_status.

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

00077 { m_status = st;  }

void RecMucTrack::setTrackId ( const int  trackId  ) 

set the index for this track.

Reimplemented from DstMucTrack.

Definition at line 209 of file RecMucTrack.cxx.

References DstMucTrack::m_trackId.

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

00210 {
00211   if(trackId >= 0) {
00212     m_trackId = trackId;
00213   }
00214 }

void DstMucTrack::setType ( int  type  )  [inline, inherited]

Definition at line 78 of file DstMucTrack.h.

References DstMucTrack::m_type.

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

00078 { m_type = type; }

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

Reimplemented from DstMucTrack.

Definition at line 337 of file RecMucTrack.h.

References m_vecHits.

00337 { m_vecHits = vechits;}

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

reload setVecHits

Definition at line 323 of file RecMucTrack.cxx.

References genRecEmupikp::i, and m_vecHits.

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

00324 {
00325   for(int i = 0 ; i < pHits.size(); i++)
00326     m_vecHits.push_back((pHits[i]->GetID()).get_value());
00327 }

void DstMucTrack::setXPos ( double  x  )  [inline, inherited]

Definition at line 93 of file DstMucTrack.h.

References DstMucTrack::m_xPos.

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

00093 { m_xPos = x; }

void DstMucTrack::setXPosSigma ( double  xsigma  )  [inline, inherited]

Definition at line 97 of file DstMucTrack.h.

References DstMucTrack::m_xPosSigma.

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

00097 { m_xPosSigma = xsigma; }

void DstMucTrack::setYPos ( double  y  )  [inline, inherited]

Definition at line 94 of file DstMucTrack.h.

References DstMucTrack::m_yPos.

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

00094 { m_yPos = y; }

void DstMucTrack::setYPosSigma ( double  ysigma  )  [inline, inherited]

Definition at line 98 of file DstMucTrack.h.

References DstMucTrack::m_yPosSigma.

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

00098 { m_yPosSigma = ysigma; }

void DstMucTrack::setZPos ( double  z  )  [inline, inherited]

Definition at line 95 of file DstMucTrack.h.

References DstMucTrack::m_zPos.

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

00095 { m_zPos = z; }

void DstMucTrack::setZPosSigma ( double  zsigma  )  [inline, inherited]

Definition at line 99 of file DstMucTrack.h.

References DstMucTrack::m_zPosSigma.

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

00099 { m_zPosSigma = zsigma; }

int DstMucTrack::startPart (  )  const [inline, inherited]

Definition at line 37 of file DstMucTrack.h.

References DstMucTrack::m_startPart.

00037 { return   m_startPart; }    // start position of track locates in which part

int DstMucTrack::status (  )  const [inline, inherited]

Definition at line 34 of file DstMucTrack.h.

References DstMucTrack::m_status.

Referenced by LineFit().

00034 { return   m_status; } 

int DstMucTrack::trackId (  )  const [inline, inherited]

Definition at line 32 of file DstMucTrack.h.

References DstMucTrack::m_trackId.

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

00032 { return   m_trackId ; }

int DstMucTrack::type (  )  const [inline, inherited]

Definition at line 35 of file DstMucTrack.h.

References DstMucTrack::m_type.

00035 { return   m_type;  }

vector<int> DstMucTrack::vecHits (  )  const [inline, inherited]

Definition at line 65 of file DstMucTrack.h.

References DstMucTrack::m_vecHits.

00065 { return  m_vecHits ;}

double DstMucTrack::xPos (  )  const [inline, inherited]

Definition at line 50 of file DstMucTrack.h.

References DstMucTrack::m_xPos.

00050 { return m_xPos; }   // position on the start of track in muc (vertex) 

double DstMucTrack::xPosSigma (  )  const [inline, inherited]

Definition at line 54 of file DstMucTrack.h.

References DstMucTrack::m_xPosSigma.

00054 { return m_xPosSigma; } 

double DstMucTrack::yPos (  )  const [inline, inherited]

Definition at line 51 of file DstMucTrack.h.

References DstMucTrack::m_yPos.

00051 { return m_yPos; }

double DstMucTrack::yPosSigma (  )  const [inline, inherited]

Definition at line 55 of file DstMucTrack.h.

References DstMucTrack::m_yPosSigma.

00055 { return m_yPosSigma; }

double DstMucTrack::zPos (  )  const [inline, inherited]

Definition at line 52 of file DstMucTrack.h.

References DstMucTrack::m_zPos.

00052 { return m_zPos; }

double DstMucTrack::zPosSigma (  )  const [inline, inherited]

Definition at line 56 of file DstMucTrack.h.

References DstMucTrack::m_zPosSigma.

00056 { return m_zPosSigma; }


Member Data Documentation

int RecMucTrack::m_brFirstLayer [private]

Definition at line 369 of file RecMucTrack.h.

Referenced by brFirstLayer(), ComputeLastGap(), RecMucTrack(), and SetDefault().

int DstMucTrack::m_brLastLayer [protected, inherited]

Definition at line 125 of file DstMucTrack.h.

Referenced by DstMucTrack::brLastLayer(), ComputeDepth(), ComputeLastGap(), operator=(), RecMucTrack(), and DstMucTrack::setBrLastLayer().

bool RecMucTrack::m_changeUnit [private]

Definition at line 377 of file RecMucTrack.h.

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

double DstMucTrack::m_chi2 [protected, inherited]

Definition at line 132 of file DstMucTrack.h.

Referenced by DstMucTrack::chi2(), LineFit(), operator=(), RecMucTrack(), and DstMucTrack::setChi2().

Hep3Vector RecMucTrack::m_CurrentDir [private]

Definition at line 364 of file RecMucTrack.h.

Referenced by CorrectDir(), GetCurrentDir(), operator=(), Project(), and SetCurrentDir().

Hep3Vector RecMucTrack::m_CurrentInsct [private]

Definition at line 365 of file RecMucTrack.h.

Referenced by CalculateInsct(), CorrectDir(), CorrectPos(), GetCurrentInsct(), GetHitDistance(), GetHitDistance2(), operator=(), and SetCurrentInsct().

Hep3Vector RecMucTrack::m_CurrentPos [private]

Definition at line 363 of file RecMucTrack.h.

Referenced by CorrectDir(), CorrectPos(), GetCurrentPos(), operator=(), Project(), and SetCurrentPos().

double DstMucTrack::m_deltaPhi [protected, inherited]

Definition at line 149 of file DstMucTrack.h.

Referenced by DstMucTrack::deltaPhi(), LineFit(), operator=(), RecMucTrack(), and DstMucTrack::setDeltaPhi().

double DstMucTrack::m_depth [protected, inherited]

Definition at line 131 of file DstMucTrack.h.

Referenced by ComputeDepth(), DstMucTrack::depth(), LineFit(), operator=(), OutputUnitChange(), RecMucTrack(), and DstMucTrack::setDepth().

float RecMucTrack::m_depth_3 [private]

Definition at line 373 of file RecMucTrack.h.

Referenced by ComputeDepth(), and GetDepth3().

vector<Hep3Vector> RecMucTrack::m_Directions [private]

Definition at line 390 of file RecMucTrack.h.

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

Hep3Vector RecMucTrack::m_Dist_muc_ext [private]

Definition at line 366 of file RecMucTrack.h.

Referenced by ComputeDistanceMatch(), and GetExtMucDistance().

double DstMucTrack::m_distance [protected, inherited]

Definition at line 148 of file DstMucTrack.h.

Referenced by ComputeDistanceMatch(), DstMucTrack::distance(), OutputUnitChange(), and DstMucTrack::setDistance().

vector<float> RecMucTrack::m_distHits [private]

Definition at line 384 of file RecMucTrack.h.

Referenced by getDistHits(), LineFit(), and setDistHits().

vector<float> RecMucTrack::m_distHits_ext [private]

Definition at line 386 of file RecMucTrack.h.

Referenced by getExtDistHits(), pushExtDistHits(), and setExtDistHits().

vector<float> RecMucTrack::m_distHits_quad [private]

Definition at line 385 of file RecMucTrack.h.

Referenced by getQuadDistHits(), LineFit(), and setQuadDistHits().

int DstMucTrack::m_dof [protected, inherited]

Definition at line 133 of file DstMucTrack.h.

Referenced by DstMucTrack::dof(), LineFit(), operator=(), RecMucTrack(), and DstMucTrack::setDof().

int RecMucTrack::m_ecFirstLayer [private]

Definition at line 370 of file RecMucTrack.h.

Referenced by ComputeLastGap(), ecFirstLayer(), RecMucTrack(), and SetDefault().

int DstMucTrack::m_ecLastLayer [protected, inherited]

Definition at line 126 of file DstMucTrack.h.

Referenced by ComputeDepth(), ComputeLastGap(), DstMucTrack::ecLastLayer(), LineFit(), operator=(), RecMucTrack(), and DstMucTrack::setEcLastLayer().

int RecMucTrack::m_ecPart [private]

Definition at line 371 of file RecMucTrack.h.

Referenced by ComputeLastGap(), and RecMucTrack().

int DstMucTrack::m_endPart [protected, inherited]

Definition at line 124 of file DstMucTrack.h.

Referenced by ComputeLastGap(), DstMucTrack::endPart(), LineFit(), operator=(), RecMucTrack(), and DstMucTrack::setEndPart().

vector<int> RecMucTrack::m_expHits [private]

Definition at line 383 of file RecMucTrack.h.

Referenced by getExpHits(), and setExpHits().

Hep3Vector RecMucTrack::m_ExtMucMomentum [private]

Definition at line 357 of file RecMucTrack.h.

Referenced by getExtMucMomentum(), and SetExtMucMomentum().

Hep3Vector RecMucTrack::m_ExtMucPos [private]

Definition at line 356 of file RecMucTrack.h.

Referenced by ComputeDistanceMatch(), Extend(), getExtMucPos(), and SetExtMucPos().

RecExtTrack* RecMucTrack::m_ExtTrack [private]

Definition at line 351 of file RecMucTrack.h.

Referenced by SetExtTrack().

int RecMucTrack::m_ExtTrackID [private]

Definition at line 350 of file RecMucTrack.h.

Referenced by getExtTrackID(), operator=(), SetExtTrack(), and SetExtTrackID().

int RecMucTrack::m_Good3DLine [private]

Definition at line 375 of file RecMucTrack.h.

Referenced by ComputeDepth(), and LineFit().

int RecMucTrack::m_Good3DPart [private]

Definition at line 376 of file RecMucTrack.h.

Referenced by ComputeDepth(), LineFit(), and SetDefault().

int DstMucTrack::m_id [protected, inherited]

Definition at line 119 of file DstMucTrack.h.

Referenced by DstMucTrack::id(), operator=(), RecMucTrack(), and DstMucTrack::setId().

Hep3Vector RecMucTrack::m_IntersectionInner[9] [private]

Definition at line 378 of file RecMucTrack.h.

Referenced by ComputeDepth(), LineFit(), and RecMucTrack().

Hep3Vector RecMucTrack::m_IntersectionOuter[9] [private]

Definition at line 379 of file RecMucTrack.h.

Referenced by ComputeDepth(), LineFit(), and RecMucTrack().

vector<Hep3Vector> RecMucTrack::m_Intersections [private]

Definition at line 389 of file RecMucTrack.h.

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

int DstMucTrack::m_kalbrLastLayer [protected, inherited]

Definition at line 157 of file DstMucTrack.h.

Referenced by DstMucTrack::kalbrLastLayer(), operator=(), RecMucTrack(), and DstMucTrack::setkalbrLastLayer().

double DstMucTrack::m_kaldepth [protected, inherited]

Definition at line 156 of file DstMucTrack.h.

Referenced by DstMucTrack::kaldepth(), operator=(), RecMucTrack(), and DstMucTrack::setkalDepth().

int DstMucTrack::m_kaldof [protected, inherited]

Definition at line 155 of file DstMucTrack.h.

Referenced by DstMucTrack::kaldof(), operator=(), RecMucTrack(), and DstMucTrack::setkalDof().

int DstMucTrack::m_kalecLastLayer [protected, inherited]

Definition at line 158 of file DstMucTrack.h.

Referenced by DstMucTrack::kalecLastLayer(), operator=(), RecMucTrack(), and DstMucTrack::setkalecLastLayer().

double DstMucTrack::m_kalrechi2 [protected, inherited]

Definition at line 154 of file DstMucTrack.h.

Referenced by DstMucTrack::kalRechi2(), operator=(), RecMucTrack(), and DstMucTrack::setkalRechi2().

int DstMucTrack::m_maxHitsInLayer [protected, inherited]

Definition at line 129 of file DstMucTrack.h.

Referenced by ComputeMaxHitsInGap(), DstMucTrack::maxHitsInLayer(), operator=(), RecMucTrack(), and DstMucTrack::setMaxHitsInLayer().

Hep3Vector RecMucTrack::m_MdcMomentum [private]

Definition at line 354 of file RecMucTrack.h.

Referenced by getMdcMomentum(), LineFit(), operator=(), and SetMdcMomentum().

Hep3Vector RecMucTrack::m_MdcPos [private]

Definition at line 353 of file RecMucTrack.h.

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

Hep3Vector RecMucTrack::m_MucMomentum [private]

Definition at line 360 of file RecMucTrack.h.

Referenced by ComputeDepth(), Extend(), getMucMomentum(), LineFit(), operator=(), and SetMucMomentum().

Hep3Vector RecMucTrack::m_MucPos [private]

Definition at line 359 of file RecMucTrack.h.

Referenced by ComputeDistanceMatch(), Extend(), getMucPos(), LineFit(), operator=(), and SetMucPos().

Hep3Vector RecMucTrack::m_MucPosSigma [private]

Definition at line 361 of file RecMucTrack.h.

Referenced by getMucPosSigma(), LineFit(), operator=(), and SetMucPosSigma().

int DstMucTrack::m_numHits [protected, inherited]

Definition at line 127 of file DstMucTrack.h.

Referenced by ComputeNGapsWithHits(), DstMucTrack::numHits(), operator=(), RecMucTrack(), and DstMucTrack::setNumHits().

int DstMucTrack::m_numLayers [protected, inherited]

Definition at line 128 of file DstMucTrack.h.

Referenced by ComputeDepth(), ComputeNGapsWithHits(), GetNGapsWithHits(), DstMucTrack::numLayers(), operator=(), RecMucTrack(), and DstMucTrack::setNumLayers().

vector<MucRecHit*> RecMucTrack::m_pExpectedHits [private]

Definition at line 388 of file RecMucTrack.h.

Referenced by ComputeTrackInfo(), GetExpectedHits(), LineFit(), operator=(), and ~RecMucTrack().

vector<MucRecHit*> RecMucTrack::m_pHits [private]

Definition at line 387 of file RecMucTrack.h.

Referenced by AttachHit(), CalculateInsct(), ComputeDepth(), ComputeDistanceMatch(), ComputeLastGap(), ComputeNGapsWithHits(), ComputeTrackInfo(), GetHit(), GetHitIndices(), GetHitInGap(), GetHitInSegOrient(), GetHits(), GetNSharedHits(), GetTotalHits(), HasHit(), HasHitInGap(), LineFit(), operator=(), and PrintHitsInfo().

double DstMucTrack::m_px [protected, inherited]

Definition at line 144 of file DstMucTrack.h.

Referenced by LineFit(), OutputUnitChange(), DstMucTrack::px(), SetMucMomentum(), and DstMucTrack::setPx().

double DstMucTrack::m_py [protected, inherited]

Definition at line 145 of file DstMucTrack.h.

Referenced by LineFit(), OutputUnitChange(), DstMucTrack::py(), SetMucMomentum(), and DstMucTrack::setPy().

double DstMucTrack::m_pz [protected, inherited]

Definition at line 146 of file DstMucTrack.h.

Referenced by LineFit(), OutputUnitChange(), DstMucTrack::pz(), SetMucMomentum(), and DstMucTrack::setPz().

int RecMucTrack::m_recmode [private]

Definition at line 374 of file RecMucTrack.h.

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

double DstMucTrack::m_rms [protected, inherited]

Definition at line 134 of file DstMucTrack.h.

Referenced by LineFit(), operator=(), RecMucTrack(), DstMucTrack::rms(), and DstMucTrack::setRms().

int DstMucTrack::m_startPart [protected, inherited]

Definition at line 123 of file DstMucTrack.h.

Referenced by operator=(), RecMucTrack(), DstMucTrack::setStartPart(), and DstMucTrack::startPart().

int DstMucTrack::m_status [protected, inherited]

Definition at line 120 of file DstMucTrack.h.

Referenced by LineFit(), operator=(), RecMucTrack(), DstMucTrack::setStatus(), and DstMucTrack::status().

Hep3Vector RecMucTrack::m_StripPhi [private]

Definition at line 367 of file RecMucTrack.h.

Referenced by ComputeDistanceMatch(), and GetMucStripPos().

int DstMucTrack::m_trackId [protected, inherited]

Definition at line 118 of file DstMucTrack.h.

Referenced by setTrackId(), DstMucTrack::setTrackId(), and DstMucTrack::trackId().

int DstMucTrack::m_type [protected, inherited]

Definition at line 121 of file DstMucTrack.h.

Referenced by operator=(), RecMucTrack(), DstMucTrack::setType(), and DstMucTrack::type().

vector<int> RecMucTrack::m_vecHits [private]

Reimplemented from DstMucTrack.

Definition at line 382 of file RecMucTrack.h.

Referenced by getVecHits(), and setVecHits().

double DstMucTrack::m_xPos [protected, inherited]

Definition at line 136 of file DstMucTrack.h.

Referenced by Extend(), LineFit(), OutputUnitChange(), SetMucPos(), DstMucTrack::setXPos(), and DstMucTrack::xPos().

double DstMucTrack::m_xPosSigma [protected, inherited]

Definition at line 140 of file DstMucTrack.h.

Referenced by LineFit(), operator=(), OutputUnitChange(), RecMucTrack(), SetMucPosSigma(), DstMucTrack::setXPosSigma(), and DstMucTrack::xPosSigma().

double DstMucTrack::m_yPos [protected, inherited]

Definition at line 137 of file DstMucTrack.h.

Referenced by Extend(), LineFit(), OutputUnitChange(), SetMucPos(), DstMucTrack::setYPos(), and DstMucTrack::yPos().

double DstMucTrack::m_yPosSigma [protected, inherited]

Definition at line 141 of file DstMucTrack.h.

Referenced by LineFit(), operator=(), OutputUnitChange(), RecMucTrack(), SetMucPosSigma(), DstMucTrack::setYPosSigma(), and DstMucTrack::yPosSigma().

double DstMucTrack::m_zPos [protected, inherited]

Definition at line 138 of file DstMucTrack.h.

Referenced by Extend(), LineFit(), OutputUnitChange(), SetMucPos(), DstMucTrack::setZPos(), and DstMucTrack::zPos().

double DstMucTrack::m_zPosSigma [protected, inherited]

Definition at line 142 of file DstMucTrack.h.

Referenced by LineFit(), operator=(), OutputUnitChange(), RecMucTrack(), SetMucPosSigma(), DstMucTrack::setZPosSigma(), and DstMucTrack::zPosSigma().


Generated on Tue Nov 29 23:20:58 2016 for BOSS_7.0.2 by  doxygen 1.4.7