2 #include "Math/GenVector/VectorUtil.h"
13 jetSrc( iConfig.getParameter<
vtag>(
"JetSrc") ),
14 mEt_Min( iConfig.getParameter<double>(
"EtMin") )
16 for(vtag::const_iterator it =
jetSrc.begin(); it !=
jetSrc.end(); ++it) {
21 produces<CaloJetCollection>();
41 for(CaloJetCollection::const_iterator iTau = tauJets->begin(); iTau !=tauJets->end(); ++iTau)
48 myTmpJets.push_back(myJet);
60 std::sort(myTmpJets.begin(),myTmpJets.end(),
sorter);
63 while(myTmpJets.size()>0) {
64 tauL2jets->push_back(myTmpJets[0]);
66 for(
unsigned int i=1 ;
i<myTmpJets.size();++
i) {
69 tmp.push_back(myTmpJets[
i]);
75 iEvent.
put(tauL2jets);
83 std::vector<edm::InputTag> inputTags;
88 desc.
add< std::vector<edm::InputTag> >(
"JetSrc",inputTags)->setComment(
"CaloJet collections to merge");
89 desc.
add<
double>(
"EtMin",20.0)->
setComment(
"Minimal ET of jet to merge");
90 descriptions.
setComment(
"Merges CaloJet collections removing duplicates");
91 descriptions.
add(
"L2TauJetsMerger",desc);
void setComment(std::string const &value)
L2TauJetsMerger(const edm::ParameterSet &)
Jets made from CaloTowers.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void setPdgId(int pdgId) final
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
vtoken_cjets jetSrc_token
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< std::vector< double > > tmp
std::vector< edm::InputTag > vtag
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects