RunAnalyzer_FlowPIDHadrons.C 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * \brief Helper macros for analyzing name.femtoDst.root files using FemtoDstAnalyzer.C
  3. *
  4. * This macros takes inFileName argument with a femtoDst.root file
  5. * or with a list of files (name.lis or name.list). It sets _VANILLA_ROOT_
  6. * (necessary for standalone mode), loads pre-compiled libStFemtoDst.so
  7. * (from StFemtoEvent), compiles and executes a text
  8. * FemtoDstAnalyzer.C macro with passing inFileName to it, and
  9. * cleans up the directory from the compilation products at the end.
  10. *
  11. * Some details:
  12. * inFileName - is a name of name.femtoDst.root file or a name
  13. * of a name.lis(t) files that contains a list of
  14. * name1.femtoDst.root files.
  15. * NOTE: inFileName should contain either /absolutePath/inFileName
  16. * or /relative2currentDir/inFileName
  17. * It is assumed that FemtoDstAnalyzer.C is placed in the same
  18. * directory where the RunAnalyzer.C is stored.
  19. *
  20. * \author Grigory Nigmatkulov
  21. * \date July 5, 2018
  22. */
  23. // ROOT headers
  24. #include "TROOT.h"
  25. #include "TSystem.h"
  26. #include "TString.h"
  27. //const Char_t* defaultFileName = "/mnt/pool/rhic/4/parfenovpeter/STAR/list/200gev_run_12132011.list";
  28. // const Char_t* defaultFileName = "/mnt/pool/rhic/4/parfenovpeter/STAR/list/middle_200gev_run_12132011.list";
  29. const Char_t* defaultFileName = "/mnt/pool/rhic/4/parfenovpeter/STAR/list/little_200gev_run_12132011.list";
  30. // const Char_t* recFileName = "/mnt/pool/rhic/4/parfenovpeter/STAR/Analysis/macro/Flow/oReCenteringTest.root";
  31. // const Char_t* shiftFile = "/mnt/pool/rhic/4/parfenovpeter/STAR/Analysis/macro/Flow/oShiftTest.root";
  32. // const Char_t* resFile = "/mnt/pool/rhic/4/parfenovpeter/STAR/Analysis/macro/Flow/oResolutionTest.root";
  33. const Char_t* recFileName = "/mnt/pool/rhic/4/parfenovpeter/STAR/OUT/200gev/merge/Recentering.root";
  34. const Char_t* shiftFile = "/mnt/pool/rhic/4/parfenovpeter/STAR/OUT/200gev/merge/ShiftCorr.root";
  35. const Char_t* resFile = "/mnt/pool/rhic/4/parfenovpeter/STAR/OUT/200gev/merge/Resolution.root";
  36. const Char_t* pidFile = "/mnt/pool/rhic/4/parfenovpeter/STAR/OUT/200gev/merge/pid_fit.root";
  37. //_________________
  38. void RunAnalyzer_FlowPIDHadrons(const Char_t *inFileName = defaultFileName,
  39. const Char_t *oFileName = "oFlowPIDTest.root",
  40. const Char_t *recentFileName = recFileName,
  41. const Char_t *shiftFileName = shiftFile,
  42. const Char_t *resFileName = resFile,
  43. const Char_t *pidFileName = pidFile) {
  44. // Next line is not needed if you are not running in a standalone mode
  45. gROOT->ProcessLine("#define _VANILLA_ROOT_");
  46. //gSystem->Load("$FEMTOSOFT/StFemtoEvent/libStFemtoDst.so");
  47. gSystem->Load("/mnt/pool/rhic/4/parfenovpeter/STAR/build/libStFemtoDst.so");
  48. TString str;
  49. str = ".x /mnt/pool/rhic/4/parfenovpeter/STAR/Analysis/macro/Flow/FemtoDstAnalyzer_FlowPIDHadrons.C+(\"";
  50. str += inFileName;
  51. str += "\",\"";
  52. str += oFileName;
  53. str += "\",\"";
  54. str += recentFileName;
  55. str += "\",\"";
  56. str += shiftFileName;
  57. str += "\",\"";
  58. str += resFileName;
  59. str += "\",\"";
  60. str += pidFileName;
  61. str += "\")";
  62. gROOT->ProcessLine( str.Data() );
  63. // Next line should be commented if you run in a batch mode
  64. //gROOT->ProcessLine(".!rm -f FemtoDstAnalyzer_C* ");
  65. }