FemtoDstQA_pp200_y2015.C 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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_y2015(const char *flist = "test.list",
  8. const char *ofile = "femtoQA_pp200_y2015.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(997033, 15339001, 16336024); // pp200 - Run16
  37. maker->AddTrigId(480006); // trigger selection for pp200 y2015 P16id VPDMB
  38. maker->AddTrigId(470001);
  39. maker->AddTrigId(470004);
  40. maker->AddTrigId(470007);
  41. maker->AddTrigId(470014);
  42. maker->AddTrigId(470017);
  43. maker->AddTrigId(470904);
  44. maker->AddTrigId(470914);
  45. maker->AddTrigId(490004);
  46. maker->AddTrigId(490007);
  47. maker->AddTrigId(490904);
  48. maker->AddTrigId(470401); // JP2
  49. maker->AddTrigId(470402); // JP2-bsmd
  50. maker->AddTrigId(470404); // JP1
  51. maker->AddTrigId(470201); // BHT0*VPDMB-30
  52. maker->AddTrigId(470202); // BHT1*VPDMB-30
  53. maker->AddTrigId(470206); // BHT1*VPDMB-30-nobsmd
  54. maker->AddTrigId(470211); // BHT0*VPDMB-5
  55. maker->AddTrigId(480004); // VPDMB-novtx
  56. maker->AddTrigId(480007); // VPDMB-5-trgonly
  57. maker->AddTrigId(480904); // VPDMB-30
  58. maker->AddTrigId(480401); // JP2
  59. maker->AddTrigId(480404); // JP1
  60. maker->AddTrigId(480411); // JP2
  61. maker->AddTrigId(480414); // JP1
  62. maker->AddTrigId(480201); // BHT0*VPDMB-5
  63. maker->AddTrigId(480202); // BHT1*VPDMB-30
  64. //
  65. // Turn on only min-bias triggers
  66. //
  67. maker->SetTrigger(480006, 1);
  68. maker->SetTrigger(470001, 1);
  69. maker->SetTrigger(470004, 1);
  70. maker->SetTrigger(470007, 1);
  71. maker->SetTrigger(470014, 1);
  72. maker->SetTrigger(470017, 1);
  73. maker->SetTrigger(470904, 1);
  74. maker->SetTrigger(470914, 1);
  75. maker->SetTrigger(490004, 1);
  76. maker->SetTrigger(490007, 1);
  77. maker->SetTrigger(490904, 1);
  78. maker->SetTrigger(480004, 1);
  79. maker->SetTrigger(480007, 1);
  80. maker->SetTrigger(480904, 1);
  81. chain->Init();
  82. //
  83. // Loop over the links in the chain
  84. //
  85. int iret = 0;
  86. int nEvents = maker->GetNEvents();
  87. std::cout << "Entries in chain = " << nEvents << std::endl;
  88. for(int iev = 0; iev < nEvents; iev++) {
  89. chain->Clear();
  90. iret = chain->Make(iev);
  91. if(iret) {
  92. std::cout << "Error in Make occured. Error code: " << iret << std::endl;
  93. std::cout << "iev = " << iev << '\n';
  94. break;
  95. }
  96. }
  97. chain->Finish();
  98. //Cleanup
  99. delete maker;
  100. delete chain;
  101. }