Changeset 212 in svn
- Timestamp:
- Jan 30, 2009, 12:25:28 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r191 r212 66 66 exit(1); 67 67 } 68 68 69 cout << endl << endl; 70 71 cout <<"*********************************************************************"<< endl; 72 cout <<"*********************************************************************"<< endl; 73 cout <<"** **"<< endl; 74 cout <<"** Welcome to **"<< endl; 75 cout <<"** **"<< endl; 76 cout <<"** **"<< endl; 77 cout <<"** .ddddddd- lL hH **"<< endl; 78 cout <<"** -Dd` `dD: Ll hH` **"<< endl; 79 cout <<"** dDd dDd eeee. lL .pp+pp Hh+hhh` -eeee- `sssss **"<< endl; 80 cout <<"** -Dd `DD ee. ee Ll .Pp. PP Hh. HH. ee. ee sSs **"<< endl; 81 cout <<"** dD` dDd eEeee: lL. pP. pP hH hH` eEeee:` -sSSSs. **"<< endl; 82 cout <<"** .Dd :dd eE. LlL PpppPP Hh Hh eE sSS **"<< endl; 83 cout <<"** dddddd:. eee+: lL. pp. hh. hh eee+ sssssS **"<< endl; 84 cout <<"** Pp **"<< endl; 85 cout <<"** **"<< endl; 86 cout <<"** Delphes, a framework for the fast simulation **"<< endl; 87 cout <<"** of a generic collider experiment **"<< endl; 88 cout <<"** **"<< endl; 89 cout <<"** --- Version 1.3beta of Delphes --- **"<< endl; 90 cout <<"** Last date of change: 29 January 2009 **"<< endl; 91 cout <<"** **"<< endl; 92 cout <<"** **"<< endl; 93 cout <<"** This package uses: **"<< endl; 94 cout <<"** ------------------ **"<< endl; 95 cout <<"** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **"<< endl; 96 cout <<"** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **"<< endl; 97 cout <<"** FROG: **"<< endl; 98 cout <<"** **"<< endl; 99 cout <<"**-----------------------------------------------------------------**"<< endl; 100 cout <<"** **"<< endl; 101 cout <<"** Main authors: **"<< endl; 102 cout <<"** ------------- **"<< endl; 103 cout <<"** **"<< endl; 104 cout <<"** Séverine Ovyn Xavier Rouby **"<< endl; 105 cout <<"** severine.ovyn@uclouvain.be xavier.rouby@cern **"<< endl; 106 cout <<"** Center for Particle Physics and Phenomenology (CP3) **"<< endl; 107 cout <<"** Universite Catholique de Louvain (UCL) **"<< endl; 108 cout <<"** Louvain-la-Neuve, Belgium **"<< endl; 109 cout <<"** **"<< endl; 110 cout <<"**-----------------------------------------------------------------**"<< endl; 111 cout <<"** **"<< endl; 112 cout <<"** Former Delphes versions and documentation can be found on : **"<< endl; 113 cout <<"** http://www.fynu.ucl.ac.be/delphes.html **"<< endl; 114 cout <<"** **"<< endl; 115 cout <<"** **"<< endl; 116 cout <<"** Disclaimer: this program is a beta version of Delphes and **"<< endl; 117 cout <<"** therefore comes without guarantees. Beware of errors and please **"<< endl; 118 cout <<"** give us your feedbacks about potential bugs **"<< endl; 119 cout <<"** **"<< endl; 120 cout <<"*********************************************************************"<< endl; 121 cout <<"*********************************************************************"<< endl; 122 69 123 // 1. ********** initialisation *********** 70 124 … … 94 148 //read the datacard input file 95 149 string DetDatacard(""); 96 if(argc>=4) 150 if(argc>=4)DetDatacard =argv[3]; 97 151 98 152 //Smearing information 99 153 RESOLution *DET = new RESOLution(); 154 cout <<"** **"<< endl; 155 cout <<"** ####### Start reading DETECTOR parameters ####### **"<< endl; 156 cout << left << setw(40) <<"** Opening configuration card: "<<"" 157 << left << setw(20) << DetDatacard <<"" 158 << right << setw(9) <<" **"<<""<<endl; 100 159 DET->ReadDataCard(DetDatacard); 101 160 DET->Logfile(LogName); 161 cout << left << setw(42) <<"** Parameters summarised in file: "<<"" 162 << left << setw(20) << LogName <<"" 163 << right << setw(7) <<"**"<<""<<endl; 164 cout <<"** **"<< endl; 102 165 103 166 //read the trigger input file … … 109 172 TRIGT->TriggerCardReader(TrigDatacard.c_str()); 110 173 TRIGT->PrintTriggerTable(LogName); 174 if(DET->FLAG_trigger == 1) 175 { 176 cout <<"** ########### Start reading TRIGGER card ########## **"<< endl; 177 cout << left << setw(40) <<"** Opening configuration card: "<<"" 178 << left << setw(20) << TrigDatacard <<"" 179 << right << setw(9) <<" **"<<""<<endl; 180 cout <<"** **"<< endl; 181 } 111 182 112 183 //Propagation of tracks in the B field … … 121 192 // data converters 122 193 DataConverter *converter=0; 123 194 cout <<"** **"<<endl; 195 cout <<"** ####### Start convertion to TRoot format ######## **"<< endl; 196 124 197 if(strstr(line.c_str(),".hep")) 125 198 { 126 cout<<"#**********************************************************************"<<endl; 127 cout<<"#********** StdHEP file format detected *************"<<endl; 128 cout<<"#*********** Starting convertion to TRoot format **************"<<endl; 129 cout<<"#**********************************************************************"<<endl; 199 cout <<"** StdHEP file format detected **"<<endl; 200 cout <<"** This can take several minutes **"<< endl; 130 201 converter = new STDHEPConverter(inputFileList,outputfilename);//case ntpl file in input list 131 202 } 132 203 else if(strstr(line.c_str(),".lhe")) 133 204 { 134 cout<<"#**********************************************************************"<<endl; 135 cout<<"#*********** LHEF file format detected ************"<<endl; 136 cout<<"#*********** Starting convertion to TRoot format ************"<<endl; 137 cout<<"#**********************************************************************"<<endl; 205 cout <<"** LHEF file format detected **"<<endl; 206 cout <<"** This can take several minutes **"<< endl; 138 207 converter = new LHEFConverter(inputFileList,outputfilename);//case ntpl file in input list 139 208 } 140 209 else if(strstr(line.c_str(),".root")) 141 210 { 142 cout<<"#**********************************************************************"<<endl; 143 cout<<"#********** h2root file format detected *************"<<endl; 144 cout<<"#********** Starting convertion to TRoot format *************"<<endl; 145 cout<<"#**********************************************************************"<<endl; 211 cout <<"** h2root file format detected **"<<endl; 212 cout <<"** This can take several minutes **"<< endl; 146 213 converter = new HEPEVTConverter(inputFileList,outputfilename);//case ntpl file in input list 147 214 } 148 else { cout << "*** " << line.c_str() << "\n*** file format not identified\n*** Exiting\n"; return -1;}; 149 215 else { 216 cout << left << setw(4) <<"** "<<"" 217 << left << setw(63) << line.c_str() <<"" 218 << right << setw(2) <<"**"<<endl; 219 cout <<"** File format not identified -- Exiting... **"<< endl; 220 cout <<"** **"<< endl; 221 cout <<"*********************************************************************"<< endl; 222 return -1;}; 223 cout <<"** Exiting conversion... **"<< endl; 224 150 225 TChain chain("GEN"); 151 226 chain.Add(outputfilename.c_str()); … … 196 271 // 2. ********** Loop over all events *********** 197 272 Long64_t entry, allEntries = treeReader->GetEntries(); 198 cout << "** The input list contains " << allEntries << " events" << endl; 273 cout <<"** **"<<endl; 274 cout <<"** ####### Start fast detector simulation ######## **"<< endl; 275 cout << left << setw(52) <<"** Total number of events to run: "<<"" 276 << left << setw(15) << allEntries <<"" 277 << right << setw(2) <<"**"<<endl; 278 199 279 loopwatch.Start(); 200 280 … … 205 285 treeReader->ReadEntry(entry); 206 286 treeWriter->Clear(); 207 if((entry % 100) == 0 && entry > 0 ) cout << "** Processing element # " << entry << endl; 287 if((entry % 100) == 0 && entry > 0 ){ 288 cout << left << setw(52) <<"** Processing element # "<<"" 289 << left << setw(15) << entry <<"" 290 << right << setw(2) <<"**"<<endl; 291 } 208 292 209 293 electron.clear(); … … 384 468 treeWriter->Fill(); 385 469 } // 2. Loop over all events ('for' loop) 386 470 471 cout <<"** **"<< endl; 472 cout <<"** Exiting detector simulation... **"<< endl; 473 474 387 475 treeWriter->Write(); 388 476 delete treeWriter; … … 391 479 392 480 393 // 3. ********** Trigger & Frog ***********481 // 3. ********** Trigger & Frog *********** 394 482 // 3.1 ************ running the trigger in case the FLAG trigger is put to 1 in the datacard 395 483 triggerwatch.Start(); 396 484 if(DET->FLAG_trigger == 1) 397 485 { 486 cout <<"** **"<<endl; 487 cout <<"** ########### Start Trigger selection ########### **"<< endl; 488 398 489 // input 399 490 TChain chainT("Analysis"); … … 414 505 415 506 Long64_t entryT, allEntriesT = treeReaderT->GetEntries(); 416 cout << "** Trigger: the 'Analysis' tree contains " << allEntriesT << " events" << endl;417 507 // loop on all entries 418 508 for(entryT = 0; entryT < allEntriesT; ++entryT) { … … 422 512 treeWriterT->Fill(); 423 513 } // loop on all entries 514 cout <<"** Exiting trigger simulation... **"<< endl; 424 515 425 516 treeWriterT->Write(); … … 433 524 if(DET->FLAG_frog == 1) 434 525 { 526 cout <<"** **"<<endl; 527 cout <<"** ################## Start FROG ################# **"<< endl; 528 435 529 FrogDisplay *FROG = new FrogDisplay(); 436 530 FROG->BuidEvents(outputfilename,DET->NEvents_Frog); … … 443 537 444 538 // 4. ********** End & Exit *********** 445 cout << "** Exiting..." << endl; 539 446 540 globalwatch.Stop(); 447 cout << "** Time report for " << allEntries << " events.\n"; 448 cout << " + Time (s): \tCPU \t real"<< endl; 449 cout << " + Global: \t" << globalwatch.CpuTime() << " \t " << globalwatch.RealTime() << endl; 450 cout << " + Events: \t" << loopwatch.CpuTime() << " \t " << loopwatch.RealTime() << endl; 541 cout <<"** **"<< endl; 542 cout <<"** ################## Time report ################# **"<< endl; 543 cout << left << setw(32) <<"** Time report for "<<"" 544 << left << setw(15) << allEntries <<"" 545 << right << setw(22) <<"events **"<<endl; 546 cout <<"** **"<< endl; 547 cout << left << setw(10) <<"**"<<"" 548 << left << setw(15) <<"Time (s):"<<"" 549 << right << setw(15) <<"CPU"<<"" 550 << right << setw(15) <<"Real"<<"" 551 << right << setw(14) <<"**"<<endl; 552 cout << left << setw(10) <<"**"<<"" 553 << left << setw(15) <<" + Global:"<<"" 554 << right << setw(15) <<globalwatch.CpuTime()<<"" 555 << right << setw(15) <<globalwatch.RealTime()<<"" 556 << right << setw(14) <<"**"<<endl; 557 cout << left << setw(10) <<"**"<<"" 558 << left << setw(15) <<" + Events:"<<"" 559 << right << setw(15) <<loopwatch.CpuTime()<<"" 560 << right << setw(15) <<loopwatch.RealTime()<<"" 561 << right << setw(14) <<"**"<<endl; 451 562 if(DET->FLAG_trigger == 1) 452 cout << " + Trigger: \t" << triggerwatch.CpuTime() << " \t " << triggerwatch.RealTime() << endl; 563 { 564 cout << left << setw(10) <<"**"<<"" 565 << left << setw(15) <<" + Trigger:"<<"" 566 << right << setw(15) <<triggerwatch.CpuTime()<<"" 567 << right << setw(15) <<triggerwatch.RealTime()<<"" 568 << right << setw(14) <<"**"<<endl; 569 } 453 570 if(DET->FLAG_frog == 1) 454 cout << " + Frog: \t" << frogwatch.CpuTime() << " \t " << frogwatch.RealTime() << endl; 455 456 571 { 572 cout << left << setw(10) <<"**"<<"" 573 << left << setw(15) <<" + Frog:"<<"" 574 << right << setw(15) <<frogwatch.CpuTime()<<"" 575 << right << setw(15) <<frogwatch.RealTime()<<"" 576 << right << setw(14) <<"**"<<endl; 577 578 } 579 580 cout <<"** **"<< endl; 581 cout <<"** Exiting Delphes ... **"<< endl; 582 cout <<"** **"<< endl; 583 cout <<"*********************************************************************"<< endl; 584 cout <<"*********************************************************************"<< endl; 585 586 457 587 delete treeReader; 458 588 delete DET;
Note:
See TracChangeset
for help on using the changeset viewer.