ATLAS Offline Software
Functions
TRT_SeededSpacePointFinder_ATL.cxx File Reference
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ServiceHandle.h"
#include "CLHEP/Vector/ThreeVector.h"
#include "TrkSpacePoint/SpacePointCLASS_DEF.h"
#include "TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h"
#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
#include "InDetPrepRawData/SCT_Cluster.h"
#include "InDetIdentifier/SCT_ID.h"
#include "StoreGate/ReadHandle.h"
#include <ostream>
#include <iomanip>
#include <set>

Go to the source code of this file.

Functions

double rollrating (double angle)
 
void bracket_angle (double angle, double delta, double *min, double *max)
 
double rotrating (double y, double x)
 

Function Documentation

◆ bracket_angle()

void bracket_angle ( double  angle,
double  delta,
double *  min,
double *  max 
)

Definition at line 611 of file TRT_SeededSpacePointFinder_ATL.cxx.

612  {
613  double amin = rollrating(angle - delta);
614  double amax = rollrating(angle + delta);
615  if (delta >= M_PI) {
616  amin = 0.0;
617  amax = 4.0;
618  }
619  *min = amin;
620  *max = amax;
621 }

◆ rollrating()

double rollrating ( double  angle)

Definition at line 581 of file TRT_SeededSpacePointFinder_ATL.cxx.

581  {
582  while (angle < 0) {
583  angle += 2*M_PI;
584  }
585  while (angle > 2*M_PI) {
586  angle -= 2*M_PI;
587  }
588  double rotations = angle/(2*M_PI);
589  double rquadrant = rotations*4.0;
590  long quadrant = (long)rquadrant & 3;
591  double twist;
592  if ((quadrant & 1) != 0) {
593  twist = cos(angle);
594  }
595  else {
596  twist = sin(angle);
597  }
598  twist *= twist;
599  quadrant -= ((quadrant & 2) << 1);
600  return quadrant + twist;
601 }

◆ rotrating()

double rotrating ( double  y,
double  x 
)
inline

Definition at line 628 of file TRT_SeededSpacePointFinder_ATL.cxx.

628  {
629  long asign_x = (long)(x < 0.0);
630  long asign_y = (long)(y < 0.0);
631  long quadrant = -(asign_y << 1) + (asign_y ^ asign_x);
632  double x2 = x*x;
633  double y2 = y*y;
634  double denominator = x2 + y2;
635  double numerator = ((quadrant & 1) != 0) ? x2 : y2;
636  return (double)quadrant + numerator/denominator;
637 }
rollrating
double rollrating(double angle)
Definition: TRT_SeededSpacePointFinder_ATL.cxx:581
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
M_PI
#define M_PI
Definition: ActiveFraction.h:11
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
x
#define x
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
ReadTripsProbsFromCool.denominator
denominator
Definition: ReadTripsProbsFromCool.py:96
y
#define y
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36