// ---------------------------------------------------------------------------- // $Id: sio_EventDisp.C,v 1.4 2001/06/19 16:52:11 toshi Exp $ // ---------------------------------------------------------------------------- // $Log: sio_EventDisp.C,v $ // Revision 1.4 2001/06/19 16:52:11 toshi // Use gSystem->Getenv() to get Parfiles directory. // // Revision 1.3 2001/05/11 21:52:47 toshi // Remove .so suffix from gSystem->Load("...") in order to call macros from // Windows system. // // Revision 1.2 2001/05/09 22:07:16 toshi // Add libSIO2root. // Add $Id: sio_EventDisp.C,v 1.4 2001/06/19 16:52:11 toshi Exp $. // // // Example file to run Event Display // // In this file, 1) read sio event (output from GISMO) // 2) make event display // // Feb. 2001 M. Iwasaki // // :: How to run :: // // 1) to call the root, type // // root // // 2) // root [0] .x sio_EventDisp.C // // .. that's it. // // For example, if you like to run 3 events, type like // root [0] .x sio_EventDisp.C(3) // #include int sio_EventDisp(int nEvent=5) { 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("libLCDEvent"); gSystem->Load("libLCDRootAppsUtil"); gSystem->Load("libLCDFastMC"); gSystem->Load("libLCDFullRecon"); gSystem->Load("libLCDPhUtil"); gSystem->Load("libSIO2root"); gSystem->Load("libLCDSIOUtil"); LCDEvent event; // Input generated stdhep file Char_t* sioFile = "test_L2_pi0.sio"; LCDreadSIOFile source(sioFile,&event); // Must use the same detector name as Full simulation Char_t* geomFile = "Silicon.par"; //Silicon //"Large.par"; // Large //"Small.par"; // Small TString s_geomFile(parfile_dir); s_geomFile += geomFile; FILE* m_geomfile = fopen(s_geomFile.Data(),"r"); LCDGetParameters gp(m_geomfile); fclose(m_geomfile); Char_t* smearFile = "lookup_silicon.nobmcon"; //"lookup_large.nobmcon"; //"lookup_small.nobmcon"; TString s_smearFile(parfile_dir); s_smearFile += smearFile; // Setup FullRecon LCDFullRecon frec(&gp, s_smearFile.Data(), &event); // Setup Event Display LCDEventDisplay evdisp(&gp); //Select Black-White option, if you like //evdisp->SetBlackWhite(); evdisp.SetGismo(); evdisp.SetEMCALHit(); //evdisp.SetHDCALHit(); //evdisp.SetMUCALHit(); //evdisp.SetTRKHit(); //evdisp.SetVXD(); evdisp.SetNoTRK(); //evdisp.SetENDCAL(); //evdisp.SetNoTRKHit(); evdisp.SetNoLMCAL(); //Do not display LUM CAL part //evdisp.SetNoEMCAL(); //Do not display EM CAL part evdisp.SetNoHDCAL(); // Do not display HAD CAL part evdisp.SetNoCOIL(); // Do not display COIL part evdisp.SetNoMUCAL(); // Do not display MU CAL part //evdisp.SetTheta(90.); //evdisp.SetPhi(30.); // Event loop Int_t iEvent; for (iEvent = 0; iEvent < nEvent; iEvent++) { if (!source.GetEvent()) break; frec.Doit(); cout<<"# of Clusters="<GetEntries()<