34 produces<reco::PFCandidateCollection>();
40 descriptions.
add(
"pfTICLProducer", desc);
47 const auto ticl_candidates = *ticl_cand_h;
49 auto candidates = std::make_unique<reco::PFCandidateCollection>();
51 for (
const auto& ticl_cand : ticl_candidates) {
52 const auto abs_pdg_id =
std::abs(ticl_cand.pdgId());
53 const auto charge = ticl_cand.charge();
54 const auto& four_mom = ticl_cand.p4();
78 candidates->emplace_back(charge, four_mom, part_type);
81 if (candidate.charge()) {
85 candidate.setTrackRef(ref);
87 candidate.setTime(ticl_cand.time(), ticl_cand.timeError());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParticleType
particle types
~PFTICLProducer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EDProductGetter const & productGetter() const
PFTICLProducer(const edm::ParameterSet &)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::View< TICLCandidate > > ticl_candidates_
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override