CMS 3D CMS Logo

List of all members | Public Member Functions
CmsTrackerLevelBuilder::ExtractPhiMirror Struct Reference

#include <CmsTrackerLevelBuilder.h>

Inheritance diagram for CmsTrackerLevelBuilder::ExtractPhiMirror:

Public Member Functions

double operator() (const GeometricDet *a) const
 

Detailed Description

Definition at line 155 of file CmsTrackerLevelBuilder.h.

Member Function Documentation

double CmsTrackerLevelBuilder::ExtractPhiMirror::operator() ( const GeometricDet a) const
inline

Definition at line 156 of file CmsTrackerLevelBuilder.h.

References phi, GeometricDet::phi(), and pi.

156  {
157  const double pi = 3.141592653592;
158  double phi = a->phi();
159  phi = (phi>= 0 ? phi : phi+2*pi); // (-pi,pi] --> [0,2pi)
160  return ( (pi-phi) >= 0 ? (pi-phi) : (pi-phi)+2*pi ); // (-pi,pi] --> [0,2pi)
161  }
const Double_t pi
double phi() const
Definition: GeometricDet.h:129