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 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}
#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 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}
#define y
#define x