{ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // Input file (MC events) // TString MCFile = "Mvd_TestNewVersion.root"; // Parameter file // TString parFile = "MvdParamsNewVersion.root"; // Parameter output file // TString parOutFile = "MvdParamsNewVersion.root"; // Number of events to process Int_t nEvents = 100; // ---- Load libraries ------------------------------------------------- // gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); // ------------------------------------------------------------------------ TString inFile="$SIMPATH/pandaroot/macro/data/MvdTpc_D+D-_2Disks/digiMVD/Combined.raw.root"; TString jobname="recoMVD"; TString mcFile="$SIMPATH/pandaroot/macro/data/MvdTpc_D+D-_2Disks/Combined.mc.root"; TString SIMPATH = gSystem->Getenv("SIMPATH"); inFile.ReplaceAll("$SIMPATH",SIMPATH); mcFile.ReplaceAll("$SIMPATH",SIMPATH); TString inDir=inFile(0,inFile.Last('/')+1); // make new subdir TString jobDir=inDir; jobDir+=jobname; jobDir+="/"; TString cmd="mkdir "; cmd+=jobDir; if(gSystem->Exec(cmd)){ std::cout<<"Could not create Job-Directory "<SetInputFile(inFile); fRun->AddFriend(mcFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(kTRUE); parInput1->open(paramIn.Data(),"UPDATE"); // FairParAsciiFileIo* parInput1 = new FairParAsciiFileIo(); // parInput1->open(parFile.Data(),"in"); rtdb->setFirstInput(parInput1); // fRun->LoadGeometry(); // ------------------------------------------------------------------------ // ========================================================================= // ====== Hit Producers ====== // ========================================================================= // ----- MVD hit producer -------------------------------------------- Double_t chargecut = 1.e5; PndMvdStripClusterTask* mvdmccls = new PndMvdStripClusterTask(); mvdmccls->SetVerbose(iVerbose); fRun->AddTask(mvdmccls); PndMvdPixelClusterTask* mvdClusterizer = new PndMvdPixelClusterTask(); mvdClusterizer->SetVerbose(iVerbose); fRun->AddTask(mvdClusterizer); FairParRootFileIo* output=new FairParRootFileIo(kTRUE); output->open(paramOut.Data()); rtdb->setOutput(output); // rtdb->setOutput(parInput1); rtdb->print(); // ===== End of HitProducers ===== // ========================================================================= // PndMvdGeoPar* geoPar = (PndMvdGeoPar*)(rtdb->getContainer("PndMvdGeoPar")); // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(0,nEvents); // ------------------------------------------------------------------------ // rtdb->saveOutput(); // ----- 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 " << paramOut << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ }