template<typename T, typename Textractor>
class ShiftedJetProducerT< T, Textractor >
Vary energy of jets by +/- 1 standard deviation, in order to estimate resulting uncertainty on MET
NOTE: energy scale uncertainties are taken from the Database
- Author
- Christian Veelken, LLR
Definition at line 37 of file ShiftedJetProducerT.h.
template<typename T , typename Textractor >
Definition at line 43 of file ShiftedJetProducerT.h.
References ShiftedJetProducerT< T, Textractor >::addResidualJES_, edm::ParameterSet::exists(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), ShiftedJetProducerT< T, Textractor >::jecUncertainty_, ShiftedJetProducerT< T, Textractor >::jecUncertaintyValue_, ShiftedJetProducerT< T, Textractor >::jetCorrEtaMax_, ShiftedJetProducerT< T, Textractor >::jetCorrInputFileName_, ShiftedJetProducerT< T, Textractor >::jetCorrLabelUpToL3_, ShiftedJetProducerT< T, Textractor >::jetCorrLabelUpToL3Res_, ShiftedJetProducerT< T, Textractor >::jetCorrParameters_, ShiftedJetProducerT< T, Textractor >::jetCorrPayloadName_, ShiftedJetProducerT< T, Textractor >::jetCorrTokenUpToL3_, ShiftedJetProducerT< T, Textractor >::jetCorrTokenUpToL3Res_, ShiftedJetProducerT< T, Textractor >::jetCorrUncertaintyTag_, edm::FileInPath::location(), ShiftedJetProducerT< T, Textractor >::shiftBy_, AlCaHLTBitMon_QueryRunRegistry::string, edm::FileInPath::Unknown, and ShiftedJetProducerT< T, Textractor >::verbosity_.
52 if ( cfg.
exists(
"jecUncertaintyValue") ) {
56 if ( cfg.
exists(
"jetCorrInputFileName") ) {
68 if ( cfg.
exists(
"jetCorrLabelUpToL3") ) {
84 produces<JetCollection>();
JetCorrectorParameters * jetCorrParameters_
edm::EDGetTokenT< reco::JetCorrector > jetCorrTokenUpToL3_
T getParameter(std::string const &) const
edm::InputTag jetCorrLabelUpToL3Res_
double jecUncertaintyValue_
edm::InputTag jetCorrLabelUpToL3_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::string jetCorrUncertaintyTag_
edm::EDGetTokenT< reco::JetCorrector > jetCorrTokenUpToL3Res_
JetCorrectionUncertainty * jecUncertainty_
LocationCode location() const
Where was the file found?
std::string fullPath() const
edm::FileInPath jetCorrInputFileName_
std::string jetCorrPayloadName_
edm::EDGetTokenT< JetCollection > srcToken_
template<typename T , typename Textractor >
Definition at line 94 of file ShiftedJetProducerT.h.
References ShiftedJetProducerT< T, Textractor >::addResidualJES_, gather_cfg::cout, edm::EventSetup::get(), edm::Event::getByToken(), JetCorrectionUncertainty::getUncertainty(), edm::EventBase::isRealData(), ShiftedJetProducerT< T, Textractor >::jecUncertainty_, ShiftedJetProducerT< T, Textractor >::jecUncertaintyValue_, ShiftedJetProducerT< T, Textractor >::jetCorrEtaMax_, ShiftedJetProducerT< T, Textractor >::jetCorrExtractor_, ShiftedJetProducerT< T, Textractor >::jetCorrLabelUpToL3_, ShiftedJetProducerT< T, Textractor >::jetCorrLabelUpToL3Res_, ShiftedJetProducerT< T, Textractor >::jetCorrPayloadName_, ShiftedJetProducerT< T, Textractor >::jetCorrTokenUpToL3_, ShiftedJetProducerT< T, Textractor >::jetCorrTokenUpToL3Res_, ShiftedJetProducerT< T, Textractor >::jetCorrUncertaintyTag_, edm::InputTag::label(), ShiftedJetProducerT< T, Textractor >::moduleLabel_, eostools::move(), edm::Handle< T >::product(), edm::Event::put(), JetCorrectionUncertainty::setJetEta(), JetCorrectionUncertainty::setJetPt(), edm::shift, ShiftedJetProducerT< T, Textractor >::shiftBy_, mathSSE::sqrt(), ShiftedJetProducerT< T, Textractor >::src_, ShiftedJetProducerT< T, Textractor >::srcToken_, relativeConstraints::value, and ShiftedJetProducerT< T, Textractor >::verbosity_.
97 std::cout <<
"<ShiftedJetProducerT::produce>:" << std::endl;
110 auto shiftedJets = std::make_unique<JetCollection>();
120 for (
typename JetCollection::const_iterator originalJet = originalJets->begin();
121 originalJet != originalJets->end(); ++originalJet ) {
124 std::cout <<
"originalJet: Pt = " << originalJetP4.pt() <<
", eta = " << originalJetP4.eta() <<
", phi = " << originalJetP4.phi() << std::endl;
137 std::cout <<
"shift = " << shift << std::endl;
143 if ( rawJetP4.E() > 1.e-1 ) {
152 if ( corrJetP4upToL3.E() > 1.e-1 && corrJetP4upToL3Res.E() > 1.e-1 ) {
153 double residualJES = (corrJetP4upToL3Res.E()/corrJetP4upToL3.E()) - 1.;
154 shift =
sqrt(shift*shift + residualJES*residualJES);
161 std::cout <<
"shift*shiftBy = " << shift << std::endl;
164 T shiftedJet(*originalJet);
165 shiftedJet.setP4((1. + shift)*originalJetP4);
167 std::cout <<
"shiftedJet: Pt = " << shiftedJet.pt() <<
", eta = " << shiftedJet.eta() <<
", phi = " << shiftedJet.phi() << std::endl;
170 shiftedJets->push_back(shiftedJet);
edm::EDGetTokenT< reco::JetCorrector > jetCorrTokenUpToL3_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::InputTag jetCorrLabelUpToL3Res_
double jecUncertaintyValue_
edm::InputTag jetCorrLabelUpToL3_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string jetCorrUncertaintyTag_
edm::EDGetTokenT< reco::JetCorrector > jetCorrTokenUpToL3Res_
JetCorrectionUncertainty * jecUncertainty_
T const * product() const
void setJetEta(float fEta)
Textractor jetCorrExtractor_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
static unsigned int const shift
float getUncertainty(bool fDirection)
std::string jetCorrPayloadName_
edm::EDGetTokenT< JetCollection > srcToken_