2 #include "Math/GenVector/VectorUtil.h" 12 maxInvMassPairOnly_ ( iConfig.getParameter<
bool>(
"maxInvMassPairOnly") ),
13 removeMaxInvMassPair_ ( iConfig.getParameter<
bool>(
"removeMaxInvMassPair") )
15 produces<reco::PFJetCollection>();
31 for(
unsigned i = 0;
i < jets->size();
i++){
32 for(
unsigned j =
i+1; j < jets->size(); j++){
33 double test = ((*jets)[
i].p4()+(*jets)[j].p4()).M();
43 addPFJets->push_back((*jets)[iCan]);
44 addPFJets->push_back((*jets)[jCan]);
47 for (
unsigned i = 0;
i < jets->size();
i++) {
48 if (
i != iCan &&
i != jCan) addPFJets->push_back((*jets)[
i]);
60 desc.
add<
bool>(
"maxInvMassPairOnly",
true)->setComment(
"Add only max mjj pair");
61 desc.
add<
bool>(
"removeMaxInvMassPair",
false)->setComment(
"Remove max mjj pair and keep all other jets");
62 descriptions.
setComment(
"This module produces a collection of PFJets that are cross-cleaned with respect to PFTaus passing a HLT filter.");
63 descriptions.
add (
"PFJetsMaxInvMassModule",desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool removeMaxInvMassPair_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
~PFJetsMaxInvMassModule() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
PFJetsMaxInvMassModule(const edm::ParameterSet &)
const edm::EDGetTokenT< reco::PFJetCollection > pfJetSrc_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< PFJet > PFJetCollection
collection of PFJet objects