|
| PFCandidateMuonUntagger (const edm::ParameterSet &) |
|
void | produce (edm::StreamID iID, edm::Event &, const edm::EventSetup &) const override |
|
| ~PFCandidateMuonUntagger () override |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInLumis () const final |
|
bool | hasAbilityToProduceInRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () 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 |
|
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) |
|
|
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 |
|
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) |
|
Take:
Definition at line 24 of file PFCandidateMuonUntagger.cc.
Definition at line 56 of file PFCandidateMuonUntagger.cc.
References funct::abs(), popcon2dropbox::copy(), DEFINE_FWK_MODULE, edm::helper::Filler< Map >::fill(), objects.autophobj::filler, edm::Event::getByToken(), mps_fire::i, edm::helper::Filler< Map >::insert(), eostools::move(), gen::n, lumidbDDL::newToOld(), lumidbDDL::oldToNew(), oldToNewMuons_, packedPFCandidateRefMixer_cfi::pf, packedPFCandidateRefMixer_cfi::pf2pf, pfcandidates_, and edm::Event::put().
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), HTMLExport.HTMLExportStatic::export(), and ~PFCandidateMuonUntagger().
64 int n = pfcandidates->size();
65 std::unique_ptr<std::vector<reco::PFCandidate>>
copy(
new std::vector<reco::PFCandidate>());
66 std::unique_ptr<std::vector<reco::PFCandidate>> discarded(
new std::vector<reco::PFCandidate>());
74 if (
pf.muonRef().isNonnull()) {
76 if (
abs(
pf.pdgId()) == 13 && !newRef->isPFMuon()) {
77 discarded->push_back(
pf);
79 badToOld.push_back(i);
80 discarded->back().setMuonRef(newRef);
84 newToOld.push_back(i);
85 copy->back().setMuonRef(newRef);
90 newToOld.push_back(i);
100 std::vector<reco::PFCandidateRef> refs; refs.reserve(n);
102 for (i = 0; i <
n; ++
i) {
109 filler.insert(pfcandidates, refs.begin(), refs.end());
112 for (
int i : newToOld) {
115 filler.insert(newpf, refs.begin(), refs.end());
118 for (
int i : badToOld) {
121 filler.insert(badpf, refs.begin(), refs.end());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::Association< std::vector< reco::Muon > > > oldToNewMuons_
Abs< T >::type abs(const T &t)
Particle reconstructed by the particle flow algorithm.
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pfcandidates_