|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #define M_PI 3.14159265358979323846
5 #define M_2PI 6.28318530717958647692
28 float& dist_phi0 )
const {
32 float abs_dist_eta0 = abs( dist_eta0 );
33 float abs_dist_phi0 = abs( dist_phi0 );
34 return max( abs_dist_eta0, abs_dist_phi0 ) - 0.5;
40 long long bestDDE = -1;
49 float raw_eta =
eta + best_eta_corr;
50 float raw_phi =
phi + best_phi_corr;
57 float bestdist = +10000000;
60 while ( ( newDDE >= 0 ) && nsearch < 3 ) {
61 float dist_eta0, dist_phi0;
71 ieta +=
round( dist_eta0 );
72 iphi +=
round( dist_phi0 );
74 long long oldDDE = newDDE;
78 if ( oldDDE == newDDE )
break;
84 if ( minieta < 0 ) minieta = 0;
86 for (
int iieta = minieta; iieta <= maxieta; ++iieta ) {
87 for (
int iiphi = miniphi; iiphi <= maxiphi; ++iiphi ) {
94 float dist_eta0, dist_phi0;
103 printf(
"GeoRegin::getDDE, windows search ieta=%d iphi=%d is empty\n", ieta, iphi );
__HOSTDEV__ double Phi_mpi_pi(double x)
__HOSTDEV__ float calculate_distance_eta_phi(const long long DDE, float eta, float phi, float &dist_eta0, float &dist_phi0) const
float m_maxphi_correction
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
float round(const float toRound, const unsigned int decimals)
__HOSTDEV__ bool index_range_adjust(int &ieta, int &iphi) const
__HOSTDEV__ int cell_grid_phi() const
CUDA_HOSTDEV float eta() const
cell eta
__HOSTDEV__ int raw_phi_position_to_index(float phi_raw) const
float m_minphi_correction
__HOSTDEV__ int raw_eta_position_to_index(float eta_raw) const
CaloDetDescrElement_Gpu * m_all_cells
__HOSTDEV__ int cell_grid_eta() const
float m_maxeta_correction
__HOSTDEV__ long long getDDE(float eta, float phi, float *distance=0, int *steps=0)
float m_mineta_correction
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space