Changes in modules/ParticlePropagator.cc [9330b7b:e55f5b0] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ParticlePropagator.cc
r9330b7b re55f5b0 86 86 return; 87 87 } 88 89 fRadiusMax = GetDouble("RadiusMax", fRadius);90 fHalfLengthMax = GetDouble("HalfLengthMax", fHalfLength);91 88 92 89 // import array with output from filter/classifier module … … 163 160 164 161 // check that particle position is inside the cylinder 165 if(TMath::Hypot(x, y) > fRadius Max || TMath::Abs(z) > fHalfLengthMax)162 if(TMath::Hypot(x, y) > fRadius || TMath::Abs(z) > fHalfLength) 166 163 { 167 164 continue; … … 180 177 } 181 178 182 if(TMath::Hypot(x, y) > fRadius || TMath::Abs(z) > fHalfLength) 183 { 184 mother = candidate; 185 candidate = static_cast<Candidate*>(candidate->Clone()); 186 187 candidate->InitialPosition = candidatePosition; 188 candidate->Position = candidatePosition; 189 candidate->L = 0.0; 190 191 candidate->Momentum = candidateMomentum; 192 candidate->AddCandidate(mother); 193 194 fOutputArray->Add(candidate); 195 } 196 else if(TMath::Abs(q) < 1.0E-9 || TMath::Abs(fBz) < 1.0E-9) 179 if(TMath::Abs(q) < 1.0E-9 || TMath::Abs(fBz) < 1.0E-9) 197 180 { 198 181 // solve pt2*t^2 + 2*(px*x + py*y)*t - (fRadius2 - x*x - y*y) = 0 … … 288 271 // momentum, since the orignal particle momentum isn't known 289 272 290 px = TMath::Sign(1.0, 291 py = TMath::Sign(1.0, 273 px = TMath::Sign(1.0,r) * pt * (-y_c / r_c); 274 py = TMath::Sign(1.0,r) * pt * (x_c / r_c); 292 275 etap = candidateMomentum.Eta(); 293 276 phip = TMath::ATan2(py, px); … … 297 280 // calculate additional track parameters (correct for beamspot position) 298 281 299 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt;282 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt; 300 283 dz = z - ((x - bsx) * px + (y - bsy) * py) / pt * (pz / pt); 301 284 p = candidateMomentum.P(); 302 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ());285 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ()); 303 286 304 287 … … 318 301 else 319 302 { 320 asinrho = TMath::ASin( (fRadius*fRadius - r_c*r_c - r*r) / (2*TMath::Abs(r)*r_c));303 asinrho = TMath::ASin( (fRadius*fRadius - r_c*r_c - r*r) / (2*TMath::Abs(r)*r_c) ); 321 304 delta = phi_0 - phi; 322 305 if(delta <-TMath::Pi()) delta += 2*TMath::Pi(); … … 373 356 candidate->Momentum = candidateMomentum; 374 357 375 candidate->L =l*1.0E3;376 377 358 candidate->L = l*1.0E3; 359 360 candidate->Xd = xd*1.0E3; 378 361 candidate->Yd = yd*1.0E3; 379 362 candidate->Zd = zd*1.0E3;
Note:
See TracChangeset
for help on using the changeset viewer.