// -------------------------------------------------------------------------- // // 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 = "/d/cbm04/ddutta/APR08/25GeV/centr/mc/mc.auau.centr.0000.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.new.digi.par"); seg->SetSegOption(1); // Set Radius and Regions: Example for "Standard" digi scheme /* Double_t Rad1[]={20,28,36,44,52}; //Rad. for 1st Gap (st. 1,2,3) r_int=13.7 ; r_ext=62.3 Double_t Rad2[]={24,32,40,48,56,66}; //Rad. for 2nd Gap (st. 4,5,6) r_int=17.4 ; r_ext=81.4 Double_t Rad3[]={32,40,48,56}; //Rad. for 3rd Gap (st. 7,8,9) r_int=21.4 ; r_ext=100.5 Double_t Rad4[]={42}; //Rad. for 4th Gap (st. 10,11,12) r_int=26.2 ; r_ext=124.5 Double_t Rad5[]={151}; //Rad. for 5th Gap (st. 13,14,15) r_int=31.5 ; r_ext=151.0 Double_t Rad6[]={208}; //Rad. for 6th Gap (st. 16,17,18) r_int=43.3 ; r_ext=208.7 //Set Region number for different stations Int_t Reg1[]={1,2,3,4,5,6}; //Reg. for 1st Gap (st. 1,2,3) Int_t Reg2[]={3,4,5,6,7,8,9}; //Reg. for 2nd Gap (st. 4,5,6) Int_t Reg3[]={5,6,7,8,9}; //Reg. for 3rd Gap (st. 7,8,9) Int_t Reg4[]={8,9}; //Reg. for 4th Gap (st. 10,11,12) Int_t Reg5[]={9}; //Reg. for 5th Gap (st. 13,14,15) Int_t Reg6[]={9}; //Reg. for 6th Gap (st. 16,17,18) */ /* //Flexible Digitisation scheme--Set Radius for diffrent stations Double_t Rad1[]={20,28,36,44,52}; //Rad. 1st Gap (st.1,2,3)-- r_int=13.7, r_ext=62.3 Double_t Rad2[]={24,32,40,48,56,66}; //Rad. 2nd Gap (st.4,5,6)-- r_int=17.4, r_ext=81.4 Double_t Rad3[]={32,40,48,56}; //Rad. 3rd Gap (st.7,8,9) --r_int=21.4, r_ext=100.5 Double_t Rad4[]={27,42}; //Rad. 4th Gap (st.10,11,12)--r_int=26.2, r_ext=124.5 Double_t Rad5[]={33}; //Rad. 5th Gap (st. 13,14,15)-r_int=31.5, r_ext=151 Double_t Rad6[]={44}; //Rad. 6th Gap (st. 16,17,18)-r_int=43.3, r_ext=208.7 //Set Region number for different stations Int_t Reg1[]={1,2,3,4,5,6}; //Reg. for 1st Gap (st. 1,2,3) Int_t Reg2[]={2,3,4,5,6,7,8}; //Reg. for 2nd Gap (st. 4,5,6) Int_t Reg3[]={2,5,6,7,8}; //Reg. for 3rd Gap (st. 7,8,9) Int_t Reg4[]={2,8,9}; //Reg. for 4th Gap (st. 10,11,12) Int_t Reg5[]={2,9}; //Reg. for 5th Gap (st. 13,14,15) Int_t Reg6[]={2,9}; //Reg. for 6th Gap (st. 16,17,18) */ // /* //Flexible Digitisation scheme--Set Radius for diffrent stations Double_t Rad1[]={62}; //Rad. 1st Gap (st.1,2,3)-- r_int=13.7, r_ext=62.3 Double_t Rad2[]={81}; //Rad. 2nd Gap (st.4,5,6)-- r_int=17.4, r_ext=81.4 Double_t Rad3[]={100}; //Rad. 3rd Gap (st.7,8,9) --r_int=21.4, r_ext=100.5 Double_t Rad4[]={124}; //Rad. 4th Gap (st.10,11,12)--r_int=26.2, r_ext=124.5 Double_t Rad5[]={151}; //Rad. 5th Gap (st. 13,14,15)-r_int=31.5, r_ext=151 Double_t Rad6[]={208}; //Rad. 6th Gap (st. 16,17,18)-r_int=43.3, r_ext=208.7 //Set Region number for different stations Int_t Reg1[]={3}; //Reg. for 1st Gap (st. 1,2,3) Int_t Reg2[]={4}; //Reg. for 2nd Gap (st. 4,5,6) Int_t Reg3[]={5}; //Reg. for 3rd Gap (st. 7,8,9) Int_t Reg4[]={5}; //Reg. for 4th Gap (st. 10,11,12) Int_t Reg5[]={6}; //Reg. for 5th Gap (st. 13,14,15) Int_t Reg6[]={9}; //Reg. for 6th Gap (st. 16,17,18) // */ // Gap 1: station 1,2,3 int i=1; int dim_rad=1; int dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad1,Reg1); // Gap 2: station 4,5,6 i=2; dim_rad=1; dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad2,Reg2); //Gap 3: Station 7,8,9 i=3; dim_rad=1; dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad3,Reg3); //Gap 4: Station 10,11,12 i=4; dim_rad=1; dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad4,Reg4); //Gap 5 : Station 13,14,15 i=5; dim_rad=1; dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad5,Reg5); // Gap 6: Station 16,17,18 i=6; dim_rad=1; dim_reg=1; seg->SetRadius(i,dim_rad,dim_reg,Rad6,Reg6); // Set rotation angle for each station (if needed) /* seg->SetAngle(1, -90); seg->SetAngle(2, 0); seg->SetAngle(3, 90); seg->SetAngle(4, -90); seg->SetAngle(5, 0); seg->SetAngle(6, 90); seg->SetAngle(7, -90); seg->SetAngle(8, 0); seg->SetAngle(9, 90); seg->SetAngle(10, -90); seg->SetAngle(11, 0); seg->SetAngle(12, 90); seg->SetAngle(13, -90); seg->SetAngle(14, 0); seg->SetAngle(15, 90); // 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(); }