1 #ifndef RecoMET_METProducers_MinMETProducerT_h
2 #define RecoMET_METProducers_MinMETProducerT_h
38 produces<METCollection>();
49 int numMEtObjects = -1;
50 for ( vInputTag::const_iterator src_i =
src_.begin();
51 src_i !=
src_.end(); ++src_i ) {
54 if ( numMEtObjects == -1 ) numMEtObjects = inputMETs->size();
55 else if ( numMEtObjects != (
int)inputMETs->size() )
57 <<
"Mismatch in number of input MET objects !!\n";
60 for (
int iMEtObject = 0; iMEtObject < numMEtObjects; ++iMEtObject ) {
62 for ( vInputTag::const_iterator src_i =
src_.begin();
63 src_i !=
src_.end(); ++src_i ) {
66 const T& inputMET = inputMETs->at(iMEtObject);
67 if ( minMET == 0 || inputMET.pt() < minMET->pt() ) minMET = &inputMET;
70 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)