42 bool isSmeared_ =
false);
57 bool readFromMiniAOD =
false);
69 onMiniAOD_(iConfig.existsAs<
bool>(
"runningOnMiniAOD") ? iConfig.getParameter<
bool>(
"runningOnMiniAOD") :
false) {
88 produces<std::vector<pat::MET>>();
94 bool readFromMiniAOD) {
96 throw cms::Exception(
"Unsupported",
"Reading PSets not supported, for now just use input tag");
157 t0FromMiniAOD(t0FromMiniAOD_),
160 isSmeared(isSmeared) {
165 snprintf(buff, 1023, baseTagStr.c_str(),
"");
168 snprintf(buff, 1023, baseTagStr.c_str(),
"JetEnUp");
171 snprintf(buff, 1023, baseTagStr.c_str(),
"JetEnDown");
174 snprintf(buff, 1023, baseTagStr.c_str(),
"JetResUp");
177 snprintf(buff, 1023, baseTagStr.c_str(),
"JetResDown");
180 snprintf(buff, 1023, baseTagStr.c_str(),
"MuonEnUp");
183 snprintf(buff, 1023, baseTagStr.c_str(),
"MuonEnDown");
186 snprintf(buff, 1023, baseTagStr.c_str(),
"ElectronEnUp");
189 snprintf(buff, 1023, baseTagStr.c_str(),
"ElectronEnDown");
192 snprintf(buff, 1023, baseTagStr.c_str(),
"PhotonEnUp");
195 snprintf(buff, 1023, baseTagStr.c_str(),
"PhotonEnDown");
198 snprintf(buff, 1023, baseTagStr.c_str(),
"TauEnUp");
201 snprintf(buff, 1023, baseTagStr.c_str(),
"TauEnDown");
204 snprintf(buff, 1023, baseTagStr.c_str(),
"UnclusteredEnUp");
207 snprintf(buff, 1023, baseTagStr.c_str(),
"UnclusteredEnDown");
210 throw cms::Exception(
"LogicError",
"OneMETShift constructor called with bogus shift");
221 if (
src->size() != 1)
222 throw cms::Exception(
"CorruptData",
"More than one MET in the collection");
224 auto out = std::make_unique<std::vector<pat::MET>>(1,
src->front());
240 if (
src->size() != 1)
241 throw cms::Exception(
"CorruptData",
"More than one MET in the shifted collection");