{ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; // Input file (MC events) TString inFile = "MvdMC.root"; // Parameter file TString parFile = "MvdParams.root"; // Output file TString outFile = "MvdDigi.root"; // Number of events to process Int_t nEvents = 1; // ---- Load libraries ------------------------------------------------- gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libMCStack"); gSystem->Load("libField"); gSystem->Load("libGen"); gSystem->Load("libPassive"); gSystem->Load("libMvd"); // ------------------------------------------------------------------------ // --- Now choose concrete engines for the different tasks ------------- // ------------------------------------------------------------------------ // In general, the following parts need not be touched // ======================================================================== // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(inFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parInput1 = new CbmParRootFileIo(); parInput1->open(parFile.Data()); rtdb->setFirstInput(parInput1); fRun->LoadGeometry(); // ------------------------------------------------------------------------ // ========================================================================= // ====== Hit Producers ====== // ========================================================================= // ----- MVD hit producer -------------------------------------------- double lx=0.01, ly=0.01, threshold=000, noise=00; double slx=0.01, sly=0.01, sthreshold=000, snoise=00; MvdDigiTask* mvdHitProd = new MvdDigiTask(lx, ly, threshold, noise, slx, sly, sthreshold, snoise); mvdHitProd->SetVerbose(iVerbose); fRun->AddTask(mvdHitProd); // ===== End of HitProducers ===== // ========================================================================= // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(0,nEvents); // ------------------------------------------------------------------------ // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; cout << "Output file is " << outFile << endl; cout << "Parameter file is " << parFile << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ }