Changes in external/TrackCovariance/SolTrack.cc [00b14d5:ebf40fd] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/SolTrack.cc
r00b14d5 rebf40fd 232 232 // 233 233 return kmh; 234 }235 //236 Int_t SolTrack::FirstHit(Double_t &Xfirst, Double_t &Yfirst, Double_t &Zfirst)237 {238 Int_t iFirst = -1;239 Int_t iFirstLay = -1; // Default return with no hits240 Xfirst = 0.;241 Yfirst = 0.;242 Zfirst = 0.;243 Int_t Nmh = nmHit(); // # measurement hits244 if(Nmh > 0){245 Int_t *ih = new Int_t [Nmh];246 Double_t *Xh = new Double_t[Nmh];247 Double_t *Yh = new Double_t[Nmh];248 Double_t *Zh = new Double_t[Nmh];249 Double_t *dh = new Double_t[Nmh];250 //251 Int_t n = HitListXYZ(ih, Xh, Yh, Zh);252 //253 for(Int_t i=0; i<Nmh; i++){254 Double_t rr = TMath::Sqrt(Xh[i]*Xh[i]+Yh[i]*Yh[i]); // Hit radius255 dh[i] = TMath::ASin(C() * TMath::Sqrt((rr * rr - D() * D()) / (1. + 2 * C() * D()))) / C(); // Arc length traveled256 }257 //258 Int_t *hord = new Int_t[Nmh]; // hit order by increasing arc length259 TMath::Sort(Nmh, dh, hord, kFALSE); // Order by increasing arc length260 iFirst = hord[0]; // First hit pointer261 Xfirst = Xh[iFirst];262 Yfirst = Yh[iFirst];263 Zfirst = Zh[iFirst];264 iFirstLay = ih[iFirst];265 //266 // Clean267 delete [] ih;268 delete [] Xh;269 delete [] Yh;270 delete [] Zh;271 delete [] dh;272 delete [] hord;273 }274 //275 return iFirstLay; // Return first hit layer number276 234 } 277 235 //
Note:
See TracChangeset
for help on using the changeset viewer.