#ifndef MULTREADER_CXX #define MULTREADER_CXX #include "MultReader.h" #include MultReader::MultReader(TTree *tree) : BaseReader(tree) { } MultReader::~MultReader() { } void MultReader::LoopMultiplicity(TString outName) { if (fChain == 0) return; Long64_t nentries = fChain->GetEntries(); Long64_t nbytes = 0, nb = 0; Int_t refMult, refMultPHENIX; TH1F *hMult = new TH1F("hMult","hMult",2500,0.,2500.); TH1F *hMultPHENIX = new TH1F("hMultPHENIX","hMultPHENIX",2500,0.,2500.); for (Long64_t jentry=0; jentryGetEntry(jentry); nbytes += nb; // if (Cut(ientry) < 0) continue; refMult = GetMult(); refMultPHENIX = GetMultPHENIX(); if (refMult >= 4)hMult->Fill(refMult); if (refMultPHENIX > 0)hMultPHENIX->Fill(refMultPHENIX); } TFile *fo = new TFile(outName.Data(),"recreate"); fo->cd(); hMult->Write(); hMultPHENIX->Write(); fo->Close(); } #endif