FemtoDstQA_pp500_y2011.C 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #include <TFile.h>
  2. #include "TROOT.h"
  3. #include "TSystem.h"
  4. #include "TChain.h"
  5. #include "TTree.h"
  6. //_____________________
  7. void FemtoDstQA_pp500_y2011(const char *flist = "test.list",
  8. const char *ofile = "femtoQA_pp500_y2011.root") {
  9. std::cout << "Input file list = " << flist << '\n';
  10. if (!flist) {
  11. std::cout << "Input file list = NULL!\n";
  12. return;
  13. }
  14. //
  15. // Load libraries
  16. //
  17. gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  18. loadSharedLibraries();
  19. gSystem->Load("libMinuit");
  20. gSystem->Load("StMuDSTMaker");
  21. gSystem->Load("StChain");
  22. gSystem->Load("StRefMultCorr");
  23. gSystem->Load("StFlowMaker");
  24. gSystem->Load("StFlowAnalysisMaker");
  25. gSystem->Load("StHbtMaker");
  26. gSystem->Load("StPicoDstMakerRun11");
  27. gSystem->Load("StFemtoDstMaker");
  28. StChain *chain = 0;
  29. StFemtoDstQAMaker *maker = 0;
  30. //
  31. // List of member links in the chain
  32. //
  33. chain = new StChain("StChain");
  34. maker = new StFemtoDstQAMaker("", flist, ".", 22000);
  35. maker->SetOutFileName(ofile);
  36. maker->SetRunIdParameters(200000, 12021028, 12221028); // pp500 - production_pp500_2011
  37. maker->AddTrigId(320000); //Trigger selection for pp500 y2011
  38. maker->AddTrigId(320001);
  39. maker->AddTrigId(320011);
  40. maker->AddTrigId(320021);
  41. maker->AddTrigId(330021);
  42. maker->AddTrigId(320103); // NOT VPDMB here and below
  43. maker->AddTrigId(320113);
  44. maker->AddTrigId(320123);
  45. maker->AddTrigId(330123);
  46. maker->AddTrigId(320500);
  47. maker->AddTrigId(320504);
  48. maker->AddTrigId(320514);
  49. maker->AddTrigId(320524);
  50. maker->AddTrigId(330524);
  51. maker->AddTrigId(320501);
  52. maker->AddTrigId(330501);
  53. maker->AddTrigId(320503);
  54. maker->AddTrigId(330503);
  55. maker->SetTrigger(320000, 1); // VPDMB triggers
  56. maker->SetTrigger(320001, 1);
  57. maker->SetTrigger(320011, 1);
  58. maker->SetTrigger(320021, 1);
  59. maker->SetTrigger(330021, 1);
  60. chain->Init();
  61. //
  62. // Loop over the links in the chain
  63. //
  64. int iret = 0;
  65. int nEvents = maker->GetNEvents();
  66. std::cout << "Entries in chain = " << nEvents << std::endl;
  67. for(int iev = 0; iev < nEvents; iev++) {
  68. chain->Clear();
  69. iret = chain->Make(iev);
  70. if(iret) {
  71. std::cout << "Error in Make occured. Error code: " << iret << std::endl;
  72. std::cout << "iev = " << iev << '\n';
  73. break;
  74. }
  75. }
  76. chain->Finish();
  77. //Cleanup
  78. delete maker;
  79. delete chain;
  80. }