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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

double fECMS
 
HepMC::GenEventfEvt
 
bool fFireBackward
 
bool fFireForward
 
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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, 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 ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 28 of file BaseRandomtXiGunProducer.h.

Constructor & Destructor Documentation

BaseRandomtXiGunProducer::BaseRandomtXiGunProducer ( const ParameterSet pset)

Definition at line 33 of file BaseRandomtXiGunProducer.cc.

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

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

Definition at line 66 of file BaseRandomtXiGunProducer.cc.

67 {
68 
69 }

Member Function Documentation

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

Definition at line 72 of file BaseRandomtXiGunProducer.cc.

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

73 {
74  es.getData( fPDGTable ) ;
75  return ;
76 
77 }
void getData(T &iHolder) const
Definition: EventSetup.h:98
return((rh^lh)&mask)
ESHandle< HepPDT::ParticleDataTable > fPDGTable
void BaseRandomtXiGunProducer::endRun ( const edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 79 of file BaseRandomtXiGunProducer.cc.

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

Definition at line 81 of file BaseRandomtXiGunProducer.cc.

References edm::Run::put().

82 {
83  // just create an empty product
84  // to keep the EventContent definitions happy
85  // later on we might put the info into the run info that this is a PGun
86  run.put( std::make_unique<GenRunInfoProduct>() );
87 }

Member Data Documentation

double edm::BaseRandomtXiGunProducer::fECMS
protected

Definition at line 52 of file BaseRandomtXiGunProducer.h.

Referenced by BaseRandomtXiGunProducer().

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

Definition at line 55 of file BaseRandomtXiGunProducer.h.

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

bool edm::BaseRandomtXiGunProducer::fFireBackward
protected
bool edm::BaseRandomtXiGunProducer::fFireForward
protected
double edm::BaseRandomtXiGunProducer::fMaxPhi
protected
double edm::BaseRandomtXiGunProducer::fMinPhi
protected
std::vector<int> edm::BaseRandomtXiGunProducer::fPartIDs
protected
ESHandle<HepPDT::ParticleDataTable> edm::BaseRandomtXiGunProducer::fPDGTable
protected

Definition at line 57 of file BaseRandomtXiGunProducer.h.

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

double edm::BaseRandomtXiGunProducer::fpEnergy
protected
int edm::BaseRandomtXiGunProducer::fVerbosity
protected
const HepPDT::ParticleData* edm::BaseRandomtXiGunProducer::PData
protected