@@ -420,8 +420,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
420
420
421
421
// Cut #2: dphi difference
422
422
// Ref to original code: https://github.com/slava77/cms-tkph2-ntuple/blob/184d2325147e6930030d3d1f780136bc2dd29ce6/doubletAnalysis.C#L3085
423
- float xn = 0 .f , yn = 0 .f ; // , zn = 0;
424
- float shiftedRt2;
423
+ float xn = 0 .f , yn = 0 .f ;
424
+ float shiftedRt2 = 0 . f ;
425
425
if (modules.sides ()[lowerModuleIndex] != Center) // If barrel and not center it is tilted
426
426
{
427
427
// Shift the hits and calculate new xn, yn position
@@ -462,9 +462,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
462
462
noShiftedDphi = deltaPhi (acc, xLower, yLower, xUpper, yUpper);
463
463
}
464
464
} else {
465
- shiftedX = 0 ;
466
- shiftedY = 0 ;
467
- shiftedZ = 0 ;
465
+ shiftedX = 0 .f ;
466
+ shiftedY = 0 .f ;
467
+ shiftedZ = 0 .f ;
468
+ shiftedRt2 = 0 .f ;
468
469
dPhi = deltaPhi (acc, xLower, yLower, xUpper, yUpper);
469
470
noShiftedDphi = dPhi;
470
471
}
@@ -476,7 +477,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
476
477
// Ref to original code: https://github.com/slava77/cms-tkph2-ntuple/blob/184d2325147e6930030d3d1f780136bc2dd29ce6/doubletAnalysis.C#L3076
477
478
if (modules.sides ()[lowerModuleIndex] != Center) {
478
479
// When it is tilted, use the new shifted positions
479
- // TODO: This is somewhat of an mystery.... somewhat confused why this is the case
480
480
if (modules.moduleLayerType ()[lowerModuleIndex] != Pixel) {
481
481
// dPhi Change should be calculated so that the upper hit has higher rt.
482
482
// In principle, this kind of check rt_lower < rt_upper should not be necessary because the hit shifting should have taken care of this.
0 commit comments