27 storeLostTracks_(
cfg.getParameter<
bool>(
"storeLostTracks")) {
28 produces<std::vector<reco::VertexCompositePtrCandidate>>();
36 auto outputCands = std::make_unique<std::vector<reco::VertexCompositePtrCandidate>>();
37 outputCands->reserve(inputTaus->size() * 3);
38 for (
size_t iTau = 0; iTau < inputTaus->size(); ++iTau) {
39 for (
const auto&
cand : (*inputTaus)[iTau].signalCands()) {
43 outputCands->push_back(outCand);
46 for (
const auto&
cand : (*inputTaus)[iTau].signalLostTracks()) {
54 outputCands->push_back(outCand);
67 desc.add<
bool>(
"storeLostTracks",
true)
68 ->setComment(
"If true, lostTracks will be stored together with other candidates with pdgId=+-10211");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~PATTauSignalCandidatesProducer() override
edm::EDGetTokenT< pat::TauCollection > tausToken_
std::vector< Tau > TauCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const bool storeLostTracks_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
PATTauSignalCandidatesProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
void addDaughter(const CandidatePtr &)
add a daughter via a reference
void setStatus(int status) final
set status word
void setPdgId(int pdgId) final