123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #include <TFile.h>
- #include "TROOT.h"
- #include "TSystem.h"
- #include "TChain.h"
- #include "TTree.h"
- //_____________________
- void FemtoDstQA_pp500_y2011(const char *flist = "test.list",
- const char *ofile = "femtoQA_pp500_y2011.root") {
- std::cout << "Input file list = " << flist << '\n';
- if (!flist) {
- std::cout << "Input file list = NULL!\n";
- return;
- }
- //
- // Load libraries
- //
- gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
- loadSharedLibraries();
- gSystem->Load("libMinuit");
- gSystem->Load("StMuDSTMaker");
- gSystem->Load("StChain");
- gSystem->Load("StRefMultCorr");
- gSystem->Load("StFlowMaker");
- gSystem->Load("StFlowAnalysisMaker");
- gSystem->Load("StHbtMaker");
- gSystem->Load("StPicoDstMakerRun11");
- gSystem->Load("StFemtoDstMaker");
- StChain *chain = 0;
- StFemtoDstQAMaker *maker = 0;
- //
- // List of member links in the chain
- //
- chain = new StChain("StChain");
- maker = new StFemtoDstQAMaker("", flist, ".", 22000);
- maker->SetOutFileName(ofile);
- maker->SetRunIdParameters(200000, 12021028, 12221028); // pp500 - production_pp500_2011
- maker->AddTrigId(320000); //Trigger selection for pp500 y2011
- maker->AddTrigId(320001);
- maker->AddTrigId(320011);
- maker->AddTrigId(320021);
- maker->AddTrigId(330021);
- maker->AddTrigId(320103); // NOT VPDMB here and below
- maker->AddTrigId(320113);
- maker->AddTrigId(320123);
- maker->AddTrigId(330123);
- maker->AddTrigId(320500);
- maker->AddTrigId(320504);
- maker->AddTrigId(320514);
- maker->AddTrigId(320524);
- maker->AddTrigId(330524);
- maker->AddTrigId(320501);
- maker->AddTrigId(330501);
- maker->AddTrigId(320503);
- maker->AddTrigId(330503);
- maker->SetTrigger(320000, 1); // VPDMB triggers
- maker->SetTrigger(320001, 1);
- maker->SetTrigger(320011, 1);
- maker->SetTrigger(320021, 1);
- maker->SetTrigger(330021, 1);
- chain->Init();
- //
- // Loop over the links in the chain
- //
- int iret = 0;
- int nEvents = maker->GetNEvents();
- std::cout << "Entries in chain = " << nEvents << std::endl;
- for(int iev = 0; iev < nEvents; iev++) {
- chain->Clear();
- iret = chain->Make(iev);
- if(iret) {
- std::cout << "Error in Make occured. Error code: " << iret << std::endl;
- std::cout << "iev = " << iev << '\n';
- break;
- }
- }
- chain->Finish();
- //Cleanup
- delete maker;
- delete chain;
- }
|