64 |
|
tr->Branch("luminosityBlock",&luminosityBlock); |
65 |
|
tr->Branch("isRealData",&isRealData); |
66 |
|
tr->Branch("HBHENoiseFilterResult",&HBHENoiseFilterResult); |
67 |
< |
tr->Branch("beamspot_x0",&beamspot_x0); |
68 |
< |
tr->Branch("beamspot_y0",&beamspot_y0); |
69 |
< |
tr->Branch("beamspot_z0",&beamspot_z0); |
70 |
< |
|
67 |
> |
if(doPV){ |
68 |
> |
tr->Branch("beamspot_x0",&beamspot_x0); |
69 |
> |
tr->Branch("beamspot_y0",&beamspot_y0); |
70 |
> |
tr->Branch("beamspot_z0",&beamspot_z0); |
71 |
> |
} |
72 |
|
if(doElectrons){ |
73 |
|
electron_sources = iConfig.getParameter<std::vector<std::string> >("electron_sources"); |
74 |
|
for(size_t j=0; j< electron_sources.size(); ++j){ |
198 |
|
pvs[j].push_back(pv); |
199 |
|
} |
200 |
|
} |
201 |
+ |
|
202 |
+ |
edm::Handle<reco::BeamSpot> beamSpot; |
203 |
+ |
iEvent.getByLabel(edm::InputTag("offlineBeamSpot"), beamSpot); |
204 |
+ |
const reco::BeamSpot & bsp = *beamSpot; |
205 |
+ |
|
206 |
+ |
beamspot_x0 = bsp.x0(); |
207 |
+ |
beamspot_y0 = bsp.y0(); |
208 |
+ |
beamspot_z0 = bsp.z0(); |
209 |
|
} |
201 |
– |
|
202 |
– |
edm::Handle<reco::BeamSpot> beamSpot; |
203 |
– |
iEvent.getByLabel(edm::InputTag("offlineBeamSpot"), beamSpot); |
204 |
– |
const reco::BeamSpot & bsp = *beamSpot; |
205 |
– |
|
206 |
– |
beamspot_x0 = bsp.x0(); |
207 |
– |
beamspot_y0 = bsp.y0(); |
208 |
– |
beamspot_z0 = bsp.z0(); |
210 |
|
|
211 |
|
// ------------- electrons ------------- |
212 |
|
if(doElectrons){ |
703 |
|
void |
704 |
|
NtupleWriter::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) |
705 |
|
{ |
706 |
< |
bool setup_changed = false; |
707 |
< |
hlt_cfg.init(iRun, iSetup, "HLT", setup_changed); |
708 |
< |
newrun=true; |
709 |
< |
|
710 |
< |
edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; |
710 |
< |
iSetup.get<JetCorrectionsRecord>().get("AK5PF",JetCorParColl); |
711 |
< |
JetCorrectorParameters const & JetCorPar = (*JetCorParColl)["Uncertainty"]; |
712 |
< |
jecUnc = new JetCorrectionUncertainty(JetCorPar); |
706 |
> |
if(doTrigger){ |
707 |
> |
bool setup_changed = false; |
708 |
> |
hlt_cfg.init(iRun, iSetup, "HLT", setup_changed); |
709 |
> |
newrun=true; |
710 |
> |
} |
711 |
|
|
712 |
+ |
if(doJets || doTopJets){ |
713 |
+ |
edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; |
714 |
+ |
iSetup.get<JetCorrectionsRecord>().get("AK5PF",JetCorParColl); |
715 |
+ |
JetCorrectorParameters const & JetCorPar = (*JetCorParColl)["Uncertainty"]; |
716 |
+ |
jecUnc = new JetCorrectionUncertainty(JetCorPar); |
717 |
+ |
} |
718 |
|
} |
719 |
|
|
720 |
|
// ------------ method called when ending the processing of a run ------------ |