CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
edm::BaseRandomtXiGunProducer Class Reference

#include <BaseRandomtXiGunProducer.h>

Inheritance diagram for edm::BaseRandomtXiGunProducer:
edm::one::EDProducer< one::WatchRuns, EndRunProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper edm::RandomtXiGunProducer

Public Member Functions

 BaseRandomtXiGunProducer (const ParameterSet &)
 
void beginRun (const edm::Run &r, const edm::EventSetup &) override
 
void endRun (const edm::Run &r, const edm::EventSetup &) override
 
void endRunProduce (edm::Run &r, const edm::EventSetup &) override
 
 ~BaseRandomtXiGunProducer () override
 
- Public Member Functions inherited from edm::one::EDProducer< one::WatchRuns, EndRunProducer >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

double fECMS
 
HepMC::GenEventfEvt
 
bool fFireBackward
 
bool fFireForward
 
bool fLog_t
 
double fMaxPhi
 
double fMinPhi
 
std::vector< int > fPartIDs
 
ESHandle< HepPDT::ParticleDataTablefPDGTable
 
double fpEnergy
 
int fVerbosity
 
const HepPDT::ParticleDataPData
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 26 of file BaseRandomtXiGunProducer.h.

Constructor & Destructor Documentation

◆ BaseRandomtXiGunProducer()

BaseRandomtXiGunProducer::BaseRandomtXiGunProducer ( const ParameterSet pset)

Definition at line 31 of file BaseRandomtXiGunProducer.cc.

31  : fEvt(nullptr) {
33  if (!rng.isAvailable()) {
34  throw cms::Exception("Configuration")
35  << "The RandomNumberProducer module requires the RandomNumberGeneratorService\n"
36  "which appears to be absent. Please add that service to your configuration\n"
37  "or remove the modules that require it.";
38  }
39 
40  ParameterSet pgun_params = pset.getParameter<ParameterSet>("PGunParameters");
41 
42  // although there's the method ParameterSet::empty(),
43  // it looks like it's NOT even necessary to check if it is,
44  // before trying to extract parameters - if it is empty,
45  // the default values seem to be taken
46  fPartIDs = pgun_params.getParameter<vector<int> >("PartID");
47  fMinPhi = pgun_params.getParameter<double>("MinPhi");
48  fMaxPhi = pgun_params.getParameter<double>("MaxPhi");
49  fECMS = pgun_params.getParameter<double>("ECMS");
50  fpEnergy = fECMS / 2.0;
51 
52  fVerbosity = pset.getUntrackedParameter<int>("Verbosity", 0);
53 
54  fFireBackward = pset.getParameter<bool>("FireBackward");
55  fFireForward = pset.getParameter<bool>("FireForward");
56 
57  produces<GenRunInfoProduct, Transition::EndRun>();
58 }

References Exception, fECMS, fFireBackward, fFireForward, fMaxPhi, fMinPhi, fPartIDs, fpEnergy, fVerbosity, edm::ParameterSet::getParameter(), edm::Service< T >::isAvailable(), and muonDTDigis_cfi::pset.

◆ ~BaseRandomtXiGunProducer()

BaseRandomtXiGunProducer::~BaseRandomtXiGunProducer ( )
override

Definition at line 60 of file BaseRandomtXiGunProducer.cc.

60 {}

Member Function Documentation

◆ beginRun()

void BaseRandomtXiGunProducer::beginRun ( const edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 62 of file BaseRandomtXiGunProducer.cc.

62  {
63  es.getData(fPDGTable);
64  return;
65 }

References fPDGTable, and edm::EventSetup::getData().

◆ endRun()

void BaseRandomtXiGunProducer::endRun ( const edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 67 of file BaseRandomtXiGunProducer.cc.

67 {}

◆ endRunProduce()

void BaseRandomtXiGunProducer::endRunProduce ( edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 68 of file BaseRandomtXiGunProducer.cc.

68  {
69  // just create an empty product
70  // to keep the EventContent definitions happy
71  // later on we might put the info into the run info that this is a PGun
72  run.put(std::make_unique<GenRunInfoProduct>());
73 }

References writedatasetfile::run.

Member Data Documentation

◆ fECMS

double edm::BaseRandomtXiGunProducer::fECMS
protected

Definition at line 45 of file BaseRandomtXiGunProducer.h.

Referenced by BaseRandomtXiGunProducer().

◆ fEvt

HepMC::GenEvent* edm::BaseRandomtXiGunProducer::fEvt
protected

Definition at line 48 of file BaseRandomtXiGunProducer.h.

Referenced by edm::RandomtXiGunProducer::produce().

◆ fFireBackward

bool edm::BaseRandomtXiGunProducer::fFireBackward
protected

◆ fFireForward

bool edm::BaseRandomtXiGunProducer::fFireForward
protected

◆ fLog_t

bool edm::BaseRandomtXiGunProducer::fLog_t
protected

◆ fMaxPhi

double edm::BaseRandomtXiGunProducer::fMaxPhi
protected

◆ fMinPhi

double edm::BaseRandomtXiGunProducer::fMinPhi
protected

◆ fPartIDs

std::vector<int> edm::BaseRandomtXiGunProducer::fPartIDs
protected

◆ fPDGTable

ESHandle<HepPDT::ParticleDataTable> edm::BaseRandomtXiGunProducer::fPDGTable
protected

Definition at line 50 of file BaseRandomtXiGunProducer.h.

Referenced by beginRun(), and edm::RandomtXiGunProducer::produce().

◆ fpEnergy

double edm::BaseRandomtXiGunProducer::fpEnergy
protected

◆ fVerbosity

int edm::BaseRandomtXiGunProducer::fVerbosity
protected

◆ PData

const HepPDT::ParticleData* edm::BaseRandomtXiGunProducer::PData
protected
edm::BaseRandomtXiGunProducer::fEvt
HepMC::GenEvent * fEvt
Definition: BaseRandomtXiGunProducer.h:48
edm::BaseRandomtXiGunProducer::fPartIDs
std::vector< int > fPartIDs
Definition: BaseRandomtXiGunProducer.h:41
edm::BaseRandomtXiGunProducer::fMinPhi
double fMinPhi
Definition: BaseRandomtXiGunProducer.h:42
edm::BaseRandomtXiGunProducer::fFireForward
bool fFireForward
Definition: BaseRandomtXiGunProducer.h:56
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::BaseRandomtXiGunProducer::fpEnergy
double fpEnergy
Definition: BaseRandomtXiGunProducer.h:44
edm::ParameterSet
Definition: ParameterSet.h:36
edm::Service
Definition: Service.h:30
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:113
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::BaseRandomtXiGunProducer::fPDGTable
ESHandle< HepPDT::ParticleDataTable > fPDGTable
Definition: BaseRandomtXiGunProducer.h:50
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Exception
Definition: hltDiff.cc:246
edm::BaseRandomtXiGunProducer::fFireBackward
bool fFireBackward
Definition: BaseRandomtXiGunProducer.h:57
edm::BaseRandomtXiGunProducer::fVerbosity
int fVerbosity
Definition: BaseRandomtXiGunProducer.h:52
edm::BaseRandomtXiGunProducer::fECMS
double fECMS
Definition: BaseRandomtXiGunProducer.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::BaseRandomtXiGunProducer::fMaxPhi
double fMaxPhi
Definition: BaseRandomtXiGunProducer.h:43