138{
139
143
144
145
146
147
150
154
155
158 surfacePhi *= (
m_flatDist->shoot() > 0.5 ) ? -1. : 1.;
159 double startX = startR*
cos(surfacePhi);
160 double startY = startR*
sin(surfacePhi);
162
163
165 alphaZ *= (
m_flatDist->shoot() > 0.5 ) ? -1. : 1.;
166
167
169 startY,
170 startZ,
172 alphaZ),
173 10e3,10e3);
174
175
177 covMat.setZero();
178
179
185 startSurface,
186 covMat);
187
189
190
191
193
194
195
196 Trk::CylinderSurface estimationCylinder(Amg::
Transform3D(), estimationR, 10e10);
197
198 ATH_MSG_VERBOSE(
"Cylinder to be intersected : " << estimationCylinder );
199
200 auto estimationParameters =
m_propagator->propagateParameters(ctx,
201 startParameters,
202 estimationCylinder,
204 false,
206 if (!estimationParameters) {
207 ATH_MSG_VERBOSE(
"Estimation of intersection did not work - skip event !" );
208 return StatusCode::SUCCESS;
209 }
210
212
213 const Amg::Vector3D& estimatedPosition = estimationParameters->position();
214
215 double estimationX = estimatedPosition.x();
216 double estimationY = estimatedPosition.y();
217 double estimationZ = estimatedPosition.z();
218
219 double estimationPhi = estimatedPosition.phi();
220 double estimationTheta = estimatedPosition.theta();
221
222
223
225 rotateTrans *= (
m_flatDist->shoot() > 0.5 ) ? -1. : 1.;
226
228
230
231 Amg::Vector3D radialVector(estimatedPosition.x(), estimatedPosition.y(), 0.);
234
235 Amg::Vector3D surfaceXdirection(surfaceYdirection.cross(surfaceZdirection));
236
238 surfaceRotation.col(0) = surfaceXdirection;
239 surfaceRotation.col(1) = surfaceYdirection;
240 surfaceRotation.col(2) = surfaceZdirection;
243 } else
245 estimationY,
246 estimationZ,
247 estimationPhi,
248 estimationTheta,
249 rotateTrans);
250
251
252
253 Trk::PlaneSurface destinationSurface(surfaceTransform,10e5 , 10e5);
254
255
256
257 std::optional<Trk::TransportJacobian> optTransportJacobian{};
258 AmgMatrix(5,5) testMatrix; testMatrix.setZero();
259 Trk::TransportJacobian currentStepJacobian(testMatrix);
260 double pathLimit = -1.;
261
263 startParameters,
264 destinationSurface,
266 false,
268 optTransportJacobian,
269 pathLimit);
270
271
272 if (trackParameters && optTransportJacobian){
273
274 unsigned int recStep = 0;
275 const auto& transportJacobian = (*optTransportJacobian);
276
278
279
280
281 m_loc1loc1[recStep] = (transportJacobian)(0,0);
282 m_loc1loc2[recStep] = (transportJacobian)(0,1);
283 m_loc1phi[recStep] = (transportJacobian)(0,2);
285 m_loc1qop[recStep] = (transportJacobian)(0,4);
287
288 m_loc2loc1[recStep] = (transportJacobian)(1,0);
289 m_loc2loc2[recStep] = (transportJacobian)(1,1);
290 m_loc2phi[recStep] = (transportJacobian)(1,2);
292 m_loc2qop[recStep] = (transportJacobian)(1,4);
294
295 m_philoc1[recStep] = (transportJacobian)(2,0);
296 m_philoc2[recStep] = (transportJacobian)(2,1);
297 m_phiphi[recStep] = (transportJacobian)(2,2);
298 m_phitheta[recStep] = (transportJacobian)(2,3);
299 m_phiqop[recStep] = (transportJacobian)(2,4);
301
304 m_thetaphi[recStep] = (transportJacobian)(3,2);
306 m_thetaqop[recStep] = (transportJacobian)(3,4);
308
309 m_qoploc1[recStep] = (transportJacobian)(4,0);
310 m_qoploc2[recStep] = (transportJacobian)(4,1);
311 m_qopphi[recStep] = (transportJacobian)(4,2);
312 m_qoptheta[recStep] = (transportJacobian)(4,3);
313 m_qopqop[recStep] = (transportJacobian)(4,4);
315
316 ++recStep;
317
318
319
321
323
324
327
330
333
336
339
340
341 auto endLoc1Minus =
m_propagator->propagateParameters(ctx,
342 startLoc1Minus,
343 destinationSurface,
345 false,
347
348
349 auto endLoc1Plus =
m_propagator->propagateParameters(ctx,
350 startLoc1Plus,
351 destinationSurface,
353 false,
355
356 auto endLoc2Minus =
m_propagator->propagateParameters(ctx,
357 startLoc2Minus,
358 destinationSurface,
360 false,
362
363 auto endLoc2Plus =
m_propagator->propagateParameters(ctx,
364 startLoc2Plus,
365 destinationSurface,
367 false,
369
370 auto endPhiMinus =
m_propagator->propagateParameters(ctx,
371 startPhiMinus,
372 destinationSurface,
374 false,
376
377 auto endPhiPlus =
m_propagator->propagateParameters(ctx,
378 startPhiPlus,
379 destinationSurface,
381 false,
383
384 auto endThetaMinus =
m_propagator->propagateParameters(ctx,
385 startThetaMinus,
386 destinationSurface,
388 false,
390
391 auto endThetaPlus =
m_propagator->propagateParameters(ctx,
392 startThetaPlus,
393 destinationSurface,
395 false,
397
398 auto endQopMinus =
m_propagator->propagateParameters(ctx,
399 startQopMinus,
400 destinationSurface,
402 false,
404
405 auto endQopPlus =
m_propagator->propagateParameters(ctx,
406 startQopPlus,
407 destinationSurface,
409 false,
411 if (endLoc1Minus
412 && endLoc1Plus
413 && endLoc2Minus
414 && endLoc2Plus
415 && endPhiMinus
416 && endPhiPlus
417 && endThetaMinus
418 && endThetaPlus
419 && endQopMinus
420 && endQopPlus){
421
422
423 const Amg::VectorX& endLoc1MinusPar = endLoc1Minus->parameters();
424 const Amg::VectorX& endLoc1PlusPar = endLoc1Plus->parameters();
425
426 const Amg::VectorX& endLoc2MinusPar = endLoc2Minus->parameters();
427 const Amg::VectorX& endLoc2PlusPar = endLoc2Plus->parameters();
428
429 const Amg::VectorX& endPhiMinusPar = endPhiMinus->parameters();
430 const Amg::VectorX& endPhiPlusPar = endPhiPlus->parameters();
431
432 const Amg::VectorX& endThetaMinusPar = endThetaMinus->parameters();
433 const Amg::VectorX& endThetaPlusPar = endThetaPlus->parameters();
434
435 const Amg::VectorX& endQopMinusPar = endQopMinus->parameters();
436 const Amg::VectorX& endQopPlusPar = endQopPlus->parameters();
437
438
439 Amg::VectorX endLoc1Diff(endLoc1PlusPar-endLoc1MinusPar);
440 Amg::VectorX endLoc2Diff(endLoc2PlusPar-endLoc2MinusPar);
442 Amg::VectorX endThetaDiff(endThetaPlusPar-endThetaMinusPar);
444
450
451 m_loc1loc1[recStep] = currentStepJacobian(0,0);
452 m_loc1loc2[recStep] = currentStepJacobian(0,1);
453 m_loc1phi[recStep] = currentStepJacobian(0,2);
455 m_loc1qop[recStep] = currentStepJacobian(0,4);
457
463
464 m_loc2loc1[recStep] = currentStepJacobian(1,0);
465 m_loc2loc2[recStep] = currentStepJacobian(1,1);
466 m_loc2phi[recStep] = currentStepJacobian(1,2);
468 m_loc2qop[recStep] = currentStepJacobian(1,4);
470
476
477 m_philoc1[recStep] = currentStepJacobian(2,0);
478 m_philoc2[recStep] = currentStepJacobian(2,1);
479 m_phiphi[recStep] = currentStepJacobian(2,2);
480 m_phitheta[recStep] = currentStepJacobian(2,3);
481 m_phiqop[recStep] = currentStepJacobian(2,4);
483
489
492 m_thetaphi[recStep] = currentStepJacobian(3,2);
494 m_thetaqop[recStep] = currentStepJacobian(3,4);
496
502
503 m_qoploc1[recStep] = currentStepJacobian(4,0);
504 m_qoploc2[recStep] = currentStepJacobian(4,1);
505 m_qopphi[recStep] = currentStepJacobian(4,2);
506 m_qoptheta[recStep] = currentStepJacobian(4,3);
507 m_qopqop[recStep] = currentStepJacobian(4,4);
509
510 ATH_MSG_DEBUG(
"Current TransportJacobian : " << currentStepJacobian );
511
512 ++recStep;
513 }
514 }
515
516
517 if (recStep > 2){
518
519
531
543
555
567
579
580 currentStepJacobian(0,0)=
m_loc1loc1[recStep];
581 currentStepJacobian(0,1)=
m_loc1loc2[recStep];
582 currentStepJacobian(0,2)=
m_loc1phi[recStep];
584 currentStepJacobian(0,4)=
m_loc1qop[recStep];
585
586 currentStepJacobian(1,0)=
m_loc2loc1[recStep];
587 currentStepJacobian(1,1)=
m_loc2loc2[recStep];
588 currentStepJacobian(1,2)=
m_loc2phi[recStep];
590 currentStepJacobian(1,4)=
m_loc2qop[recStep];
591
592 currentStepJacobian(2,0)=
m_philoc1[recStep];
593 currentStepJacobian(2,1)=
m_philoc2[recStep];
594 currentStepJacobian(2,2)=
m_phiphi[recStep];
595 currentStepJacobian(2,3)=
m_phitheta[recStep];
596 currentStepJacobian(2,4)=
m_phiqop[recStep];
597
600 currentStepJacobian(3,2)=
m_thetaphi[recStep];
602 currentStepJacobian(3,4)=
m_thetaqop[recStep];
603
604 currentStepJacobian(4,0)=
m_qoploc1[recStep];
605 currentStepJacobian(4,1)=
m_qoploc2[recStep];
606 currentStepJacobian(4,2)=
m_qopphi[recStep];
607 currentStepJacobian(4,3)=
m_qoptheta[recStep];
608 currentStepJacobian(4,4)=
m_qopqop[recStep];
609
610 }
611
612 ATH_MSG_DEBUG(
"Interpolated TransportJacobian : " << currentStepJacobian );
613 ++recStep;
614
615
616
617 TransportJacobian diffMatrix(transportJacobian-currentStepJacobian);
618
619 ATH_MSG_VERBOSE(
"Absolute Differences of the TransportJacobian : " << diffMatrix );
620
621
622
623
630
637
640 m_phiphi[recStep] = diffMatrix(2,2);
642 m_phiqop[recStep] = diffMatrix(2,4);
644
651
654 m_qopphi[recStep] = diffMatrix(4,2);
656 m_qopqop[recStep] = diffMatrix(4,4);
658 ++recStep;
659
660
661 if (recStep > 1){
662
669
676
683
690
697 }
698 ++recStep;
699
700
701
702
703
704 m_loc1loc1[recStep] = std::abs((transportJacobian)(0,0)) > 1
e-50 ? diffMatrix(0,0)/((transportJacobian)(0,0)) : 0.;
705 m_loc1loc2[recStep] = std::abs((transportJacobian)(0,1)) > 1
e-50 ? diffMatrix(0,1)/((transportJacobian)(0,1)) : 0.;
706 m_loc1phi[recStep] = std::abs((transportJacobian)(0,2)) > 1
e-50 ? diffMatrix(0,2)/((transportJacobian)(0,2)) : 0.;
707 m_loc1theta[recStep] = std::abs((transportJacobian)(0,3)) > 1
e-50 ? diffMatrix(0,3)/((transportJacobian)(0,3)) : 0.;
708 m_loc1qop[recStep] = std::abs((transportJacobian)(0,4)) > 1
e-50 ? diffMatrix(0,4)/((transportJacobian)(0,4)) : 0.;
710
711 m_loc2loc1[recStep] = std::abs((transportJacobian)(1,0)) > 1
e-50 ? diffMatrix(1,0)/((transportJacobian)(1,0)) : 0.;
712 m_loc2loc2[recStep] = std::abs((transportJacobian)(1,1)) > 1
e-50 ? diffMatrix(1,1)/((transportJacobian)(1,1)) : 0.;
713 m_loc2phi[recStep] = std::abs((transportJacobian)(1,2)) > 1
e-50 ? diffMatrix(1,2)/((transportJacobian)(1,2)) : 0.;
714 m_loc2theta[recStep] = std::abs((transportJacobian)(1,3)) > 1
e-50 ? diffMatrix(1,3)/((transportJacobian)(1,3)) : 0.;
715 m_loc2qop[recStep] = std::abs((transportJacobian)(1,4)) > 1
e-50 ? diffMatrix(1,4)/((transportJacobian)(1,4)) : 0.;
717
718 m_philoc1[recStep] = std::abs((transportJacobian)(2,0)) > 1
e-50 ? diffMatrix(2,0)/((transportJacobian)(2,0)) : 0.;
719 m_philoc2[recStep] = std::abs((transportJacobian)(2,1)) > 1
e-50 ? diffMatrix(2,1)/((transportJacobian)(2,1)) : 0.;
720 m_phiphi[recStep] = std::abs((transportJacobian)(2,2)) > 1
e-50 ? diffMatrix(2,2)/((transportJacobian)(2,2)) : 0.;
721 m_phitheta[recStep] = std::abs((transportJacobian)(2,3)) > 1
e-50 ? diffMatrix(2,3)/((transportJacobian)(2,3)) : 0.;
722 m_phiqop[recStep] = std::abs((transportJacobian)(2,4)) > 1
e-50 ? diffMatrix(2,4)/((transportJacobian)(2,4)) : 0.;
724
725 m_thetaloc1[recStep] = std::abs((transportJacobian)(3,0)) > 1
e-50 ? diffMatrix(3,0)/((transportJacobian)(3,0)) : 0.;
726 m_thetaloc2[recStep] = std::abs((transportJacobian)(3,1)) > 1
e-50 ? diffMatrix(3,1)/((transportJacobian)(3,1)) : 0.;
727 m_thetaphi[recStep] = std::abs((transportJacobian)(3,2)) > 1
e-50 ? diffMatrix(3,2)/((transportJacobian)(3,2)) : 0.;
728 m_thetatheta[recStep] = std::abs((transportJacobian)(3,3)) > 1
e-50 ? diffMatrix(3,3)/((transportJacobian)(3,3)) : 0.;
729 m_thetaqop[recStep] = std::abs((transportJacobian)(3,4)) > 1
e-50 ? diffMatrix(3,4)/((transportJacobian)(3,4)) : 0.;
731
732 m_qoploc1[recStep] = std::abs((transportJacobian)(4,0)) > 1
e-50 ? diffMatrix(4,0)/((transportJacobian)(4,0)) : 0.;
733 m_qoploc2[recStep] = std::abs((transportJacobian)(4,1)) > 1
e-50 ? diffMatrix(4,1)/((transportJacobian)(4,1)) : 0.;
734 m_qopphi[recStep] = std::abs((transportJacobian)(4,2)) > 1
e-50 ? diffMatrix(4,2)/((transportJacobian)(4,2)) : 0.;
735 m_qoptheta[recStep] = std::abs((transportJacobian)(4,3)) > 1
e-50 ? diffMatrix(4,3)/((transportJacobian)(4,3)) : 0.;
736 m_qopqop[recStep] = std::abs((transportJacobian)(4,4)) > 1
e-50 ? diffMatrix(4,4)/((transportJacobian)(4,4)) : 0.;
738 ++recStep;
739
740
741
748
755
762
769
776 ++recStep;
777
780 }
781
782
783 return StatusCode::SUCCESS;
784}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_VERBOSE(x)
double charge(const T &p)
Eigen::Affine3d Transform3D
#define AmgMatrix(rows, cols)
float m_phisteps[RIDDLERSSTEPS]
DoubleProperty m_maximumR
DoubleProperty m_minimumR
To create the first extimations.
float m_phiqop[RIDDLERSSTEPS]
float m_qopphi[RIDDLERSSTEPS]
float m_loc1theta[RIDDLERSSTEPS]
float m_loc2theta[RIDDLERSSTEPS]
static double parabolicInterpolation(double y0, double y1, double y2, double x0, double x1, double x2)
Langrange-parabolic interpolation.
TTree * m_validationTree
Root Validation Tree.
float m_thetaloc1[RIDDLERSSTEPS]
DoubleArrayProperty m_angularVariations
float m_loc1loc1[RIDDLERSSTEPS]
PublicToolHandle< IPropagator > m_propagator
member variables for algorithm properties:
float m_loc1qop[RIDDLERSSTEPS]
float m_qoptheta[RIDDLERSSTEPS]
float m_qopqop[RIDDLERSSTEPS]
DoubleArrayProperty m_localVariations
variations
float m_loc2steps[RIDDLERSSTEPS]
float m_loc1loc2[RIDDLERSSTEPS]
float m_thetaloc2[RIDDLERSSTEPS]
float m_loc2qop[RIDDLERSSTEPS]
float m_phiphi[RIDDLERSSTEPS]
float m_phitheta[RIDDLERSSTEPS]
float m_philoc2[RIDDLERSSTEPS]
float m_philoc1[RIDDLERSSTEPS]
float m_loc2loc2[RIDDLERSSTEPS]
float m_loc2phi[RIDDLERSSTEPS]
float m_qoploc1[RIDDLERSSTEPS]
static Amg::Transform3D createTransform(double x, double y, double z, double phi=0., double theta=0., double alphaZ=0.)
private helper method to create a HepTransform
float m_qoploc2[RIDDLERSSTEPS]
float m_thetaqop[RIDDLERSSTEPS]
DoubleProperty m_sigmaLoc
The smearing.
float m_thetaphi[RIDDLERSSTEPS]
DoubleArrayProperty m_qOpVariations
float m_qopsteps[RIDDLERSSTEPS]
float m_loc1steps[RIDDLERSSTEPS]
float m_thetasteps[RIDDLERSSTEPS]
float m_loc1phi[RIDDLERSSTEPS]
float m_thetatheta[RIDDLERSSTEPS]
BooleanProperty m_useAlignedSurfaces
float m_loc2loc1[RIDDLERSSTEPS]
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
@ loc2
generic first and second local coordinate
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane