drawCentrality.C 535 B

123456789101112131415161718192021
  1. #include "../Centrality/CentralityCalculator.cxx"
  2. #include <TROOT.h>
  3. #include <TFile.h>
  4. #include <TH1F.h>
  5. void drawCentrality(TString refMultFileName, TString outCanvasName)
  6. {
  7. gROOT->SetStyle("Pub");
  8. TFile *file = new TFile(refMultFileName.Data(),"read");
  9. TH1F *hist = (TH1F*) file->Get("hMultPHENIX");
  10. CentralityCalculator *cent = new CentralityCalculator();
  11. cent->SetHistogram(hist);
  12. cent->SetEnergy(200);
  13. cent->SetModel("PHSD");
  14. cent->SetEfficiency(0.93);
  15. cent->Calc();
  16. cent->DrawHistogram(outCanvasName);
  17. }