/* $Id: CbmRichReconstruction.C,v 1.5 2006/09/15 12:50:52 turany Exp $ */ /* History of CVS commits: * * $Log: CbmRichReconstruction.C,v $ * Revision 1.5 2006/09/15 12:50:52 turany * load the base before the field * * Revision 1.4 2006/02/17 23:41:48 sgorboun * the order of loading of libraries changed * * Revision 1.3 2006/02/09 16:36:29 hoehne * moise added for HitProducer * * Revision 1.2 2006/01/25 13:49:45 hoehne * ring matchingadded of found <-> MC * * Revision 1.1 2006/01/19 12:40:24 hoehne * initial version * * * */ // Macro for RICH ring reconstruction { // ======================================================================== // Adjust this part according to your requirements // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; // Input file (MC events) //TString inFile = "auau.25gev.centr.mc.root"; //TString inFile = "../data/boxgen_test.root"; TString inFile = "../run/auau.25gev.centr.mc_100notrd.root"; // Number of events to process Int_t nEvents = 1; // Parameter file //TString parFile = "pararameters.root"; //TString parFile = "../run/parfiles/testparams.root"; TString parFile = "../run/parfiles/params.root"; // Output file //TString outFile = "auau.25gev.centr.reco.root"; TString outFile = "rich.reco.test.root"; // In general, the following parts need not be touched // ======================================================================== // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ---- Load libraries ------------------------------------------------- gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libBase"); gSystem->Load("libPassive"); gSystem->Load("libField"); gSystem->Load("libSts"); gSystem->Load("libRich"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libGen"); gSystem->Load("libGlobal"); gSystem->Load("libKF"); gSystem->Load("libL1"); // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(inFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ cout<<" FILES Opened"<GetRuntimeDb(); CbmParRootFileIo *io1 = new CbmParRootFileIo(); io1->open(parFile.Data()); rtdb->setFirstInput(io1); // fRun->LoadGeometry(); // ------------------------------------------------------------------------ cout<<"PARAMETERS done"<AddTask(hp); //------------------------------------------------------------------------- //----------------------RICH Ring Finding---------------------------------- // This is the place to choose a particular finder //CbmRichRingFinderIdeal* ringFinderIdeal = new CbmRichRingFinderIdeal(iVerbose); CbmRichRingFinderIdeal* ringFinder = new CbmRichRingFinderIdeal(); CbmRichFindRings* richFindRings = new CbmRichFindRings(); richFindRings->UseFinder(ringFinder); fRun->AddTask(richFindRings); //-------------------------------------------------------------------------- //--------------------RICH Ring Fitting------------------------------------- // This is the place to choose a particular fitting method - available are: // CbmRichRingFitterCircle // CbmRichRingFitterCOP // CbmRichRingFitterRobustCOP // CbmRichRingFitterTAU CbmRichRingFitterCircle* ringFitter = new CbmRichRingFitterCircle(); CbmRichFitRings* fitRings = new CbmRichFitRings("","",ringFitter); fRun->AddTask(fitRings); //-------------------------------------------------------------------------- // ------------------- RICH Ring matching ---------------------------------- CbmRichMatchRings* matchRings = new CbmRichMatchRings(iVerbose); fRun->AddTask(matchRings); // ------------------------------------------------------------------------ // ----- 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; // ------------------------------------------------------------------------ }