|
void | beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override |
|
void | beginLuminosityBlockProduce (LuminosityBlock &, EventSetup const &) override |
|
void | beginRun (Run const &, EventSetup const &) override |
|
void | endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override |
|
void | endLuminosityBlockProduce (LuminosityBlock &, EventSetup const &) override |
|
void | endRun (Run const &, EventSetup const &) override |
|
void | endRunProduce (Run &, EventSetup const &) override |
|
bool | filter (Event &e, EventSetup const &es) override |
|
| HadronizerFilter (ParameterSet const &ps) |
|
| ~HadronizerFilter () override |
|
| EDFilter ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | hasAbilityToProduceInLumis () const final |
|
bool | hasAbilityToProduceInRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
| EDFilterBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDFilterBase () override |
|
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 |
|
std::vector< ConsumesInfo > | consumesInfo () 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 |
|
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 |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (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) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
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) |
|
template<class HAD, class DEC>
class edm::HadronizerFilter< HAD, DEC >
Definition at line 55 of file HadronizerFilter.h.
template<class HAD , class DEC >
Definition at line 98 of file HadronizerFilter.h.
References edm::BranchDescription::branchType(), edm::ProducerBase::callWhenNewProductsRegistered(), edm::HadronizerFilter< HAD, DEC >::counterRunInfoProducts_, edm::HadronizerFilter< HAD, DEC >::decayer_, edm::HadronizerFilter< HAD, DEC >::eventProductToken_, edm::ParameterSet::exists(), edm::HadronizerFilter< HAD, DEC >::filter_, edm::ParameterSet::getParameter(), edm::HadronizerFilter< HAD, DEC >::hadronizer_, edm::InRun, edm::BranchDescription::moduleLabel(), edm::HadronizerFilter< HAD, DEC >::nAttempts_, edm::BranchDescription::processName(), edm::BranchDescription::productInstanceName(), edm::HadronizerFilter< HAD, DEC >::runInfoProductTag_, edm::HadronizerFilter< HAD, DEC >::runInfoProductToken_, edm::uniqueSharedResourceName(), and edm::BranchDescription::unwrappedTypeID().
112 iBD.branchType() ==
InRun) {
114 this->
eventProductToken_ = consumes<LHEEventProduct>(InputTag((iBD.moduleLabel()==
"externalLHEProducer") ?
"externalLHEProducer" :
"source"));
115 this->
runInfoProductTag_ = InputTag(iBD.moduleLabel(), iBD.productInstanceName(), iBD.processName());
116 this->
runInfoProductToken_ = consumes<LHERunInfoProduct,InRun>(InputTag(iBD.moduleLabel(), iBD.productInstanceName(), iBD.processName()));
129 std::vector<std::string>
const& sharedResources =
hadronizer_.sharedResources();
130 for(
auto const& resource : sharedResources) {
131 usesResource(resource);
134 if ( ps.exists(
"ExternalDecays") )
140 std::vector<std::string>
const& sharedResourcesDec = decayer_->sharedResources();
141 for(
auto const& resource : sharedResourcesDec) {
142 usesResource(resource);
146 if ( ps.exists(
"HepMCFilter") ) {
152 if (ps.exists(
"nAttempts")) {
153 nAttempts_ = ps.getParameter<
unsigned int>(
"nAttempts");
158 if(sharedResources.empty() && (!decayer_ || decayer_->sharedResources().empty())) {
162 produces<edm::HepMCProduct>(
"unsmeared");
163 produces<GenEventInfoProduct>();
164 produces<GenLumiInfoHeader, edm::Transition::BeginLuminosityBlock>();
165 produces<GenLumiInfoProduct, edm::Transition::EndLuminosityBlock>();
166 produces<GenRunInfoProduct, edm::Transition::EndRun>();
168 produces<GenFilterInfo, edm::Transition::EndLuminosityBlock>();
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
unsigned int counterRunInfoProducts_
InputTag runInfoProductTag_
EDGetTokenT< LHEEventProduct > eventProductToken_
EDGetTokenT< LHERunInfoProduct > runInfoProductToken_
std::string uniqueSharedResourceName()
HepMCFilterDriver * filter_
template<class HAD , class DEC >
Definition at line 407 of file HadronizerFilter.h.
References lhef::LHERunInfo::Process::accepted(), lhef::LHERunInfo::Process::acceptedBr(), lhef::LHERunInfo::XSec::error(), edm::HadronizerFilter< HAD, DEC >::filter_, lhef::LHERunInfo::getHEPRUP(), lhef::LHERunInfo::Process::getLHEXSec(), lhef::LHERunInfo::getLumiProcesses(), edm::HadronizerFilter< HAD, DEC >::hadronizer_, mps_fire::i, lhef::HEPRUP::IDWTUP, lhef::LHERunInfo::Process::killed(), eostools::move(), lhef::LHERunInfo::Counter::n(), lhef::LHERunInfo::Process::nPassNeg(), lhef::LHERunInfo::Process::nPassPos(), lhef::LHERunInfo::Process::nTotalNeg(), lhef::LHERunInfo::Process::nTotalPos(), HepMCFilterDriver::numEventsPassNeg(), HepMCFilterDriver::numEventsPassPos(), HepMCFilterDriver::numEventsTotalNeg(), HepMCFilterDriver::numEventsTotalPos(), lhef::LHERunInfo::Process::process(), edm::LuminosityBlock::put(), lhef::LHERunInfo::Process::selected(), GenLumiInfoProduct::ProcessInfo::setAccepted(), GenLumiInfoProduct::ProcessInfo::setAcceptedBr(), GenLumiInfoProduct::ProcessInfo::setKilled(), GenLumiInfoProduct::ProcessInfo::setLheXSec(), GenLumiInfoProduct::ProcessInfo::setNPassNeg(), GenLumiInfoProduct::ProcessInfo::setNPassPos(), GenLumiInfoProduct::ProcessInfo::setNTotalNeg(), GenLumiInfoProduct::ProcessInfo::setNTotalPos(), GenLumiInfoProduct::ProcessInfo::setProcess(), GenLumiInfoProduct::ProcessInfo::setSelected(), GenLumiInfoProduct::ProcessInfo::setTried(), lhef::LHERunInfo::Counter::sum(), lhef::LHERunInfo::Counter::sum2(), HepMCFilterDriver::sumpass_w(), HepMCFilterDriver::sumpass_w2(), HepMCFilterDriver::sumtotal_w(), HepMCFilterDriver::sumtotal_w2(), groupFilesInBlocks::temp, lhef::LHERunInfo::Process::tried(), and lhef::LHERunInfo::XSec::value().
412 std::vector<lhef::LHERunInfo::Process> LHELumiProcess = lheRunInfo->
getLumiProcesses();
413 std::vector<GenLumiInfoProduct::ProcessInfo> GenLumiProcess;
414 for(
unsigned int i=0;
i < LHELumiProcess.size();
i++){
429 GenLumiProcess.push_back(temp);
433 genLumiInfo->setProcessInfo( GenLumiProcess );
441 std::unique_ptr<GenFilterInfo> thisProduct(
new GenFilterInfo(
void setNPassNeg(unsigned int n)
unsigned int nTotalPos() const
void setTried(unsigned int n, double sum, double sum2)
void setNTotalNeg(unsigned int n)
void setSelected(unsigned int n, double sum, double sum2)
unsigned int numEventsPassNeg() const
unsigned int numEventsTotalPos() const
void setKilled(unsigned int n, double sum, double sum2)
double sumtotal_w2() const
const std::vector< Process > & getLumiProcesses() const
void setAccepted(unsigned int n, double sum, double sum2)
void setAcceptedBr(unsigned int n, double sum, double sum2)
double sumtotal_w() const
void setNTotalPos(unsigned int n)
unsigned int nTotalNeg() const
unsigned int nPassPos() const
const HEPRUP * getHEPRUP() const
unsigned int numEventsPassPos() const
void setLheXSec(double value, double err)
unsigned int numEventsTotalNeg() const
Counter acceptedBr() const
double sumpass_w2() const
void setNPassPos(unsigned int n)
unsigned int nPassNeg() const
HepMCFilterDriver * filter_
template<class HAD , class DEC >
Implements edm::one::EDFilterBase.
Definition at line 180 of file HadronizerFilter.h.
References edm::HadronizerFilter< HAD, DEC >::decayer_, edm::EventID::event(), event(), edm::HadronizerFilter< HAD, DEC >::eventProductToken_, HepMCFilterDriver::filter(), edm::HadronizerFilter< HAD, DEC >::filter_, particlelevel_cff::genEventInfo, edm::Event::getByToken(), edm::HadronizerFilter< HAD, DEC >::hadronizer_, edm::EventBase::id(), eostools::move(), edm::HadronizerFilter< HAD, DEC >::nAttempts_, edm::Event::put(), edm::Event::streamID(), and protons_cff::t.
182 RandomEngineSentry<HAD> randomEngineSentry(&
hadronizer_,
ev.streamID());
183 RandomEngineSentry<DEC> randomEngineSentryDecay(
decayer_,
ev.streamID());
192 std::unique_ptr<HepMC::GenEvent> finalEvent;
193 std::unique_ptr<GenEventInfoProduct> finalGenEventInfo;
198 unsigned int naccept = 0;
200 for (
unsigned int itry = 0; itry<
nAttempts_; ++itry) {
216 if( !
event.get() )
continue;
231 if ( !
event.get() )
continue;
242 if ( !
event.get() )
continue;
244 event->set_event_number(
ev.id().event() );
265 if (!naccept)
return false;
271 double multihadweight = double(naccept)/double(nAttempts_);
274 finalGenEventInfo->weights()[0] *= multihadweight;
277 finalEvent->weights()[0] *= multihadweight;
282 std::unique_ptr<HepMCProduct> bare_product(
new HepMCProduct());
283 bare_product->addHepMCData( finalEvent.release() );
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
EDGetTokenT< LHEEventProduct > eventProductToken_
bool filter(const HepMC::GenEvent *evt, double weight=1.)
HepMCFilterDriver * filter_