CMS 3D CMS Logo

Geom Namespace Reference


Classes

class  Cartesian2Cartesian3D
 Cartesian coordinate set, for uniformity with other coordinate systems. More...
class  Cylindrical2Cartesian
 Converts cylindtical coordinates to cartesian coordinates. More...
class  OnePiRange
 A class for polar angle represantation. More...
class  Phi
 A class for azimuthal angle represantation and algebra. More...
class  Polar2Cartesian
 Converts polar 2D coordinates to cartesian coordinates. More...
class  Spherical2Cartesian
 Converts spherical (or polar 3D) coordinates to cartesian coordinates. More...
class  Theta
 A class for polar angle represantation. More...

Functions

double deltaBarePhi (double phi1, double phi2)
 Find aximutal Angle difference between two generic vectors ( v2.Phi() - v1.Phi() ) The only requirements on the Vector classes is that they implement the Phi() method.
template<class Vector1, class Vector2>
double deltaPhi (const Vector1 &v1, const Vector2 &v2)
double deltaPhi (double phi1, double phi2)
double deltaPhi (float phi1, float phi2)
template<class Vector1, class Vector2>
double deltaR (const Vector1 &v1, const Vector2 &v2)
template<class Vector1, class Vector2>
double deltaR2 (const Vector1 &v1, const Vector2 &v2)
 Find difference in pseudorapidity (Eta) and Phi betwen two generic vectors The only requirements on the Vector classes is that they implement the Phi() and Eta() method.
double halfPi ()
template<class T>
Phi< T > operator * (double a, const Phi< T > &b)
 Multiplication with scalar.
template<class T, class Scalar>
Phi< T > operator * (const Phi< T > &a, const Scalar &b)
 Multiplication with scalar, does not change the precision.
template<class T>
OnePiRange< T > operator * (double a, const OnePiRange< T > &b)
 Multiplication with scalar.
template<class T, class Scalar>
OnePiRange< T > operator * (const OnePiRange< T > &a, const Scalar &b)
 Multiplication with scalar, does not change the precision.
template<class T, class Scalar>
Phi< T > operator+ (const Scalar &a, const Phi< T > &b)
 Addition with scalar, does not change the precision.
template<class T, class Scalar>
Phi< T > operator+ (const Phi< T > &a, const Scalar &b)
 Addition with scalar, does not change the precision.
template<class T>
Phi< T > operator+ (const Phi< T > &a, const Phi< T > &b)
 Addition.
template<class T, class Scalar>
OnePiRange< T > operator+ (const Scalar &a, const OnePiRange< T > &b)
 Addition with scalar, does not change the precision.
template<class T, class Scalar>
OnePiRange< T > operator+ (const OnePiRange< T > &a, const Scalar &b)
 Addition with scalar, does not change the precision.
template<class T>
OnePiRange< T > operator+ (const OnePiRange< T > &a, const OnePiRange< T > &b)
 Addition.
template<class T, class Scalar>
Phi< T > operator- (const Scalar &a, const Phi< T > &b)
 Subtraction with scalar, does not change the precision.
template<class T, class Scalar>
Phi< T > operator- (const Phi< T > &a, const Scalar &b)
 Subtraction with scalar, does not change the precision.
template<class T>
Phi< T > operator- (const Phi< T > &a, const Phi< T > &b)
 Subtraction.
template<class T>
Phi< T > operator- (const Phi< T > &a)
 
  • operator

template<class T, class Scalar>
OnePiRange< T > operator- (const Scalar &a, const OnePiRange< T > &b)
 Subtraction with scalar, does not change the precision.
template<class T, class Scalar>
OnePiRange< T > operator- (const OnePiRange< T > &a, const Scalar &b)
 Subtraction with scalar, does not change the precision.
template<class T>
OnePiRange< T > operator- (const OnePiRange< T > &a, const OnePiRange< T > &b)
 Subtraction.
template<class T>
OnePiRange< T > operator- (const OnePiRange< T > &a)
 
  • operator

template<class T>
Phi< T > operator/ (const Phi< T > &a, double b)
 Division by scalar.
template<class T>
operator/ (const Phi< T > &a, const Phi< T > &b)
 Division.
template<class T>
OnePiRange< T > operator/ (const OnePiRange< T > &a, double b)
 Division by scalar.
template<class T>
operator/ (const OnePiRange< T > &a, const OnePiRange< T > &b)
 Division.
template<class Vector1, class Vector2>
bool phiLess (const Vector1 &v1, const Vector2 &v2)
bool phiLess (double phi1, double phi2)
bool phiLess (float phi1, float phi2)
 Definition of ordering of azimuthal angles.
double pi ()
double twoPi ()


Function Documentation

double Geom::deltaBarePhi ( double  phi1,
double  phi2 
) [inline]

Find aximutal Angle difference between two generic vectors ( v2.Phi() - v1.Phi() ) The only requirements on the Vector classes is that they implement the Phi() method.

Parameters:
v1 Vector of any type implementing the Phi() operator
v2 Vector of any type implementing the Phi() operator
Returns:
Phi difference

\[ \Delta \phi = \phi_2 - \phi_1 \]

Definition at line 21 of file VectorUtil.h.

Referenced by deltaPhi().

00021                                                        { 
00022     double dphi = phi2-phi1; 
00023     if ( dphi > M_PI ) {
00024       dphi -= 2.0*M_PI;
00025     } else if ( dphi <= -M_PI ) {
00026       dphi += 2.0*M_PI;
00027     }
00028     return dphi;
00029   }

template<class Vector1, class Vector2>
double Geom::deltaPhi ( const Vector1 &  v1,
const Vector2 &  v2 
) [inline]

Definition at line 39 of file VectorUtil.h.

References deltaBarePhi().

00039                                                            { 
00040     return deltaBarePhi(v1.phi(),v2.phi()); 
00041   }

double Geom::deltaPhi ( double  phi1,
double  phi2 
) [inline]

Definition at line 34 of file VectorUtil.h.

References deltaBarePhi(), and Phi_mpi_pi().

00034                                                    { 
00035     using ROOT::Math::VectorUtil::Phi_mpi_pi;
00036     return deltaBarePhi(Phi_mpi_pi(phi2),Phi_mpi_pi(phi1));
00037   }

double Geom::deltaPhi ( float  phi1,
float  phi2 
) [inline]

Definition at line 30 of file VectorUtil.h.

References deltaBarePhi(), and Phi_mpi_pi().

Referenced by TIDRing::computeCrossings(), CompositeTECWedge::computeCrossings(), TECLayer::computeCrossings(), deltaR2(), and phiLess().

00030                                                  { 
00031     using ROOT::Math::VectorUtil::Phi_mpi_pi;
00032     return deltaBarePhi(Phi_mpi_pi(phi2),Phi_mpi_pi(phi1));
00033   }

template<class Vector1, class Vector2>
double Geom::deltaR ( const Vector1 &  v1,
const Vector2 &  v2 
) [inline]

Definition at line 84 of file VectorUtil.h.

References deltaR2(), and funct::sqrt().

Referenced by reco::VertexFilter::operator()(), CombinedSVComputer::operator()(), and reco::SecondaryVertexTagInfo::taggingVariables().

00084                                                          { 
00085     return std::sqrt( deltaR2(v1,v2));
00086   }

template<class Vector1, class Vector2>
double Geom::deltaR2 ( const Vector1 &  v1,
const Vector2 &  v2 
) [inline]

Find difference in pseudorapidity (Eta) and Phi betwen two generic vectors The only requirements on the Vector classes is that they implement the Phi() and Eta() method.

Parameters:
v1 Vector 1
v2 Vector 2
Returns:
Angle between the two vectors

\[ \Delta R = \sqrt{ ( \Delta \phi )^2 + ( \Delta \eta )^2 } \]

Definition at line 78 of file VectorUtil.h.

References deltaPhi().

Referenced by deltaR().

00078                                                           { 
00079     double dphi = deltaPhi(v1,v2); 
00080     double deta = v2.eta() - v1.eta(); 
00081     return dphi*dphi + deta*deta; 
00082   }

double Geom::halfPi (  )  [inline]

Definition at line 33 of file Pi.h.

Referenced by RoadSearchCloudMakerAlgorithm::makecircle(), and TrackAssociatorByChi2::parametersAtClosestApproach().

00033 {return 0.5*3.141592653589793238;}

template<class T>
Phi<T> Geom::operator * ( double  a,
const Phi< T > &  b 
) [inline]

Multiplication with scalar.

Definition at line 113 of file Phi.h.

00113                                                      {
00114     return Phi<T>(b) *= a;
00115   }

template<class T, class Scalar>
Phi<T> Geom::operator * ( const Phi< T > &  a,
const Scalar &  b 
) [inline]

Multiplication with scalar, does not change the precision.

Definition at line 108 of file Phi.h.

00108                                                             {
00109     return Phi<T>(a) *= b;
00110   }

template<class T>
OnePiRange<T> Geom::operator * ( double  a,
const OnePiRange< T > &  b 
) [inline]

Multiplication with scalar.

Definition at line 116 of file OnePiRange.h.

00116                                                                    {
00117     return OnePiRange<T>(b) *= a;
00118   }

template<class T, class Scalar>
OnePiRange<T> Geom::operator * ( const OnePiRange< T > &  a,
const Scalar &  b 
) [inline]

Multiplication with scalar, does not change the precision.

Definition at line 110 of file OnePiRange.h.

00110                                                                           {
00111     return OnePiRange<T>(a) *= b;
00112   }

template<class T, class Scalar>
Phi<T> Geom::operator+ ( const Scalar &  a,
const Phi< T > &  b 
) [inline]

Addition with scalar, does not change the precision.

Definition at line 84 of file Phi.h.

00084                                                             {
00085     return Phi<T>(b) += a;
00086   }

template<class T, class Scalar>
Phi<T> Geom::operator+ ( const Phi< T > &  a,
const Scalar &  b 
) [inline]

Addition with scalar, does not change the precision.

Definition at line 79 of file Phi.h.

00079                                                             {
00080     return Phi<T>(a) += b;
00081   }

template<class T>
Phi<T> Geom::operator+ ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Addition.

Definition at line 74 of file Phi.h.

00074                                                             {
00075     return Phi<T>(a) += b;
00076   }

template<class T, class Scalar>
OnePiRange<T> Geom::operator+ ( const Scalar &  a,
const OnePiRange< T > &  b 
) [inline]

Addition with scalar, does not change the precision.

Definition at line 86 of file OnePiRange.h.

00086                                                                           {
00087     return OnePiRange<T>(b) += a;
00088   }

template<class T, class Scalar>
OnePiRange<T> Geom::operator+ ( const OnePiRange< T > &  a,
const Scalar &  b 
) [inline]

Addition with scalar, does not change the precision.

Definition at line 81 of file OnePiRange.h.

00081                                                                           {
00082     return OnePiRange<T>(a) += b;
00083   }

template<class T>
OnePiRange<T> Geom::operator+ ( const OnePiRange< T > &  a,
const OnePiRange< T > &  b 
) [inline]

Addition.

Definition at line 76 of file OnePiRange.h.

00076                                                                                  {
00077     return OnePiRange<T>(a) += b; 
00078   }

template<class T, class Scalar>
Phi<T> Geom::operator- ( const Scalar &  a,
const Phi< T > &  b 
) [inline]

Subtraction with scalar, does not change the precision.

Definition at line 101 of file Phi.h.

References Geom::Phi< T >::value().

00101                                                             { 
00102     return Phi<T>(a - b.value());  // use of unary operators would normalize twice
00103   }

template<class T, class Scalar>
Phi<T> Geom::operator- ( const Phi< T > &  a,
const Scalar &  b 
) [inline]

Subtraction with scalar, does not change the precision.

Definition at line 96 of file Phi.h.

00096                                                             { 
00097     return Phi<T>(a) -= b;
00098   }

template<class T>
Phi<T> Geom::operator- ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Subtraction.

Definition at line 91 of file Phi.h.

00091                                                             { 
00092     return Phi<T>(a) -= b;
00093   }

template<class T>
Phi<T> Geom::operator- ( const Phi< T > &  a  )  [inline]

Definition at line 69 of file Phi.h.

References Geom::Phi< T >::value().

00069 {return Phi<T>(-a.value());}

template<class T, class Scalar>
OnePiRange<T> Geom::operator- ( const Scalar &  a,
const OnePiRange< T > &  b 
) [inline]

Subtraction with scalar, does not change the precision.

Definition at line 104 of file OnePiRange.h.

References Geom::OnePiRange< T >::value().

00104                                                                           { 
00105     return OnePiRange<T>(a - b.value());  // use of unary operators would normalize twice
00106   }

template<class T, class Scalar>
OnePiRange<T> Geom::operator- ( const OnePiRange< T > &  a,
const Scalar &  b 
) [inline]

Subtraction with scalar, does not change the precision.

Definition at line 98 of file OnePiRange.h.

00098                                                                           { 
00099     return OnePiRange<T>(a) -= b;
00100   }

template<class T>
OnePiRange<T> Geom::operator- ( const OnePiRange< T > &  a,
const OnePiRange< T > &  b 
) [inline]

Subtraction.

Definition at line 92 of file OnePiRange.h.

00092                                                                                  { 
00093     return OnePiRange<T>(a) -= b;
00094   }

template<class T>
OnePiRange<T> Geom::operator- ( const OnePiRange< T > &  a  )  [inline]

Definition at line 71 of file OnePiRange.h.

References Geom::OnePiRange< T >::value().

00071 {return OnePiRange<T>(-a.value());}

template<class T>
Phi<T> Geom::operator/ ( const Phi< T > &  a,
double  b 
) [inline]

Division by scalar.

Definition at line 125 of file Phi.h.

00125                                                      {
00126     return Phi<T>(a) /= b;
00127   }

template<class T>
T Geom::operator/ ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Division.

Definition at line 120 of file Phi.h.

References Geom::Phi< T >::value().

00120                                                        { 
00121     return a.value() / b.value();
00122   }

template<class T>
OnePiRange<T> Geom::operator/ ( const OnePiRange< T > &  a,
double  b 
) [inline]

Division by scalar.

Definition at line 128 of file OnePiRange.h.

00128                                                                    {
00129     return OnePiRange<T>(a) /= b;
00130   }

template<class T>
T Geom::operator/ ( const OnePiRange< T > &  a,
const OnePiRange< T > &  b 
) [inline]

Division.

Definition at line 122 of file OnePiRange.h.

References Geom::OnePiRange< T >::value().

00122                                                                      { 
00123     return a.value() / b.value();
00124   }

template<class Vector1, class Vector2>
bool Geom::phiLess ( const Vector1 &  v1,
const Vector2 &  v2 
) [inline]

Definition at line 64 of file VectorUtil.h.

References deltaPhi().

00064                                                        {
00065     return deltaPhi(v1,v2)<0.; 
00066   }

bool Geom::phiLess ( double  phi1,
double  phi2 
) [inline]

Definition at line 60 of file VectorUtil.h.

References deltaPhi().

00060                                                 {
00061     return deltaPhi(phi1,phi2)<0;
00062   }

bool Geom::phiLess ( float  phi1,
float  phi2 
) [inline]

Definition of ordering of azimuthal angles.

phi1 is less than phi2 if the angle covered by a point going from phi1 to phi2 in the counterclockwise direction is smaller than pi. It makes sense only if ALL phis are in a single hemisphere...

Definition at line 57 of file VectorUtil.h.

References deltaPhi().

Referenced by tkDetUtil::calculatePhiWindow(), boundSpan::computeSpan(), PhiLess::operator()(), and DetPhiLess::operator()().

00057                                               {
00058     return deltaPhi(phi1,phi2)<0;
00059   }

double Geom::pi (  )  [inline]

Definition at line 31 of file Pi.h.

Referenced by PhotonsWithConversionsAnalyzer::analyze(), DTVDriftCalibration::analyze(), SimpleConvertedPhotonAnalyzer::analyze(), EgammaObjects::analyzeElectrons(), EgammaObjects::analyzePhotons(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter(), tkDetUtil::calculatePhiWindow(), RoadSearchCloudMakerAlgorithm::CheckZPhiIntersection(), cms::ClusterAnalysis::clusterInfos(), DTLocalTriggerTask::computeCoordinates(), PixelBarrelLayer::computeCrossings(), TOBLayer::computeCrossings(), DTTime2DriftParametrization::computeDriftDistance_mean(), DTTime2DriftParametrization::computeDriftDistance_mode(), Ring::containsDetId(), PFClusterShapeAlgo::covariances(), EcalClusterTools::covariances(), CylinderFromSectorMFGrid::CylinderFromSectorMFGrid(), Geom::Phi< float >::degrees(), Geom::OnePiRange< T >::degrees(), EgammaObjects::ecalEta(), EgammaSuperClusters::ecalEta(), ECALPositionCalculator::ecalEta(), EcalEtaPhiRegion::EcalEtaPhiRegion(), ECALPositionCalculator::ecalPhi(), EcalElectronicsMapping::GetListofFEDs(), HResolution::HResolution(), HResolution1DRecHit::HResolution1DRecHit(), HTrackVariables::HTrackVariables(), EcalEtaPhiRegion::inRegion(), EcalListOfFEDSProducer::ListOfFEDS(), EcalRawToRecHitRoI::ListOfFEDS(), HLTPi0RecHitsFilter::ListOfFEDS(), MagGeometry::MagGeometry(), Ring::map_phi(), map_phi2(), RoadSearchCloudMakerAlgorithm::map_phi2(), Geom::Phi< float >::normalize(), Geom::OnePiRange< T >::normalize(), SimpleConeBounds::openingAngle(), RoadSearchCircleSeed::Phi0(), DTLocalTriggerTask::phi2Pos(), DTLocalTriggerTask::phib2Ang(), PhiBorderFinder::PhiBorderFinder(), L2MuonSeedGenerator::produce(), SteppingHelixPropagator::refToDest(), SteppingHelixPropagator::refToMagVolume(), SteppingHelixPropagator::refToMatVolume(), RoadSearchCloudMakerAlgorithm::run(), and TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid().

00031 {return     3.141592653589793238;}

double Geom::twoPi (  )  [inline]

Definition at line 32 of file Pi.h.

Referenced by PhotonsWithConversionsAnalyzer::analyze(), SimpleConvertedPhotonAnalyzer::analyze(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter(), Ring::containsDetId(), PFClusterShapeAlgo::covariances(), EcalClusterTools::covariances(), EcalEtaPhiRegion::EcalEtaPhiRegion(), ECALPositionCalculator::ecalPhi(), EgammaTowerIsolation::getTowerEtSum(), EcalEtaPhiRegion::inRegion(), RoadSearchCloudMakerAlgorithm::map_phi(), Ring::map_phi(), map_phi2(), RoadSearchCloudMakerAlgorithm::map_phi2(), Geom::Phi< float >::normalize(), PhiBorderFinder::positiveRange(), and GeneralBinFinderInPhi< T >::positiveRange().

00032 {return 2. *3.141592653589793238;}


Generated on Tue Jun 9 18:47:15 2009 for CMSSW by  doxygen 1.5.4