|
| 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 &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
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 & | operator= (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) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
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 () |
|
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 = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
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) |
|
Definition at line 16 of file CandMCMatchTableProducer.cc.
CandMCMatchTableProducer::CandMCMatchTableProducer |
( |
edm::ParameterSet const & |
params | ) |
|
|
inline |
Definition at line 18 of file CandMCMatchTableProducer.cc.
24 produces<nanoaod::FlatTable>();
28 else if (
type ==
"Electron")
30 else if (
type ==
"Tau")
32 else if (
type ==
"Photon")
34 else if (
type ==
"Other")
42 "1 = prompt muon (including gamma*->mu mu), 15 = muon from prompt tau, "
43 "5 = muon from b, 4 = muon from c, 3 = muon from light or unknown, 0 = unmatched";
47 "1 = prompt electron (including gamma*->mu mu), 15 = electron from prompt tau, 22 = prompt photon (likely "
49 "5 = electron from b, 4 = electron from c, 3 = electron from light or unknown, 0 = unmatched";
52 flavDoc_ =
"1 = prompt photon, 11 = prompt electron, 0 = unknown or unmatched";
56 "1 = prompt electron, 2 = prompt muon, 3 = tau->e decay, 4 = tau->mu decay, 5 = hadronic tau decay, 0 = "
57 "unknown or unmatched";
60 flavDoc_ =
"1 = from hard scatter, 0 = unknown or unmatched";
66 consumes<edm::Association<reco::GenParticleCollection>>(
params.getParameter<
edm::InputTag>(
"mcMapVisTau"));
71 consumes<edm::Association<reco::GenJetCollection>>(
params.getParameter<
edm::InputTag>(
"mcMapDressedLep"));
References candMapDressedLep_, candMapVisTau_, Exception, flavDoc_, genPartsToken_, mapTauAnc_, MElectron, MMuon, MOther, MPhoton, MTau, CalibrationSummaryClient_cfi::params, AlCaHLTBitMon_QueryRunRegistry::string, and type_.
Implements edm::global::EDProducerBase.
Definition at line 79 of file CandMCMatchTableProducer.cc.
82 unsigned int ncand =
cands->size();
84 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
objName_,
false,
true);
103 std::vector<int>
key(ncand, -1), flav(ncand, 0);
104 for (
unsigned int i = 0;
i < ncand; ++
i) {
111 matchVisTau = (*mapVisTau)[
cands->ptrAt(
i)];
114 matchDressedLep = (*mapDressedLep)[
cands->ptrAt(
i)];
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<
int>(
branchName_ +
"Idx",
key,
"Index into genParticle list for " +
doc_);
199 "Flavour of genParticle (DressedLeptons for electrons) for " +
doc_ +
": " +
flavDoc_);
References funct::abs(), branchName_, candMap_, candMapDressedLep_, candMapVisTau_, HLT_FULL_cff::cands, 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(), genParticles_cff::map, electrons_cff::mapTauAnc, mapTauAnc_, match(), MElectron, HiEvtPlane_cfi::minpt, MMuon, eostools::move(), MPhoton, MTau, objName_, reco::LeafCandidate::pt(), src_, and type_.