23 typedef std::pair<std::string, edm::InputTag>
NameTag;
34 for (std::vector<std::string>::const_iterator it = names.begin(), ed = names.end(); it != ed; ++it) {
39 "PATTauProducer: id addTauID is true, you must specify:\n" <<
40 "\tPSet tauIDSources = { \n" <<
41 "\t\tInputTag <someName> = <someTag> // as many as you want \n " <<
45 produces<std::vector<pat::Tau> >();
53 auto outputTaus = std::make_unique<std::vector<pat::Tau> >();
54 outputTaus->reserve(inputTaus->size());
57 for(pat::TauCollection::const_iterator inputTau = inputTaus->begin(); inputTau != inputTaus->end(); ++inputTau, ++tau_idx){
60 size_t nTauIds = inputTau->tauIDs().size();
61 std::vector<pat::Tau::IdPair> tauIds(nTauIds+
tauIDSrcs_.size());
63 for(
size_t i = 0;
i < nTauIds; ++
i){
64 tauIds[
i] = inputTau->tauIDs().at(
i);
71 tauIds[nTauIds+
i].second = (*tauDiscr)[inputTauRef];
75 outputTaus->push_back(outputTau);
std::vector< edm::EDGetTokenT< pat::PATTauDiscriminator > > patTauIDTokens_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const HistoName names[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< NameTag > tauIDSrcs_
void setTauIDs(const std::vector< IdPair > &ids)
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
~PATTauIDEmbedder() override
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Analysis-level tau class.
PATTauIDEmbedder(const edm::ParameterSet &)
edm::EDGetTokenT< pat::TauCollection > src_
void produce(edm::Event &, const edm::EventSetup &) override
std::pair< std::string, edm::InputTag > NameTag