CMS 3D CMS Logo

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, PVValHelper::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
CLHEP::HepRandomEngine * hjRandomEngine
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
void IsotropicR3 ( double  r,
TVector3 &  pos 
)

Definition at line 36 of file UKUtility.cc.

References hjRandomEngine, PVValHelper::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
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 *x, double *y, double *z)
Definition: UKUtility.cc:26

Variable Documentation

const double fermi
const double GeV

Definition at line 16 of file MathUtil.h.

Referenced by FullModelReactionDynamics::AddBlackTrackParticles(), CustomParticleFactory::addCustomParticle(), CMSGDMLWriteStructure::AddExtension(), Rivet::CMS_2013_I1224539_DIJET::analyze(), Rivet::RivetAnalysis::analyze(), Bcm1fSD::Bcm1fSD(), FullModelHadronicProcess::CalculateMomenta(), CaloSD::CaloSD(), CastorSD::CastorSD(), CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(), CMSMonopolePhysics::CMSMonopolePhysics(), CMSmplIonisationWithDeltaModel::CMSmplIonisationWithDeltaModel(), NuclearInteractionFTFSimulator::compute(), CMSMonopolePhysics::ConstructParticle(), CMSEmStandardPhysicsXS::ConstructProcess(), CustomPhysicsListSS::ConstructProcess(), CustomPhysicsList::ConstructProcess(), CMSMonopolePhysics::ConstructProcess(), TkAccumulatingSensitiveDetector::createHit(), MuonSensitiveDetector::createHit(), HadronPhysicsQGSPCMS_FTFP_BERT::CreateModels(), HadronPhysicsCMS::CreateModels(), CMSHadronPhysicsFTFP_BERT_ATL::CreateModels(), CaloSD::createNewHit(), Decay3Body::doDecay(), GflashHadronShowerModel::DoIt(), GflashEMShowerModel::DoIt(), GFlashHadronShowerModel::DoIt(), GFlashEMShowerModel::DoIt(), CMSHadronPhysicsFTFP_BERT::DumpBanner(), GflashHadronShowerModel::excludeDetectorRegion(), GFlashHadronShowerModel::excludeDetectorRegion(), HcalTestAnalysis::fill(), SimG4HcalValidation::fill(), HcalTB04Analysis::fillBuffer(), HcalTB02Analysis::fillEvent(), MaterialBudgetCastorHistos::fillStartTrack(), MaterialBudgetHcalHistos::fillStartTrack(), G4ProcessHelper::G4ProcessHelper(), FullModelReactionDynamics::GenerateNBodyEvent(), FullModelReactionDynamics::GenerateXandPt(), ZdcSD::getEnergyDeposit(), ZdcShowerLibrary::getEnergyFromLibrary(), HCalSD::getFromHFLibrary(), ZdcSD::getFromLibrary(), CastorSD::getFromLibrary(), HCalSD::getFromParam(), HCalSD::getHitFibreBundle(), HCalSD::getHitPMT(), HFShowerPMT::getHits(), HFShowerParam::getHits(), HFShowerLibrary::getHits(), CastorShowerLibraryMaker::GetKinematics(), TotemSD::getStepInfo(), FP420SD::GetStepInfo(), CaloMeanResponse::getWeight(), HFGflash::gfParameterization(), GflashHadronShowerProfile::hadronicParameterization(), CalorimetryManager::HDShowerSimulation(), Generator::HepMC2G4(), HFShowerLibrary::HFShowerLibrary(), HCalSD::hitForFibre(), Rivet::CMS_2013_I1224539_DIJET::init(), Rivet::RivetAnalysis::init(), RunManager::initG4(), CMSFieldManager::InitialiseForVolume(), TimingSD::Initialize(), RunManagerMTWorker::initializeThread(), TreatSecondary::initTrack(), fastsim::NuclearInteractionFTF::interact(), HFShowerLibrary::interpolate(), GflashHadronShowerModel::isFirstInelasticInteraction(), G4SimEvent::load(), CustomParticleFactory::loadCustomParticles(), CastorShowerLibrary::loadEventInfo(), HFShowerLibrary::loadEventInfo(), HadronicProcessHelper::m_phaseSpace(), MaterialEffects::MaterialEffects(), GflashHadronShowerModel::ModelTrigger(), GflashEMShowerModel::ModelTrigger(), GFlashHadronShowerModel::ModelTrigger(), Monopole::Monopole(), MuonSensitiveDetector::MuonSensitiveDetector(), NAStrangeDensity::NAStrangeDensity(), CMSHadronPhysicsFTFP_BERT::Neutron(), CMSSteppingVerbose::NextStep(), Generator::nonBeamEvent2G4(), fastsim::NuclearInteractionFTF::NuclearInteractionFTF(), FullModelReactionDynamics::NuclearReaction(), GflashEMShowerProfile::parameterization(), ParametrisedEMPhysics::ParametrisedEMPhysics(), Generator::particleAssignDaughters(), Generator::particlePassesPrimaryCuts(), G4ProcessHelper::PhaseSpace(), PltSD::PltSD(), FullModelHadronicProcess::PostStepDoIt(), sim::LocalFieldManager::print(), GflashHadronWrapperProcess::Print(), CaloSD::ProcessHits(), FullModelReactionDynamics::ProduceStrangeParticlePairs(), Geant4ePropagator::propagateGeneric(), Herwig7Interface::pthat(), CaloMeanResponse::readResponse(), CaloSD::resetForNewPrimary(), MonopoleTransportation::ResetKilledStatistics(), RHStopTracer::RHStopTracer(), FullModelReactionDynamics::Rotate(), UrbanMscModel93::SampleCosineTheta(), CaloSD::saveHit(), CaloSteppingAction::saveHits(), TimingSD::setCuts(), CMSSteppingVerbose::StackFilled(), FullModelReactionDynamics::SuppressChargedPions(), TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector(), TreatSecondary::tracks(), CMSSteppingVerbose::TrackStarted(), FullModelReactionDynamics::TwoBody(), FullModelReactionDynamics::TwoCluster(), MonopoleSteppingAction::update(), RHStopTracer::update(), HGCalTBMB::update(), GflashG4Watcher::update(), MaterialBudgetForward::update(), MaterialBudget::update(), TrackingVerboseAction::update(), HGCPassive::update(), HcalTB02Analysis::update(), DoCastorAnalysis::update(), TkAccumulatingSensitiveDetector::updateHit(), MuonSensitiveDetector::updateHit(), and ZdcSD::ZdcSD().

const double hbarc
const double hbarc_squared

Definition at line 24 of file UKUtility.cc.

const double mbarn
const double MeV

Referenced by FullModelReactionDynamics::AddBlackTrackParticles(), AHCalSD::AHCalSD(), MonopoleTransportation::AlongStepDoIt(), FullModelHadronicProcess::CalculateMomenta(), CaloSD::CaloSD(), CaloSteppingAction::CaloSteppingAction(), CaloTrkProcessing::CaloTrkProcessing(), StackingAction::ClassifyNewTrack(), UrbanMscModel93::ComputeCrossSectionPerAtom(), UrbanMscModel93::ComputeTheta0(), UrbanMscModel93::ComputeTruePathLengthLimit(), CMSEmStandardPhysics::ConstructProcess(), CMSEmStandardPhysicsXS::ConstructProcess(), CMSEmStandardPhysicsLPM::ConstructProcess(), ParametrisedEMPhysics::ConstructProcess(), HFWedgeSD::createNewHit(), FullModelReactionDynamics::Defs1(), DreamSD::DreamSD(), ECalSD::ECalSD(), EcalTBH4BeamSD::EcalTBH4BeamSD(), HFShowerLibrary::fillHits(), FullModelReactionDynamics::GenerateXandPt(), DreamSD::getEnergyDeposit(), EcalTBH4BeamSD::getEnergyDeposit(), HcalTB02SD::getEnergyDeposit(), ECalSD::getEnergyDeposit(), HFShowerPMT::getHits(), HFShowerFibreBundle::getHits(), HCalSD::HCalSD(), HcalTB02SD::HcalTB02SD(), HcalTB06BeamSD::HcalTB06BeamSD(), HFNoseSD::HFNoseSD(), HGCalSD::HGCalSD(), HGCalTB16SD01::HGCalTB16SD01(), HGCScintSD::HGCScintSD(), HGCSD::HGCSD(), UrbanMscModel93::Initialise(), SteppingAction::initPointer(), TreatSecondary::initTrack(), KillSecondariesTrackAction::KillSecondariesTrackAction(), HcalTestAnalysis::layerAnalysis(), SimG4HcalValidation::layerAnalysis(), SimG4HGCalValidation::layerAnalysis(), CustomParticleFactory::loadCustomParticles(), FullModelReactionDynamics::MomentumCheck(), CMSSteppingVerbose::NextStep(), fastsim::NuclearInteractionFTF::NuclearInteractionFTF(), NuclearInteractionFTFSimulator::NuclearInteractionFTFSimulator(), FullModelReactionDynamics::NuclearReaction(), operator<<(), ParametrisedEMPhysics::ParametrisedEMPhysics(), FullModelHadronicProcess::PostStepDoIt(), SteppingAction::PrintKilledTrack(), HFChamberSD::ProcessHits(), FullModelReactionDynamics::Rotate(), MaterialProperties::setMaterialProperties(), StackingAction::StackingAction(), SteppingAction::SteppingAction(), TreatSecondary::tracks(), TreatSecondary::TreatSecondary(), FullModelReactionDynamics::TwoBody(), FullModelReactionDynamics::TwoCluster(), KillSecondariesTrackAction::update(), SaveSimTrack::update(), CaloTrkProcessing::update(), HcalTestAnalysis::update(), SimG4HcalValidation::update(), EcalTBH4Trigger::update(), HFWedgeSD::updateHit(), UrbanMscModel93::UrbanMscModel93(), and SteppingAction::UserSteppingAction().

const double w

Definition at line 23 of file UKUtility.cc.

Referenced by EcalSelectiveReadoutSuppressor::accept(), edm::StreamSchedule::actionTable(), FastLineRecognition::Cluster::add(), MinL3Algorithm::addEvent(), MinL3AlgoUniv< IDdet >::addEvent(), hi::GenPlane::addParticle(), edm::PreMixingModule::addSignals(), edm::WorkerManager::allWorkers(), DQMMessageLogger::analyze(), DQMSourceExample::analyze(), ValidationMisalignedTracker::analyze(), L1TDTTF::analyze(), MuonTrackValidator::analyze(), SoftLeptonTagPlotter::analyzeTag(), BaseTagInfoPlotter::analyzeTag(), IPTagPlotter< Container, Base >::analyzeTag(), TrackCountingTagPlotter::analyzeTag(), TrackProbabilityTagPlotter::analyzeTag(), TaggingVariablePlotter::analyzeTag(), JetTagPlotter::analyzeTag(), pat::PATLostTracks::associateTrkToVtx(), edm::PreMixingModule::beginLuminosityBlock(), edm::PreMixingModule::beginRun(), DAClusterizerInZ::beta0(), DAClusterizerInZ_vect::beta0(), DAClusterizerInZT_vect::beta0(), DTSegment4DQuality::bookHistograms(), DTRecHitQuality::bookHistograms(), HGCalGeometryLoader::build(), FWVertexProxyBuilder::build(), CSCEventData::calcALCTcrc(), L1RCTElectronIsolationCard::calcElectronCandidates(), PhysicsTools::LeastSquares::calculate(), FastCircleFit::calculate(), ClusterShapeAlgo::Calculate_Covariances(), PFPileUpAlgo::chargedHadronVertex(), PrimaryVertexAssignment::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), PFPhotonIsolationCalculator::chargedHadronVertex(), JetCharge::chargeFromRef(), JetCharge::chargeFromValIterator(), CSCDCCExaminer::check(), FWGeometryTableManager::checkChildMatches(), AdaptiveVertexReconstructor::cleanUpVertices(), RPCEventSummary::clientOperation(), AdaptiveVertexReconstructor::clone(), FastLineRecognition::Cluster::Cluster(), CmsShowMain::CmsShowMain(), EcalDccWeightBuilder::computeAllWeights(), UrbanMscModel93::ComputeCrossSectionPerAtom(), GaussianSumUtilities1D::computeMode(), HFCherenkov::computeNPE(), EcalClusterToolsT< noZS >::covariances(), CTPPSLHCInfoRandomXangleESSource::CTPPSLHCInfoRandomXangleESSource(), TtFullLepKinSolver::cubic(), EcalSelectiveReadoutValidation::dccZsFIR(), ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), npstat::HistoND< Numeric, Axis >::dispatch(), FWGUISubviewArea::dock(), edm::PreMixingModule::doPileUp(), MultiTrackValidatorGenPs::dqmAnalyze(), HGCalValidator::dqmAnalyze(), MultiTrackValidator::dqmAnalyze(), DTRecHitClients::dqmEndJob(), RPCEfficiencySecond::dqmEndJob(), RPCEfficiencyShiftHisto::dqmEndJob(), DQMNet::dqmhash(), FWFramedTextTableCellRenderer::draw(), FWTextTableCellRenderer::draw(), FWColorRow::DrawHighlight(), l1t::EndCapParamsHelper::EndCapParamsHelper(), edm::PreMixingModule::endRun(), AbsPlan1RechitCombiner::energyWeightedAverage(), edmtest::ESTestDataB::ESTestDataB(), ESRecHitAnalyticAlgo::EvalAmplitude(), ESRecHitSimAlgo::evalAmplitude(), EcalTBEventHeader::eventType(), HFShowerLibrary::extrapolate(), MonitorElement::Fill(), npstat::HistoND< Numeric, Axis >::fill(), npstat::HistoND< Numeric, Axis >::fillC(), dqm::TrackAnalyzer::fillHistosForState(), JetMETHLTOfflineSource::fillMEforMonTriggerSummary(), npstat::HistoND< Numeric, Axis >::fillPreservingCentroid(), QcdUeDQM::fillProfile(), QcdUeDQM::fillUE_with_ChargedJets(), QcdUeDQM::fillUE_with_MaxpTtrack(), CSCDigiValidator::filter(), CSCHitFromStripOnly::findHitOnStripPosition(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), FKDPoint< TYPE, numberOfDimensions >::FKDPoint(), FsmwClusterizer1DNameSpace::fsmw(), FWFFHelper::FWFFHelper(), FWTGLViewer::GenerateFbo(), MultiTrackSelector::getBestVertex(), FWTabularWidget::GetDefaultSize(), HFShower::getHits(), npstat::UniformAxis::getInterval(), npstat::GridAxis::getInterval(), LMFDat::getKeyList(), HGCalTriggerGeometryHexImp2::getNeighborsFromTriggerCell(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), FastLineRecognition::getOneLine(), FastLineRecognition::getPatterns(), HcalSiPMnonlinearity::getPixelsFired(), l1t::GlobalParamsHelper::GlobalParamsHelper(), GlobalTrackerMuonAlignment::gradientGlobal(), graph_tree_output(), TtGenEvent::hadronicDecayQuark(), CmsAnnotation::Handle(), FWGUIEventFilter::HandleKey(), FWEveViewManager::highlightAdded(), TtFullHadHypothesis::hypo(), popcon::EcalSRPHandler::importDccConfigFile(), EcalSRCondTools::importParameterSet(), InduceChargeFP420::InduceChargeFP420(), l1t::ClusterShapes::Init(), edm::StreamSchedule::initializeEarlyDelete(), edm::PreMixingModule::initializeEvent(), HFShowerLibrary::interpolate(), npstat::ArrayND< Numeric, StackLen, StackDim >::interpolate1(), reco::Vertex::isFake(), heppy::IsolationComputer::isoSumNeutralsWeighted(), GenericMinL3Algorithm::iterate(), CSCLayerGeometry::lengthOfWireGroup(), npstat::UniformAxis::linearInterval(), npstat::GridAxis::linearInterval(), PhysicsTools::LeastSquares::load(), CSCLayerGeometry::localCenterOfWireGroup(), EcalClusterToolsT< noZS >::localCovariances(), HFClusterAlgo::makeCluster(), FWTGLViewer::MakeFboScale(), MuScleFitUtils::massProb(), FWHistSliceSelector::matchCell(), RPCClusterSizeTest::myBooker(), RPCNoisyStripTest::myBooker(), RPCOccupancyTest::myBooker(), RPCChamberQuality::myBooker(), TracksClusteringFromDisplacedSeed::nearTracks(), CSCRecoConditions::noiseMatrix(), ESRecHitSimAlgo::oldEvalAmplitude(), GhostTrackComputer::operator()(), PropagationDirectionChooser::operator()(), funct::GaussLegendreIntegrator::operator()(), CombinedSVComputer::operator()(), funct::GaussIntegrator::operator()(), npstat::LinInterpolatedTableND< Numeric, Axis >::operator()(), edm::OStreamColumn::OStreamColumn(), output(), L1GTDigiToRaw::packGMT(), InnerDeltaPhi::phiRange(), edm::PreMixingModule::pileWorker(), PlotCombiner(), TrackingMaterialPlotter::plotSegmentInLayer(), TrackingMaterialPlotter::plotSegmentUnassigned(), l1t::PrescalesVetosHelper::PrescalesVetosHelper(), GctDigiToRaw::print(), VFATFrame::Print(), DTConfigBti::print(), Phase2Tracker::printHex(), sistrip::printHex(), ctpps::RawDataUnpacker::processOptoRxFrameSerial(), ctpps::RawDataUnpacker::processVFATDataParallel(), TOFPIDProducer::produce(), GEMDigiToRawModule::produce(), CTPPSProtonProducer::produce(), PrimaryVertexProducer::produce(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::produce(), EvtPlaneProducer::produce(), CTPPSProtonReconstructionSimulationValidator::PlotGroup::profileToRMSGraph(), TagCorrelationPlotter::psPlot(), LA_Filler_Fitter::pull(), edm::PreMixingModule::put(), PrimaryVertexMonitor::pvTracksPlots(), TtFullLepKinSolver::quartic(), emtf::Forest::rankVariables(), RPCPackingModule::rawData(), StoreESCondition::readESTimeSampleWeightsFromFile(), popcon::EcalTPGWeightIdMapHandler::readtxtFile(), popcon::EcalTPGWeightIdMapHandler::readxmlFile(), edm::maker::ModuleHolderT< T >::replaceModuleFor(), ParabolaFit::result(), SiG4UniversalFluctuation::SampleFluctuations(), LandauFP420::SampleFluctuations(), EcalClusterToolsT< noZS >::scLocalCovariances(), MuonHitsChamberResidual::segment_fit(), GFHistManager::SetCanvasWidth(), helper::MuonCollectionStoreManager::setCloneClusters(), helper::TrackCollectionStoreManager::setCloneClusters(), DTConfigBti::setDefaults(), FWMuonBuilder::setLineWidth(), AdaptiveVertexFitter::setWeightThreshold(), TagProbeFitter::setWeightVar(), RPCSimParam::simulate(), DDErrorDetection::so(), DAClusterizerInZ::split(), DAClusterizerInZ_vect::split(), TFileAdaptor::statsXML(), CSCRecoConditions::stripWeight(), FWGUIManager::subviewDestroyAll(), TestPythiaDecays::TestPythiaDecays(), reco::Vertex::tracks_end(), TrackVertexArbitration< VTX >::trackVertexArbitrator(), DAClusterizerInZ::update(), DAClusterizerInZ_vect::update(), DAClusterizerInZT_vect::update(), svhelper::updateVertexTime(), MultiVertexFitter::updateWeights(), MultiVertexFitter::vertices(), CSCDCCUnpacker::visual_raw(), PHcalTB04Info::vtxSecEk(), PHcalTB06Info::vtxSecEKin(), G4SimEvent::weight(), muonisolation::IsolatorByNominalEfficiency::weightedSum(), muonisolation::IsolatorByDeposit::weightedSum(), PosteriorWeightsCalculator::weights(), RPCCompDetId::wheel(), FWCollectionSummaryModelCellRenderer::width(), FWTextTreeCellRenderer::width(), FEConfigFgrParamDat::writeArrayDB(), MonLaserPulseDat::writeArrayDB(), FEConfigLinDat::writeArrayDB(), MonPNPedDat::writeArrayDB(), MonLaserBlueDat::writeArrayDB(), MonLaserRedDat::writeArrayDB(), MonLed1Dat::writeArrayDB(), MonLaserIRedDat::writeArrayDB(), MonLed2Dat::writeArrayDB(), MonLaserGreenDat::writeArrayDB(), FEConfigParamDat::writeArrayDB(), MonMemChConsistencyDat::writeArrayDB(), MonMemTTConsistencyDat::writeArrayDB(), MonCrystalConsistencyDat::writeArrayDB(), MonTestPulseDat::writeArrayDB(), MonPedestalsDat::writeArrayDB(), MonTTConsistencyDat::writeArrayDB(), MonPNIRedDat::writeArrayDB(), MonPNLed2Dat::writeArrayDB(), MonPNRedDat::writeArrayDB(), MonPNGreenDat::writeArrayDB(), MonPNLed1Dat::writeArrayDB(), MonPNBlueDat::writeArrayDB(), MonPNMGPADat::writeArrayDB(), DCULVRVoltagesDat::writeArrayDB(), EcalDccWeightBuilder::writeWeightToDB(), CSCLayerGeometry::yLimitsOfStripPlane(), BaseTagInfoPlotter::~BaseTagInfoPlotter(), EcalDccWeightBuilder::~EcalDccWeightBuilder(), OverlapValidation::~OverlapValidation(), and TrackIPHistograms< T >::~TrackIPHistograms().