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 640 of file TRT_SeededSpacePointFinder_ATL.cxx.

641  {
642  double amin = rollrating(angle - delta);
643  double amax = rollrating(angle + delta);
644  if (delta >= M_PI) {
645  amin = 0.0;
646  amax = 4.0;
647  }
648  *min = amin;
649  *max = amax;
650 }

◆ rollrating()

double rollrating ( double  angle)

Definition at line 610 of file TRT_SeededSpacePointFinder_ATL.cxx.

610  {
611  while (angle < 0) {
612  angle += 2*M_PI;
613  }
614  while (angle > 2*M_PI) {
615  angle -= 2*M_PI;
616  }
617  double rotations = angle/(2*M_PI);
618  double rquadrant = rotations*4.0;
619  long quadrant = (long)rquadrant & 3;
620  double twist;
621  if ((quadrant & 1) != 0) {
622  twist = cos(angle);
623  }
624  else {
625  twist = sin(angle);
626  }
627  twist *= twist;
628  quadrant -= ((quadrant & 2) << 1);
629  return quadrant + twist;
630 }

◆ rotrating()

double rotrating ( double  y,
double  x 
)
inline

Definition at line 657 of file TRT_SeededSpacePointFinder_ATL.cxx.

657  {
658  long asign_x = (long)(x < 0.0);
659  long asign_y = (long)(y < 0.0);
660  long quadrant = -(asign_y << 1) + (asign_y ^ asign_x);
661  double x2 = x*x;
662  double y2 = y*y;
663  double denominator = x2 + y2;
664  double numerator = ((quadrant & 1) != 0) ? x2 : y2;
665  return (double)quadrant + numerator/denominator;
666 }
rollrating
double rollrating(double angle)
Definition: TRT_SeededSpacePointFinder_ATL.cxx:610
max
#define max(a, b)
Definition: cfImp.cxx:41
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
min
#define min(a, b)
Definition: cfImp.cxx:40
y
#define y
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36