16 void readPi02(Int_t nevents=-1,
17 const Char_t *mydir=
"/star/institutions/iucf/hew/7863/7136033/",
18 const Char_t *ofile=
"/star/u/hew/pionCVS/7136033.root")
21 const Double_t ptbins[]={0.0,2.5,4.5,5.5,6.5,8.5,10.5,14.5,20.0};
22 Int_t nptbins=
sizeof(ptbins)/
sizeof(Double_t) - 1;
24 TFile *file=
new TFile(ofile,
"RECREATE");
25 hEtavsMass =
new TH2F(
"hEtavsMass",
"Detector #eta of #pi^{0} candidates vs Mass;Mass; #eta",120,0.,1.2,180,1.,2.5);
26 hPhivsMass =
new TH2F(
"hPhivsMass",
"#Phi of #pi^{0} candidates vs Mass; Mass, #Phi",120,0.,1.2,360,-180.,180.);
27 hPhi=
new TH1F(
"hPhi",
"#Phi",30,0.,30.);
28 hPhiEta1=
new TH1F(
"hPhiEta1",
"#Phi with #eta at [1.089,1.268)",30,0.,30.);
29 hPhiEta2=
new TH1F(
"hPhiEta2",
"#Phi with #eta at [1.268,1.476)",30,0.,30.);
30 hPhiEta3=
new TH1F(
"hPhiEta3",
"#Phi with #eta at [1.476,1.718)",30,0.,30.);
31 hPhiEta4=
new TH1F(
"hPhiEta4",
"#Phi with #eta at [1.718,2.000)",30,0.,30.);
32 hZggPt=
new TH2F(
"hZggPt",
"Pi0 Zgg vs Pt;pT[Gev/c];Zgg",50,0.,25.,50,0.,1.);
43 nevents = reader->getNumberOfEvents();
54 if ( event>=nevents )
break;
59 realEvent = reader->event();
62 for ( Int_t i=0;i<
nPairs;i++ )
65 Float_t mass = reader->event()->mMass[i];
66 Float_t pt = reader->event()->mPT[i];
67 Float_t zgg = reader->event()->mZgg[i];
68 Float_t meta = reader->event()->mEEmcEta[i];
69 Float_t mphi = reader->event()->mPhi[i];
71 hEtavsMass->Fill(mass,meta);
72 hPhivsMass->Fill(mass,mphi*180./3.14159265);
73 Int_t mod_phi=int(mphi*180./3.14159265+180.)%30;
75 if(meta>=1.089 && meta<1.268) hPhiEta1->Fill(mod_phi);
76 if(meta>=1.268 && meta<1.476) hPhiEta2->Fill(mod_phi);
77 if(meta>=1.476 && meta<1.718) hPhiEta3->Fill(mod_phi);
78 if(meta>=1.718 && meta<2.) hPhiEta4->Fill(mod_phi);
81 Float_t diff = realEvent->mEsmdu[i] - realEvent->mEsmdv[i];
82 Float_t sum = realEvent->mEsmdu[i] + realEvent->mEsmdv[i];
83 Float_t zuv = TMath::Abs(diff)/sum;
107 void chainFiles(
const Char_t *path)
110 std::cout <<
"chaining files " << path << std::endl;
112 TSystemDirectory *dir =
new TSystemDirectory(
"dir",path);
114 TIter next( dir->GetListOfFiles() );
116 while ( file = (TObject*)next() )
118 TString name=file->GetName();
120 if ( name.Contains(
"root") ) {
121 reader->chainFile(name);
136 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
137 loadSharedLibraries();
139 gSystem->Load(
"StDbLib");
140 gSystem->Load(
"StDbBroker");
141 gSystem->Load(
"St_db_Maker");
142 gSystem->Load(
"StEEmcUtil");
143 gSystem->Load(
"StEEmcDbMaker");
144 gSystem->Load(
"StEEmcSimulatorMaker");
146 gSystem->Load(
"StEEmcA2EMaker");
147 gSystem->Load(
"StEEmcIUPi0");
148 gSystem->Load(
"StSpinDbMaker");
Int_t nPairs
From EEMC point-maker.
virtual void ls(Option_t *option="") const