#include <TrackCam.h>
Public Member Functions | |
| TrackCam (CandSliceHandle *slice) | |
| virtual | ~TrackCam () |
| CandSliceHandle * | GetCandSliceHandle () const |
| int | GetBegPlane () const |
| int | GetEndPlane () const |
| void | AddHit (HitCam *hit) |
| bool | ContainsHit (HitCam *hit) const |
| HitCam * | GetHit (unsigned int i) const |
| double | GetBegTPos () |
| double | GetEndTPos () |
| double | GetDir (int Plane1, int Plane2) |
| double | GetBegDir () |
| double | GetEndDir () |
| double | GetBegZPos () const |
| double | GetEndZPos () const |
| int | GetPlaneView () const |
| unsigned int | GetEntries () const |
| int | GetUID () const |
| void | SetUID (int UIDNum) |
| void | SetPartner (TrackCam *objtrk) |
| TrackCam * | GetPartner () const |
Private Attributes | |
| CandSliceHandle * | fSlice |
| int | fBegPlane |
| int | fEndPlane |
| double | fBegZ |
| double | fEndZ |
| int | fUID |
| TrackCam * | fPartner |
| int | fPlaneView |
| vector< HitCam * > | HitsInTrack |
|
|
Definition at line 18 of file TrackCam.cxx. 00018 : 00019 fSlice(0), fBegPlane(999), fEndPlane(-999), fBegZ(999.), fEndZ(-999.), 00020 fUID(0), fPartner(0), fPlaneView(-1) 00021 { 00022 fSlice = slice; 00023 }
|
|
|
Definition at line 28 of file TrackCam.cxx. References HitsInTrack. 00029 {
00030 HitsInTrack.clear();
00031 }
|
|
|
Definition at line 36 of file TrackCam.cxx. References ContainsHit(), fBegPlane, fBegZ, fEndPlane, fEndZ, fPlaneView, GetEntries(), HitCam::GetPlane(), HitCam::GetPlaneView(), HitCam::GetZPos(), and HitsInTrack. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::FillGapsInTrack(), AlgTrackCamList::Form3DTracks(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00037 {
00038 if(this->GetEntries()==0) { fPlaneView=hit->GetPlaneView(); }
00039
00040 if(this->ContainsHit(hit)==true) {return;}
00041 HitsInTrack.push_back(hit);
00042
00043 if( fBegPlane > hit->GetPlane()){ fBegPlane = hit->GetPlane(); fBegZ = hit->GetZPos();}
00044 if( fEndPlane < hit->GetPlane()){ fEndPlane = hit->GetPlane(); fEndZ = hit->GetZPos();}
00045
00046 return;
00047 }
|
|
|
Definition at line 52 of file TrackCam.cxx. References HitsInTrack. Referenced by AddHit(). 00053 {
00054 for(unsigned int i=0; i<HitsInTrack.size(); ++i) {
00055 if(hit==HitsInTrack[i]) {return true;}
00056 }
00057
00058 return false;
00059 }
|
|
|
Definition at line 191 of file TrackCam.cxx. References fBegPlane, and GetDir(). Referenced by AlgTrackCamList::ExtendTrack(), and AlgTrackCamList::MatchUV(). 00192 {
00193 return this->GetDir(fBegPlane,fBegPlane+10);
00194 }
|
|
|
Definition at line 27 of file TrackCam.h. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::FillGapsInTrack(), AlgTrackCamList::Form3DTracks(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCam::RunAlg(). 00027 {return fBegPlane;};
|
|
|
Definition at line 73 of file TrackCam.cxx. References HitCam::GetPlane(), HitCam::GetTPos(), and HitsInTrack. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCam::ExtractHitProperties(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00074 {
00075 double tot=0.0,begt=0.0;
00076 unsigned int nhits = HitsInTrack.size();
00077
00078 for(unsigned int i=0; i<nhits; ++i) {
00079 //find the hits on the first plane in the track
00080 HitCam* hit = HitsInTrack[i];
00081
00082 if(hit->GetPlane()==fBegPlane) {
00083 begt+=hit->GetTPos();
00084 tot+=1.0;
00085 }
00086 }
00087 if(tot>0) return (begt/tot);
00088 else return 0;
00089 }
|
|
|
Definition at line 38 of file TrackCam.h. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00038 {return fBegZ;};
|
|
|
Definition at line 25 of file TrackCam.h. 00025 {return fSlice;};
|
|
||||||||||||
|
Definition at line 115 of file TrackCam.cxx. References HitCam::GetPlane(), HitCam::GetTPos(), HitCam::GetZPos(), and HitsInTrack. Referenced by GetBegDir(), and GetEndDir(). 00116 {
00117 double z=0.0,t=0.0;
00118 double sw=0.0,swx=0.0,swx2=0.0;
00119 double swy=0.0,swyx=0.0;
00120 unsigned int nhits = HitsInTrack.size();
00121
00122 int Counter=0; int ThisPlane; int LastPlaneAdded=-999;
00123
00124 for(unsigned int i=0; i<nhits; ++i) {
00125 HitCam* hit = HitsInTrack[i];
00126
00127 ThisPlane=hit->GetPlane();
00128
00129 //find the hits in the correct region of the track
00130 if(ThisPlane>=Plane1 && ThisPlane<=Plane2) {
00131 z=hit->GetZPos();
00132 t=hit->GetTPos();
00133 sw+=1.0;
00134 swx+=z;
00135 swx2+=z*z;
00136 swy+=t;
00137 swyx+=t*z;
00138
00139 Counter++; LastPlaneAdded=ThisPlane;
00140 }
00141 }
00142
00143
00144 // If we haven't added enough hits to the straight-line fit.
00145 // Only likely to affect ND track extrapolation.
00147 if(Counter==1) {
00148 HitCam* NextHit = 0;
00149 int MaxPlane=-20; int MinPlane=500;
00150
00151 if(LastPlaneAdded==Plane1) {
00152 for(unsigned int i=0; i<nhits; ++i) {
00153 HitCam* hit = HitsInTrack[i];
00154 ThisPlane=hit->GetPlane();
00155
00156 if(ThisPlane>Plane1 && ThisPlane<MinPlane) {MinPlane=ThisPlane; NextHit=hit;}
00157 }
00158 }
00159
00160 else if(LastPlaneAdded==Plane2) {
00161 for(unsigned int i=0; i<nhits; ++i) {
00162 HitCam* hit = HitsInTrack[i];
00163 ThisPlane=hit->GetPlane();
00164
00165 if(ThisPlane<Plane2 && ThisPlane>MaxPlane) {MaxPlane=ThisPlane; NextHit=hit;}
00166 }
00167 }
00168
00169 // Add extra hit to the fit.
00170 if(NextHit) {
00171 z=NextHit->GetZPos();
00172 t=NextHit->GetTPos();
00173 sw+=1.0;
00174 swx+=z;
00175 swx2+=z*z;
00176 swy+=t;
00177 swyx+=t*z;
00178 }
00179 }
00181
00182
00183 if((swx*swx-sw*swx2)!=0) {return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);}
00184
00185 else return 0;
00186 }
|
|
|
Definition at line 199 of file TrackCam.cxx. References fEndPlane, and GetDir(). Referenced by AlgTrackCamList::ExtendTrack(), and AlgTrackCamList::MatchUV(). 00200 {
00201 return this->GetDir(fEndPlane-10,fEndPlane);
00202 }
|
|
|
Definition at line 28 of file TrackCam.h. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::FillGapsInTrack(), AlgTrackCamList::Form3DTracks(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCam::RunAlg(). 00028 {return fEndPlane;};
|
|
|
Definition at line 94 of file TrackCam.cxx. References HitCam::GetPlane(), HitCam::GetTPos(), and HitsInTrack. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCam::ExtractHitProperties(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00095 {
00096 double tot=0.0,endt=0.0;
00097 unsigned int nhits = HitsInTrack.size();
00098
00099 for(unsigned int i=0; i<nhits; ++i) {
00100 //find the hits on the first plane in the track
00101 HitCam* hit = HitsInTrack[i];
00102
00103 if(hit->GetPlane()==fEndPlane) {
00104 endt+=hit->GetTPos();
00105 tot+=1.0;
00106 }
00107 }
00108 if(tot>0) return (endt/tot);
00109 else return 0;
00110 }
|
|
|
Definition at line 39 of file TrackCam.h. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00039 {return fEndZ;};
|
|
|
Definition at line 41 of file TrackCam.h. References HitsInTrack. Referenced by AddHit(), AlgTrackCam::ExtractHitProperties(), AlgTrackCamList::FillGapsInTrack(), AlgTrackCamList::Form3DTracks(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00041 {return HitsInTrack.size();};
|
|
|
Definition at line 64 of file TrackCam.cxx. References HitsInTrack. Referenced by AlgTrackCam::ExtractHitProperties(), AlgTrackCamList::FillGapsInTrack(), AlgTrackCamList::Form3DTracks(), AlgTrackCamList::LookForHitsAcrossGap(), and AlgTrackCamList::MatchUV(). 00065 {
00066 if(i<HitsInTrack.size()) {return HitsInTrack[i];}
00067 else {return 0;}
00068 }
|
|
|
Definition at line 47 of file TrackCam.h. Referenced by AlgTrackCam::ExtractHitProperties(). 00047 {return fPartner;};
|
|
|
Definition at line 40 of file TrackCam.h. Referenced by AlgTrackCamList::ExtendTrack(), AlgTrackCamList::FillGapsInTrack(), and AlgTrackCamList::LookForHitsAcrossGap(). 00040 {return fPlaneView;};
|
|
|
Definition at line 43 of file TrackCam.h. 00043 {return fUID;};
|
|
|
Definition at line 46 of file TrackCam.h. References fPartner. Referenced by AlgTrackCamList::Form3DTracks(). 00046 {fPartner=objtrk;};
|
|
|
Definition at line 44 of file TrackCam.h. References fUID. 00044 {fUID=UIDNum;};
|
|
|
Definition at line 52 of file TrackCam.h. Referenced by AddHit(), and GetBegDir(). |
|
|
Definition at line 54 of file TrackCam.h. Referenced by AddHit(). |
|
|
Definition at line 53 of file TrackCam.h. Referenced by AddHit(), and GetEndDir(). |
|
|
Definition at line 55 of file TrackCam.h. Referenced by AddHit(). |
|
|
Definition at line 57 of file TrackCam.h. Referenced by SetPartner(). |
|
|
Definition at line 58 of file TrackCam.h. Referenced by AddHit(). |
|
|
Definition at line 51 of file TrackCam.h. |
|
|
Definition at line 56 of file TrackCam.h. Referenced by SetUID(). |
|
|
Definition at line 60 of file TrackCam.h. Referenced by AddHit(), ContainsHit(), GetBegTPos(), GetDir(), GetEndTPos(), GetEntries(), GetHit(), and ~TrackCam(). |
1.3.9.1