ATLAS Offline Software
Loading...
Searching...
No Matches
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 612 of file TRT_SeededSpacePointFinder_ATL.cxx.

613 {
614 double amin = rollrating(angle - delta);
615 double amax = rollrating(angle + delta);
616 if (delta >= M_PI) {
617 amin = 0.0;
618 amax = 4.0;
619 }
620 *min = amin;
621 *max = amax;
622}
#define M_PI
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
double rollrating(double angle)
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41

◆ rollrating()

double rollrating ( double angle)

Definition at line 582 of file TRT_SeededSpacePointFinder_ATL.cxx.

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

◆ rotrating()

double rotrating ( double y,
double x )
inline

Definition at line 629 of file TRT_SeededSpacePointFinder_ATL.cxx.

629 {
630 long asign_x = (long)(x < 0.0);
631 long asign_y = (long)(y < 0.0);
632 long quadrant = -(asign_y << 1) + (asign_y ^ asign_x);
633 double x2 = x*x;
634 double y2 = y*y;
635 double denominator = x2 + y2;
636 double numerator = ((quadrant & 1) != 0) ? x2 : y2;
637 return (double)quadrant + numerator/denominator;
638}
#define y
#define x