2 #include "Math/GenVector/VectorUtil.h" 8 std::vector<edm::InputTag> inputCollVector_ = iConfig.
getParameter<std::vector<InputTag>>(
"InputCollections");
9 for (
unsigned int ii = 0;
ii < inputCollVector_.size(); ++
ii) {
10 inputColl_.push_back(consumes<LorentzVectorCollection>(inputCollVector_[
ii]));
12 matchDeltaR_ = iConfig.
getParameter<
double>(
"MatchDeltaR");
13 outName_ = iConfig.
getParameter<
string>(
"OutputCollection");
15 produces<LorentzVectorCollection>(outName_);
24 std::vector<Handle<LorentzVectorCollection>> handles;
26 bool allCollectionsExist =
true;
28 for (
size_t i = 0;
i < inputColl_.size(); ++
i) {
31 handles.push_back(tmp);
33 allCollectionsExist =
false;
38 if (allCollectionsExist) {
40 for (
size_t i = 0;
i < (handles[0])->
size(); ++
i) {
41 bool MatchedObj =
true;
47 for (
size_t j = 1; j < handles.size(); ++j) {
48 if (!
match(lvRef, *(handles[j])))
54 out_product->push_back(lvRef);
67 for (LorentzVectorCollection::const_iterator it = lvcol.begin(); it != lvcol.end(); ++it) {
69 if (delta < matchDeltaR_) {
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool match(const LorentzVector &, const LorentzVectorCollection &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< LorentzVector > LorentzVectorCollection
HLTTauRefCombiner(const edm::ParameterSet &)
std::vector< std::vector< double > > tmp
~HLTTauRefCombiner() override
math::XYZTLorentzVectorD LorentzVector
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
void produce(edm::Event &, const edm::EventSetup &) override