// -------------------------------------------------------------------------- // // Macro for segmentation of MUCH stations // // // M.Ryzhinskiy 22.11.2007 // // -------------------------------------------------------------------------- { // ======================================================================== // Adjust this part according to your requirements // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // Monte-Carlo transport file TString mcFile = "data/mc.root"; // Dummy ROOT file (neede as an output) TString outFile = "data/dummy.root"; // ---- Load libraries ------------------------------------------------- gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libCbmBase"); gSystem->Load("libField"); gSystem->Load("libGen"); gSystem->Load("libPassive"); gSystem->Load("libMvd"); gSystem->Load("libSts"); gSystem->Load("libRich"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libEcal"); gSystem->Load("libGlobal"); gSystem->Load("libKF"); gSystem->Load("libL1"); gSystem->Load("libMuch"); // ------------------------------------------------------------------------ // ----- Analysis run ------------------------------------------------- CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(mcFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- TString muchDigiFile = gSystem->Getenv("VMCWORKDIR"); CbmRuntimeDb* rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo* parIo1 = new CbmParRootFileIo(); parIo1->open(gFile); rtdb->setFirstInput(parIo1); rtdb->setOutput(parIo1); rtdb->saveOutput(); fRun->LoadGeometry(); // ------------------------------------------------------------------------ // ----- Segmentation task ---------------------------------------------- CbmMuchSegmentation* seg = new CbmMuchSegmentation("data/much_test.digi.par"); // Set number of stations in MUCH seg->SetNStations(18); // Set rotation angle for each station (if needed) seg->SetAngle(1, -10); seg->SetAngle(2, 0); seg->SetAngle(3, 10); // Set minimal resolution in X and/or Y for each station (if needed) seg->SetMinSigmaX(1, 400); seg->SetMinSigmaY(1, 800); fRun->AddTask(seg); // ------------------------------------------------------------------------ // Run segmentation fRun->Init(); }