File tree Expand file tree Collapse file tree
GPU/GPUTracking/DataTypes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,10 +77,11 @@ class trackInterface<o2::track::TrackParCov> : public o2::track::TrackParCov
7777
7878 GPUdi () void setPileUpDistance (unsigned char bwd, unsigned char fwd) { setUserField ((((unsigned short )bwd) << 8 ) | fwd); }
7979 GPUdi () bool hasPileUpInfo () const { return getUserField () != 0 ; }
80- GPUdi () unsigned char getPileUpDistanceBwd () const { return ((unsigned char )getUserField ()) >> 8 ; }
81- GPUdi () unsigned char getPileUpDistanceFwd () const { return ((unsigned char )getUserField ()) & 255 ; }
80+ GPUdi () bool hasPileUpInfoBothSides () const { return getPileUpDistanceBwd () > 0 && getPileUpDistanceFwd () > 0 ; }
81+ GPUdi () unsigned char getPileUpDistanceBwd () const { return getUserField () >> 8 ; }
82+ GPUdi () unsigned char getPileUpDistanceFwd () const { return getUserField () & 255 ; }
8283 GPUdi () unsigned short getPileUpSpan () const { return ((unsigned short )getPileUpDistanceBwd ()) + getPileUpDistanceFwd (); }
83- GPUdi () float getPileUpMean () const { return 0.5 * ((float )getPileUpDistanceFwd ()) - ((float )getPileUpDistanceBwd ()); }
84+ GPUdi () float getPileUpMean () const { return hasPileUpInfoBothSides () ? 0.5 * ((float )getPileUpDistanceFwd ()) - ((float )getPileUpDistanceBwd ()) : getPileUpDistanceFwd () + getPileUpDistanceBwd ( ); }
8485 GPUdi () float getPileUpTimeShiftMUS () const { return getPileUpMean () * o2::constants::lhc::LHCBunchSpacingMUS; }
8586 GPUdi () float getPileUpTimeErrorMUS () const { return getPileUpSpan () * o2::constants::lhc::LHCBunchSpacingMUS / 3.4641016 ; }
8687
You can’t perform that action at this time.
0 commit comments