1 #ifndef RecoMET_METProducers_MinMETProducerT_h
2 #define RecoMET_METProducers_MinMETProducerT_h
40 produces<METCollection>();
51 int numMEtObjects = -1;
52 for ( vInputTag::const_iterator src_i =
src_.begin();
53 src_i !=
src_.end(); ++src_i ) {
56 if ( numMEtObjects == -1 ) numMEtObjects = inputMETs->size();
57 else if ( numMEtObjects != (
int)inputMETs->size() )
59 <<
"Mismatch in number of input MET objects !!\n";
62 for (
int iMEtObject = 0; iMEtObject < numMEtObjects; ++iMEtObject ) {
64 for ( vInputTag::const_iterator src_i =
src_.begin();
65 src_i !=
src_.end(); ++src_i ) {
68 const T& inputMET = inputMETs->at(iMEtObject);
69 if ( minMET == 0 || inputMET.pt() < minMET->pt() ) minMET = &inputMET;
72 outputMETs->push_back(
T(*minMET));
T getParameter(std::string const &) const
std::vector< edm::InputTag > vInputTag
MinMETProducerT< reco::PFMET > MinPFMETProducer
std::vector< T > METCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void produce(edm::Event &evt, const edm::EventSetup &es) override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MinMETProducerT< reco::CaloMET > MinCaloMETProducer
MinMETProducerT(const edm::ParameterSet &cfg)