CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
JetUtil.h File Reference
#include <cmath>

Go to the source code of this file.

Classes

class  PtGreater
 

Functions

double dPhi (double phi1, double phi2)
 
double Phi_0_2pi (double x)
 
double Phi_mpi_pi (double x)
 
double radius (double eta1, double phi1, double eta2, double phi2)
 
template<typename T1 , typename T2 >
double radius (const T1 &t1, const T2 &t2)
 

Function Documentation

double dPhi ( double  phi1,
double  phi2 
)

Definition at line 30 of file JetUtil.h.

References Phi_0_2pi(), and Phi_mpi_pi().

Referenced by PhotonValidator::analyze(), SimplePhotonAnalyzer::beginJob(), ConvertedPhotonProducer::buildCollections(), SoftConversionTrackCandidateProducer::buildCollections(), L1GtVhdlWriterBitManager::buildDeltaPhiCalo(), L1GtVhdlWriterBitManager::buildDeltaPhiMuon(), pat::CaloIsolationEnergy::calculate(), SuperClusterShapeAlgo::Calculate_Covariances(), ClusterShapeAlgo::Calculate_Covariances(), GsfElectronAlgo::ElectronData::checkCtfTrack(), TrackerOnlyConversionProducer::checkPhi(), RPCSeedPattern::checkStraightwithThreerecHits(), EgammaSuperClusters::closestMCParticle(), EcalClusterTools::covariances(), PFClusterShapeAlgo::covariances(), TtSemiLepSignalSelMVAComputer::DeltaPhi(), TtSemiLepSignalSelMVATrainer::DeltaPhi(), TtSemiLepSignalSel::DeltaPhi(), L1MuonPixelTrackFitter::deltaPhi(), TtSemiLepSignalSelMVAComputer::DeltaR(), TtSemiLepSignalSel::DeltaR(), TtSemiLepSignalSelMVATrainer::DeltaR(), muonisolation::PixelTrackExtractor::directionAtPresetRadius(), reco::ellipse(), EtaPhiEstimator::estimate(), EtaPhiMeasurementEstimator::estimate(), DDHCalFibreBundle::execute(), TrackerOfflineValidationSummary::fillTree(), TrackerOfflineValidation::fillTree(), filterCells3x3(), filterCells5x5(), ConversionTrackEcalImpactPoint::find(), TrackDetMatchInfo::findMaxDeposition(), CxCalculator::getAvgBCEt(), CxCalculator::getCCx(), CxCalculator::getCCxRemoveSC(), CxCalculator::getCorrection(), RxCalculator::getCRx(), GsfElectronCoreBaseProducer::getCtfTrackRef(), HiGammaJetSignalDef::getDeltaPhi(), Tau3MuReco::getDeltaR(), HiGammaJetSignalDef::getDeltaR(), EcalClusterTools::getDPhiEndcap(), GsfElectronAlgo::ElectronData::getEleBasicCluster(), CxCalculator::getNBC(), RxCalculator::getRFx(), RxCalculator::getROx(), RxCalculator::getRx(), RPCSeedPattern::getSpecialAlgorithmErrorMatrix(), CosmicMuonGenerator::goodOrientation(), EcalClusterTools::localCovariances(), JetMaker::makeSpecific(), reco::makeSpecific(), BremRecoveryClusterAlgo::match(), HiBremRecoveryClusterAlgo::match(), Multi5x5BremRecoveryClusterAlgo::match(), reco::RecoTauPiZero::maxDeltaPhi(), MuonCkfTrajectoryBuilder::MuonCkfTrajectoryBuilder(), CosmicMuonGenerator::nextEvent(), CosmicMuonGenerator::nextMultiEvent(), TrackDetMatchInfo::nXnEnergy(), reco::isodeposit::Direction::operator-(), egHLT::EgJetTagProbeCut< T >::pass(), egHLT::EgJetB2BCut< T >::pass(), PFClusterWidthAlgo::PFClusterWidthAlgo(), SETSeedFinder::pre_prune(), edm::MultiParticleInConeGunSource::produce(), edm::MultiParticleInConeGunProducer::produce(), SoftConversionProducer::produce(), MuonSeedPtExtractor::pT_extract(), pftools::CaloWindow::relativePosition(), EcalClusterTools::scLocalCovariances(), CSCSegAlgoShowering::showerSeg(), reco::isodeposit::NumCrystalEtaPhiVeto::veto(), and reco::isodeposit::RectangularEtaPhiVeto::veto().

30  {
31  phi1=Phi_0_2pi(phi1);
32  phi2=Phi_0_2pi(phi2);
33  return Phi_mpi_pi(phi1-phi2);
34 }
double Phi_mpi_pi(double x)
Definition: JetUtil.h:24
double Phi_0_2pi(double x)
Definition: JetUtil.h:18
double Phi_0_2pi ( double  x)

Definition at line 18 of file JetUtil.h.

References M_PI, and ExpressReco_HICollisions_FallBack::x.

Referenced by dPhi(), and radius().

18  {
19  while (x >= 2*M_PI) x -= 2*M_PI;
20  while (x < 0.) x += 2*M_PI;
21  return x;
22 }
#define M_PI
Definition: BFit3D.cc:3
double Phi_mpi_pi ( double  x)
double radius ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)

Definition at line 36 of file JetUtil.h.

References M_PI, siStripFEDMonitor_P5_cff::Min, Phi_0_2pi(), mathSSE::sqrt(), and TWOPI.

36  {
37 
38  const double TWOPI= 2.0*M_PI;
39 
40  phi1=Phi_0_2pi(phi1);
41  phi2=Phi_0_2pi(phi2);
42 
43  double dphi=Phi_0_2pi(phi1-phi2);
44  dphi = TMath::Min(dphi,TWOPI-dphi);
45  double deta = eta1-eta2;
46 
47  return sqrt(deta*deta+dphi*dphi);
48 }
#define TWOPI
EgammaCoreTools.
double Phi_0_2pi(double x)
Definition: JetUtil.h:18
T sqrt(T t)
Definition: SSEVec.h:28
#define M_PI
Definition: BFit3D.cc:3
template<typename T1 , typename T2 >
double radius ( const T1 &  t1,
const T2 &  t2 
)

Definition at line 50 of file JetUtil.h.

References CosmicsPD_Skims::radius.

50  {
51  return radius(t1->eta(),t1->phi(),t2->eta(),t2->phi());
52 }