Selects hadrons and partons from a collection of GenParticles. More...
#include <PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc>
Public Member Functions | |
HadronAndPartonSelector (const edm::ParameterSet &) | |
~HadronAndPartonSelector () | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Static Public Member Functions inherited from edm::EDProducer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | beginRun (edm::Run &, edm::EventSetup const &) |
virtual void | endJob () |
virtual void | endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | endRun (edm::Run &, edm::EventSetup const &) |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
const edm::EDGetTokenT < reco::GenParticleCollection > | particlesToken_ |
std::string | partonMode_ |
PartonSelectorPtr | partonSelector_ |
const edm::EDGetTokenT < GenEventInfoProduct > | srcToken_ |
Additional Inherited Members | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Protected Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
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) |
Selects hadrons and partons from a collection of GenParticles.
This producer selects hadrons, partons, and leptons from a collection of GenParticles and stores vectors of EDM references to these particles in the event. The following hadrons are selected:
Older Fortran Monte Carlo generators (Pythia6 and Herwig6) follow the HEPEVT [1] particle status code convention while newer C++ Monte Carlo generators (Pythia8, Herwig++, and Sherpa) follow the HepMC [2] particle status code convention. However, both conventions give considerable freedom in defining the status codes of intermediate particle states. Hence, the parton selection is generator-dependent and is described in each of the parton selectors separately.
Using the provenance information of the GenEventInfoProduct, the producer attempts to automatically determine what generator was used to hadronize events and based on that information decides what parton selection mode to use. It is also possible to enforce any of the supported parton selection modes.
The selected hadrons and partons are finally used by the JetFlavourClustering producer to determine the jet flavour.
The following leptons are selected:
[1] http://cepa.fnal.gov/psm/stdhep/ [2] http://lcgapp.cern.ch/project/simu/HepMC/
Definition at line 79 of file HadronAndPartonSelector.cc.
|
explicit |
Definition at line 111 of file HadronAndPartonSelector.cc.
HadronAndPartonSelector::~HadronAndPartonSelector | ( | ) |
Definition at line 126 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Reimplemented from edm::EDProducer.
Definition at line 263 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Definition at line 286 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Definition at line 274 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Reimplemented from edm::EDProducer.
Definition at line 269 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Definition at line 292 of file HadronAndPartonSelector.cc.
|
privatevirtual |
Definition at line 280 of file HadronAndPartonSelector.cc.
|
static |
Definition at line 298 of file HadronAndPartonSelector.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
|
privatevirtual |
Implements edm::EDProducer.
Definition at line 141 of file HadronAndPartonSelector.cc.
References edm::hlt::Exception, edm::Event::getByToken(), edm::Event::getProvenance(), CandMCTagUtils::hasBottom(), CandMCTagUtils::hasCharm(), i, edm::HandleBase::id(), reco::isElectron(), reco::isMuon(), reco::isTau(), edm::HandleBase::isValid(), HLT_25ns14e33_v1_cff::leptons, edm::moduleName(), particlesToken_, partonMode_, partonSelector_, edm::Event::put(), srcToken_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 98 of file HadronAndPartonSelector.cc.
Referenced by produce().
|
private |
Definition at line 100 of file HadronAndPartonSelector.cc.
Referenced by produce().
|
private |
Definition at line 101 of file HadronAndPartonSelector.cc.
Referenced by produce().
|
private |
Definition at line 97 of file HadronAndPartonSelector.cc.
Referenced by produce().