44 src_(consumes<pat::
METCollection>(iConfig.getParameter<edm::InputTag>(
"src")))
49 produces<std::vector<pat::MET> >();
54 throw cms::Exception(
"Unsupported",
"Reading PSets not supported, for now just use input tag");
79 case pat::MET::NoShift : snprintf(buff, 1023, baseTagStr.c_str(),
"OriginalReserved");
break;
80 case pat::MET::JetEnUp : snprintf(buff, 1023, baseTagStr.c_str(),
"JetEnUp");
break;
88 case pat::MET::TauEnUp : snprintf(buff, 1023, baseTagStr.c_str(),
"TauEnUp");
break;
92 default:
throw cms::Exception(
"LogicError",
"OneMETShift constructor called wih bogus shift");
104 if (
src->size() != 1)
throw cms::Exception(
"CorruptData",
"More than one MET in the collection");
106 auto_ptr<vector<pat::MET> >
out(
new vector<pat::MET>(1,
src->front()));
119 if (src->size() != 1)
throw cms::Exception(
"CorruptData",
"More than one MET in the shifted collection");
120 const pat::MET &met2 = src->front();
Analysis-level MET class.
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< MET > METCollection
void readAndSet(const edm::Event &ev, pat::MET &met)
edm::EDGetTokenT< pat::METCollection > token
pat::MET::METUncertainty shift
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
void setShift(double px, double py, double sumEt, METUncertainty shift, METUncertaintyLevel level=Type1)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void maybeReadShifts(const edm::ParameterSet &basePSet, const std::string &name, pat::MET::METUncertaintyLevel level)
edm::EDGetTokenT< pat::METCollection > src_
pat::MET::METUncertaintyLevel level
virtual double px() const
x coordinate of momentum vector
PATMETSlimmer(const edm::ParameterSet &iConfig)
static unsigned int const shift
std::vector< OneMETShift > shifts_
virtual double py() const
y coordinate of momentum vector