CMS 3D CMS Logo

Functions | Variables
MathUtil.h File Reference
#include <iostream>
#include <math.h>
#include <Rtypes.h>

Go to the source code of this file.

Functions

template<class T >
T Abs (T a)
 
template<class T >
T Max (T a, T b)
 
template<class T >
T max (T a, T b)
 
template<class T >
T Min (T a, T b)
 
template<class T >
T min (T a, T b)
 
template<class T >
T Sign (T A, T B)
 
template<class T >
void Swap (T &a, T &b)
 
template<class T >
void SwapObj (T *a, T *b)
 

Variables

const double fermi = 1.
 
const double GeV = 1.
 
const double hbarc = 0.197*GeV*fermi
 
const double N_INFINITY = 9.0E99
 
const double N_PI = 3.14159265359
 
const double N_SMALL = 1.E-10
 

Function Documentation

template<class T >
T Abs ( T  a)
inline

Definition at line 49 of file MathUtil.h.

References a.

Referenced by FWPFCandidateDetailView::addClusters(), FWCaloDataHistProxyBuilder::addEntryToTEveCaloData(), FWOverlapTableManager::addOverlapEntry(), MonitorElement::addProfiles(), ZeePlots::analyze(), WenuPlots::analyze(), BeamHaloAnalyzer::analyze(), BesselI0(), BesselI1(), FWConvTrackHitsDetailView::build(), FWMET3DProxyBuilder::build(), FWMETProxyBuilder::buildViewType(), MEzCalculator::Calculate(), METzCalculator::Calculate(), EcalHaloAlgo::Calculate(), HcalHaloAlgo::Calculate(), GlobalHaloAlgo::Calculate(), ApeEstimatorSummary::calculateApe(), SiStripBadAPVAlgorithmFromClusterOccupancy::CalculateMeanAndRMS(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::CalculateMeanAndRMS(), Huber::calculateQuantile(), NAStrangePotential::CalculateStrangePotential(), MillePedeAlignmentAlgorithm::callMille2D(), WenuPlots::CheckCut(), ZeePlots::CheckCut1(), ZeePlots::CheckCut1Inv(), ZeePlots::CheckCut2(), ZeePlots::CheckCut2Inv(), WenuPlots::CheckCutInv(), WenuPlots::CheckCuts(), ZeePlots::CheckCuts1(), ZeePlots::CheckCuts2(), reco::modules::TrackerTrackHitFilter::checkHitAngle(), EventShapeVariables::circularity(), reco::helper::JetIDHelper::classifyJetComponents(), TrackerGeometryCompare::compareSurfaceDeformations(), compareTracklets(), TEveEllipsoid::ComputeBBox(), TEveEllipsoidProjected::ComputeBBox(), EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_highR9(), EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_lowR9(), PedeSteererWeakModeConstraints::constructConstraints(), TKinFitter::converged(), EGEnergyCorrector::CorrectedEnergyWithError(), EGEnergyCorrector::CorrectedEnergyWithErrorV3(), PFEnergyCalibration::CorrEta(), JetIDSelectionFunctor::craft08Cuts(), CosmicGenFilterHelix::createHistsEnd(), Decay(), PFRecoTauDiscriminationAgainstElectronMVA5::discriminate(), PFRecoTauDiscriminationByIsolationMVA2::discriminate(), AntiElectronIDCut2::Discriminator(), IntegralOverPhiFunction::DoEval(), IntegrandThetaFunction::DoEval(), SiPixelGainCalibrationAnalysis::doFits(), TEveEllipsoidProjectedGL::DrawRhoPhi(), TEveEllipsoidProjectedGL::DrawRhoZ(), TEveEllipsoidProjectedGL::drawRhoZAxis(), PFEnergyCalibration::Ecorr(), PFEnergyCalibration::EcorrPS_ePSNil(), EncodedEventId::EncodedEventId(), HOCalibAnalyzer::endJob(), EcalDeadChannelRecoveryNN< DetIdT >::estimateEnergy(), metsig::SignAlgoResolutions::evalPFJet(), ElectronEnergyCorrector::fBremEta(), EcalClusterEnergyCorrectionObjectSpecific::fBremEta(), GenSpecificAlgo::fillCommonMETData(), MillePedeMonitor::fillDerivatives(), QcdLowPtDQM::filldNdeta(), MillePedeMonitor::fillFrameToFrame(), MillePedeMonitor::fillRefTrajectory(), MillePedeMonitor::fillResiduals(), QcdLowPtDQM::fillTracklets(), ZeeCandidateFilter::filter(), Huber::fit(), fnc_dscb(), fnc_gaussalpha(), fnc_gaussalpha1alpha2(), JetIDSelectionFunctor::fwd09Cuts(), gen::Hydjet2Hadronizer::generatePartonsAndHadronize(), PedeSteererWeakModeConstraints::getCoefficient(), HIPixelClusterVtxProducer::getContainedHits(), pat::PATMHTProducer::getElectrons(), PFEnergyResolution::getEnergyResolutionEm(), TKinFitter::getF(), FWMagField::GetField(), pat::PATMHTProducer::getJets(), PrimaryVertexValidation::getMAD(), FWMagField::GetMaxFieldMag(), PhotonMIPHaloTagger::GetMipTrailFit(), pat::PATMHTProducer::getMuons(), PFResolutionMap::getRes(), getTheElectron(), getTheMuon(), EcalClusterLocalContCorrection::getValue(), EcalBasicClusterLocalContCorrection::getValue(), EcalClusterCrackCorrection::getValue(), reco::helper::JetIDHelper::HBHE_oddness(), FWEveViewManager::highlightAdded(), gen::Hydjet2Hadronizer::initializeForInternalPartons(), PFResolutionMap::IsInAPhiCrack(), ZeeCandidateFilter::isInFiducial(), EventShapeVariables::isotropy(), HDQMUtil::langaupro(), langaupro(), EcalClusterLocal::localCoordsEE(), FWHistSliceSelector::matchCell(), PFIsolationEstimator::matchPFObject(), PFResolutionMap::minimum(), PFEnergyCalibration::minimum(), GenSpecificAlgo::mkSpecificGenMETData(), passesElectronId(), passesElectronPreId(), Type0PFMETcorrInputProducer::produce(), CastorTowerProducer::produce(), BoostedTopProducer::Psi(), HIPAlignmentAlgorithm::run(), Comp2RefKolmogorov::runTest(), NoisyChannel::runTest(), ContentsWithinExpected::runTest(), TKinFitter::setMaxDeltaS(), TKinFitter::setMaxF(), TopologyWorker::setPartList(), TEcnaResultType::SetSizeHis(), TEcnaResultType::SetSizeMat(), Sign(), TopologyWorker::sign(), Huber::target(), QcdLowPtDQM::trackletVertexUnbinned(), TopologyWorker::ulAngle(), and QcdLowPtDQM::vertexZFromClusters().

50 {
51  return (a > 0) ? a : -a;
52  }
double a
Definition: hdecay.h:121
template<class T >
T Max ( T  a,
T  b 
)
inline

Definition at line 44 of file MathUtil.h.

References b.

Referenced by FWItemValueGetter::addEntry(), ZMuMuIsolationAnalyzer::analyze(), TrackerHitAnalyzer::analyze(), DQMSourceEleCalib::analyze(), EcalPerEvtLaserAnalyzer::analyze(), EcalABAnalyzer::analyze(), EcalTestPulseAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), EcalLaserAnalyzer::analyze(), TAPDPulse::arePulseRatioOK(), L1THIonImp::bookHistograms(), FWECALCaloDataDetailViewBuilder::buildCaloData(), reco::helper::JetIDHelper::calculate(), FWInvMassDialog::Calculate(), TEveEllipsoid::ComputeBBox(), TEveEllipsoidProjected::ComputeBBox(), PFRecoTauDiscriminationByIsolationMVA2::discriminate(), IntegralOverPhiFunction::DoEval(), TEveEllipsoidProjectedGL::DrawRhoZ(), InvRingCalib::duringLoop(), EcalEleCalibLooper::duringLoop(), GenXSecAnalyzer::endRun(), TauDQMHistPlotter::endRun(), FWTEventList::Enter(), TrackerHitProducer::fillG4MC(), MatrixFillMap::fillMap(), FWHFTowerProxyBuilderBase::fillTowerForDetId(), JetIDSelectionFunctor::fwd09Cuts(), CMSCGEN::generate(), FWCompactVerticalLayout::GetDefaultSize(), FWMagField::GetMaxFieldMag(), GetMPV(), FWGeometryTableViewBase::getTopNodeIdx(), CmsAnnotation::Handle(), EGammaMvaEleEstimator::IDIsoCombinedMvaValue(), EGammaMvaEleEstimator::isoMvaValue(), TAPDPulse::isPulseRatioMaxOK(), FWCompactVerticalLayout::Layout(), PFRecoTauDiscriminationAgainstElectronDeadECAL::loopXtals(), lorentzianPeak(), TopologyWorker::planes_sphe(), TopologyWorker::planes_sphe_wei(), FWGeometryTableManager::recalculateVisibility(), ZeePlots::ReturnCandVar(), Comp2RefKolmogorov::runTest(), TopologyWorker::sanda(), muon::segmentCompatibility(), SiStripMonitorDigi::SiStripMonitorDigi(), FW3DViewBase::updateClipPlanes(), fireworks::Context::voteMaxEtAndEnergy(), FWGeoTopNode::wrapTransparency(), and L1TOccupancyClient::xySymmetry().

45 {
46  return (a > b) ? a : b;
47  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
template<class T >
T max ( T  a,
T  b 
)
inline

Definition at line 63 of file MathUtil.h.

References b.

64 {
65  return (a > b)?a:b;
66  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
template<class T >
T Min ( T  a,
T  b 
)
inline
template<class T >
T min ( T  a,
T  b 
)
inline

Definition at line 58 of file MathUtil.h.

References b.

Referenced by dataset.Dataset::__lumiSelectionSnippet(), plotting::_findBounds(), plotting::_findBoundsY(), argparse.HelpFormatter::_format_action(), python.rootplot.argparse.HelpFormatter::_format_action(), plotting::_getXmin(), plotting::_getYmin(), argparse.ArgumentParser::_parse_known_args(), python.rootplot.argparse.ArgumentParser::_parse_known_args(), TPTask::_process(), abcd(), SiStripAPVRestorer::AbnormalBaselineInspect(), PixelClusterizerBase::AccretionCluster::add(), FastLineRecognition::Cluster::add(), Phase2ITPixelCluster::add(), SiPixelCluster::add(), TMom::addEntry(), GeometryInterface::addExtractor(), fit::RootMinuit< Function >::addParameter(), SideBandSubtract::addSideBandRegion(), SideBandSubtract::addSignalRegion(), L1GlobalTriggerObjectMaps::AlgorithmResult::AlgorithmResult(), revisionDML::alldataTags(), FedTimingAlgorithm::analyse(), ApvTimingAlgorithm::analyse(), OptoScanAlgorithm::analyse(), RECOVertex::analyze(), ValidationMisalignedTracker::analyze(), BasicGenParticleValidation::analyze(), L1TRPCTF::analyze(), PrimaryVertexValidation::analyze(), DTLocalTriggerLutTask::analyze(), MuonTrackValidator::analyze(), SiStripTrackingRecHitsValid::analyze(), HcalTriggerPrimitiveAlgo::analyzeHF2016(), HcalTriggerPrimitiveAlgo::analyzeHF2017(), approx_erf(), approx_expf(), mathSSE::as3D(), FWProxyBuilderConfiguration::assertParam(), VEcalCalibBlock::at(), objects.LeptonAnalyzer.LeptonAnalyzer::attachIsoAnnulus04(), objects.LeptonAnalyzer.LeptonAnalyzer::attachMiniIsolation(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::autosizeScrollWidget(), badGlobalMuonTaggerFWLite.BadGlobalMuonTagger::badMuons(), CSCSegAlgoRU::baseline(), PeriodicBinFinderInPhi< float >::binIndex(), PeriodicBinFinderInZ< float >::binIndex(), GeneralBinFinderInR< T >::binIndex(), GeneralBinFinderInZforGeometricSearchDet< float >::binIndex(), GenericBinFinderInZ< float, GeomDet >::binIndex(), MagBinFinders::GeneralBinFinderInR< double >::binIndex(), RBorderFinder::binIndex(), MagBinFinders::GeneralBinFinderInZ< double >::binIndex(), GctFormatTranslateV38::blockToGctEmCandsAndEnergySums(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), MaterialBudgetForward::book(), HistogramManager::book(), dqmoffline::l1t::L1TEfficiencyPlotHandler::book(), HcalDigisValidation::book1D(), DTTriggerEfficiencyTask::bookChamberHistos(), DTLocalTriggerEfficiencyTest::bookChambHistos(), dqmoffline::l1t::L1TDiffHarvesting::L1TDiffPlotHandler::bookDiff(), HLTExoticaPlotter::bookHist(), HLTHiggsPlotter::bookHist(), HLTHiggsSubAnalysis::bookHist(), HLTExoticaSubAnalysis::bookHist(), HLTMuonPlotter::bookHist(), PhotonOfflineClient::bookHisto(), PhotonAnalyzer::bookHisto(), ECALpedestalPCLworker::bookHistograms(), PrimaryVertexAnalyzer4PUSlimmed::bookHistograms(), MuonTrackValidator::bookHistograms(), DTLocalTriggerSynchTask::bookHistos(), DTLocalTriggerTask::bookHistos(), TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), Vispa.Views.LineDecayView.DecayLine::boundingRect(), RPCGeometryBuilderFromCondDB::build(), FWLongParameterSetter::build(), FWDoubleParameterSetter::build(), RPCGeometryBuilderFromDDD::buildGeometry(), MagGeoBuilderFromDDD::eLayer::buildMagELayer(), FWCaloTauProxyBuilder::buildViewType(), L1GlobalCaloTrigger::bxSetup(), LocalCacheFile::cache(), parserTimingReport::calc_MinMaxAvgRMS(), LRHelpFunctions::calcPtdrLRval(), Phase2TrackerDigitizerAlgorithm::calcQ(), SiPixelDigitizerAlgorithm::calcQ(), l1t::MicroGMTIsolationUnit::calculate5by5Sum(), PFEGammaAlgo::calculate_ele_mva(), Cluster3DPCACalculator::calculateAndSetPositionActual(), barrelUtil::calculatePhiWindow(), tkDetUtil::calculatePhiWindow(), CSCXonStrip_MatchGatti::calculateXonStripError(), CSCXonStrip_MatchGatti::calculateXonStripPosition(), Phase2ITPixelThresholdClusterizer::calibrate(), condbon::cdbon_write(), RectangularStripTopology::channel(), TrapezoidalStripTopology::channel(), CSCRadialStripTopology::channel(), TkRadialStripTopology::channel(), GsfElectronAlgo::ElectronData::checkCtfTrack(), SimpleCosmicBONSeeder::checkNoisyModules(), checkPhiInRange(), RectangularEtaPhiTrackingRegion::checkRZOld(), StraightLineCylinderCrossing::chooseSolution(), SpikeAndDoubleSpikeCleaner::clean(), TrajectoryCleanerBySharedHits::clean(), TrackCleaner::cleanTracks(), clip(), Grid1D::closestNode(), PixelCPEGeneric::collect_edge_charges(), CSCStripElectronicsSim::comparatorReading(), HltDiff::compare(), EgammaTowerIsolationNew< NC >::compute(), svgfig.Ticks::compute_logticks(), svgfig.Ticks::compute_miniticks(), EcalDccWeightBuilder::computeAllWeights(), ForwardDiskSectorBuilderFromWedges::computeBounds(), ForwardDiskSectorBuilderFromDet::computeBounds(), ForwardRingDiskBuilderFromDet::computeBounds(), TIDLayer::computeDisk(), Phase2EndcapLayer::computeDisk(), MVAJetPuId::computeIdVariables(), PileupJetIdAlgo::computeIdVariables(), Phase1PixelBlade::computeRadiusRanges(), BarrelDetLayer::computeSurface(), ForwardDetLayer::computeSurface(), MuRingForwardDoubleLayer::computeSurface(), EcalTPGParamBuilder::computeWeights(), Vispa.Views.LineDecayView.DecayLine::containsPoint(), MuonHOAcceptance::convertRegions(), HcalPulseShapes::convolve(), GsfBetheHeitlerUpdator::correctedFirstMean(), PFClusterEMEnergyCorrector::correctEnergies(), SamplingAlgorithm::correctProfile(), LaserSorter::createOutStream(), edmStreamStallGrapher::createPDFImage(), GaussianSumUtilities1D::d1LnPdf(), GaussianSumUtilities1D::d2LnPdf(), Qjets::d_ij(), revisionDML::dataTagInfo(), DateHandler::dateToTm(), LaserSorter::dcc2Lme(), gbl::BorderedBandMatrix::decomposeBand(), BTagLikeDeDxDiscriminator::dedx(), Vispa.Gui.VispaWidget.VispaWidget::defineCircleBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget::defineRoundRectBackgroundShape(), AlphaTVarProducer::deltaHt(), CSCMotherboardME11GEM::deltaPad(), CSCMotherboardME11GEM::deltaRoll(), Phase2TrackerDigitizerAlgorithm::digitize(), PATTauDiscriminationAgainstElectronMVA6::discriminate(), PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(), PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(), PATTauDiscriminationByMVAIsolationRun2::discriminate(), PFRecoTauDiscriminationByIsolation::discriminate(), python.rootplot.core::display_bin_text(), CSCSkim::doLongSATrack(), CSCStripElectronicsSim::doSaturation(), SideBandSubtract::doSubtraction(), PhysicsTools::TrainProcessor::doTrainData(), EmissionVetoHook1::doVetoFSREmission(), RPCRecHitValidClient::dqmEndJob(), SiPixelCertification::dqmEndJob(), DTCertificationSummary::dqmEndJob(), SiPixelCertification::dqmEndLuminosityBlock(), Comparator::Draw(), Vispa.Gui.PortConnection.PointToPointConnection::drawCorner(), Vispa.Gui.MenuWidget.MenuWidget::drawMenuEntries(), ClusterizingHistogram::dump(), VVIObjFDetails::dzero(), VVIObjDetails::dzero(), sistripvvi::VVIObjDetails::dzero(), EcalMonitorPrescaler::EcalMonitorPrescaler(), AlcaBeamMonitorClient::endRun(), PFEnergyCalibration::energyEmHad(), GSUtilities::errorMode(), RectangularEtaPhiTrackingRegion::estimator(), EtaMultiRangeCut::EtaMultiRangeCut(), SimHitsValidationHcal::etaRange::etaRange(), GflashShowino::evaluateLengths(), HcalTopology::exclude(), sistrip::SpyUtilities::extractFrameInfo(), external::HEPTopTaggerV2_fixed_R::f_rec(), DAClusterizerInZ_vect::fill(), cond::payloadInspector::TimeHistoryPlot< PayloadType, Y >::fill(), AdHocNTupler::fill(), MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(), core.autovars.NTupleCollection::fillBranchesScalar(), core.autovars.NTupleCollection::fillBranchesVector(), HcalTB04Analysis::fillBuffer(), HLTMuonMatchAndPlot::fillEdges(), TriggerSummaryProducerAOD::fillFilterObjectMembers(), MuonShowerInformationFiller::fillHitsByStation(), HcalTB04Histo::fillLongProf(), FastTimerServiceClient::fillPathSummaryPlots(), NewMuonTrackValidatorBase::fillPlotNoFlow(), SiStripQualityChecker::fillSubDetStatus(), ThroughputServiceClient::fillSummaryPlots(), ExtractAppInfoFromXML::fillTable(), LRHelpFunctions::fillToSignalCorrelation(), HcalTB04Histo::fillTrnsProf(), dqmoffline::l1t::fillWithinLimits(), BadGlobalMuonTagger::filter(), ProbeTreeProducer::filter(), CSCDigiValidator::filter(), JetVertexChecker::filter(), RPCNoise::filter(), L1TGlobalPrescaler::filter(), RPCRunIOV::filterIMON(), LA_Filler_Fitter::find_rebin(), ThirdHitPrediction::findArcIntersection(), PFBlockAlgo::findBlocks(), GaussianSumUtilities1D::findMode(), ThirdHitPrediction::findRectangle(), SymmetryFit::findUsableMinMax(), SequentialPartitionGenerator::first_part(), tauImpactParameter::Chi2VertexFitter::fit(), reco::PositiveSideGhostTrackFitter::fit(), Huber::fit(), LA_Filler_Fitter::fit_width_profile(), CaloRecHit::flagField(), SiStripAPVRestorer::FlatRegionsFinder(), EcalSelectiveReadoutValidation::frame2Energy(), submitDQMOfflineCAF::Func_MagConfig(), FWExpressionValidator::FWExpressionValidator(), Pythia8Hadronizer::generatePartonsAndHadronize(), cmsPerfStripChart::get_yaxis_range(), CustomParticleFactory::getAntiDecayTable(), l1t::getBXRange(), RPCSimModelTiming::getClSize(), RPCSimAverage::getClSize(), RPCSimAverageNoise::getClSize(), RPCSimAverageNoiseEff::getClSize(), RPCSimAverageNoiseEffCls::getClSize(), RPCSimAsymmetricCls::getClSize(), sistrip::SpyEventMatcher::getCollections(), GsfElectronCoreBaseProducer::getCtfTrackRef(), FSQHLTOfflineSource_cfi::getDoublePFJet(), ZdcSD::getEnergyDeposit(), CastorSD::getEnergyDeposit(), PSFitter::HybridMinimizer::GetFCN(), dqmoffline::l1t::getFillValueWithinLimits(), EcalSelectiveReadoutValidation::getFIRWeights(), EcalSelectiveReadoutSuppressor::getFIRWeigths(), PlotMillePede::GetHistManager(), CastorShowerLibraryMaker::GetKinematics(), TMom::getMin(), heppy::BTagSF::getMistag(), popcon::EcalPedestalsHandler::getNewObjectsP5(), LMFLmrSubIOV::getParameters(), TMom::getPeak(), fireworks::getPhiRange(), PlotMillePedeIOV::GetPlotMillePede(), FSQHLTOfflineSource_cfi::getPTAveVPSet(), ThirdHitPrediction::getRanges(), PrimaryVertexAnalyzer4PUSlimmed::getRecoPVs(), SiStripThreshold::getRegistryVectorEnd(), heppy::BTagSF::getSFl(), PrimaryVertexAnalyzer4PUSlimmed::getSimPVs(), FSQHLTOfflineSource_cfi::getSinglePFJet(), PlotMillePede::GetSubDetIds(), HcalTB02HcalNumberingScheme::getUnitID(), create_public_peakpu_plots::GetXLocator(), create_public_lumi_plots::GetXLocator(), HFGflash::gfParameterization(), CachingSeedCleanerBySharedInput::good(), GsfEleSCEtaMultiRangeCut::GsfEleSCEtaMultiRangeCut(), dataDML::guessDataIdForRange(), Pythia8Hadronizer::hadronize(), HFQIE10Info::HFQIE10Info(), mpl_axes_hist_fix::hist(), ApvTimingHistograms::histoAnalysis(), FedTimingHistograms::histoAnalysis(), npstat::HistoND< Numeric, Axis >::HistoND(), PixelQuadrupletGenerator::hitQuadruplets(), PixelTripletLargeTipGenerator::hitTriplets(), PixelTripletHLTGenerator::hitTriplets(), HLTDiMuonGlbTrkFilter::hltFilter(), EGammaMvaEleEstimator::IDIsoCombinedMvaValue(), Vispa.Gui.VispaWidget.VispaWidget::imageRectF(), SiPixelCPEGenericDBErrorParametrization::index(), Grid1D::index(), SiTrivialInduceChargeOnStrips::induceOriginal(), SiTrivialInduceChargeOnStrips::induceVector(), reco::MustacheKernel::inDynamicDPhiWindow(), TMom::init(), ThirdHitPredictionFromInvParabola::init(), EcalSelectiveReadoutSuppressor::initCellThresholds(), HBHERecalibration::initialize(), reco::MustacheKernel::inMustache(), BeautifulSoup.PageElement::insert(), funct::integral_f(), EcalSelectiveReadoutSuppressor::internalThreshold(), dataDML::intglumiForRange(), gbl::BorderedBandMatrix::invertBand(), DTHitPairForFit::isCompatible(), PFMuonAlgo::isGlobalLooseMuon(), PFMuonAlgo::isGlobalTightMuon(), L1MuGMTMatrix< T >::isMin(), TangentCircle::isTangent(), npstat::LinInterpolatedTableND< Numeric, Axis >::isWithinLimits(), reco::TrackProbabilityTagInfo::jetProbability(), TemplatedJetProbabilityComputer< Container, Base >::jetProbability(), TemplatedJetBProbabilityComputer< Container, Base >::jetProbability(), PFBlockAlgo::link(), SimpleNavigationSchool::linkOuterGroup(), PFBlockAlgo::linkPrefilter(), GaussianSumUtilities1D::lnPdf(), HcalGeomParameters::loadGeometry(), CaloTPGTranscoderULUT::loadHCALCompress(), CSCRadialStripTopology::localPitch(), PixelCPETemplateReco::localPosition(), GflashHadronShowerProfile::locateHitPosition(), npstat::ArrayRange::lowerLimits(), VoronoiAlgorithm::lp_populate(), main(), heppy_loop::main(), Phase2ITPixelThresholdClusterizer::make_cluster(), PixelThresholdClusterizer::make_cluster(), SiPixelDigitizerAlgorithm::make_digis(), HGCalImagingAlgo::makeClusters(), generateEDF::makeEDFplot(), MuIsoValidation::MakeLogBinsForProfile(), EcalUncalibRecHitMaxSampleAlgo< C >::makeRecHit(), CSCHitFromStripOnly::makeStripData(), cmsTiming_parser::manipulate_log(), btag::Matching< Delta >::match(), TrackingNtuple::matchCluster(), objects.LeptonAnalyzer.LeptonAnalyzer::matchLeptons(), objects.LeptonAnalyzer.LeptonAnalyzer::matchToPhotons(), AlignmentGlobalTrackSelector::matchTracks(), maxDiff(), Chi2MeasurementEstimatorBase::maximalLocalDisplacement(), GflashHadronShowerProfile::medianLateralArm(), MuonHOAcceptance::deadIdRegion::merge(), QuadrupletSeedMerger::mergeTriplets(), TrackerInteractionGeometry::minDim(), ntuplePrintersDiff._TrackAssociation::minEta(), PSFitter::HybridMinimizer::Minimize(), FlatEvtVtxGenerator::minX(), FlatEvtVtxGenerator::minY(), FlatEvtVtxGenerator::minZ(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), FWEventItem::moveToFront(), FWEventItem::moveToLayer(), MuRingForwardLayer::MuRingForwardLayer(), AntiElectronIDMVA5::MVAValue(), AntiElectronIDMVA6::MVAValue(), CSCRadialStripTopology::nearestStrip(), TkRadialStripTopology::nearestStrip(), L1CaloHcalScaleConfigOnlineProd::newObject(), CosmicMuonGenerator::nextMultiEvent(), PulseChiSqSNNLS::NNLS(), tauImpactParameter::MultiProngTauSolver::numericalESolver(), RK4PreciseStep::operator()(), reco::parser::min_f::operator()(), CylinderBuilderFromDet::operator()(), funct::GaussLegendreIntegrator::operator()(), npstat::LinInterpolatedTableND< Numeric, Axis >::operator()(), edm::operator<<(), l1t::stage1::EtSumPacker::pack(), l1t::stage1::HFRingPacker::pack(), l1t::stage1::MissEtPacker::pack(), l1t::stage2::CaloTowerPacker::pack(), l1t::stage1::MissHtPacker::pack(), l1t::stage1::CaloSpareHFPacker::pack(), l1t::stage2::EtSumPacker::pack(), l1t::stage2::EGammaPacker::pack(), l1t::stage2::TauPacker::pack(), l1t::stage2::JetPacker::pack(), CastorCORData::pack(), Phase2ITPixelCluster::pack_(), SiPixelCluster::packCol(), SiPixelCluster::packRow(), GflashEMShowerProfile::parameterization(), python.rootplot.core::parse_legend_root(), python.rootplot.core::parse_range(), python.rootplot.rootmath::pathdiff3(), HelixForwardPlaneCrossing::pathLength(), Phase2ITPixelCluster::Phase2ITPixelCluster(), CmsTrackerPhase1DiskBuilder::PhiPosNegSplit_innerOuter(), CmsTrackerPhase2TPDiskBuilder::PhiPosNegSplit_innerOuter(), DTTrigGeomUtils::phiRange(), InnerDeltaPhi::phiRange(), RectangularEtaPhiTrackingRegion::phiWindow(), PhoSCEtaMultiRangeCut::PhoSCEtaMultiRangeCut(), SiPixelCoordinates::pixel_(), PixelForwardLayerPhase1::PixelForwardLayerPhase1(), SiPixelTemplateSplit::PixelTempSplit(), PixelTrackErrorParam::PixelTrackErrorParam(), plotMaker(), matplotRender.matplotRender::plotPeakPerday_Time(), matplotRender.matplotRender::plotPerdayX_Time(), PFTauRenderPlugin::preDraw(), CSCCrosstalkConditions::prefillCrosstalk(), CSCFakeDBCrosstalk::prefillDBCrosstalk(), CSCGainsConditions::prefillGains(), gbl::VVector::print(), gbl::VMatrix::print(), gbl::VSymMatrix::print(), sipixelobjects::PixelFEDLink::printForMap(), MuonBadTrackFilter::printMuonProperties(), PFMuonAlgo::printMuonProperties(), SiStripNoises::printSummary(), HcalDDDSimConstants::printTileHB(), HcalDDDSimConstants::printTileHE(), process(), PFAlgo::processBlock(), HBHEPhase1Reconstructor::processData(), MultiTrackSelector::processMVA(), HIMultiTrackSelector::processMVA(), RPCTwinMuxRawToDigi::processTwinMux(), CandOneToOneDeltaRMatcher::produce(), pat::L1MuonMatcher::produce(), ConversionTrackMerger::produce(), SimpleTrackListMerger::produce(), TrackListMerger::produce(), L1TMuonProducer::produce(), GenTtbarCategorizer::produce(), BaseParticlePropagator::propagate(), Qjets::Prune(), SamplingAlgorithm::pruneProfile(), CSCTFPtMethods::Pt2StnChiSq(), CSCTFPtMethods::Pt3StnChiSq(), TauIdMVAAuxiliaries::pt_weighted_dx(), EmissionVetoHook1::pTcalc(), edm::DataMixingEMDigiWorker::putEM(), TrackClassifier::qualityInformation(), JME::JetResolutionObject::Range::Range(), rangeIntersection(), lhef::StorageInputStream::readBytes(), RunInfoRead::readData(), HcalSimpleRecAlgoImpl::recoHFTime(), HFPreRecAlgo::reconstruct(), reco::tau::RecoTauPiZeroStripPlugin2::RecoTauPiZeroStripPlugin2(), reco::tau::RecoTauPiZeroStripPlugin3::RecoTauPiZeroStripPlugin3(), RecoTauPlotDiscriminator::RecoTauPlotDiscriminator(), reco::GhostTrackVertexFinder::recursiveMerge(), SiStripQuality::ReduceGranularity(), MuonTrackingRegionBuilder::region(), HcalSimpleRecAlgoImpl::removePileup(), DynamicRfilt::result(), svgfig::rgb(), external::HEPTopTaggerV2_fixed_R::run(), SubjetFilterAlgorithm::run(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), HGCFEElectronics< DFr >::runShaperWithToT(), HGCFEElectronics< DFr >::runSimpleShaper(), SimpleElectronicsSimInMIPs::runTrivialShaper(), HGCFEElectronics< DFr >::runTrivialShaper(), TrackerMap::save_as_HVtrackermap(), SiStripBaseCondObjDQM::saveTkMap(), PowhegResHook::scaleResonance(), KDTreeLinkerTrackEcal::searchLinks(), PixelForwardLayer::searchNeighbors(), PixelForwardLayerPhase1::searchNeighbors(), TIBRing::searchNeighbors(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), set_mean(), set_sigma(), GeometryComparisonPlotter::SetBranchMin(), GFHistManager::SetCanvasHeight(), GlobalHaloAlgo::SetEcalMatchingRadius(), CaloRecHit::setFlagField(), CaloTowersCreationAlgo::setGeometry(), GlobalHaloAlgo::SetHcalMatchingRadius(), CondDBESSource::setIntervalFor(), TotemRPIncludeAlignments::setIntervalFor(), AbsElectronicODERHS::setLeadingParameters(), PFBlockAlgo::setLinkers(), DatabasePDG::SetMassRange(), CompareToMedian::setMin(), CompareLastFilledBin::setMin(), HistoDef::setMinimum(), FlavourHistograms< int >::SetMinimum(), FlavourHistograms2D< double, double >::SetMinimum(), SetMinMaxRange(), reco::PhiWedge::SetMinMaxTime(), CompareToMedian::setMinMedian(), TrackerMap::setRange(), Vispa.Main.SplitterTab.SplitterToolBar::setSectionSizes(), reco::tau::RecoTauBuilderConePlugin::setTauQuantities(), TrackerMap::setTitle(), egHLT::BinData::Data1D::setup(), DatabasePDG::SetWidthRange(), HcalZSAlgoRealistic::shouldKeep(), CSCStripHitSim::simulate(), SiPixelCluster::SiPixelCluster(), JetCorrectorParametersHelper::size(), Vispa.Gui.VispaWidget.VispaWidget::sizeHint(), StripCPEgeometric::WrappedCluster::smallerEdgeStrip(), QGLikelihoodCalculator::smearingFunction(), gbl::BorderedBandMatrix::solveBand(), TrackClusterSplitter::splitCluster(), TkRadialStripTopology::strip(), CSCRadialStripTopology::strip(), edmIntegrityCheck.IntegrityCheck::stripDuplicates(), npstat::ArrayRange::stripOuterLayer(), SiStripTemplateSplit::StripTempSplit(), PixelRecoRange< float >::sum(), svgfig.XErrorBars::SVG(), svgfig.YErrorBars::SVG(), SiStripTemplate::sxtemp(), ConeIsolationAlgorithm::tag(), TestPythiaDecays::TestPythiaDecays(), TkStripMeasurementDet::testStrips(), LinkByRecHit::testTrackAndClusterByRecHit(), root::tf1(), DTTrigGeomUtils::thetaRange(), create_public_lumi_plots.LumiDataBlock::time_begin(), create_public_lumi_plots.LumiDataBlockCollection::time_begin(), Traj2TrackHits::toChi2x5(), RPCRunIOV::toUNIX(), MultiTrackValidator::trackDR(), MuonNavigableLayer::trackingRange(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), ThirdHitPredictionFromCircle::transverseIP(), funct::trapezoid_integral(), TwoBowedSurfacesDeformation::TwoBowedSurfacesDeformation(), GflashHadronShowerProfile::twoGammaProfile(), HcalNumberingFromDDD::unitID(), l1t::stage2::CaloTowerUnpacker::unpack(), DCCTowerBlock::unpackXtalData(), DCCSCBlock::unpackXtalData(), HcaluLUTTPGCoder::update(), HcalTB02Analysis::update(), sistrip::RawToDigiUnpacker::update(), CastorTestAnalysis::update(), GaussianSumUtilities1D::update(), edm::service::CondorStatusService::updateImpl(), Vispa.Main.Application.Application::updateMenu(), RPCFw::UTtoT(), validateGlobalMuonPair(), FWProxyBuilderConfiguration::value(), PuppiContainer::var_within_R(), DAClusterizerInZ_vect::vertices(), npstat::HistoND< Numeric, Axis >::volume(), edm::Lumi3DReWeighting::weight3D(), reweight::LumiReWeighting::weight3D(), edm::Lumi3DReWeighting::weight3D_init(), reweight::LumiReWeighting::weight3D_init(), npstat::BoxND< Numeric >::write(), CSCXonStrip_MatchGatti::xfError_Noise(), CSCXonStrip_MatchGatti::xfError_XTasym(), SiPixelTemplate2D::xytemp(), and QGLikelihoodCalculator::~QGLikelihoodCalculator().

59 {
60  return (a < b)?a:b;
61  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
template<class T >
T Sign ( T  A,
T  B 
)
inline
template<class T >
void Swap ( T a,
T b 
)
inline

Definition at line 32 of file MathUtil.h.

References a, b, and tmp.

Referenced by dqmstorepb::ROOTFilePB_Histo::internal_default_instance(), and dqmstorepb::ROOTFilePB::internal_default_instance().

33 {
34  T tmp = a;
35  a = b;
36  b = tmp;
37  }
double b
Definition: hdecay.h:120
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
double a
Definition: hdecay.h:121
long double T
template<class T >
void SwapObj ( T a,
T b 
)
inline

Definition at line 25 of file MathUtil.h.

References a, b, and tmp.

26 {
27  T tmp= *a;
28  *a = *b;
29  *b = tmp;
30  }
double b
Definition: hdecay.h:120
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
double a
Definition: hdecay.h:121
long double T

Variable Documentation

const double fermi = 1.
const double GeV = 1.

Definition at line 16 of file MathUtil.h.

Referenced by CustomParticleFactory::addCustomParticle(), CMSGDMLWriteStructure::AddExtension(), Rivet::CMS_2013_I1224539_DIJET::analyze(), Bcm1fSD::Bcm1fSD(), CaloSD::CaloSD(), CastorSD::CastorSD(), CMSMonopolePhysics::CMSMonopolePhysics(), NuclearInteractionFTFSimulator::compute(), CMSMonopolePhysics::ConstructParticle(), CustomPhysicsList::ConstructProcess(), CustomPhysicsListSS::ConstructProcess(), CMSMonopolePhysics::ConstructProcess(), PltSD::createHit(), Bcm1fSD::createHit(), TkAccumulatingSensitiveDetector::createHit(), MuonSensitiveDetector::createHit(), HadronPhysicsQGSPCMS_FTFP_BERT::CreateModels(), HadronPhysicsCMS::CreateModels(), CMSHadronPhysicsFTFP_BERT_ATL::CreateModels(), CaloSD::createNewHit(), Decay3Body::doDecay(), GflashHadronShowerModel::DoIt(), GFlashHadronShowerModel::DoIt(), GflashEMShowerModel::DoIt(), GFlashEMShowerModel::DoIt(), GflashHadronShowerModel::excludeDetectorRegion(), GFlashHadronShowerModel::excludeDetectorRegion(), HcalTestAnalysis::fill(), SimG4HcalValidation::fill(), HcalTB04Analysis::fillBuffer(), HcalTB02Analysis::fillEvent(), MaterialBudgetCastorHistos::fillStartTrack(), MaterialBudgetHcalHistos::fillStartTrack(), ZdcShowerLibrary::getEnergyFromLibrary(), ZdcSD::getFromLibrary(), CastorSD::getFromLibrary(), HCalSD::getFromLibrary(), HCalSD::getFromParam(), HCalSD::getHitFibreBundle(), HCalSD::getHitPMT(), HFShowerPMT::getHits(), HFShowerParam::getHits(), HFShowerLibrary::getHits(), CastorShowerLibraryMaker::GetKinematics(), TotemSD::GetStepInfo(), BHMSD::GetStepInfo(), FastTimerSD::GetStepInfo(), BscSD::GetStepInfo(), FP420SD::GetStepInfo(), CaloMeanResponse::getWeight(), HFGflash::gfParameterization(), GflashHadronShowerProfile::hadronicParameterization(), CalorimetryManager::HDShowerSimulation(), Generator::HepMC2G4(), HFShowerLibrary::HFShowerLibrary(), HCalSD::hitForFibre(), Rivet::CMS_2013_I1224539_DIJET::init(), RunManager::initG4(), CMSFieldManager::InitialiseForVolume(), RunManagerMTWorker::initializeThread(), TreatSecondary::initTrack(), HFShowerLibrary::interpolate(), GflashHadronShowerModel::isFirstInelasticInteraction(), G4SimEvent::load(), CustomParticleFactory::loadCustomParticles(), CastorShowerLibrary::loadEventInfo(), HFShowerLibrary::loadEventInfo(), MaterialEffects::MaterialEffects(), GflashHadronShowerModel::ModelTrigger(), GFlashHadronShowerModel::ModelTrigger(), GflashEMShowerModel::ModelTrigger(), NAStrangeDensity::NAStrangeDensity(), CMSSteppingVerbose::NextStep(), Generator::nonBeamEvent2G4(), GflashEMShowerProfile::parameterization(), ParametrisedEMPhysics::ParametrisedEMPhysics(), Generator::particleAssignDaughters(), Generator::particlePassesPrimaryCuts(), PltSD::PltSD(), GflashHadronWrapperProcess::Print(), CaloSD::ProcessHits(), Geant4ePropagator::propagateGeneric(), CaloMeanResponse::readResponse(), CaloSD::resetForNewPrimary(), RHStopTracer::RHStopTracer(), UrbanMscModel93::SampleCosineTheta(), CaloSD::saveHit(), CMSSteppingVerbose::StackFilled(), TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector(), TreatSecondary::tracks(), CMSSteppingVerbose::TrackStarted(), MonopoleSteppingAction::update(), RHStopTracer::update(), HGCalTBMB::update(), GflashG4Watcher::update(), MaterialBudgetForward::update(), MaterialBudget::update(), TrackingVerboseAction::update(), HcalTB02Analysis::update(), DoCastorAnalysis::update(), PltSD::updateHit(), Bcm1fSD::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), MuonSensitiveDetector::updateHit(), and ZdcSD::ZdcSD().

const double hbarc = 0.197*GeV*fermi
const double N_INFINITY = 9.0E99

Definition at line 21 of file MathUtil.h.

const double N_PI = 3.14159265359

Definition at line 19 of file MathUtil.h.

Referenced by NAStrangeDensity::ParticleNumberDensity().

const double N_SMALL = 1.E-10

Definition at line 22 of file MathUtil.h.