2 #include "Math/GenVector/VectorUtil.h"
11 inputColl_ = iConfig.
getParameter< std::vector<InputTag> >(
"InputCollections");
12 matchDeltaR_ = iConfig.
getParameter<
double>(
"MatchDeltaR");
13 outName_ = iConfig.
getParameter<
string>(
"OutputCollection");
15 produces<LorentzVectorCollection> ( outName_);
25 std::vector< Handle<LorentzVectorCollection> > handles;
27 bool allCollectionsExist =
true;
29 for(
size_t i = 0;
i<inputColl_.size();++
i)
34 handles.push_back(tmp);
38 allCollectionsExist =
false;
44 if(allCollectionsExist)
47 for(
size_t i = 0;
i < (handles[0])->
size();++
i)
49 bool MatchedObj =
true;
55 for(
size_t j = 1;
j < handles.size();++
j)
57 if(!
match(lvRef,*(handles[
j])))
65 out_product->push_back(lvRef);
72 iEvent.
put(out_product,outName_);
89 for(LorentzVectorCollection::const_iterator it = lvcol.begin();it!=lvcol.end();++it)
91 double delta = ROOT::Math::VectorUtil::DeltaR(lv,*it);
92 if(delta<matchDeltaR_)
T getParameter(std::string const &) const
bool match(const LorentzVector &, const LorentzVectorCollection &)
std::vector< LorentzVector > LorentzVectorCollection
virtual void produce(edm::Event &, const edm::EventSetup &)
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName, BranchDescription::MatchMode m)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
HLTTauRefCombiner(const edm::ParameterSet &)
std::vector< std::vector< double > > tmp
math::XYZTLorentzVectorD LorentzVector
tuple size
Write out results.