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){ |