Changes in external/TrackCovariance/SolTrack.cc [3a105e5:ebf40fd] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/SolTrack.cc
r3a105e5 rebf40fd 176 176 { 177 177 // 178 // Return lists of hits associated to a track including all scattering layers. 178 // Return lists of hits associated to a track including all scattering layers. 179 179 // Return value is the total number of measurement hits 180 180 // kmh = total number of measurement layers hit for given type … … 190 190 { 191 191 Double_t R; Double_t phi; Double_t zz; 192 if (HitLayer(i, R, phi, zz)) 192 if (HitLayer(i, R, phi, zz)) 193 193 { 194 194 zhh[kh] = zz; … … 207 207 { 208 208 // 209 // Return lists of hits associated to a track for all measurement layers. 209 // Return lists of hits associated to a track for all measurement layers. 210 210 // Return value is the total number of measurement hits 211 211 // kmh = total number of measurement layers hit for given type … … 234 234 } 235 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 }277 //278 236 // Track plot 279 237 // … … 327 285 // 328 286 // 329 // Input flags: 287 // Input flags: 330 288 // Res = .TRUE. turn on resolution effects/Use standard resolutions 331 289 // .FALSE. set all resolutions to 0 … … 410 368 nz = 1.0; 411 369 } 412 Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p(); 370 Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p(); 413 371 Double_t Rlf = fG->lTh(i) / (corr*fG->lX0(i)); // Rad. length fraction 414 372 thms[ii] = 0.0136*TMath::Sqrt(Rlf)*(1.0 + 0.038*TMath::Log(Rlf)) / p(); // MS angle … … 438 396 Int_t ityp = fG->lTyp(i); // Layer type Barrel or Z 439 397 Int_t nmeai = fG->lND(i); // # measurements in layer 440 398 441 399 if (fG->isMeasure(i)) 442 400 { … … 470 428 Rm(im, 2) = csa * dRphi(2) - ssa * dRz(2); // C derivative 471 429 Rm(im, 3) = csa * dRphi(3) - ssa * dRz(3); // z0 derivative 472 Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4); // cot(theta) derivative 430 Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4); // cot(theta) derivative 473 431 } 474 432 if (ityp == 2) // Z type layer (Measure R-phi at const. Z) … … 531 489 { 532 490 Double_t strk = 0; 533 if (nmk + 1 == 1) strk = fG->lStU(k); // Stereo angle upper 491 if (nmk + 1 == 1) strk = fG->lStU(k); // Stereo angle upper 534 492 if (nmk + 1 == 2) strk = fG->lStL(k); // Stereo angle lower 535 493 //if (im == km && Res) Sm(im, km) += sig*sig; // Detector resolution on diagonal … … 542 500 // 543 501 // Loop on all layers below for MS contributions 544 for (Int_t jj = 0; jj < kk; jj++) 502 for (Int_t jj = 0; jj < kk; jj++) 545 503 { 546 504 Double_t di = dik(ii, jj);
Note:
See TracChangeset
for help on using the changeset viewer.