Changes in modules/ParticlePropagator.cc [187fc41:764f12a0] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ParticlePropagator.cc
r187fc41 r764f12a0 66 66 { 67 67 } 68 69 68 70 69 //------------------------------------------------------------------------------ … … 92 91 fItInputArray = fInputArray->MakeIterator(); 93 92 94 // import beamspot95 96 fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle"));97 98 93 // create output arrays 99 94 … … 116 111 { 117 112 Candidate *candidate, *mother; 118 TLorentzVector candidatePosition, candidateMomentum , beamSpotPosition;113 TLorentzVector candidatePosition, candidateMomentum; 119 114 Double_t px, py, pz, pt, pt2, e, q; 120 115 Double_t x, y, z, t, r, phi; … … 125 120 Double_t tmp, discr, discr2; 126 121 Double_t delta, gammam, omega, asinrho; 127 Double_t rcu, rc2, xd, yd, zd; 128 Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha; 129 Double_t bsx, bsy, bsz; 130 122 Double_t rcu, rc2, dxy, xd, yd, zd; 123 131 124 const Double_t c_light = 2.99792458E8; 132 133 if (!fBeamSpotInputArray->GetSize () || !fBeamSpotInputArray->At(0)) 134 beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 135 else 136 { 137 Candidate &beamSpotCandidate = *((Candidate *) fBeamSpotInputArray->At(0)); 138 beamSpotPosition = beamSpotCandidate.Position; 139 } 140 125 141 126 fItInputArray->Reset(); 142 127 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 147 132 y = candidatePosition.Y()*1.0E-3; 148 133 z = candidatePosition.Z()*1.0E-3; 149 150 bsx = beamSpotPosition.X()*1.0E-3;151 bsy = beamSpotPosition.Y()*1.0E-3;152 bsz = beamSpotPosition.Z()*1.0E-3;153 154 134 q = candidate->Charge; 155 135 … … 201 181 y_t = y + py*t; 202 182 z_t = z + pz*t; 203 204 l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z));205 183 206 184 mother = candidate; … … 208 186 209 187 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3); 210 candidate->L = l*1.0E3; 211 188 212 189 candidate->Momentum = candidateMomentum; 213 190 candidate->AddCandidate(mother); … … 261 238 yd = (rc2 > 0.0) ? yd / rc2 : -999; 262 239 zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt; 263 264 // use perigee momentum rather than original particle 265 // momentum, since the orignal particle momentum isn't known 266 267 px = TMath::Sign(1.0,r) * pt * (-y_c / r_c); 268 py = TMath::Sign(1.0,r) * pt * (x_c / r_c); 269 etap = candidateMomentum.Eta(); 270 phip = TMath::ATan2(py, px); 271 272 candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E()); 273 274 // calculate additional track parameters (correct for beamspot position) 275 276 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt; 277 dz = z - ((x - bsx) * px + (py - bsy) * py) / pt * (pz / pt); 278 p = candidateMomentum.P(); 279 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ()); 280 240 241 // calculate impact paramater 242 dxy = (xd*py - yd*px)/pt; 243 281 244 // 3. time evaluation t = TMath::Min(t_r, t_z) 282 245 // t_r : time to exit from the sides … … 324 287 r_t = TMath::Hypot(x_t, y_t); 325 288 326 327 // compute path length for an helix328 329 alpha = pz*1.0E9 / c_light / gammam;330 l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega);331 332 289 if(r_t > 0.0) 333 290 { … … 338 295 339 296 candidate->Momentum = candidateMomentum; 340 341 candidate->L = l*1.0E3; 342 candidate->D0 = d0*1.0E3; 343 candidate->DZ = dz*1.0E3; 344 candidate->P = p; 345 candidate->PT = pt; 346 candidate->CtgTheta = ctgTheta; 347 candidate->Phi = phi; 348 349 candidate->Xd = xd*1.0E3; 297 candidate->Dxy = dxy*1.0E3; 298 candidate->Xd = xd*1.0E3; 350 299 candidate->Yd = yd*1.0E3; 351 300 candidate->Zd = zd*1.0E3;
Note:
See TracChangeset
for help on using the changeset viewer.