34 produces<std::vector<pat::Jet>>();
35 produces<reco::GenJetCollection>(
"genJets");
36 produces<std::vector<CaloTower>>(
"caloTowers");
37 produces<reco::PFCandidateCollection>(
"pfCandidates");
38 produces<edm::OwnVector<reco::BaseTagInfo>>(
"tagInfos");
47 auto patJets = std::make_unique<std::vector<Jet>>();
49 auto genJetsOut = std::make_unique<reco::GenJetCollection>();
50 auto caloTowersOut = std::make_unique<std::vector<CaloTower>>();
51 auto pfCandidatesOut = std::make_unique<reco::PFCandidateCollection>();
52 auto tagInfosOut = std::make_unique<edm::OwnVector<reco::BaseTagInfo>>();
56 iEvent.getRefBeforePut<std::vector<CaloTower>>(
"caloTowers");
70 bool selectedLoose =
false;
78 for (CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
79 itowerEnd = ijet->caloTowersFwdPtr().end(),
84 caloTowersOut->push_back(**itower);
88 for (reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
89 icandEnd = ijet->pfCandidatesFwdPtr().end(),
94 pfCandidatesOut->push_back(**icand);
98 for (TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
99 iinfoEnd = ijet->tagInfosFwdPtr().end(),
104 tagInfosOut->push_back(**iinfo);
108 if (ijet->genJet() !=
nullptr) {
109 genJetsOut->push_back(*(ijet->genJet()));
122 unsigned int caloTowerIndex = 0;
123 unsigned int pfCandidateIndex = 0;
124 unsigned int tagInfoIndex = 0;
125 unsigned int genJetIndex = 0;
131 bool selectedLoose =
false;
133 selectedLoose =
true;
142 for (CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
143 itowerEnd = ijet->caloTowersFwdPtr().end(),
144 itower = itowerBegin;
151 patJets->back().updateFwdCaloTowerFwdPtr(itower - itowerBegin,
157 for (reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
158 icandEnd = ijet->pfCandidatesFwdPtr().end(),
166 patJets->back().updateFwdPFCandidateFwdPtr(icand - icandBegin,
172 for (TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
173 iinfoEnd = ijet->tagInfosFwdPtr().end(),
181 patJets->back().updateFwdTagInfoFwdPtr(iinfo - iinfoBegin,
187 if (ijet->genJet() !=
nullptr) {
188 patJets->back().updateFwdGenJetFwdRef(
208 iDesc.
setComment(
"Energy Correlation Functions adder");
211 iDesc.
add<
std::string>(
"cutLoose",
"")->setComment(
"Loose jet selection. Will keep nLoose loose jets.");
212 iDesc.
add<
bool>(
"filter",
false)->setComment(
"Filter selection?");
213 iDesc.
add<
unsigned>(
"nLoose", 0)->setComment(
"Keep nLoose loose jets that satisfy cutLoose");
214 descriptions.
add(
"PATJetSelector", iDesc);
242 std::vector<CompositeCandidate>,
274 std::vector<CompositeCandidate>,
const StringCutObjectSelector< Jet > selector_
SingleObjectSelector< std::vector< Tau >, StringCutObjectSelector< Tau > > PATTauSelector
const StringCutObjectSelector< Jet > selectorLoose_
const std::string cutLoose_
SingleObjectSelector< std::vector< TriggerObjectStandAlone >, StringCutObjectSelector< TriggerObjectStandAlone > > PATTriggerObjectStandAloneSelector
std::vector< GenJet > GenJetCollection
collection of GenJet objects
SingleObjectSelector< std::vector< Photon >, StringCutObjectSelector< Photon >, edm::RefVector< std::vector< Photon > > > PATPhotonRefSelector
SingleObjectSelector< std::vector< Electron >, StringCutObjectSelector< Electron > > PATElectronSelector
SingleObjectSelector< std::vector< PFParticle >, StringCutObjectSelector< PFParticle > > PATPFParticleSelector
SingleObjectSelector< pat::IsolatedTrackCollection, StringCutObjectSelector< pat::IsolatedTrack > > IsoTrackSelector
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void setComment(std::string const &value)
SingleObjectSelector< std::vector< CompositeCandidate >, StringCutObjectSelector< CompositeCandidate, true > > PATCompositeCandidateSelector
~PATJetSelector() override
SingleObjectSelector< std::vector< Electron >, StringCutObjectSelector< Electron >, edm::RefVector< std::vector< Electron > > > PATElectronRefSelector
#define DEFINE_FWK_MODULE(type)
bool filter(edm::Event &iEvent, const edm::EventSetup &iSetup) override
SingleObjectSelector< std::vector< GenericParticle >, StringCutObjectSelector< GenericParticle >, edm::RefVector< std::vector< GenericParticle > > > PATGenericParticleRefSelector
SingleObjectSelector< std::vector< CompositeCandidate >, StringCutObjectSelector< CompositeCandidate, true >, edm::RefVector< std::vector< CompositeCandidate > > > PATCompositeCandidateRefSelector
SingleObjectSelector< std::vector< GenericParticle >, StringCutObjectSelector< GenericParticle > > PATGenericParticleSelector
ParameterDescriptionBase * add(U const &iLabel, T const &value)
SingleObjectSelector< std::vector< Jet >, StringCutObjectSelector< Jet >, edm::RefVector< std::vector< Jet > > > PATJetRefSelector
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
ObjectCountFilter< pat::MuonCollection, StringCutObjectSelector< pat::Muon > >::type MuonRefPatCount
SingleObjectSelector< std::vector< Tau >, StringCutObjectSelector< Tau >, edm::RefVector< std::vector< Tau > > > PATTauRefSelector
void add(std::string const &label, ParameterSetDescription const &psetDescription)
SingleObjectSelector< std::vector< MET >, StringCutObjectSelector< MET >, edm::RefVector< std::vector< MET > > > PATMETRefSelector
SingleObjectSelector< std::vector< MET >, StringCutObjectSelector< MET > > PATMETSelector
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
SingleObjectSelector< std::vector< Photon >, StringCutObjectSelector< Photon > > PATPhotonSelector
SingleObjectSelector< std::vector< Muon >, StringCutObjectSelector< Muon > > PATMuonSelector
const edm::EDGetTokenT< edm::View< pat::Jet > > srcToken_
SingleObjectSelector< std::vector< PFParticle >, StringCutObjectSelector< PFParticle >, edm::RefVector< std::vector< PFParticle > > > PATPFParticleRefSelector
SingleObjectSelector< std::vector< Muon >, StringCutObjectSelector< Muon >, edm::RefVector< std::vector< Muon > > > PATMuonRefSelector
PATJetSelector(edm::ParameterSet const ¶ms)