//----------------------------------------------------------------------------- // $Id: pandpyth_EventDisp.C,v 1.4 2001/06/19 16:51:56 toshi Exp $ //----------------------------------------------------------------------------- // $Log: pandpyth_EventDisp.C,v $ // Revision 1.4 2001/06/19 16:51:56 toshi // Use gSystem->Getenv() to get Parfiles directory. // // Revision 1.3 2001/05/11 21:52:27 toshi // Remove .so suffix from gSystem->Load("...") in order to call macros from // Windows system. // // Revision 1.2 2001/05/09 21:55:23 toshi // Add CVS tag $Id: pandpyth_EventDisp.C,v 1.4 2001/06/19 16:51:56 toshi Exp $. // // Example file to run Event Display interactively with Root. // // In this file, 1) event generation with pandora_pythia // 2) through Fast MC // 3) make event display // // // Apr. 26 2001 Toshi // // :: How to run :: // // 1) type root // 2) // root [0] .x pandpyth_EventDisp.C // // For example, if you like to run 20 events, type like // root [0] .x pandpyth_EventDisp.C(20) // //__________________________________________________________________________ Int_t pandpyth_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("libPandora"); gSystem->Load("libPandoraProc"); gSystem->Load("libPythia6"); gSystem->Load("libEG"); gSystem->Load("libEGPythia6"); gSystem->Load("libTauola"); gSystem->Load("libPandPyth"); gSystem->Load("libLCDEvent"); gSystem->Load("libLCDRootAppsUtil"); gSystem->Load("libLCDFastMC"); gSystem->Load("libLCDPhUtil"); gSystem->Load("libLCDGenUtil"); //------------< Setup Generator (Pandora-Pythia) >------------------------ cout<<"Start Generator Setup!"< 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++) { PR->getevent(); //Event Generation with pandora_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; } PR.terminate(); return iEvent; }