Changes in external/TrackCovariance/SolTrack.cc [ebf40fd:3a105e5] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/SolTrack.cc
rebf40fd r3a105e5 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 hits 240 Xfirst = 0.; 241 Yfirst = 0.; 242 Zfirst = 0.; 243 Int_t Nmh = nmHit(); // # measurement hits 244 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 radius 255 dh[i] = TMath::ASin(C() * TMath::Sqrt((rr * rr - D() * D()) / (1. + 2 * C() * D()))) / C(); // Arc length traveled 256 } 257 // 258 Int_t *hord = new Int_t[Nmh]; // hit order by increasing arc length 259 TMath::Sort(Nmh, dh, hord, kFALSE); // Order by increasing arc length 260 iFirst = hord[0]; // First hit pointer 261 Xfirst = Xh[iFirst]; 262 Yfirst = Yh[iFirst]; 263 Zfirst = Zh[iFirst]; 264 iFirstLay = ih[iFirst]; 265 // 266 // Clean 267 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 number 276 } 277 // 236 278 // Track plot 237 279 // … … 285 327 // 286 328 // 287 // Input flags: 329 // Input flags: 288 330 // Res = .TRUE. turn on resolution effects/Use standard resolutions 289 331 // .FALSE. set all resolutions to 0 … … 368 410 nz = 1.0; 369 411 } 370 Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p(); 412 Double_t corr = TMath::Abs(pxi*nx + pyi * ny + pzi * nz) / p(); 371 413 Double_t Rlf = fG->lTh(i) / (corr*fG->lX0(i)); // Rad. length fraction 372 414 thms[ii] = 0.0136*TMath::Sqrt(Rlf)*(1.0 + 0.038*TMath::Log(Rlf)) / p(); // MS angle … … 396 438 Int_t ityp = fG->lTyp(i); // Layer type Barrel or Z 397 439 Int_t nmeai = fG->lND(i); // # measurements in layer 398 440 399 441 if (fG->isMeasure(i)) 400 442 { … … 428 470 Rm(im, 2) = csa * dRphi(2) - ssa * dRz(2); // C derivative 429 471 Rm(im, 3) = csa * dRphi(3) - ssa * dRz(3); // z0 derivative 430 Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4); // cot(theta) derivative 472 Rm(im, 4) = csa * dRphi(4) - ssa * dRz(4); // cot(theta) derivative 431 473 } 432 474 if (ityp == 2) // Z type layer (Measure R-phi at const. Z) … … 489 531 { 490 532 Double_t strk = 0; 491 if (nmk + 1 == 1) strk = fG->lStU(k); // Stereo angle upper 533 if (nmk + 1 == 1) strk = fG->lStU(k); // Stereo angle upper 492 534 if (nmk + 1 == 2) strk = fG->lStL(k); // Stereo angle lower 493 535 //if (im == km && Res) Sm(im, km) += sig*sig; // Detector resolution on diagonal … … 500 542 // 501 543 // Loop on all layers below for MS contributions 502 for (Int_t jj = 0; jj < kk; jj++) 544 for (Int_t jj = 0; jj < kk; jj++) 503 545 { 504 546 Double_t di = dik(ii, jj);
Note:
See TracChangeset
for help on using the changeset viewer.