FemtoDstQA_pp200_y2012.C 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #include <TFile.h>
  2. #include "TROOT.h"
  3. #include "TSystem.h"
  4. #include "TChain.h"
  5. #include "TTree.h"
  6. //_____________________
  7. void FemtoDstQA_pp200_y2012(const char *flist = "test.list",
  8. const char *ofile = "femtoQA_pp200_y2012.root")
  9. {
  10. std::cout << "Input file list = " << flist << '\n';
  11. if (!flist) {
  12. std::cout << "Input file list = NULL!\n";
  13. return;
  14. }
  15. //
  16. // Load libraries
  17. //
  18. gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  19. loadSharedLibraries();
  20. gSystem->Load("libMinuit");
  21. gSystem->Load("StMuDSTMaker");
  22. gSystem->Load("StChain");
  23. gSystem->Load("StRefMultCorr");
  24. gSystem->Load("StFlowMaker");
  25. gSystem->Load("StFlowAnalysisMaker");
  26. gSystem->Load("StHbtMaker");
  27. gSystem->Load("StPicoDstMakerRun12");
  28. gSystem->Load("StFemtoDstMaker");
  29. StChain *chain = 0;
  30. StFemtoDstQAMaker *maker = 0;
  31. //
  32. // List of member links in the chain
  33. //
  34. chain = new StChain("StChain");
  35. maker = new StFemtoDstQAMaker("", flist, ".", 1e9);
  36. maker->SetOutFileName(ofile);
  37. maker->SetRunIdParameters(33886, 13038134, 13072020); // pp200 - production_pp200_2012
  38. maker->AddTrigId(370011); // vpdmb -nobsmd
  39. maker->AddTrigId(370001); // vpdmb
  40. maker->AddTrigId(370022); // bbcmb
  41. maker->AddTrigId(370501); // bht0 -vpdmb
  42. maker->AddTrigId(370511); // bht1 -vpdmb
  43. maker->AddTrigId(370531); // bht2
  44. maker->AddTrigId(370542); // bht0 -bbcmb -tof0
  45. maker->AddTrigId(370546); // bht1 -bbcmb -tof0
  46. maker->AddTrigId(370522); // bht2 -bbcmb
  47. maker->AddTrigId(370601); // jp0
  48. maker->AddTrigId(370611); // jp1
  49. maker->AddTrigId(370621); // jp2
  50. maker->AddTrigId(370641); // ajp
  51. maker->AddTrigId(370301); // bbcmb -tof0
  52. maker->AddTrigId(370361); // tofmult3 -vpd
  53. maker->AddTrigId(370341); // tofmult4
  54. maker->SetTrigger(370011, 1); // VPDMB triggers
  55. maker->SetTrigger(370001, 1);
  56. chain->Init();
  57. //
  58. // Loop over the links in the chain
  59. //
  60. int iret = 0;
  61. int nEvents = maker->GetNEvents();
  62. std::cout << "Entries in chain = " << nEvents << std::endl;
  63. for(int iev = 0; iev < nEvents; iev++) {
  64. chain->Clear();
  65. iret = chain->Make(iev);
  66. if(iret) {
  67. std::cout << "Error in Make occured. Error code: " << iret << std::endl;
  68. std::cout << "iev = " << iev << '\n';
  69. break;
  70. }
  71. }
  72. chain->Finish();
  73. //Cleanup
  74. delete maker;
  75. delete chain;
  76. }