ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/dasu/UltraFastSim/generateData.cc
(Generate patch)

Comparing UserCode/dasu/UltraFastSim/generateData.cc (file contents):
Revision 1.10 by dasu, Fri Feb 18 05:06:02 2011 UTC vs.
Revision 1.11 by dasu, Thu Feb 24 07:34:29 2011 UTC

# Line 194 | Line 194 | int main(int argc, char **argv) {
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; ) {
# Line 210 | Line 211 | int main(int argc, char **argv) {
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) {
# Line 241 | Line 248 | int main(int argc, char **argv) {
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);
# Line 260 | Line 267 | int main(int argc, char **argv) {
267    pileupPythia.statistics();
268  
269    bbH.end();
263  ZH.end();
270  
271    outFile->cd();
272    outFile->Write();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines