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.3 by dasu, Thu Feb 10 14:15:45 2011 UTC vs.
Revision 1.5 by dasu, Tue Feb 15 06:49:11 2011 UTC

# Line 14 | Line 14 | using namespace std;
14   using namespace Pythia8;
15  
16   #include "UltraFastSim.h"
17 + #include "Analysis.h"
18  
19   int main(int argc, char **argv) {
20    // Generator. Process selection. LHC initialization. Histogram.
# Line 115 | Line 116 | int main(int argc, char **argv) {
116    // Ultra Fast Simulator
117  
118    UltraFastSim ufs(rndmPtr);
119 +  Analysis analysis(argv[1], &ufs);
120  
121    // Begin event loop
122    for (int iEvent = 0; iEvent < nEvents; ) {
# Line 122 | Line 124 | int main(int argc, char **argv) {
124      // Generate event. Skip if error. List first one.
125      if (!pythia.next()) continue;
126  
127 +    if(iEvent < 10) pythia.event.list();
128 +
129      // Add pileup
130  
131      int pileupEventCount = 0;
# Line 149 | Line 153 | int main(int argc, char **argv) {
153          exit(1);
154        }
155  
156 <    cout << "Number of Particles = " << ufs.particleList().size() << endl;
157 <    cout << "Number of Gen Elecs = " << ufs.electronList().size() << endl;
156 >    cout << "Number of Gen Chrgd = " << ufs.chargedHadronList().size() << endl;
157 >    cout << "Number of Gen Neutr = " << ufs.neutralHadronList().size() << endl;
158 >    cout << "Number of Gen Phtns = " << ufs.photonList().size() << endl;
159 >    cout << "Number of Gen Elcns = " << ufs.electronList().size() << endl;
160      cout << "Number of Gen Muons = " << ufs.muonList().size() << endl;
161      cout << "Number of Gen Taus =  " << ufs.genTauList().size() << endl;
162 +    cout << "Number of taus =      " << ufs.tauList().size() << endl;
163 +    cout << "Number of c Quarks =  " << ufs.cQuarkList().size() << endl;
164      cout << "Number of b Quarks =  " << ufs.bQuarkList().size() << endl;
165 <    cout << "Number of Jets =      " << ufs.sortedJetList().size() << endl;
165 >    cout << "Number of Jets =      " << ufs.jetList().size() << endl;
166      cout << "Number of bJets =     " << ufs.bJetList().size() << endl;
159    cout << "Number of taus =      " << ufs.tauList().size() << endl;
167      cout << endl;
168 <  
168 >
169 >    // Run analysis
170 >
171 >    if(!analysis.run())
172 >      {
173 >        cerr << "Analysis failed - aborting" << endl;
174 >        exit(2);
175 >      }
176 >
177      // End of event loop. Statistics. Histogram. Done.
178  
179      if(!(iEvent % 100)) cout << "Processed event " << iEvent << endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines