58 iConfig.getParameter<
edm::
InputTag>(
"trackToGenAssoc"))),
60 iConfig.getParameter<
edm::
InputTag>(
"trackToPackedCandidatesAssoc"))),
62 iConfig.getParameter<
edm::
InputTag>(
"genToPrunedAssoc"))),
64 iConfig.getParameter<
edm::
InputTag>(
"genToPrunedAssocWithStatusOne"))),
66 produces<edm::Association<reco::GenParticleCollection>>();
78 auto prunedCollection = genToPrunedAssoc.ref();
83 const auto&
tracks = *trackHandle;
85 auto out = std::make_unique<edm::Association<reco::GenParticleCollection>>(prunedCollection);
88 if (not trackToGenAssocHandle.isValid()
or not trackToGenAssocHandle->contains(trackHandle.id())) {
100 std::vector<int>
indices(pcCollection->size(), -1);
102 for (
size_t i = 0;
i <
tracks.size();
i++) {
115 auto newGenWSO = genToPrunedAssocWSO[
gen];
116 if (newGenWSO.isNull()) {
120 auto newGen = genToPrunedAssoc[newGenWSO];
121 if (newGen.isNull()) {
125 indices[pc.index()] = newGen.index();
140 descriptions.
add(
"packedCandidatesGenAssociationDefault",
desc);
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > trackToPcToken_
PackedCandidateGenAssociationProducer(const edm::ParameterSet &)
trackToPackedCandidatesAssoc
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > trackToGenToken_
std::vector< pat::PackedCandidate > PackedCandidateCollection
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > genToPrunedWSOToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
def gen(fragment, howMuch)
Production test section ####.
edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > genToPrunedToken_
auto const & tracks
cannot be loose
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_