Changeset e55f5b0 in git for modules/ParticlePropagator.cc
- Timestamp:
- Aug 23, 2016, 3:20:20 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 91acc76
- Parents:
- 443f093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ParticlePropagator.cc
r443f093 re55f5b0 100 100 { 101 101 fBeamSpotInputArray = 0; 102 } 102 } 103 103 // create output arrays 104 104 … … 133 133 Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha; 134 134 Double_t bsx, bsy, bsz; 135 135 136 136 const Double_t c_light = 2.99792458E8; 137 138 if (!fBeamSpotInputArray || fBeamSpotInputArray->GetSize () == 0) 137 138 if (!fBeamSpotInputArray || fBeamSpotInputArray->GetSize () == 0) 139 139 beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 140 140 else … … 143 143 beamSpotPosition = beamSpotCandidate.Position; 144 144 } 145 145 146 146 fItInputArray->Reset(); 147 147 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 152 152 y = candidatePosition.Y()*1.0E-3; 153 153 z = candidatePosition.Z()*1.0E-3; 154 154 155 155 bsx = beamSpotPosition.X()*1.0E-3; 156 156 bsy = beamSpotPosition.Y()*1.0E-3; 157 157 bsz = beamSpotPosition.Z()*1.0E-3; 158 158 159 159 q = candidate->Charge; 160 160 … … 206 206 y_t = y + py*t; 207 207 z_t = z + pz*t; 208 208 209 209 l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z)); 210 210 … … 215 215 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3); 216 216 candidate->L = l*1.0E3; 217 217 218 218 candidate->Momentum = candidateMomentum; 219 219 candidate->AddCandidate(mother); … … 267 267 yd = (rc2 > 0.0) ? yd / rc2 : -999; 268 268 zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt; 269 269 270 270 // use perigee momentum rather than original particle 271 // momentum, since the orignal particle momentum isn't known 272 271 // momentum, since the orignal particle momentum isn't known 272 273 273 px = TMath::Sign(1.0,r) * pt * (-y_c / r_c); 274 274 py = TMath::Sign(1.0,r) * pt * (x_c / r_c); 275 275 etap = candidateMomentum.Eta(); 276 276 phip = TMath::ATan2(py, px); 277 277 278 278 candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E()); 279 279 280 280 // calculate additional track parameters (correct for beamspot position) 281 281 282 282 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt; 283 283 dz = z - ((x - bsx) * px + (y - bsy) * py) / pt * (pz / pt); 284 284 p = candidateMomentum.P(); 285 285 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ()); 286 286 287 287 288 // 3. time evaluation t = TMath::Min(t_r, t_z) 288 289 // t_r : time to exit from the sides … … 330 331 r_t = TMath::Hypot(x_t, y_t); 331 332 332 333 333 334 // compute path length for an helix 334 335 335 336 alpha = pz*1.0E9 / c_light / gammam; 336 337 l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega); 337 338 338 339 if(r_t > 0.0) 339 340 { 340 341 341 342 // store these variables before cloning 342 343 343 candidate->D0 = d0*1.0E3; 344 344 candidate->DZ = dz*1.0E3; … … 347 347 candidate->CtgTheta = ctgTheta; 348 348 candidate->Phi = phip; 349 349 350 350 mother = candidate; 351 351 candidate = static_cast<Candidate*>(candidate->Clone()); … … 355 355 356 356 candidate->Momentum = candidateMomentum; 357 357 358 358 candidate->L = l*1.0E3; 359 359 360 360 candidate->Xd = xd*1.0E3; 361 361 candidate->Yd = yd*1.0E3;
Note:
See TracChangeset
for help on using the changeset viewer.