30 bool t0FromMiniAOD_,
bool corShift_,
bool uncShift_,
bool isSmeared_=
false) ;
54 if(iConfig.
existsAs<
bool>(
"runningOnMiniAOD")) {
70 produces<std::vector<pat::MET> >();
76 throw cms::Exception(
"Unsupported",
"Reading PSets not supported, for now just use input tag");
112 shift(shift_),
level(level_), t0FromMiniAOD(t0FromMiniAOD_), corShift(corShift_), uncShift(uncShift_), isSmeared(isSmeared)
119 case pat::MET::JetEnUp : snprintf(buff, 1023, baseTagStr.c_str(),
"JetEnUp");
break;
121 case pat::MET::JetResUp : snprintf(buff, 1023, baseTagStr.c_str(), isSmeared?
"JetResUp":
"");
break;
122 case pat::MET::JetResDown: snprintf(buff, 1023, baseTagStr.c_str(), isSmeared?
"JetResDown":
"");
break;
123 case pat::MET::MuonEnUp : snprintf(buff, 1023, baseTagStr.c_str(),
"MuonEnUp");
break;
129 case pat::MET::TauEnUp : snprintf(buff, 1023, baseTagStr.c_str(),
"TauEnUp");
break;
133 default:
throw cms::Exception(
"LogicError",
"OneMETShift constructor called with bogus shift");
146 if (
src->size() != 1)
throw cms::Exception(
"CorruptData",
"More than one MET in the collection");
148 auto_ptr<vector<pat::MET> >
out(
new vector<pat::MET>(1,
src->front()));
165 if (src->size() != 1)
throw cms::Exception(
"CorruptData",
"More than one MET in the shifted collection");
166 const pat::MET &met2 = src->front();
Analysis-level MET class.
T getParameter(std::string const &) const
double shiftedPx(METUncertainty shift, METCorrectionLevel level=Type1) 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 setUncShift(double px, double py, double sumEt, METUncertainty shift, bool isSmeared=false)
double corPy(METCorrectionLevel level=Type1) const
void readAndSet(const edm::Event &ev, pat::MET &met)
edm::EDGetTokenT< pat::METCollection > token
double corSumEt(METCorrectionLevel level=Type1) const
pat::MET::METUncertainty shift
double shiftedPy(METUncertainty shift, METCorrectionLevel level=Type1) const
void maybeReadShifts(const edm::ParameterSet &basePSet, const std::string &name, pat::MET::METCorrectionType level, bool readFromMiniAOD=false)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double shiftedSumEt(METUncertainty shift, METCorrectionLevel level=Type1) const
edm::EDGetTokenT< pat::METCollection > src_
double corPx(METCorrectionLevel level=Type1) const
pat::MET::METCorrectionType level
virtual double px() const
x coordinate of momentum vector
PATMETSlimmer(const edm::ParameterSet &iConfig)
static unsigned int const shift
std::vector< OneMETShift > shifts_
void setCorShift(double px, double py, double sumEt, METCorrectionType level)
virtual double py() const
y coordinate of momentum vector