194 |
|
|
195 |
|
UltraFastSim ufs(rndmPtr); |
196 |
|
bbHAnalysis bbH(outFile, &pythia, &ufs, true); |
197 |
< |
ZHAnalysis ZH(outFile, &pythia, &ufs, true); |
197 |
> |
ZHAnalysis ZH; // outFile, &pythia, &ufs, true); |
198 |
> |
ZH.BookTree(); |
199 |
|
|
200 |
|
// Begin event loop |
201 |
|
for (int iEvent = 0; iEvent < nEvents; ) { |
211 |
|
if(meanPileupEventCount > 0) pileupEventCount = meanPileupEventCount; // * rmdmPtr->pois(); (not available yet) |
212 |
|
for (int puEvent = 0; puEvent < pileupEventCount; ) { |
213 |
|
if(!pileupPythia.next()) continue; |
214 |
+ |
double vx = rndmPtr->gauss()*2.; // Mean beam spread is 2 mm in x-y and 75 mm in z |
215 |
+ |
double vy = rndmPtr->gauss()*2.; |
216 |
+ |
double vz = rndmPtr->gauss()*75.; |
217 |
|
for(int i = 0; i < pileupPythia.event.size(); i++) { |
218 |
|
Particle& particle = pileupPythia.event[i]; |
219 |
+ |
particle.xProd(vx+particle.xProd()); |
220 |
+ |
particle.yProd(vy+particle.yProd()); |
221 |
+ |
particle.zProd(vz+particle.zProd()); |
222 |
|
if(particle.status() > 0) { |
223 |
|
if(particle.isVisible()) { |
224 |
|
if(particle.pT() > 0.5) { |
248 |
|
|
249 |
|
// Run ZHAnalysis |
250 |
|
|
251 |
< |
if(!ZH.run()) |
251 |
> |
if(!ZH.Run(&ufs)) |
252 |
|
{ |
253 |
|
cerr << "ZH Analysis failed - aborting" << endl; |
254 |
|
exit(3); |
267 |
|
pileupPythia.statistics(); |
268 |
|
|
269 |
|
bbH.end(); |
263 |
– |
ZH.end(); |
270 |
|
|
271 |
|
outFile->cd(); |
272 |
|
outFile->Write(); |