The class is a Source whose run is chosen randomly. This initializes identically to a cms.Source
and after being initialized the run number distribution is set by calling 'setRunDistribution'.
Definition at line 3 of file RandomRunSource.py.
def RandomRunSource.RandomRunSource.insertInto |
( |
|
self, |
|
|
|
parameterSet, |
|
|
|
myname |
|
) |
| |
Definition at line 14 of file RandomRunSource.py.
References MuonTypeByOrCut.type_, edm::ObjectWithDict.type_, L1TMuonOverlapParams::Node.type_, FWJobMetadataManager::Data.type_, reco::MuonMETCorrectionData.type_, L1TMuonGlobalParams_PUBLIC::Node.type_, CutBasedElectronID.type_, L1TMuonGlobalParams::Node.type_, L1TMuonBarrelParams::Node.type_, OpticalAlignMeasurementInfo.type_, edm::eventsetup::ComponentDescription.type_, l1t::CaloParams::Node.type_, StringObjectFunction< reco::Candidate >.type_, StringCutObjectSelector< reco::utils::ClusterTotals >.type_, StringCutObjectSelector< reco::Muon >.type_, StringCutObjectSelector< reco::CaloMET >.type_, StringCutObjectSelector< reco::Candidate, true >.type_, StringCutObjectSelector< pat::DiObjectProxy, true >.type_, StringCutObjectSelector< reco::Muon, false >.type_, StringCutObjectSelector< reco::Track, true >.type_, StringCutObjectSelector< reco::PFJet >.type_, StringCutObjectSelector< reco::CaloMuon, false >.type_, StringCutObjectSelector< pat::pat::DiObjectProxy >.type_, StringObjectFunction< std::vector< TOutputCandidateType > >.type_, StringObjectFunction< reco::RecoTauPiZero >.type_, StringObjectFunction< T >.type_, StringCutObjectSelector< reco::CaloJet >.type_, StringObjectFunction< Object >.type_, StringObjectFunction< PFTau >.type_, StringObjectFunction< reco::PFTau >.type_, StringCutObjectSelector< trigger::TriggerObject >.type_, StringObjectFunction< T, true >.type_, StringObjectFunction< reco::Candidate, true >.type_, StringObjectFunction< reco::reco::PFTau >.type_, StringObjectFunction< reco::PFJet >.type_, MixedGenMEtProducer.type_, StringCutObjectSelector< pat::Jet >.type_, StringCutObjectSelector< reco::CaloTau >.type_, StringCutObjectSelector< Object >.type_, StringCutObjectSelector< T1 >.type_, StringCutObjectSelector< reco::JetID >.type_, StringCutObjectSelector< reco::PFMET >.type_, StringCutObjectSelector< l1extra::L1MuonParticle >.type_, StringCutObjectSelector< reco::GenJet >.type_, StringCutObjectSelector< std::vector< TOutputCandidateType > >.type_, StringCutObjectSelector< reco::Candidate::LorentzVector >.type_, StringCutObjectSelector< reco::PFRecoTauChargedHadron >.type_, StringCutObjectSelector< T2 >.type_, StringCutObjectSelector< pat::pat::Jet >.type_, StringCutObjectSelector< pat::Tau >.type_, StringCutObjectSelector< reco::TrackRef, false >.type_, StringCutObjectSelector< T, DefaultLazyness >.type_, StringCutObjectSelector< T2, true >.type_, StringCutObjectSelector< reco::GenParticle >.type_, StringCutObjectSelector< reco::PFCandidate >.type_, StringCutObjectSelector< pat::TriggerObjectStandAlone >.type_, StringObjectFunction< reco::PFRecoTauChargedHadron >.type_, StringObjectFunction< T, DefaultLazyness >.type_, StringCutObjectSelector< T1, true >.type_, StringCutObjectSelector< pat::pat::Photon >.type_, StringCutObjectSelector< T, Lazy >.type_, StringCutObjectSelector< reco::reco::Vertex >.type_, StringCutObjectSelector< reco::RecoTauPiZero >.type_, StringCutObjectSelector< reco::Track >.type_, StringCutObjectSelector< l1extra::L1EtMissParticle >.type_, StringCutObjectSelector< reco::GenMET >.type_, StringCutObjectSelector< pat::Muon >.type_, StringCutObjectSelector< typename Classifier::Categories >.type_, StringCutObjectSelector< T >.type_, StringCutObjectSelector< pat::pat::Electron >.type_, StringCutObjectSelector< reco::MET >.type_, StringCutObjectSelector< reco::Photon >.type_, StringCutObjectSelector< PFTau >.type_, StringCutObjectSelector< reco::Vertex >.type_, StringCutObjectSelector< pat::Electron >.type_, StringCutObjectSelector< reco::Candidate >.type_, StringCutObjectSelector< pat::pat::Muon >.type_, StringCutObjectSelector< reco::PFTau >.type_, StringCutObjectSelector< MuonPointerPair, true >.type_, StringCutObjectSelector< TInputCandidateType >.type_, StringCutObjectSelector< T, true >.type_, StringCutObjectSelector< reco::BeamSpot >.type_, StringCutObjectSelector< reco::GsfElectron >.type_, MuonRefProducer.type_, TauDQMHistPlotter::cfgEntryProcess.type_, pftools::ParticleFiltrationDecision.type_, reco::TrackingRecHitInfo.type_, AlignableBuilder::LevelInfo.type_, pos::PixelTKFECParameters.type_, pat::TriggerFilter.type_, l1t::BlockHeader.type_, NoProductErrorThrower.type_, pat::TriggerCondition.type_, MultShiftMETcorrInputProducer.type_, l1t::CaloSpare.type_, edm::ParentContext.type_, edm::ConsumesInfo.type_, DQMHcalIsoTrackAlCaReco.type_, DBReader.type_, pat::helper::AnyNumberAssociationAdaptor.type_, GsfElectronDataAnalyzer.type_, ScoutingMuon.type_, edm::ParameterWildcardBase.type_, NoBranchErrorThrower.type_, MuonTrackCleanerBase.type_, edm::eventsetup::EventSetupRecordKey.type_, l1t::EtSum.type_, l1t::Setting.type_, edm::AllowedLabelsDescriptionBase.type_, L1TUtmCondition.type_, fwlite::internal::DataKey.type_, reco::PUSubMETCandInfo.type_, L1TUtmScale.type_, BinomialInterval.type_, pftools::CandidateWrapper.type_, edm::eventsetup::DataKey.type_, l1extra::L1EmParticle.type_, OpticalAlignInfo.type_, l1extra::L1JetParticle.type_, Json::Reader::Token.type_, edm::PileUp.type_, PFBlockLink.type_, pat::JetCorrFactorsProducer.type_, L1TUtmObject.type_, ParticleReplacerZtautau::MinVisPtCut.type_, Entry.type_, pos::PixelPortCardConfig.type_, edm::ParameterDescriptionBase.type_, edm::Handle< GenericObject >.type_, BeamSpotObjects.type_, L1GctInternHFData.type_, l1extra::L1EtMissParticle.type_, edm::Handle< FWGenericObject >.type_, reco::PFBlockElement.type_, funct::RootIntegrator.type_, L1GctInternHtMiss.type_, reco::BeamSpot.type_, L1GctInternEtSum.type_, L1GctInternJetData.type_, TrackerDpgAnalysis.type_, SiStripConfigDb::Run.type_, ConfigurableHisto.type_, reco::Muon.type_, Mixins._TypedParameterizable.type_(), GsfElectronFakeAnalyzer.type_, Json::Value.type_, edm::IndexIntoFile::IndexIntoFileItrImpl.type_, and Config.SubProcess.type_().
16 from random
import SystemRandom
18 for r,p
in self.__dict__[
'runsAndProbs']:
21 random = SystemRandom()
22 runProb = random.uniform(0,totalProb)
26 for r,p
in self.__dict__[
'runsAndProbs']:
28 if sumProb >= runProb:
31 if self.type_() ==
"PoolSource":
35 self.
firstRun = cms.untracked.uint32(runNumber)
36 super(RandomRunSource,self).
insertInto(parameterSet,myname)