58 template <
class C1,
class C2,
class C3,
class C4>
60 const C3 & refProdMany, C4& itemsMany,
const std::string & nameMany);
62 template <
class C1,
class C2,
class C3,
class C4>
64 const C3 & refProdMany, C4& itemsMany,
const std::string & nameMany);
92 produces<std::vector<pat::Jet>>(
"jets");
93 produces<std::vector<pat::Muon>>(
"muons");
94 produces<std::vector<pat::Electron>>(
"electrons");
95 produces<std::vector<pat::Tau>>(
"taus");
96 produces<std::vector<pat::Photon>>(
"photons");
117 template <
class C1,
class C2,
class C3,
class C4>
119 const C3 & refProdMany, C4& itemsMany,
const std::string & nameMany)
122 for(
auto & j: itemsOne) {
125 for(
auto &
m: itemsMany){
127 m.addUserCand(nameOne,
reco::CandidatePtr(refProdOne.id(), ji, refProdOne.productGetter()));
137 template <
class C1,
class C2,
class C3,
class C4>
139 const C3 & refProdMany, C4& itemsMany,
const std::string & nameMany)
142 for(
auto & j: itemsOne) {
145 for(
auto &
m: itemsMany){
147 m.addUserCand(nameOne,
reco::CandidatePtr(refProdOne.id(), ji, refProdOne.productGetter()));
164 auto jets = std::make_unique<std::vector<pat::Jet>>();
165 for(
const auto & j : *jetsIn)
jets->push_back(j);
166 auto jetRefProd = iEvent.
getRefBeforePut< std::vector<pat::Jet> >(
"jets");
170 auto muons = std::make_unique<std::vector<pat::Muon>>();
171 for(
const auto &
m : *muonsIn)
muons->push_back(
m);
172 auto muRefProd = iEvent.
getRefBeforePut< std::vector<pat::Muon> >(
"muons");
176 auto electrons = std::make_unique<std::vector<pat::Electron>>();
177 for(
const auto &
e : *electronsIn)
electrons->push_back(
e);
178 auto eleRefProd = iEvent.
getRefBeforePut< std::vector<pat::Electron> >(
"electrons");
182 auto taus = std::make_unique<std::vector<pat::Tau>>();
183 for(
const auto &
t : *tausIn)
taus->push_back(
t);
184 auto tauRefProd = iEvent.
getRefBeforePut< std::vector<pat::Tau> >(
"taus");
188 auto photons = std::make_unique<std::vector<pat::Photon>>();
189 for(
const auto &
p : *photonsIn)
photons->push_back(
p);
190 auto phRefProd = iEvent.
getRefBeforePut< std::vector<pat::Photon> >(
"photons");
~PATObjectCrossLinker() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void matchOneToMany(const C1 &refProdOne, C2 &itemsOne, const std::string &nameOne, const C3 &refProdMany, C4 &itemsMany, const std::string &nameMany)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::Event &, const edm::EventSetup &) override
void beginStream(edm::StreamID) override
const edm::EDGetTokenT< edm::View< pat::Muon > > muons_
bool matchByCommonParentSuperClusterRef(const C1 &c1, const C2 &c2)
PATObjectCrossLinker(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
bool matchByCommonSourceCandidatePtr(const C1 &c1, const C2 &c2)
const edm::EDGetTokenT< edm::View< pat::Jet > > jets_
const edm::EDGetTokenT< edm::View< pat::Electron > > electrons_
RefProd< PROD > getRefBeforePut()
void matchElectronToPhoton(const C1 &refProdOne, C2 &itemsOne, const std::string &nameOne, const C3 &refProdMany, C4 &itemsMany, const std::string &nameMany)
const edm::EDGetTokenT< edm::View< pat::Tau > > taus_
const edm::EDGetTokenT< edm::View< pat::Photon > > photons_
void endStream() override
EDProductGetter const * productGetter() const
Accessor for product getter.