19 #include "TApplication.h"
27 #include "TLinearFitter.h"
55 std::cout <<
" Processing Event " <<
nEvents<< std::endl;
61 TCanvas *c = (TCanvas *)gROOT->GetListOfCanvases()->FindObject(
"cHarpo");
63 c =
new TCanvas(
"cHarpo",
"DCC: All Events cumulated",0,0,1000,800);
68 TCanvas *c2 = (TCanvas *)gROOT->GetListOfCanvases()->FindObject(
"cHarpo2");
70 c2 =
new TCanvas(
"cHarpo2",
"DCC: Current Event",0,0,1000,800);
75 gStyle->SetOptStat(0);
77 TH1F* h1Ev1Ch =
new TH1F(
"h1Ev1Ch",
";time [tb]",511,0,511);
78 TH1F* h1EvAllCh =
new TH1F(
"h1EvAllCh",
";time [tb]",511,0,511);
79 TH2F* h1Ev2D =
new TH2F(
"h1Ev2D",
";time [tb]; channel",511,0,511,304,0,304);
81 TH1F* h1EvFFT1Ch =
new TH1F(
"h1EvFFT1Ch",
";freq []",511,0,511);
82 TH1F* h1EvFFTAllCh =
new TH1F(
"h1EvFFTAllCh",
";freq []",511,0,511);
83 TH2F* h1EvFFT2D =
new TH2F(
"h1EvFFT2D",
";freq []; channel",511,0,511,304,0,304);
85 TH1F* h1EvPed1Ch =
new TH1F(
"h1EvPed1Ch",
";pedesteal [ADC]",500,0,500);
86 TH1F* h1EvPedAllCh =
new TH1F(
"h1EvPedAllCh",
";pedesteal [ADC]",500,0,500);
87 TH2F* h1EvPed2D =
new TH2F(
"h1EvPed2D",
";pedesteal [ADC]; channel",500,0,500,304,0,304);
92 std::cout <<
"Event " <<
nEvents <<
" " << m << std::endl;
98 TH1F* hTmp =
new TH1F(
"hTmp",
"",511,0,511);
99 for(Int_t i=0;i<
NADC;i++){
101 for(Int_t j=0;j<
NALL;j++){
104 h2D->SetBinContent(i+1,j+1,
h2D->GetBinContent(i+1,j+1)+q);
105 h1Ev2D->SetBinContent(i+1,j+1,q);
107 h1Ch->SetBinContent(i+1,
h1Ch->GetBinContent(i+1)+q);
108 h1Ev1Ch->SetBinContent(i+1,q);
113 h1EvPed2D->Fill(q,j);
116 hAllCh->SetBinContent(i+1,
hAllCh->GetBinContent(i+1)+qTotT);
117 h1EvAllCh->SetBinContent(i+1,qTotT);
119 h1EvPedAllCh->Fill(qTotT/288);
120 hTmp->SetBinContent(i+1,qTotT);
123 hm1 = hTmp->FFT(hm1,
"MAG");
124 for(Int_t i=2;i<512;i++){
126 h1EvFFTAllCh->SetBinContent(i+1,hm1->GetBinContent(i+1));
131 for(Int_t j=0;j<
NALL;j++){
132 TH1F* hTmp =
new TH1F(
"hTmp",
"",511,0,511);
133 for(Int_t i=0;i<
NADC;i++){
136 hTmp->SetBinContent(i+1,q);
140 hm = hTmp->FFT(hm,
"MAG");
141 for(Int_t i=2;i<512;i++){
142 hFFT2D->SetBinContent(i+1,j+1,
hFFT2D->GetBinContent(i+1,j+1)+hm->GetBinContent(i+1));
143 h1EvFFT2D->SetBinContent(i+1,j+1,hm->GetBinContent(i+1));
145 hFFT1Ch->SetBinContent(i+1,
hFFT1Ch->GetBinContent(i+1,j+1)+hm->GetBinContent(i+1));
146 h1EvFFT1Ch->SetBinContent(i+1,hm->GetBinContent(i+1));
154 hFFT1Ch->GetXaxis()->SetRangeUser(-1,255);
155 hFFTAllCh->GetXaxis()->SetRangeUser(-1,255);
156 hFFT2D->GetXaxis()->SetRangeUser(-1,255);
157 h1EvFFT1Ch->GetXaxis()->SetRangeUser(-1,255);
158 h1EvFFTAllCh->GetXaxis()->SetRangeUser(-1,255);
159 h1EvFFT2D->GetXaxis()->SetRangeUser(-1,255);
167 h2D->DrawCopy(
"colz");
186 h1EvAllCh->DrawCopy();
188 h1Ev2D->DrawCopy(
"colz");
191 h1EvFFT1Ch->DrawCopy();
193 h1EvFFTAllCh->DrawCopy();
195 h1EvFFT2D->DrawCopy(
"colz");
198 h1EvPed1Ch->DrawCopy();
200 h1EvPedAllCh->DrawCopy();
202 h1EvPed2D->DrawCopy(
"colz");
204 TFile* file =
new TFile(
"noise1Ev.root",
"recreate");
211 h1EvFFTAllCh->Write();
215 h1EvPedAllCh->Write();
223 h1EvFFT1Ch->Delete();
224 h1EvFFTAllCh->Delete();
226 h1EvPed1Ch->Delete();
227 h1EvPedAllCh->Delete();
233 std::cout <<
"No Data Map for plane " << std::endl;
241 printf(
"Event %d done. Waiting for input to continue: ",
nEvents);
242 if(scanf(
"%d",&iscan) == 1)
243 std::cout <<
"Advance to next event" << std::endl;
245 std::cout <<
"Scan all events" << std::endl;
254 h1Ch =
new TH1F(
"h1Ch",
";time [tb]",511,0,511);
255 hAllCh =
new TH1F(
"hAllCh",
";time [tb]",511,0,511);
256 h2D =
new TH2F(
"h2D",
";time [tb]; channel",511,0,511,304,0,304);
258 hFFT1Ch =
new TH1F(
"hFFT1Ch",
";freq []",511,0,511);
259 hFFTAllCh =
new TH1F(
"hFFTAllCh",
";freq []",511,0,511);
260 hFFT2D =
new TH2F(
"hFFT2D",
";freq []; channel",511,0,511,304,0,304);
262 hPed1Ch =
new TH1F(
"hPed1Ch",
";pedesteal [ADC]",500,0,500);
263 hPedAllCh =
new TH1F(
"hPedAllCh",
";pedesteal [ADC]",500,0,500);
264 hPed2D =
new TH2F(
"hPed2D",
";pedesteal [ADC]; channel",500,0,500,304,0,304);
270 TCanvas *c = (TCanvas *)gROOT->GetListOfCanvases()->FindObject(
"cHarpo");
272 c->SaveAs(
"noise.png");
273 c->SaveAs(
"noise.C");
282 TFile* file =
new TFile(
"noise.root",
"recreate");
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
void Save(char *mode=NULL)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
TH1F * h1Ch
Redefine empty default.
A virtual class which define intrafece between HARPO Reader and Event Analysis code.