CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
UKUtility.h File Reference

Go to the source code of this file.

Functions

void IsotropicR3 (double r, double *pX, double *pY, double *pZ)
 
void IsotropicR3 (double r, TVector3 &pos)
 
void MomAntiMom (TLorentzVector &mom, double mass, TLorentzVector &antiMom, double antiMass, double initialMass)
 

Variables

const double fermi
 
const double GeV
 
const double hbarc
 
const double hbarc_squared
 
const double mbarn
 
const double MeV
 
const double w
 

Function Documentation

void IsotropicR3 ( double  r,
double *  pX,
double *  pY,
double *  pZ 
)

Definition at line 26 of file UKUtility.cc.

References funct::cos(), hjRandomEngine, phi, Pi, alignCSCRings::r, and funct::sin().

Referenced by MomAntiMom().

26  {
27  double pZ = 1. - 2.*(CLHEP::RandFlat::shoot(hjRandomEngine));
28  double st = TMath::Sqrt(1. - pZ * pZ) * r;
29  double phi = 2. * TMath::Pi() * (CLHEP::RandFlat::shoot(hjRandomEngine));
30 
31  *x = st * cos(phi);
32  *y = st * sin(phi);
33  *z = pZ * r;
34 }
const double Pi
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
float float float z
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CLHEP::HepRandomEngine * hjRandomEngine
Definition: DDAxes.h:10
Definition: DDAxes.h:10
void IsotropicR3 ( double  r,
TVector3 &  pos 
)

Definition at line 36 of file UKUtility.cc.

References hjRandomEngine, phi, Pi, and alignCSCRings::r.

36  {
37  double pZ = 1. - 2.* (CLHEP::RandFlat::shoot(hjRandomEngine));
38  double st = TMath::Sqrt(1. - pZ * pZ) * r;
39  double phi = 2. * TMath::Pi() * (CLHEP::RandFlat::shoot(hjRandomEngine));
40  pos.SetX(st * TMath::Cos(phi));
41  pos.SetY(st * TMath::Sin(phi));
42  pos.SetZ(pZ * r);
43 }
const double Pi
CLHEP::HepRandomEngine * hjRandomEngine
Definition: DDAxes.h:10
void MomAntiMom ( TLorentzVector &  mom,
double  mass,
TLorentzVector &  antiMom,
double  antiMass,
double  initialMass 
)

Definition at line 45 of file UKUtility.cc.

References IsotropicR3(), and alignCSCRings::r.

Referenced by Decay().

46  {
47  double r = initialMass * initialMass - mass * mass - antiMass * antiMass;
48  if (r * r - 4 * mass * mass * antiMass * antiMass < 0.) throw "MomAntiMom";
49 
50  double pAbs = .5 * TMath::Sqrt(r * r - 4 * mass * mass * antiMass * antiMass) / initialMass;
51  TVector3 mom3;
52  IsotropicR3(pAbs, mom3);
53  mom.SetVectM(mom3, mass);
54  antiMom.SetVectM(- mom3, antiMass);
55 }
void IsotropicR3(double r, double *pX, double *pY, double *pZ)
Definition: UKUtility.cc:26

Variable Documentation

const double fermi
const double GeV

Definition at line 16 of file MathUtil.h.

Referenced by CustomParticleFactory::addCustomParticle(), CustomPhysicsList::addCustomPhysics(), CustomPhysicsListSS::addCustomPhysics(), Rivet::CMS_EWK_10_010::analyze(), Rivet::CMS_EWK_11_021::analyze(), Rivet::CMS_2011_I930319::analyze(), Rivet::CMS_FSQ_12_020::analyze(), Rivet::MC_LES_HOUCHES_SYSTEMATICS_CMS::analyze(), Rivet::CMS_EWK_10_012::analyze(), Bcm1fSD::Bcm1fSD(), CaloSD::CaloSD(), CastorSD::CastorSD(), CMSMonopolePhysics::CMSMonopolePhysics(), CMSmplIonisationWithDeltaModel::CMSmplIonisationWithDeltaModel(), CMSMonopolePhysics::ConstructParticle(), CMSMonopolePhysics::ConstructProcess(), Bcm1fSD::createHit(), PltSD::createHit(), TkAccumulatingSensitiveDetector::createHit(), MuonSensitiveDetector::createHit(), HadronPhysicsQGSPCMS_FTFP_BERT::CreateModels(), HadronPhysicsQGSPCMS_FTFP_BERT_WP::CreateModels(), HadronPhysicsCMS::CreateModels(), HadronPhysicsQGSP_BERT_WP::CreateModels(), CaloSD::createNewHit(), Decay3Body::doDecay(), GflashHadronShowerModel::DoIt(), GFlashEMShowerModel::DoIt(), GflashEMShowerModel::DoIt(), GflashHadronShowerModel::excludeDetectorRegion(), HcalTestAnalysis::fill(), SimG4HcalValidation::fill(), ThePEGInterface::fillAuxiliary(), HcalTB06Analysis::fillBuffer(), HcalTB04Analysis::fillBuffer(), HcalTB02Analysis::fillEvent(), MaterialBudgetCastorHistos::fillStartTrack(), MaterialBudgetHcalHistos::fillStartTrack(), Rivet::CMS_2011_I930319::finalize(), ZdcShowerLibrary::getEnergyFromLibrary(), ZdcSD::getFromLibrary(), CastorSD::getFromLibrary(), HCalSD::getFromLibrary(), HCalSD::getFromParam(), HCalSD::getHitFibreBundle(), HCalSD::getHitPMT(), HFShowerPMT::getHits(), HFShowerParam::getHits(), HFShowerLibrary::getHits(), CastorShowerLibraryMaker::GetKinematics(), TotemSD::GetStepInfo(), BscSD::GetStepInfo(), FP420SD::GetStepInfo(), CaloMeanResponse::getWeight(), HFGflash::gfParameterization(), GflashHadronShowerProfile::hadronicParameterization(), CalorimetryManager::HDShowerSimulation(), Generator::HepMC2G4(), HFShowerLibrary::HFShowerLibrary(), HCalSD::hitForFibre(), Rivet::CMS_EWK_11_021::init(), Rivet::CMS_EWK_10_012::init(), Rivet::CMS_EWK_10_010::init(), Rivet::CMS_2011_I930319::init(), Rivet::CMS_2010_S8808686::init(), Rivet::MC_LES_HOUCHES_SYSTEMATICS_CMS::init(), TreatSecondary::initTrack(), HFShowerLibrary::interpolate(), GflashHadronShowerModel::isFirstInelasticInteraction(), G4SimEvent::load(), CustomParticleFactory::loadCustomParticles(), CastorShowerLibrary::loadEventInfo(), HFShowerLibrary::loadEventInfo(), GflashHadronShowerModel::ModelTrigger(), GFlashEMShowerModel::ModelTrigger(), GflashEMShowerModel::ModelTrigger(), NAStrangeDensity::NAStrangeDensity(), Generator::nonBeamEvent2G4(), GflashEMShowerProfile::parameterization(), Generator::particleAssignDaughters(), Generator::particlePassesPrimaryCuts(), PltSD::PltSD(), GflashHadronWrapperProcess::Print(), CaloSD::ProcessHits(), ThePEGInterface::pthat(), CaloMeanResponse::readResponse(), CaloSD::resetForNewPrimary(), UrbanMscModel93::SampleCosineTheta(), CaloSD::saveHit(), PhysicsList::SetCuts(), CustomPhysicsListSS::setupRHadronPhycis(), CustomPhysicsList::setupRHadronPhycis(), TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector(), TreatSecondary::tracks(), MonopoleSteppingAction::update(), RHStopTracer::update(), GflashG4Watcher::update(), MaterialBudgetForward::update(), MaterialBudget::update(), TrackingVerboseAction::update(), HcalTB02Analysis::update(), DoCastorAnalysis::update(), PltSD::updateHit(), Bcm1fSD::updateHit(), TkAccumulatingSensitiveDetector::updateHit(), MuonSensitiveDetector::updateHit(), ZdcSD::ZdcSD(), and PhysicsList::~PhysicsList().

const double hbarc
const double hbarc_squared

Definition at line 24 of file UKUtility.cc.

const double mbarn
const double MeV

Referenced by CustomParticleFactory::addCustomParticle(), CustomPhysicsList::addCustomPhysics(), CaloSD::CaloSD(), CaloTrkProcessing::CaloTrkProcessing(), StackingAction::ClassifyNewTrack(), UrbanMscModel93::ComputeCrossSectionPerAtom(), UrbanMscModel93::ComputeTheta0(), UrbanMscModel93::ComputeTruePathLengthLimit(), CMSEmStandardPhysics::ConstructProcess(), CMSEmStandardPhysicsXS::ConstructProcess(), ParametrisedEMPhysics::ConstructProcess(), HFWedgeSD::createNewHit(), DreamSD::DreamSD(), ECalSD::ECalSD(), EcalTBH4BeamSD::EcalTBH4BeamSD(), EcalTBH4BeamSD::getEnergyDeposit(), ECalSD::getEnergyDeposit(), HcalTB02SD::getEnergyDeposit(), CastorSD::getEnergyDeposit(), HCalSD::getEnergyDeposit(), HFShowerFibreBundle::getHits(), HFShowerPMT::getHits(), DreamSD::getStepInfo(), HCalSD::HCalSD(), HcalTB02SD::HcalTB02SD(), HcalTB06BeamSD::HcalTB06BeamSD(), Rivet::CMS_FSQ_12_020::init(), UrbanMscModel93::Initialise(), SteppingAction::initPointer(), TreatSecondary::initTrack(), KillSecondariesTrackAction::KillSecondariesTrackAction(), HcalTestAnalysis::layerAnalysis(), SimG4HcalValidation::layerAnalysis(), CustomParticleFactory::loadCustomParticles(), operator<<(), sim::LocalFieldManager::print(), SteppingAction::PrintKilledTrack(), HFChamberSD::ProcessHits(), MaterialProperties::setMaterialProperties(), StackingAction::StackingAction(), SteppingAction::SteppingAction(), TreatSecondary::tracks(), TreatSecondary::TreatSecondary(), SaveSimTrack::update(), KillSecondariesTrackAction::update(), CaloTrkProcessing::update(), HcalTestAnalysis::update(), SimG4HcalValidation::update(), EcalTBH4Trigger::update(), HFWedgeSD::updateHit(), CaloSD::updateHit(), and UrbanMscModel93::UrbanMscModel93().

const double w

Definition at line 23 of file UKUtility.cc.

