<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1429253850577_31027"><div id="yui_3_16_0_1_1429253850577_31058" dir="ltr">Dear Gaters</div><div id="yui_3_16_0_1_1429253850577_31070" dir="ltr"> i tried to execute benchmarkPET for Zr-89 only,</div><div id="yui_3_16_0_1_1429253850577_31171" dir="ltr">i wrote Zr-89 as an ion source as following:</div><div id="yui_3_16_0_1_1429253850577_31131" dir="ltr">/gate/source/addSource Zr89<br style="" class="">/gate/source/Zr89/setActivity 1000 Bq<br style="" class="">/gate/source/Zr89/gps/particle ion<br style="" class="">/gate/source/Zr89/gps/ion 40 89 0 0<br style="" class="">/gate/source/Zr89/setForcedUnstableFlag true<br style="" class="">/gate/source/Zr89/setForcedHalfLife 282240.0 s<br style="" class="">/gate/source/Zr89/gps/energytype Mono<br style="" class="">/gate/source/Zr89/gps/monoenergy 511. keV<br style="" class="">/gate/source/Zr89/gps/type Volume<br style="" class="">/gate/source/Zr89/gps/shape Cylinder<br style="" class="">/gate/source/Zr89/gps/halfz 34.0 cm<br style="" class="">/gate/source/Zr89/gps/radius .5 mm<br style="" class="">/gate/source/Zr89/gps/angtype iso<br style="" class="">/gate/source/Zr89/gps/centre 0. 0. 0. cm</div><div id="yui_3_16_0_1_1429253850577_31150" dir="ltr"><br></div><div id="yui_3_16_0_1_1429253850577_31149" dir="ltr">and i didn't add O-15 source, then i wrote the benchPET.C file as following;</div><div id="yui_3_16_0_1_1429253850577_31210" dir="ltr"><font id="yui_3_16_0_1_1429253850577_31653" color="#cd232c">{<br style="" class=""> gROOT->Reset();<br style="" class=""> TFile f("test.root");<br style="" class=""><br style="" class=""> TTree *Coincidences = (TTree*)gDirectory->Get("Coincidences");<br style="" class=""> TTree *Hits = (TTree*)gDirectory->Get("Hits");<br style="" class=""> TTree *Singles = (TTree*)gDirectory->Get("Singles");<br style="" class=""> TTree *delay = (TTree*)gDirectory->Get("delay");<br style="" class=""><br style="" class="">////Declaration of leaves types - TTree Coincidences<br style="" class="">// <br style="" class=""> Int_t RayleighCrystal1;<br style="" class=""> Int_t RayleighCrystal2;<br style="" class=""> Int_t RayleighPhantom1;<br style="" class=""> Int_t RayleighPhantom2;<br style="" class=""> Char_t RayleighVolName1[40];<br style="" class=""> Char_t RayleighVolName2[40];<br style="" class=""> Float_t axialPos;<br style="" class=""> Char_t comptVolName1[40];<br style="" class=""> Char_t comptVolName2[40];<br style="" class=""> Int_t compton1;<br style="" class=""> Int_t compton2;<br style="" class=""> Int_t crystalID1;<br style="" class=""> Int_t crystalID2;<br style="" class=""> Int_t comptonPhantom1;<br style="" class=""> Int_t comptonPhantom2;<br style="" class=""> Float_t energy1;<br style="" class=""> Float_t energy2; <br style="" class=""> Int_t eventID1;<br style="" class=""> Int_t eventID2;<br style="" class=""> Float_t globalPosX1;<br style="" class=""> Float_t globalPosX2;<br style="" class=""> Float_t globalPosY1;<br style="" class=""> Float_t globalPosY2; <br style="" class=""> Float_t globalPosZ1;<br style="" class=""> Float_t globalPosZ2;<br style="" class=""> Int_t layerID1;<br style="" class=""> Int_t layerID2;<br style="" class=""> Int_t moduleID1;<br style="" class=""> Int_t moduleID2;<br style="" class=""> Float_t rotationAngle;<br style="" class=""> Int_t rsectorID1;<br style="" class=""> Int_t rsectorID2;<br style="" class=""> Int_t runID;<br style="" class=""> Float_t sinogramS;<br style="" class=""> Float_t sinogramTheta;<br style="" class=""> Int_t sourceID1;<br style="" class=""> Int_t sourceID2;<br style="" class=""> Float_t sourcePosX1;<br style="" class=""> Float_t sourcePosX2;<br style="" class=""> Float_t sourcePosY1;<br style="" class=""> Float_t sourcePosY2;<br style="" class=""> Float_t sourcePosZ1;<br style="" class=""> Float_t sourcePosZ2;<br style="" class=""> Int_t submoduleID1;<br style="" class=""> Int_t submoduleID2;<br style="" class=""> Double_t time1;<br style="" class=""> Double_t time2;<br style="" class=""> <br style="" class=""> Float_t zmin,zmax,z;<br style="" class="">// <br style="" class="">//Set branch addresses - TTree Coincicences<br style="" class="">// <br style="" class=""> Coincidences->SetBranchAddress("RayleighCrystal1",&RayleighCrystal1);<br style="" class=""> Coincidences->SetBranchAddress("RayleighCrystal2",&RayleighCrystal2);<br style="" class=""> Coincidences->SetBranchAddress("RayleighPhantom1",&RayleighPhantom1);<br style="" class=""> Coincidences->SetBranchAddress("RayleighPhantom2",&RayleighPhantom2);<br style="" class=""> Coincidences->SetBranchAddress("RayleighVolName1",&RayleighVolName1);<br style="" class=""> Coincidences->SetBranchAddress("RayleighVolName2",&RayleighVolName2);<br style="" class=""> Coincidences->SetBranchAddress("axialPos",&axialPos);<br style="" class=""> Coincidences->SetBranchAddress("comptVolName1",&comptVolName1);<br style="" class=""> Coincidences->SetBranchAddress("comptVolName2",&comptVolName2);<br style="" class=""> Coincidences->SetBranchAddress("comptonCrystal1",&compton1);<br style="" class=""> Coincidences->SetBranchAddress("comptonCrystal2",&compton2);<br style="" class=""> Coincidences->SetBranchAddress("crystalID1",&crystalID1);<br style="" class=""> Coincidences->SetBranchAddress("crystalID2",&crystalID2);<br style="" class=""> Coincidences->SetBranchAddress("comptonPhantom1",&comptonPhantom1);<br style="" class=""> Coincidences->SetBranchAddress("comptonPhantom2",&comptonPhantom2);<br style="" class=""> Coincidences->SetBranchAddress("energy1",&energy1);<br style="" class=""> Coincidences->SetBranchAddress("energy2",&energy2); <br style="" class=""> Coincidences->SetBranchAddress("eventID1",&eventID1);<br style="" class=""> Coincidences->SetBranchAddress("eventID2",&eventID2);<br style="" class=""> Coincidences->SetBranchAddress("globalPosX1",&globalPosX1);<br style="" class=""> Coincidences->SetBranchAddress("globalPosX2",&globalPosX2);<br style="" class=""> Coincidences->SetBranchAddress("globalPosY1",&globalPosY1);<br style="" class=""> Coincidences->SetBranchAddress("globalPosY2",&globalPosY2); <br style="" class=""> Coincidences->SetBranchAddress("globalPosZ1",&globalPosZ1);<br style="" class=""> Coincidences->SetBranchAddress("globalPosZ2",&globalPosZ2);<br style="" class=""> Coincidences->SetBranchAddress("layerID1",&layerID1);<br style="" class=""> Coincidences->SetBranchAddress("layerID2",&layerID2);<br style="" class=""> Coincidences->SetBranchAddress("moduleID1",&moduleID1);<br style="" class=""> Coincidences->SetBranchAddress("moduleID2",&moduleID2);<br style="" class=""> Coincidences->SetBranchAddress("rotationAngle",&rotationAngle);<br style="" class=""> Coincidences->SetBranchAddress("rsectorID1",&rsectorID1);<br style="" class=""> Coincidences->SetBranchAddress("rsectorID2",&rsectorID2);<br style="" class=""> Coincidences->SetBranchAddress("runID",&runID);<br style="" class=""> Coincidences->SetBranchAddress("sinogramS",&sinogramS);<br style="" class=""> Coincidences->SetBranchAddress("sinogramTheta",&sinogramTheta);<br style="" class=""> Coincidences->SetBranchAddress("sourceID1",&sourceID1);<br style="" class=""> Coincidences->SetBranchAddress("sourceID2",&sourceID2);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosX1",&sourcePosX1);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosX2",&sourcePosX2);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosY1",&sourcePosY1);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosY2",&sourcePosY2);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosZ1",&sourcePosZ1);<br style="" class=""> Coincidences->SetBranchAddress("sourcePosZ2",&sourcePosZ2);<br style="" class=""> Coincidences->SetBranchAddress("submoduleID1",&submoduleID1);<br style="" class=""> Coincidences->SetBranchAddress("submoduleID2",&submoduleID2);<br style="" class=""> Coincidences->SetBranchAddress("time1",&time1);<br style="" class=""> Coincidences->SetBranchAddress("time2",&time2);<br style="" class=""> <br style="" class=""> <br style="" class=""><br style="" class=""> /////////////STAT//////// <br style="" class=""> gStyle -> SetStatW(0.28);<br style="" class=""> gStyle -> SetStatH(0.3);<br style="" class=""> gStyle -> SetStatColor(41); <br style="" class=""> gStyle -> SetStatX(1);<br style="" class=""> gStyle -> SetStatY(1); <br style="" class=""> gStyle -> SetStatFont(42);<br style="" class=""> gStyle->SetOptStat(0);<br style="" class=""> gStyle->SetOptFit(0);<br style="" class=""> /////////////////////////<br style="" class=""><br style="" class=""> <br style="" class=""> TH1F *DecayZr89 = new TH1F("Decroissance Zr-89","Zr-89 decay",60,0.,240.);<br style="" class=""> TH1F *DetectPosAxial = new TH1F("DetectPosAxial","Axial detection position",52.,-208.,+208.);<br style="" class=""><br style="" class=""> TH1F *AxialSensitivityDet = new TH1F("AxialSensitivityDet","Axial sensitivity",50,-200.,+200.);<br style="" class=""> TH1F *AxialScattersDet = new TH1F("AxialScattersDet","Axial scatters distribution",50,-200.,+200.);<br style="" class=""> TH1F *AxialProfileDet = new TH1F("AxialProfileDet","",50,-200.,+200.);<br style="" class=""> TH1F *ScatterFractionAxialDet = new TH1F("ScatterFractionAxialDet","Axial scatter fraction",50,-200.,+200.);<br style="" class=""> <br style="" class=""> TH2F *DetectPos1 = new TH2F("DetectPos1","Transaxial detection position",252,-504.,+504.,252,-504.,+504.);<br style="" class=""> TH2F *DetectPos2 = new TH2F("DetectPos2","Transaxial detection position",252,-504.,+504.,252,-504.,+504.);<br style="" class=""> Int_t nentries = Coincidences->GetEntries();<br style="" class=""> Int_t nbytes = 0, nbytesdelay = 0, nrandom = 0, nscatter = 0, ntrue = 0;<br style="" class=""> <br style="" class=""> <br style="" class=""> Double_t Zr89Activity = 100000.;<br style="" class=""> Double_t StartTime = 0.;<br style="" class=""> Double_t StopTime = 240.;<br style="" class=""> <br style="" class=""> Double_t Zr89HalfLife = 282276; <br style="" class=""> <br style="" class=""> Double_t Zr89DecayFactor = (1.0 - exp(-log(2.0)*(StopTime-StartTime)/Zr89HalfLife))/<br style="" class=""> (exp(+log(2.0)*StartTime/Zr89HalfLife)*log(2.0)/Zr89HalfLife*(StopTime-StartTime)); <br style="" class=""> <br style="" class=""> Double_t Zr89Decay = Zr89Activity * (StopTime-StartTime) * Zr89DecayFactor; <br style="" class=""><br style="" class=""><br style="" class="">//<br style="" class="">// Loop for each event in the TTree Coincidences<br style="" class="">//<br style="" class=""> for (Int_t i=0; i<nentries;i++) {<br style="" class=""> if (fmod((double)i,10000.0) == 0.0) cout << ".";<br style="" class=""> nbytes += Coincidences->GetEntry(i);<br style="" class=""> if (eventID1 != eventID2) { // Random coincidence<br style="" class=""> ++nrandom;<br style="" class=""> } else { // True coincidence<br style="" class=""> if (runID == 0) { // First frame<br style="" class=""> DetectPos1->Fill(globalPosX1,globalPosY1);<br style="" class=""> DetectPos1->Fill(globalPosX2,globalPosY2);<br style="" class=""> DetectPos1->Fill(sourcePosX1,sourcePosY1);<br style="" class=""> } else if (runID == 1) { // Second frame<br style="" class=""> DetectPos2->Fill(globalPosX1,globalPosY1);<br style="" class=""> DetectPos2->Fill(globalPosX2,globalPosY2);<br style="" class=""> DetectPos2->Fill(sourcePosX1,sourcePosY1);<br style="" class=""> }<br style="" class=""> DetectPosAxial->Fill(globalPosZ1);<br style="" class=""> DetectPosAxial->Fill(globalPosZ2);<br style="" class=""> z = (globalPosZ1+globalPosZ2)/2.;<br style="" class=""> if (comptonPhantom1 == 0 && comptonPhantom2 == 0 &&<br style="" class=""> RayleighPhantom1 == 0 && RayleighPhantom2 == 0) { // true unscattered coincidence<br style="" class=""> AxialSensitivityDet->Fill(z);<br style="" class=""> ntrue++;<br style="" class=""> } else { // true scattered coincidence<br style="" class=""> AxialScattersDet->Fill(z);<br style="" class=""> nscatter++;<br style="" class=""> } <br style="" class=""> AxialProfileDet->Fill(z);<br style="" class=""> <br style="" class=""> if ((sourceID1 == 0) && (sourceID2 == 0)) DecayZr89->Fill(time1);<br style="" class=""> } <br style="" class=""> }<br style="" class=""> cout << endl << endl;<br style="" class=""> e1 = new TF1("e1","expo",0.,240.);<br style="" class=""> //g1 = new TF1("g1","gaus",-5.,+5.);<br style="" class=""> //Acolinea_Angle_Distribution_deg->Fit("g1");<br style="" class=""> <br style="" class=""> //Double_t ndecay = Ion_decay_time_s->GetEntries();<br style="" class=""> cout << endl << endl; <br style="" class=""> cout << " *********************************************************************************** " << endl;<br style="" class=""> cout << " * * " << endl;<br style="" class=""> cout << " * G A T E P E T B E N C H M A R K R E S U L T S A N A L Y S I S * " << endl;<br style="" class=""> cout << " * * " << endl;<br style="" class=""> cout << " *********************************************************************************** " << endl;<br style="" class=""> cout << endl << endl; <br style="" class=""> cout << " Acquisition start time = " << StartTime << " [s]" << endl;<br style="" class=""> cout << " Acquisition stop time = " << StopTime << " [s]" << endl;<br style="" class=""> <br style="" class=""> cout << " Zr-89 decay factor = " << Zr89DecayFactor << endl;<br style="" class=""> <br style="" class=""> cout << " Zr-89 initial activity = " << Zr89Activity << " [Bq]" << endl; <br style="" class=""> <br style="" class=""> cout << " Zr-89 decays = " << Zr89Decay << endl; <br style="" class=""> cout << " ==> Expected total number of decays during the acquisition is " << Zr89Decay << " +/- " << sqrt(Zr89Decay) << endl; <br style="" class=""> // cout << " There are " << ndecay << " recorded decays" << endl;<br style="" class=""> cout << " There are " << ntrue << " true unscattered coincidences" << endl;<br style="" class=""> cout << " There are " << nrandom << " random coincidences" << endl;<br style="" class=""> cout << " There are " << nscatter << " scattered coincidences" << endl;<br style="" class=""> cout << " ==> there are " << nentries << " coincidences (true, scattered, and random)" << endl; <br style="" class=""> cout << " ==> global scatter fraction = " << (float)nscatter/(float)(nentries-nrandom) << endl;<br style="" class=""> // cout << " ==> absolute sensitivity = " << 100.*(float)ntrue/ndecay << " % " << endl;<br style="" class=""> Double_t p1 = e1->GetParameter(1);<br style="" class=""> <br style="" class=""> <br style="" class=""> <br style="" class=""> //Double_t p2 = g1->GetParameter(2);<br style="" class=""> //cout << " Gamma acolinearity FWHM = " << p2*2.3548 << " degree (expected: 0.58)" << endl;<br style="" class=""> c1 = new TCanvas("c1","GATE",3,28,970,632);<br style="" class=""> Int_t pos=1;<br style="" class=""> c1->Divide(3,2);<br style="" class=""> c1->SetFillColor(0);<br style="" class=""> c1->SetBorderMode(0);<br style="" class=""> c1->cd(pos++);<br style="" class=""> DetectPos1->Draw();<br style="" class=""> //c1->cd(pos++);<br style="" class=""> DetectPos2->SetMarkerColor(kRed);<br style="" class=""> DetectPos2->Draw("same");<br style="" class=""> tex = new TLatex(10.,200.,"Run 1");<br style="" class=""> tex->SetTextColor(1);<br style="" class=""> tex->SetLineWidth(2);<br style="" class=""> tex->Draw();<br style="" class=""> tex1 = new TLatex(10.,100.,"Run 2");<br style="" class=""> tex1->SetTextColor(2);<br style="" class=""> tex1->SetLineWidth(2);<br style="" class=""> tex1->Draw();<br style="" class=""> c1->cd(pos++);<br style="" class=""> DetectPosAxial->Draw();<br style="" class=""> c1->cd(pos++);<br style="" class=""> DecayO15->SetLineColor(kRed);<br style="" class=""> DecayO15->Draw();<br style="" class=""> DecayZr89->SetLineColor(kBlue);<br style="" class=""> DecayZr89->Draw("SAME");<br style="" class=""> c1->cd(pos++);<br style="" class=""> AxialSensitivityDet->Draw();<br style="" class=""> c1->cd(pos++);<br style="" class=""> ScatterFractionAxialDet->Divide(AxialScattersDet,AxialProfileDet,1.,1.,""); <br style="" class=""> ScatterFractionAxialDet->Draw();<br style="" class=""> //c1->cd(pos++);<br style="" class=""> //Acolinea_Angle_Distribution_deg->Draw();<br style="" class=""> c1->cd(pos++);<br style="" class=""> delay->Draw("time1");<br style="" class=""> tex = new TLatex(30.,440.,"Delays: with coincidence sorter");<br style="" class=""> tex->SetTextColor(1);<br style="" class=""> tex->SetLineWidth(2);<br style="" class=""> tex->Draw();<br style="" class=""> tex1 = new TLatex(30.,410.,"Randoms: eventID1 != eventID2");<br style="" class=""> tex1->SetTextColor(2);<br style="" class=""> tex1->SetLineWidth(2);<br style="" class=""> tex1->Draw();<br style="" class=""> Coincidences->SetLineColor(2);<br style="" class=""> Coincidences->Draw("time1","eventID1 != eventID2","same"); <br style="" class=""><br style="" class=""> <br style="" class=""> c1->Update(); <br style="" class=""> c1->SaveAs("benchmarkPET.gif");<br style="" class="">} <br></font></div><div id="yui_3_16_0_1_1429253850577_49464" dir="ltr">when i run benchmarkPET.C in root , i the output just includes tranaxial detection position and axial detection position <br></div><div id="yui_3_16_0_1_1429253850577_49702" dir="ltr">no output of axial sensitivity and axial scatter freaction</div><div id="yui_3_16_0_1_1429253850577_49770" dir="ltr"><br></div><div id="yui_3_16_0_1_1429253850577_49772" dir="ltr">is it necessary to add O-15 source to the macro file and benchmarkPET.C file?<br></div></div></div></body></html>