47 : _configFileName (
"slight.in"),
50 _nmbEventsPerFile (_nmbEventsTot)
65 printWarn <<
"problems initializing input parameters. cannot initialize starlight." << endl;
72 if (_baseFileName !=
"slight") {
73 inputCopyName = _baseFileName +
".in";
75 ofstream inputCopyFile;
76 inputCopyFile.open(inputCopyName.c_str());
79 if ((!infile) || (!infile.good()))
86 while (!infile.getline(tmp, lineSize).eof())
89 inputCopyFile << tmp << endl;
91 inputCopyFile.close();
114 printWarn <<
"null pointer to starlight object. make sure that init() was called. "
115 <<
"cannot generate events." << endl;
131 fileWriterLUND.
open(
"slight_LUND.txt");
136 printInfo <<
"generating events:" << endl;
137 unsigned int nmbEvents = 0;
138 std::chrono::steady_clock::time_point begin= std::chrono::steady_clock::now();
141 ++iEvent, ++nmbEvents) {
153 std::chrono::steady_clock::time_point end= std::chrono::steady_clock::now();
154 float running_total = 1E-3*std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count();
155 cout<<
"Total time "<<running_total<<
" s ("<<1E3*running_total/nmbEvents<<
" ms/ev)"<<endl;
158 fileWriterLUND.
close();
166 double selectedCrossSection =
168 if (selectedCrossSection > 1.){
169 cout<<
" The cross section of the generated sample is "<<selectedCrossSection<<
" barn."<<endl;
170 }
else if (1.E3*selectedCrossSection > 1.){
171 cout<<
" The cross section of the generated sample is "<<1.E3*selectedCrossSection<<
" mb."<<endl;
172 }
else if (1.E6*selectedCrossSection > 1.){
173 cout<<
" The cross section of the generated sample is "<<1.E6*selectedCrossSection<<
" microbarn."<<endl;
174 }
else if (1.E9*selectedCrossSection > 1.){
175 cout<<
" The cross section of the generated sample is "<<1.E9*selectedCrossSection<<
" nanobarn."<<endl;
176 }
else if (1.E12*selectedCrossSection > 1.){
177 cout<<
" The cross section of the generated sample is "<<1.E12*selectedCrossSection<<
" picobarn."<<endl;
179 cout<<
" The cross section of the generated sample is " <<1.E15*selectedCrossSection<<
" femtob."<<endl;
190 event.boost(boost, rap2);