Referenced by EcalSelectiveReadoutSuppressor::accept(), MinL3Algorithm::addEvent(), MinL3AlgoUniv< IDdet >::addEvent(), EvtPlaneProducer::GenPlane::addParticle(), PedsFullNoiseAlgorithm::analyse(), MultiTrackValidatorGenPs::analyze(), MultiTrackValidator::analyze(), TrackerSeedValidator::analyze(), DQMMessageLogger::analyze(), DQMSourceExample::analyze(), ValidationMisalignedTracker::analyze(), L1TDTTF::analyze(), PrimaryVertexAnalyzer::analyze(), MuonTrackValidator::analyze(), SoftLeptonTagPlotter::analyzeTag(), BaseTagInfoPlotter::analyzeTag(), TrackCountingTagPlotter::analyzeTag(), TrackIPTagPlotter::analyzeTag(), TrackProbabilityTagPlotter::analyzeTag(), JetTagPlotter::analyzeTag(), TaggingVariablePlotter::analyzeTag(), PrimaryVertexAnalyzer4PU::analyzeVertexCollection(), RPCNoisyStripTest::beginRun(), RPCChamberQuality::beginRun(), RPCOccupancyTest::beginRun(), RPCBxTest::beginRun(), RPCClusterSizeTest::beginRun(), DTSegment4DQuality::beginRun(), DTRecHitQuality::beginRun(), RPCEfficiencySecond::beginRun(), DAClusterizerInZ::beta0(), DAClusterizerInZ_vect::beta0(), MultiTrackValidator::bookHistograms(), TrackerSeedValidator::bookHistograms(), MuonTrackValidator::bookHistograms(), FWVertexProxyBuilder::build(), CSCEventData::calcALCTcrc(), L1RCTElectronIsolationCard::calcElectronCandidates(), PhysicsTools::LeastSquares::calculate(), ClusterShapeAlgo::Calculate_Covariances(), PFPileUpAlgo::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), PFPhotonIsolationCalculator::chargedHadronVertex(), JetCharge::chargeFromRef(), JetCharge::chargeFromValIterator(), CSCDCCExaminer::check(), AdaptiveVertexReconstructor::cleanUpVertices(), RPCEventSummary::clientOperation(), CmsShowMain::CmsShowMain(), EcalDccWeightBuilder::computeAllWeights(), UrbanMscModel93::ComputeCrossSectionPerAtom(), GaussianSumUtilities1D::computeMode(), HFCherenkov::computeNPE(), PFClusterShapeAlgo::covariances(), EcalClusterToolsT< noZS >::covariances(), TtFullLepKinSolver::cubic(), EcalSelectiveReadoutValidation::dccZsFIR(), dd_rot_bin_in(), ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), npstat::HistoND< Numeric, Axis >::dispatch(), FWGUISubviewArea::dock(), FWFramedTextTableCellRenderer::draw(), FWTextTableCellRenderer::draw(), FWColorRow::DrawHighlight(), DTNoiseTest::endLuminosityBlock(), MultiTrackValidator::endRun(), TrackerSeedValidator::endRun(), RPCEfficiencyShiftHisto::endRun(), RPCEfficiencySecond::endRun(), MuonTrackValidator::endRun(), ESRecHitAnalyticAlgo::EvalAmplitude(), ESRecHitSimAlgo::evalAmplitude(), EcalTBEventHeader::eventType(), HFShowerLibrary::extrapolate(), npstat::HistoND< Numeric, Axis >::fill(), npstat::HistoND< Numeric, Axis >::fillC(), JetMETHLTOfflineSource::fillMEforMonTriggerSummary(), BTagHLTOfflineSource::fillMEforMonTriggerSummary(), npstat::HistoND< Numeric, Axis >::fillPreservingCentroid(), QcdUeDQM::fillProfile(), QcdUeDQM::fillUE_with_ChargedJets(), QcdUeDQM::fillUE_with_MaxpTtrack(), CSCDigiValidator::filter(), CSCHitFromStripOnly::findHitOnStripPosition(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), FsmwClusterizer1DNameSpace::fsmw(), FWFFHelper::FWFFHelper(), FWTabularWidget::GetDefaultSize(), HFShower::getHits(), npstat::UniformAxis::getInterval(), npstat::GridAxis::getInterval(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), PrimaryVertexAnalyzer4PU::getTc(), GlobalTrackerMuonAlignment::gradientGlobal(), graph_tree_output(), TtGenEvent::hadronicDecayQuark(), CmsAnnotation::Handle(), FWGUIEventFilter::HandleKey(), FWEveViewManager::highlightAdded(), TtFullHadHypothesis::hypo(), popcon::EcalSRPHandler::importDccConfigFile(), EcalSRCondTools::importParameterSet(), InduceChargeFP420::InduceChargeFP420(), edm::StreamSchedule::initializeEarlyDelete(), HFShowerLibrary::interpolate(), npstat::ArrayND< Numeric, StackLen, StackDim >::interpolate1(), GenericMinL3Algorithm::iterate(), CSCLayerGeometry::lengthOfWireGroup(), npstat::UniformAxis::linearInterval(), npstat::GridAxis::linearInterval(), PhysicsTools::LeastSquares::load(), CSCLayerGeometry::localCenterOfWireGroup(), EcalClusterToolsT< noZS >::localCovariances(), HFClusterAlgo::makeCluster(), MuScleFitUtils::massProb(), FWCaloTowerSliceSelector::matchCell(), TracksClusteringFromDisplacedSeed::nearTracks(), CSCRecoConditions::noiseMatrix(), ESRecHitSimAlgo::oldEvalAmplitude(), CombinedSVComputer::operator()(), GhostTrackComputer::operator()(), CombinedSVComputerV2::operator()(), CombinedSVSoftLeptonComputer::operator()(), PropagationDirectionChooser::operator()(), npstat::LinInterpolatedTableND< Numeric, Axis >::operator()(), output(), L1GTDigiToRaw::packGMT(), RawParticle::PDGcTau(), cond::PayLoadInspector< DataT >::plot(), PlotCombiner(), TrackingMaterialPlotter::plotSegmentInLayer(), TrackingMaterialPlotter::plotSegmentUnassigned(), GctDigiToRaw::print(), DTConfigBti::print(), sistrip::printHex(), InclusiveVertexFinder::produce(), HLTJetCollectionsForBoostedLeptonPlusJets< jetType >::produce(), EvtPlaneProducer::produce(), LA_Filler_Fitter::pull(), PrimaryVertexMonitor::pvTracksPlots(), TtFullLepKinSolver::quartic(), RPCPackingModule::rawData(), edm::maker::ModuleHolderT< T >::replaceModuleFor(), ParabolaFit::result(), LandauFP420::SampleFluctuations(), SiG4UniversalFluctuation::SampleFluctuations(), EcalClusterToolsT< noZS >::scLocalCovariances(), MuonHitsChamberResidual::segment_fit(), GFHistManager::SetCanvasWidth(), helper::MuonCollectionStoreManager::setCloneClusters(), helper::TrackCollectionStoreManager::setCloneClusters(), DTConfigBti::setDefaults(), AdaptiveVertexFitter::setWeightThreshold(), RPCSimParam::simulate(), RPCSimAsymmetricCls::simulate(), RPCSimAverage::simulate(), RPCSimAverageNoiseEffCls::simulate(), RPCSimAverageNoise::simulate(), RPCSimAverageNoiseEff::simulate(), DDErrorDetection::so(), DAClusterizerInZ::split(), DAClusterizerInZ_vect::split(), TFileAdaptor::statsXML(), CSCRecoConditions::stripWeight(), FWGUIManager::subviewDestroyAll(), TrackVertexArbitration::trackVertexArbitrator(), DAClusterizerInZ::update(), DAClusterizerInZ_vect::update(), MultiVertexFitter::updateWeights(), MultiVertexFitter::vertices(), CSCDCCUnpacker::visual_raw(), G4SimEvent::weight(), DDCompactViewImpl::weight(), muonisolation::IsolatorByNominalEfficiency::weightedSum(), muonisolation::IsolatorByDeposit::weightedSum(), RPCCompDetId::wheel(), FWCollectionSummaryModelCellRenderer::width(), FWTextTreeCellRenderer::width(), MonLaserPulseDat::writeArrayDB(), FEConfigFgrParamDat::writeArrayDB(), MonPNPedDat::writeArrayDB(), FEConfigLinDat::writeArrayDB(), MonLaserBlueDat::writeArrayDB(), MonLaserRedDat::writeArrayDB(), MonLed1Dat::writeArrayDB(), MonLaserGreenDat::writeArrayDB(), MonLed2Dat::writeArrayDB(), MonLaserIRedDat::writeArrayDB(), FEConfigParamDat::writeArrayDB(), MonMemChConsistencyDat::writeArrayDB(), MonTTConsistencyDat::writeArrayDB(), MonCrystalConsistencyDat::writeArrayDB(), MonPedestalsDat::writeArrayDB(), MonTestPulseDat::writeArrayDB(), MonMemTTConsistencyDat::writeArrayDB(), MonPNMGPADat::writeArrayDB(), MonPNLed2Dat::writeArrayDB(), MonPNIRedDat::writeArrayDB(), MonPNGreenDat::writeArrayDB(), MonPNLed1Dat::writeArrayDB(), MonPNBlueDat::writeArrayDB(), MonPNRedDat::writeArrayDB(), DCULVRVoltagesDat::writeArrayDB(), and EcalDccWeightBuilder::writeWeightToDB().