Skip to content

Instantly share code, notes, and snippets.

@brynmathias
Created July 19, 2011 14:44
Show Gist options
  • Save brynmathias/1092594 to your computer and use it in GitHub Desktop.
Save brynmathias/1092594 to your computer and use it in GitHub Desktop.
l1RecoJet.cc Snippet
void L1Analysis::L1AnalysisRecoJet::SetCaloJet(const edm::Event& event,
const edm::EventSetup& setup,
edm::Handle<reco::CaloJetCollection> caloJets,
edm::Handle<edm::ValueMap<reco::JetID> > jetsID,
const JetCorrector* caloJetCorrector,
unsigned maxJet)
{
recoJet_.nJets=0;
for(reco::CaloJetCollection::const_iterator it=caloJets->begin();
it!=caloJets->end() && recoJet_.nJets < maxJet;
++it) {
edm::RefToBase<reco::Jet> jetRef(edm::Ref<reco::CaloJetCollection>(caloJets,recoJet_.nJets));
double scale = caloJetCorrector->correction(*it,jetRef,event,setup);
..........
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment