//----------------------------------------------------------------------------- // $Id: pythia_EventDisp.C,v 1.2 2001/06/19 16:51:59 toshi Exp $ //----------------------------------------------------------------------------- // $Log: pythia_EventDisp.C,v $ // Revision 1.2 2001/06/19 16:51:59 toshi // Use gSystem->Getenv() to get Parfiles directory. // // Revision 1.1 2001/05/18 23:53:56 masako // Create a new example file to run pythia and EventDisplay. // // // Example file to run Event Display interactively with Root. // // In this file, 1) event generation with Pythia (TPythia6) // 2) through Fast MC // 3) make event display // // For example, generate e+e- --> W+W- events // // May. 18 2001 M.Iwasaki // // :: How to run :: // // 1) type root // 2) // root [0] .x pythia_EventDisp.C // // For example, if you like to run 20 events, type like // root [0] .x pythia_EventDisp.C(20) // //__________________________________________________________________________ Int_t pythia_EventDisp(Int_t nEvent=10){ gROOT->Reset(); TString parfile_dir; parfile_dir += gSystem->Getenv("LCDROOT") ;parfile_dir += "/"; parfile_dir += gSystem->Getenv("LCDVERSION");parfile_dir += "/"; parfile_dir += "ParFiles/"; // In order to refer to shareable libraries in this simple form, // include their paths in a .rootrc file. gSystem->Load("libPythia6"); gSystem->Load("libEG"); gSystem->Load("libEGPythia6"); gSystem->Load("libLCDEvent"); gSystem->Load("libLCDRootAppsUtil"); gSystem->Load("libLCDFastMC"); gSystem->Load("libLCDPhUtil"); gSystem->Load("libLCDGenUtil"); //------------< Setup Generator (TPythia6) >------------------------ cout<<"Start Generator Setup!"< W+W- process pyth6.SetMSEL(0); pyth6.SetMSUB(25,1); pyth6.Pyinit("CMS","E-","E+",ECM); // Change pythia seed pyth6.SetMRPY(1,iseed_pyth); //Pyjet -> McPart converter LCDPyj2McPart py2mc; cout<<"End of Generator Setup!"<------------------- LCDEvent event; //------------< Setup Fast MC >------------------------ cout<<"Start FastMC Setup!"<-------------------- //------------< Setup Event Display >------------------ cout<<"Start EventDisplay Setup!"<SetBlackWhite(); evdisp.SetNoMUCAL(); // Do not display MUCAL part evdisp.SetNoCOIL(); // Do not display COIL part //evdisp.SetNoHADCAL(); // Do not display HADCAL part evdisp.SetTheta(90.); evdisp.SetPhi(30.); cout<<"End of EventDisplay Setup!"<-------------- Int_t iEvent; for (Int_t iEvent=0; iEvent < nEvent ; iEvent++) { pyth6.GenerateEvent(); //Event Generation with pythia py2mc.MakeMcPart(event.MCparticles()); //Make LCDMcPart fmc.Doit(); //Through FastMC evdisp.Draw(&event); //Event Display Int_t a; printf("To get the next event, enter any number (<0 Exit Event loop)\n"); scanf("%d",&a); if (a < 0) break; } pyth6.Pystat(1); // Pythia summary return iEvent; }