18 |
|
|
19 |
|
#include "UltraFastSim.h" |
20 |
|
#include "bbHAnalysis.h" |
21 |
< |
#include "ZHAnalysis.h" |
21 |
> |
//#include "ZHAnalysis.h" |
22 |
> |
#include "bbHAnalysis.cc" |
23 |
> |
//#include "ZHAnalysis.cc" |
24 |
|
|
25 |
|
int main(int argc, char **argv) { |
26 |
|
// Generator. Process selection. LHC initialization. Histogram. |
196 |
|
|
197 |
|
UltraFastSim ufs(rndmPtr); |
198 |
|
bbHAnalysis bbH(outFile, &pythia, &ufs, true); |
199 |
< |
ZHAnalysis ZH(outFile, &pythia, &ufs, true); |
199 |
> |
//ZHAnalysis ZH; // outFile, &pythia, &ufs, true); |
200 |
> |
//ZH.BookTree(); |
201 |
|
|
202 |
|
// Begin event loop |
203 |
|
for (int iEvent = 0; iEvent < nEvents; ) { |
213 |
|
if(meanPileupEventCount > 0) pileupEventCount = meanPileupEventCount; // * rmdmPtr->pois(); (not available yet) |
214 |
|
for (int puEvent = 0; puEvent < pileupEventCount; ) { |
215 |
|
if(!pileupPythia.next()) continue; |
216 |
+ |
double vx = rndmPtr->gauss()*2.; // Mean beam spread is 2 mm in x-y and 75 mm in z |
217 |
+ |
double vy = rndmPtr->gauss()*2.; |
218 |
+ |
double vz = rndmPtr->gauss()*75.; |
219 |
|
for(int i = 0; i < pileupPythia.event.size(); i++) { |
220 |
|
Particle& particle = pileupPythia.event[i]; |
221 |
+ |
particle.xProd(vx+particle.xProd()); |
222 |
+ |
particle.yProd(vy+particle.yProd()); |
223 |
+ |
particle.zProd(vz+particle.zProd()); |
224 |
|
if(particle.status() > 0) { |
225 |
|
if(particle.isVisible()) { |
226 |
|
if(particle.pT() > 0.5) { |
250 |
|
|
251 |
|
// Run ZHAnalysis |
252 |
|
|
253 |
< |
if(!ZH.run()) |
253 |
> |
/* if(!ZH.Run(&ufs)) |
254 |
|
{ |
255 |
|
cerr << "ZH Analysis failed - aborting" << endl; |
256 |
|
exit(3); |
257 |
|
} |
258 |
< |
|
258 |
> |
*/ |
259 |
|
// End of event loop. Statistics. Histogram. Done. |
260 |
|
|
261 |
|
if(!(iEvent % 100)) cout << "Processed event " << iEvent << endl; |
269 |
|
pileupPythia.statistics(); |
270 |
|
|
271 |
|
bbH.end(); |
263 |
– |
ZH.end(); |
272 |
|
|
273 |
|
outFile->cd(); |
274 |
|
outFile->Write(); |