702 |
|
void |
703 |
|
NtupleWriter::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) |
704 |
|
{ |
705 |
< |
bool setup_changed = false; |
706 |
< |
hlt_cfg.init(iRun, iSetup, "HLT", setup_changed); |
707 |
< |
newrun=true; |
708 |
< |
|
709 |
< |
edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; |
710 |
< |
iSetup.get<JetCorrectionsRecord>().get("AK5PF",JetCorParColl); |
711 |
< |
JetCorrectorParameters const & JetCorPar = (*JetCorParColl)["Uncertainty"]; |
712 |
< |
jecUnc = new JetCorrectionUncertainty(JetCorPar); |
705 |
> |
if(doTrigger){ |
706 |
> |
bool setup_changed = false; |
707 |
> |
hlt_cfg.init(iRun, iSetup, "HLT", setup_changed); |
708 |
> |
newrun=true; |
709 |
> |
} |
710 |
|
|
711 |
+ |
if(doJets || doTopJets){ |
712 |
+ |
edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; |
713 |
+ |
iSetup.get<JetCorrectionsRecord>().get("AK5PF",JetCorParColl); |
714 |
+ |
JetCorrectorParameters const & JetCorPar = (*JetCorParColl)["Uncertainty"]; |
715 |
+ |
jecUnc = new JetCorrectionUncertainty(JetCorPar); |
716 |
+ |
} |
717 |
|
} |
718 |
|
|
719 |
|
// ------------ method called when ending the processing of a run ------------ |