CMS 3D CMS Logo

Classes | Functions | Variables

Geom Namespace Reference

Classes

class  Cartesian2Cartesian3D
class  Cylindrical2Cartesian
class  OnePiRange
class  Phi
class  Polar2Cartesian
class  Spherical2Cartesian
class  Theta

Functions

double deltaBarePhi (double phi1, double phi2)
template<class Vector1 , class Vector2 >
double deltaPhi (const Vector1 &v1, const Vector2 &v2)
double deltaPhi (float phi1, float phi2)
double deltaPhi (double phi1, double 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)
float fhalfPi ()
float fpi ()
float ftwoPi ()
double halfPi ()
template<class T , class Scalar >
Phi< Toperator* (const Phi< T > &a, const Scalar &b)
 Multiplication with scalar, does not change the precision.
template<class T >
OnePiRange< Toperator* (double a, const OnePiRange< T > &b)
 Multiplication with scalar.
template<class T >
Phi< Toperator* (double a, const Phi< T > &b)
 Multiplication with scalar.
template<class T , class Scalar >
OnePiRange< Toperator* (const OnePiRange< T > &a, const Scalar &b)
 Multiplication with scalar, does not change the precision.
template<class T >
OnePiRange< Toperator+ (const OnePiRange< T > &a, const OnePiRange< T > &b)
 Addition.
template<class T , class Scalar >
OnePiRange< Toperator+ (const Scalar &a, const OnePiRange< T > &b)
 Addition with scalar, does not change the precision.
template<class T >
Phi< Toperator+ (const Phi< T > &a, const Phi< T > &b)
 Addition.
template<class T , class Scalar >
OnePiRange< Toperator+ (const OnePiRange< T > &a, const Scalar &b)
 Addition with scalar, does not change the precision.
template<class T , class Scalar >
Phi< Toperator+ (const Phi< T > &a, const Scalar &b)
 Addition with scalar, does not change the precision.
template<class T , class Scalar >
Phi< Toperator+ (const Scalar &a, const Phi< T > &b)
 Addition with scalar, does not change the precision.
template<class T >
OnePiRange< Toperator- (const OnePiRange< T > &a)
 
  • operator

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

template<class T , class Scalar >
Phi< Toperator- (const Scalar &a, const Phi< T > &b)
 Subtraction with scalar, does not change the precision.
template<class T >
T operator/ (const Phi< T > &a, const Phi< T > &b)
 Division.
template<class T >
T operator/ (const OnePiRange< T > &a, const OnePiRange< T > &b)
 Division.
template<class T >
OnePiRange< Toperator/ (const OnePiRange< T > &a, double b)
 Division by scalar.
template<class T >
Phi< Toperator/ (const Phi< T > &a, double b)
 Division by scalar.
bool phiLess (float phi1, float phi2)
template<class Vector1 , class Vector2 >
bool phiLess (const Vector1 &v1, const Vector2 &v2)
bool phiLess (double phi1, double phi2)
double pi ()
double twoPi ()

Variables

class Geom::Polar2Cartesian __attribute__

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:
v1Vector of any type implementing the Phi() operator
v2Vector of any type implementing the Phi() operator
Returns:
Phi difference

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

Definition at line 21 of file VectorUtil.h.

References M_PI.

Referenced by deltaPhi().

                                                       { 
    double dphi = phi2-phi1; 
    if ( dphi > M_PI ) {
      dphi -= 2.0*M_PI;
    } else if ( dphi <= -M_PI ) {
      dphi += 2.0*M_PI;
    }
    return dphi;
  }
template<class Vector1 , class Vector2 >
double Geom::deltaPhi ( const Vector1 &  v1,
const Vector2 &  v2 
)

Definition at line 39 of file VectorUtil.h.

References deltaBarePhi().

                                                           { 
    return deltaBarePhi(v1.phi(),v2.phi()); 
  }
double Geom::deltaPhi ( float  phi1,
float  phi2 
) [inline]
double Geom::deltaPhi ( double  phi1,
double  phi2 
) [inline]

Definition at line 34 of file VectorUtil.h.

References deltaBarePhi(), and Phi_mpi_pi().

template<class Vector1 , class Vector2 >
double Geom::deltaR ( const Vector1 &  v1,
const Vector2 &  v2 
)
template<class Vector1 , class Vector2 >
double Geom::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

Parameters:
v1Vector 1
v2Vector 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 EgammaHLTHcalIsolation::acceptHit_(), helper::SimpleJetTrackAssociator::associate(), helper::SimpleJetTrackAssociator::associateTransient(), pat::LeptonJetIsolationAngle::calculate(), deltaR(), PythiaFilterGammaJet::filter(), PythiaFilterGammaJetIsoPi0::filter(), PythiaFilterGammaJetWithOutBg::filter(), PhotonEnrichmentFilter::filter(), PythiaFilterGammaJetWithBg::filter(), CMSMidpointAlgorithm::findStableConesFromMidPoints(), PhotonTkIsolation::getIso(), HLTPFTauPairLeadTrackDzMatchFilter::hltFilter(), modules::MuonCleanerBySegmentsT< T >::isBetterMuon(), L1MuonMatcherAlgo::match(), PFB::match(), MatcherByPullsAlgorithm::match(), L1MuonMatcherAlgo::matchGeneric(), TopProjectorDeltaROverlap< Top, Bottom >::operator()(), pat::OverlapByDeltaR::operator()(), DeltaRMinPairSelector::operator()(), CMSInsideOutAlgorithm::ListIteratorLesserByDeltaR::operator()(), DeltaRNearestObjectComputer< T >::produce(), JetTracksAssociationDRVertexAssigned::produce(), TauJetSelectorForHLTTrackSeeding::produce(), JetTracksAssociationDRCalo::produce(), JetTracksAssociationDRVertex::produce(), JetVetoedTracksAssociationDRVertex::produce(), NearbyCandCountComputer::produce(), L2TauPixelIsoTagProducer::produce(), JetPlusTrackCorrector::rebuildJta(), CMSIterativeConeAlgorithm::run(), CMSInsideOutAlgorithm::run(), GenJetClosestMatchSelectorDefinition::select(), and CMSMidpointAlgorithm::splitAndMerge().

                                                          { 
    double dphi = deltaPhi(v1,v2); 
    double deta = v2.eta() - v1.eta(); 
    return dphi*dphi + deta*deta; 
  }
float Geom::fhalfPi ( ) [inline]

Definition at line 37 of file Pi.h.

{return 0.5f*3.141592653589793238f;}
float Geom::fpi ( ) [inline]
float Geom::ftwoPi ( ) [inline]
double Geom::halfPi ( ) [inline]

Definition at line 33 of file Pi.h.

Referenced by TrackAssociatorByChi2::parametersAtClosestApproach().

{return 0.5*3.141592653589793238;}
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 111 of file Phi.h.

References a.

                                                            {
    return Phi<T>(a) *= b;
  }
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.

References b.

                                                                   {
    return OnePiRange<T>(b) *= a;
  }
template<class T >
Phi<T> Geom::operator* ( double  a,
const Phi< T > &  b 
) [inline]

Multiplication with scalar.

Definition at line 116 of file Phi.h.

References b.

                                                     {
    return Phi<T>(b) *= a;
  }
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.

References a.

                                                                          {
    return OnePiRange<T>(a) *= b;
  }
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.

References a.

                                                                                 {
    return OnePiRange<T>(a) += b; 
  }
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.

References b.

                                                                          {
    return OnePiRange<T>(b) += a;
  }
template<class T >
Phi<T> Geom::operator+ ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Addition.

Definition at line 77 of file Phi.h.

References a.

                                                            {
    return Phi<T>(a) += b;
  }
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.

References a.

                                                                          {
    return OnePiRange<T>(a) += b;
  }
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 82 of file Phi.h.

References a.

                                                            {
    return Phi<T>(a) += b;
  }
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 87 of file Phi.h.

References b.

                                                            {
    return Phi<T>(b) += a;
  }
template<class T >
OnePiRange<T> Geom::operator- ( const OnePiRange< T > &  a) [inline]

  • operator

Definition at line 71 of file OnePiRange.h.

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

{return OnePiRange<T>(-a.value());}
template<class T >
Phi<T> Geom::operator- ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Subtraction.

Definition at line 94 of file Phi.h.

References a.

                                                            { 
    return Phi<T>(a) -= b;
  }
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 99 of file Phi.h.

References a.

                                                            { 
    return Phi<T>(a) -= b;
  }
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.

References a.

                                                                          { 
    return OnePiRange<T>(a) -= b;
  }
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.

References a.

                                                                                 { 
    return OnePiRange<T>(a) -= b;
  }
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().

                                                                          { 
    return OnePiRange<T>(a - b.value());  // use of unary operators would normalize twice
  }
template<class T >
Phi<T> Geom::operator- ( const Phi< T > &  a) [inline]

  • operator

Definition at line 72 of file Phi.h.

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

{return Phi<T>(-a.value());}
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 104 of file Phi.h.

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

                                                            { 
    return Phi<T>(a - b.value());  // use of unary operators would normalize twice
  }
template<class T >
T Geom::operator/ ( const Phi< T > &  a,
const Phi< T > &  b 
) [inline]

Division.

Definition at line 123 of file Phi.h.

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

                                                       { 
    return a.value() / b.value();
  }
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().

                                                                     { 
    return a.value() / b.value();
  }
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.

References a.

                                                                   {
    return OnePiRange<T>(a) /= b;
  }
template<class T >
Phi<T> Geom::operator/ ( const Phi< T > &  a,
double  b 
) [inline]

Division by scalar.

Definition at line 128 of file Phi.h.

References a.

                                                     {
    return Phi<T>(a) /= b;
  }
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::compute(), and PhiLess::operator()().

                                              {
    return deltaPhi(phi1,phi2)<0;
  }
template<class Vector1 , class Vector2 >
bool Geom::phiLess ( const Vector1 &  v1,
const Vector2 &  v2 
)

Definition at line 64 of file VectorUtil.h.

References deltaPhi().

                                                       {
    return deltaPhi(v1,v2)<0.; 
  }
bool Geom::phiLess ( double  phi1,
double  phi2 
) [inline]

Definition at line 60 of file VectorUtil.h.

References deltaPhi().

                                                {
    return deltaPhi(phi1,phi2)<0;
  }
double Geom::pi ( ) [inline]

Definition at line 31 of file Pi.h.

Referenced by PhotonsWithConversionsAnalyzer::analyze(), DTVDriftCalibration::analyze(), SimpleConvertedPhotonAnalyzer::analyze(), DTLocalTriggerSynchTask::analyze(), EgammaObjects::analyzeElectrons(), EgammaObjects::analyzePhotons(), MagGeoBuilderFromDDD::buildInterpolator(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), PFHcalSuperClusterAlgo::calculatePosition(), PFHcalSuperClusterAlgo::calculateWidths(), GCC11_FINAL< T, TOPO >::computeBounds(), DTTime2DriftParametrization::computeDriftDistance_mean(), PFClusterShapeAlgo::covariances(), EcalClusterTools::covariances(), Geom::Phi< float >::degrees(), Geom::OnePiRange< T >::degrees(), RecHitsSortedInPhi::doubleRange(), EcalEtaPhiRegion::EcalEtaPhiRegion(), ECALPositionCalculator::ecalPhi(), RecHitsSortedInPhi::hits(), HResolution::HResolution(), HResolution1DRecHit::HResolution1DRecHit(), HTrackVariables::HTrackVariables(), reco::PFHcalSuperClusterInit::initialize(), EcalEtaPhiRegion::inRegion(), ESListOfFEDSProducer::ListOfFEDS(), EcalRawToRecHitRoI::ListOfFEDS(), EcalListOfFEDSProducer::ListOfFEDS(), HLTAlCa::ListOfFEDS(), HLTDTActivityFilter::matchChamber(), Geom::Phi< float >::normalize(), Geom::OnePiRange< T >::normalize(), DTSegmentSelector::operator()(), PhiBorderFinder::PhiBorderFinder(), L2MuonSeedGenerator::produce(), TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid(), DTTrigGeomUtils::trigPos(), DDI::Sphere::volume(), DDI::EllipticalTube::volume(), and DDI::Orb::volume().

{return     3.141592653589793238;}
double Geom::twoPi ( ) [inline]

Variable Documentation