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.11 by dasu, Thu Feb 24 07:34:29 2011 UTC vs.
Revision 1.15 by dasu, Mon Feb 28 11:13:18 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"
17 > #include "UFSDataStore.h"
18  
19   int main(int argc, char **argv) {
20    // Generator. Process selection. LHC initialization. Histogram.
# Line 172 | Line 168 | int main(int argc, char **argv) {
168        }
169    }
170  
175  string name(argv[1]);
176  name += ".root";
177  TFile *outFile = TFile::Open(name.c_str(), "recreate");
178
171    // Initialize pythia
172  
173    pythia.init( 2212, 2212, 14000.);
# Line 192 | 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);
189 <  ZHAnalysis ZH; // outFile, &pythia, &ufs, true);
190 <  ZH.BookTree();
187 >  UltraFastSim ufs;
188 >  char jobName[256];
189 >  sprintf(jobName, "%s-%4.4d", argv[1], runNumber);
190 >  UFSDataStore dataStore(jobName, &ufs);
191  
192    // Begin event loop
193    for (int iEvent = 0; iEvent < nEvents; ) {
# Line 232 | Line 224 | int main(int argc, char **argv) {
224  
225      // Ultra fast simulation
226  
227 <    if(!ufs.run(pythia.event))
227 >    if(!ufs.run(pythia.event, rndmPtr))
228        {
229          cerr << "Ultra fast simulation failed - aborting" << endl;
230          exit(1);
231        }
232  
233 <    // Run bbHAnalysis
242 <
243 <    if(!bbH.run())
244 <      {
245 <        cerr << "bbH Analysis failed - aborting" << endl;
246 <        exit(2);
247 <      }
248 <
249 <    // Run ZHAnalysis
233 >    // Store data
234  
235 <    if(!ZH.Run(&ufs))
235 >    if(!dataStore.run())
236        {
237 <        cerr << "ZH Analysis failed - aborting" << endl;
237 >        cerr << "Failed to store data" << endl;
238          exit(3);
239        }
240  
# Line 266 | Line 250 | int main(int argc, char **argv) {
250    pythia.statistics();
251    pileupPythia.statistics();
252  
269  bbH.end();
270
271  outFile->cd();
272  outFile->Write();
273  outFile->Close();
274
253    return 0;
254  
255   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines