Changeset b594101 in git
- Timestamp:
- Dec 19, 2014, 11:39:10 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 764f12a0
- Parents:
- c59be54
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ParticlePropagator.cc
rc59be54 rb594101 120 120 Double_t tmp, discr, discr2; 121 121 Double_t delta, gammam, omega, asinrho; 122 Double_t ang_mom,rcu, rc2, dxy, xd, yd, zd;123 122 Double_t rcu, rc2, dxy, xd, yd, zd; 123 124 124 const Double_t c_light = 2.99792458E8; 125 125 … … 158 158 discr2 = pt2*fRadius2 - tmp*tmp; 159 159 160 if(discr2 < 0 )160 if(discr2 < 0.0) 161 161 { 162 162 // no solutions … … 168 168 t1 = (-tmp + discr)/pt2; 169 169 t2 = (-tmp - discr)/pt2; 170 t = (t1 < 0 ) ? t2 : t1;170 t = (t1 < 0.0) ? t2 : t1; 171 171 172 172 z_t = z + pz*t; … … 175 175 t3 = (+fHalfLength - z) / pz; 176 176 t4 = (-fHalfLength - z) / pz; 177 t = (t3 < 0 ) ? t4 : t3;177 t = (t3 < 0.0) ? t4 : t3; 178 178 } 179 179 … … 209 209 { 210 210 211 // 1. initial transverse momentum p_{T0} 212 // initial transverse momentum direction \phi_0 = -atan(p_X0/p_Y0)213 // relativistic gamma : gamma = E/mc² ; gammam = gamma \timesm214 // g iration frequency \omega = q/(gamma m) fBz215 // helix radius r = p_ T0/ (omega gamma m)216 217 gammam = e*1.0E9 / (c_light*c_light); // gammam in [eV/c ²]218 omega = q * fBz / (gammam); // omega is here in [ 89875518 /s]211 // 1. initial transverse momentum p_{T0}: Part->pt 212 // initial transverse momentum direction phi_0 = -atan(p_X0/p_Y0) 213 // relativistic gamma: gamma = E/mc^2; gammam = gamma * m 214 // gyration frequency omega = q/(gamma m) fBz 215 // helix radius r = p_{T0} / (omega gamma m) 216 217 gammam = e*1.0E9 / (c_light*c_light); // gammam in [eV/c^2] 218 omega = q * fBz / (gammam); // omega is here in [89875518/s] 219 219 r = pt / (q * fBz) * 1.0E9/c_light; // in [m] 220 220 221 phi_0 = TMath::ATan2(py, px); // [rad] in [-pi ;pi]221 phi_0 = TMath::ATan2(py, px); // [rad] in [-pi, pi] 222 222 223 223 // 2. helix axis coordinates … … 231 231 rcu = TMath::Abs(r); 232 232 rc2 = r_c*r_c; 233 233 234 234 // calculate coordinates of closest approach to track circle in transverse plane xd, yd, zd 235 xd = x_c*x_c*x_c - x_c*rcu*r_c + x_c*y_c*y_c; 236 xd = ( rc2 > 0.0) ? xd / rc2 : -999;237 yd 238 yd = ( rc2 > 0.0) ? yd / rc2 : -999;239 zd = z + (TMath::Sqrt(xd*xd+yd*yd) - TMath::Sqrt(x*x+y*y))*pz/pt;235 xd = x_c*x_c*x_c - x_c*rcu*r_c + x_c*y_c*y_c; 236 xd = (rc2 > 0.0) ? xd / rc2 : -999; 237 yd = y_c*(-rcu*r_c + rc2); 238 yd = (rc2 > 0.0) ? yd / rc2 : -999; 239 zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt; 240 240 241 241 // calculate impact paramater 242 ang_mom = (xd*py - yd*px); 243 dxy = ang_mom/pt; 244 245 242 dxy = (xd*py - yd*px)/pt; 243 246 244 // 3. time evaluation t = TMath::Min(t_r, t_z) 247 245 // t_r : time to exit from the sides … … 270 268 t6 = (delta - TMath::Pi() + asinrho) / omega; 271 269 272 if(t1 < 0 ) t1 = 1.0E99;273 if(t2 < 0 ) t2 = 1.0E99;274 if(t3 < 0 ) t3 = 1.0E99;275 if(t4 < 0 ) t4 = 1.0E99;276 if(t5 < 0 ) t5 = 1.0E99;277 if(t6 < 0 ) t6 = 1.0E99;270 if(t1 < 0.0) t1 = 1.0E99; 271 if(t2 < 0.0) t2 = 1.0E99; 272 if(t3 < 0.0) t3 = 1.0E99; 273 if(t4 < 0.0) t4 = 1.0E99; 274 if(t5 < 0.0) t5 = 1.0E99; 275 if(t6 < 0.0) t6 = 1.0E99; 278 276 279 277 t_ra = TMath::Min(t1, TMath::Min(t2, t3)); … … 297 295 298 296 candidate->Momentum = candidateMomentum; 299 candidate->Xd = xd*1.0E3; 300 297 candidate->Xd = xd*1.0E3; 298 candidate->Yd = yd*1.0E3; 301 299 candidate->Zd = zd*1.0E3; 302 303 300 301 candidate->AddCandidate(mother); 304 302 305 303 fOutputArray->Add(candidate);
Note:
See TracChangeset
for help on using the changeset viewer.