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.12 by mmhl, Thu Feb 24 20:17:12 2011 UTC vs.
Revision 1.14 by dasu, Fri Feb 25 17:10:39 2011 UTC

# Line 13 | Line 13 | using namespace std;
13   #include "Pythia.h"
14   using namespace Pythia8;
15  
16 #include "TROOT.h"
17 #include "TFile.h"
18
16   #include "UltraFastSim.h"
17 < #include "bbHAnalysis.h"
21 < //#include "ZHAnalysis.h"
22 < #include "bbHAnalysis.cc"
23 < //#include "ZHAnalysis.cc"
17 > #include "UFSDataStore.h"
18  
19   int main(int argc, char **argv) {
20    // Generator. Process selection. LHC initialization. Histogram.
# Line 174 | Line 168 | int main(int argc, char **argv) {
168        }
169    }
170  
177  string name(argv[1]);
178  name += ".root";
179  TFile *outFile = TFile::Open(name.c_str(), "recreate");
180
171    // Initialize pythia
172  
173    pythia.init( 2212, 2212, 14000.);
# Line 194 | Line 184 | int main(int argc, char **argv) {
184  
185    // Ultra Fast Simulator
186  
187 <  UltraFastSim ufs(rndmPtr);
188 <  bbHAnalysis bbH(outFile, &pythia, &ufs, true);
199 <  //ZHAnalysis ZH; // outFile, &pythia, &ufs, true);
200 <  //ZH.BookTree();
187 >  UltraFastSim ufs;
188 >  UFSDataStore dataStore(argv[1], &ufs);
189  
190    // Begin event loop
191    for (int iEvent = 0; iEvent < nEvents; ) {
# Line 234 | Line 222 | int main(int argc, char **argv) {
222  
223      // Ultra fast simulation
224  
225 <    if(!ufs.run(pythia.event))
225 >    if(!ufs.run(pythia.event, rndmPtr))
226        {
227          cerr << "Ultra fast simulation failed - aborting" << endl;
228          exit(1);
229        }
230  
231 <    // Run bbHAnalysis
231 >    // Store data
232  
233 <    if(!bbH.run())
233 >    if(!dataStore.run())
234        {
235 <        cerr << "bbH Analysis failed - aborting" << endl;
248 <        exit(2);
249 <      }
250 <
251 <    // Run ZHAnalysis
252 <
253 <    /* if(!ZH.Run(&ufs))
254 <      {
255 <        cerr << "ZH Analysis failed - aborting" << endl;
235 >        cerr << "Failed to store data" << endl;
236          exit(3);
237        }
238 <    */
238 >
239      // End of event loop. Statistics. Histogram. Done.
240  
241      if(!(iEvent % 100)) cout << "Processed event " << iEvent << endl;
# Line 268 | Line 248 | int main(int argc, char **argv) {
248    pythia.statistics();
249    pileupPythia.statistics();
250  
271  bbH.end();
272
273  outFile->cd();
274  outFile->Write();
275  outFile->Close();
276
251    return 0;
252  
253   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines