|
| CandMCMatchTableProducer (edm::ParameterSet const ¶ms) |
|
void | produce (edm::StreamID id, edm::Event &iEvent, const edm::EventSetup &iSetup) const override |
|
| ~CandMCMatchTableProducer () override |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () 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 |
|
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 |
|
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 |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
template<typename T > |
using | BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T > |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<Transition Tr = Transition::Event> |
auto | produces (std::string instanceName) noexcept |
| declare what type of product will make and with which optional label More...
|
|
template<Transition B> |
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) |
|
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 () |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<Transition Tr = Transition::Event> |
auto | produces () noexcept |
|
ProducesCollector | producesCollector () |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
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) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
Definition at line 16 of file CandMCMatchTableProducer.cc.
Implements edm::global::EDProducerBase.
Definition at line 79 of file CandMCMatchTableProducer.cc.
References funct::abs(), branchName_, candMap_, candMapDressedLep_, candMapVisTau_, PbPb_ZMuSkimMuonDPG_cff::deltaR, doc_, flavDoc_, EgammaValidation_cff::genp, genPartsToken_, getParentHadronFlag(), electrons_cff::hasTauAnc, mps_fire::i, iEvent, edm::Ref< C, T, F >::isNonnull(), crabWrapper::key, edm::Ref< C, T, F >::key(), electrons_cff::mapTauAnc, mapTauAnc_, match(), MElectron, HiEvtPlane_cfi::minpt, MMuon, eostools::move(), MPhoton, MTau, objName_, reco::LeafCandidate::pt(), src_, and type_.
81 auto ncand = candProd.size();
83 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
objName_,
false,
true);
101 std::vector<int16_t>
key(ncand, -1);
102 std::vector<uint8_t> flav(ncand, 0);
103 for (
unsigned int i = 0;
i < ncand; ++
i) {
105 const auto&
cand = candProd.ptrAt(
i);
111 matchVisTau = (*mapVisTau)[
cand];
114 matchDressedLep = (*mapDressedLep)[
cand];
116 hasTauAnc = (*mapTauAnc)[matchDressedLep];
119 if (
match.isNonnull())
128 if (
match->isPromptFinalState())
130 else if (
match->isDirectPromptTauDecayProductFinalState())
137 if (matchDressedLep->pdgId() == 22)
144 for (
auto& consti : matchDressedLep->getGenConstituents()) {
145 if (
abs(consti->pdgId()) != 11)
147 if (consti->pt() <
minpt)
149 minpt = consti->pt();
150 highestPtConstituent = consti;
152 if (highestPtConstituent) {
155 return (
abs(
genp.pdgId()) == 11) && (
deltaR(
genp, *highestPtConstituent) < 0.01) &&
156 (
abs(
genp.pt() - highestPtConstituent->
pt()) / highestPtConstituent->
pt() < 0.01);
158 if (iter != genParts->end()) {
159 key[
i] = iter - genParts->begin();
162 }
else if (!
match.isNonnull())
164 else if (
match->isPromptFinalState())
165 flav[
i] = (
match->pdgId() == 22 ? 22 : 1);
166 else if (
match->isDirectPromptTauDecayProductFinalState())
172 if (
match->isPromptFinalState() &&
match->pdgId() == 22)
174 else if ((
match->isPromptFinalState() ||
match->isDirectPromptTauDecayProductFinalState()) &&
180 if (
match.isNonnull() &&
match->statusFlags().isPrompt() &&
abs(
match->pdgId()) == 11)
182 else if (
match.isNonnull() &&
match->statusFlags().isPrompt() &&
abs(
match->pdgId()) == 13)
184 else if (
match.isNonnull() &&
match->isDirectPromptTauDecayProductFinalState() &&
abs(
match->pdgId()) == 11)
186 else if (
match.isNonnull() &&
match->isDirectPromptTauDecayProductFinalState() &&
abs(
match->pdgId()) == 13)
192 flav[
i] =
match->statusFlags().fromHardProcess();
196 tab->addColumn<int16_t>(
branchName_ +
"Idx",
key,
"Index into genParticle list for " +
doc_);
199 "Flavour of genParticle (DressedLeptons for electrons) for " +
doc_ +
": " +
flavDoc_);
genp
produce generated paricles in acceptance #
double pt() const final
transverse momentum
enum CandMCMatchTableProducer::MatchType type_
bool isNonnull() const
Checks for non-null.
const std::string branchName_
const std::string objName_
edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > candMapVisTau_
key_type key() const
Accessor for product key.
edm::EDGetTokenT< reco::GenParticleCollection > genPartsToken_
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< reco::CandidateView > src_
static int getParentHadronFlag(const reco::GenParticleRef match)
const edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > candMap_
edm::EDGetTokenT< edm::ValueMap< bool > > mapTauAnc_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > candMapDressedLep_