Changeset a95da74 in git for external/TrackCovariance/TrkUtil.cc
- Timestamp:
- Apr 28, 2021, 9:35:32 AM (4 years ago)
- Branches:
- master
- Children:
- d4fb268
- Parents:
- 4739226
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/TrackCovariance/TrkUtil.cc
r4739226 ra95da74 233 233 } 234 234 // 235 236 // 237 void TrkUtil::SetBfield(Double_t Bz) 238 { 239 fBz = Bz; 240 } 241 235 242 // Setup chamber volume 236 243 void TrkUtil::SetDchBoundaries(Double_t Rmin, Double_t Rmax, Double_t Zmin, Double_t Zmax) … … 267 274 // << ", C= " << C << ", z0= " << z0 << ", ct= " << ct << std::endl; 268 275 // 269 // Track length per unit phase change 276 // Track length per unit phase change 270 277 Double_t Scale = sqrt(1.0 + ct*ct) / (2.0*TMath::Abs(C)); 271 278 // 272 279 // Find intersections with chamber boundaries 273 280 // 274 Double_t phRin = 0.0; // phase of inner cylinder 281 Double_t phRin = 0.0; // phase of inner cylinder 275 282 Double_t phRin2= 0.0; // phase of inner cylinder intersection (2nd branch) 276 283 Double_t phRhi = 0.0; // phase of outer cylinder intersection … … 287 294 //std::cout << "Rin intersection: ph = " << ph<<", z= "<<z << std::endl; 288 295 289 if (z < fZmax && z > fZmin) phRin = TMath::Abs(ph); // Intersection inside chamber volume 296 if (z < fZmax && z > fZmin) phRin = TMath::Abs(ph); // Intersection inside chamber volume 290 297 // 291 298 // Include second branch of loopers … … 301 308 Double_t ph = 2 * asin(C*sqrt((fRmax*fRmax - D*D) / (1.0 + 2.0*C*D))); 302 309 Double_t z = z0 + ct*ph / (2.0*C); 303 if (z < fZmax && z > fZmin) phRhi = TMath::Abs(ph); // Intersection inside chamber volume 310 if (z < fZmax && z > fZmin) phRhi = TMath::Abs(ph); // Intersection inside chamber volume 304 311 } 305 312 // ... with left wall … … 309 316 Double_t ph = 2.0*C*Zdir; 310 317 Double_t Rint = sqrt(D*D + (1.0 + 2.0*C*D)*pow(sin(ph / 2), 2) / (C*C)); 311 if (Rint < fRmax && Rint > fRmin) phZmn = TMath::Abs(ph); // Intersection inside chamber volume 318 if (Rint < fRmax && Rint > fRmin) phZmn = TMath::Abs(ph); // Intersection inside chamber volume 312 319 } 313 320 // ... with right wall … … 317 324 Double_t ph = 2.0*C*Zdir; 318 325 Double_t Rint = sqrt(D*D + (1.0 + 2.0*C*D)*pow(sin(ph / 2), 2) / (C*C)); 319 if (Rint < fRmax && Rint > fRmin) phZmx = TMath::Abs(ph); // Intersection inside chamber volume 326 if (Rint < fRmax && Rint > fRmin) phZmx = TMath::Abs(ph); // Intersection inside chamber volume 320 327 } 321 328 // … … 390 397 // 391 398 // 392 Double_t TrkUtil::Nclusters(Double_t begam) 399 Double_t TrkUtil::Nclusters(Double_t begam) 393 400 { 394 401 Int_t Opt = fGasSel; … … 465 472 { 466 473 case 0: std::copy(ncl_He_Iso, ncl_He_Iso + Npt, ncl); // He-Isobutane 467 break; 474 break; 468 475 case 1: std::copy(ncl_He, ncl_He + Npt, ncl); // pure He 469 476 break; … … 493 500 TVectorD coeff = Xval * y; 494 501 Double_t interp = coeff[0] + coeff[1] * begam + coeff[2] * begam * begam; 495 //std::cout << "val1= (" <<x(0)<<", "<< y(0) << "), val2= (" 496 // <<x(1)<<", "<< y(1) << "), val3= (" 502 //std::cout << "val1= (" <<x(0)<<", "<< y(0) << "), val2= (" 503 // <<x(1)<<", "<< y(1) << "), val3= (" 497 504 // <<x(2)<<", "<< y(2) 498 505 // << "), result= (" <<begam<<", "<< interp<<")" << std::endl;
Note:
See TracChangeset
for help on using the changeset viewer.