44 iConfig.getParameter<edm::
InputTag>(
"srcIsoTracks"))),
46 iConfig.getParameter<edm::
InputTag>(
"packedPFCandidates"))),
49 produces<edm::ValueMap<bool>>(
"isFromLostTrack");
93 unsigned int Nit = srcIsoTracks->size();
94 std::vector<bool> v_isFromLostTrack(Nit,
false);
96 for (
unsigned int iit = 0; iit < Nit; iit++) {
97 auto isotrack = srcIsoTracks->ptrAt(iit);
99 isotrack->packedCandRef();
100 bool isFromLostTrack = (pcref.
isNonnull() && pcref.
id() == lt_handle.
id());
101 v_isFromLostTrack[iit] = isFromLostTrack;
106 filler.
insert(srcIsoTracks, v_isFromLostTrack.begin(), v_isFromLostTrack.end());
108 iEvent.
put(
std::move(vm_isFromLostTrack),
"isFromLostTrack");
114 desc.
add<
edm::InputTag>(
"srcIsoTracks")->setComment(
"isolated track input collection");
115 desc.
add<
edm::InputTag>(
"packedPFCandidates")->setComment(
"packed PF Candidates collection ");
116 desc.
add<
edm::InputTag>(
"lostTracks")->setComment(
"lost tracks collection");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< pat::PackedCandidate > PackedCandidateCollection
void insert(const H &h, I begin, I end)
ProductID id() const
Accessor for product ID.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
~IsFromLostTrackMapProducer() override
edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< edm::View< pat::IsolatedTrack > > srcIsoTracks_
IsFromLostTrackMapProducer(const edm::ParameterSet &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)