29 useUserData_(iConfig.exists(
"userData"))
40 produces<std::vector<Jet> >();
44 PATJetUpdater::~PATJetUpdater() {
56 std::vector<edm::ValueMap<JetCorrFactors> > jetCorrs;
61 jetCorrs.push_back( *jetCorr );
66 std::auto_ptr< std::vector<Jet> >
patJets (
new std::vector<Jet>() );
72 unsigned int idx = itJet - jets->begin();
88 std::vector<std::string> levels = jetCorrs[0][jetRef].correctionLabels();
89 if(
std::find(levels.begin(), levels.end(),
"L2L3Residual")!=levels.end()){
92 else if(
std::find(levels.begin(), levels.end(),
"L3Absolute")!=levels.end()){
98 edm::LogWarning(
"L3Absolute not found") <<
"L2L3Residual and L3Absolute are not part of the correction applied jetCorrFactors \n"
99 <<
"of module " << jetCorrs[0][jetRef].jecSet() <<
" jets will remain"
100 <<
" uncorrected."; first=
false;
109 patJets->push_back(ajet);
130 iDesc.
add<
bool>(
"addJetCorrFactors",
true);
131 std::vector<edm::InputTag> emptyVInputTags;
132 iDesc.
add<std::vector<edm::InputTag> >(
"jetCorrFactorsSource", emptyVInputTags);
139 descriptions.
add(
"PATJetUpdater", iDesc);
const LorentzVector correctedP4(const std::string &level, const std::string &flavor="none", const std::string &set="") const
void initializeJEC(unsigned int level, const JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
T getParameter(std::string const &) const
Assists in assimilating all pat::UserData into pat objects.
GreaterByPt< Jet > pTComparator_
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void addJECFactors(const JetCorrFactors &jec)
add more sets of energy correction factors
const std::vector< std::string > availableJECSets() const
-— methods for jet corrections -—
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PATJetUpdater(const edm::ParameterSet &iConfig)
virtual void setP4(const LorentzVector &p4)
set 4-momentum
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static void fillDescription(edm::ParameterSetDescription &iDesc)
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Class for the storage of jet correction factors.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
Analysis-level calorimeter jet class.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
pat::PATUserDataHelper< pat::Jet > userDataHelper_
edm::EDGetTokenT< edm::View< Jet > > jetsToken_
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::vector< edm::EDGetTokenT< edm::ValueMap< JetCorrFactors > > > jetCorrFactorsTokens_