22 fName = title +
"_cl";
27 name = fTitle +
"_Leading_Time";
28 histLeadingTime =
new TH1D(name, name, 500, 0, 2500);
29 histLeadingTime->GetXaxis()->SetTitle(
"Time, ns");
30 histLeadingTime->GetYaxis()->SetTitle(
"Activations count");
31 name = fTitle +
"_Leading_Time_Specific";
32 histLeadingTimeSpecific =
new TH1D(name, name, 500, 0, 2500);
33 histLeadingTimeSpecific->GetXaxis()->SetTitle(
"Time, ns");
34 histLeadingTimeSpecific->GetYaxis()->SetTitle(
"Activations count");
35 name = fTitle +
"_Amplitude";
36 histAmp =
new TH1D(name, name, 4096, 0, 96);
37 histAmp->GetXaxis()->SetTitle(
"Amplitude, ns");
38 histAmp->GetYaxis()->SetTitle(
"Activations count");
39 TGaxis* ay = (TGaxis*)histAmp->GetYaxis();
41 name = fTitle +
"_Amplitude_Specific";
42 histAmpSpecific =
new TH1D(name, name, 4096, 0, 96);
43 histAmpSpecific->GetXaxis()->SetTitle(
"Amplitude, ns");
44 histAmpSpecific->GetYaxis()->SetTitle(
"Activations count");
45 name = fTitle +
"_Strip";
47 histStrip->GetXaxis()->SetTitle(
"Strip #");
48 histStrip->GetYaxis()->SetTitle(
"Activations count");
49 histAmp->GetYaxis()->SetNoExponent(kFALSE);
50 name = fTitle +
"_StripSimult";
52 histStripSimult->GetXaxis()->SetTitle(
"Strip count");
53 histStripSimult->GetYaxis()->SetTitle(
"Activations count");
54 name = fTitle +
"_State";
56 histState->GetXaxis()->SetTitle(
"Strip #");
57 histState->GetYaxis()->SetTitle(
"Side");
58 name = fTitle +
"_State2D";
61 histStrip2d->GetXaxis()->SetTitle(
"Strip #");
62 histStrip2d->GetYaxis()->SetTitle(
"Plane #");
64 histSimultaneous.SetDirectory(0);
65 histL->SetDirectory(0);
66 histR->SetDirectory(0);
70 name = fTitle +
"Canvas2d";
73 can2dPads.resize(2 * 1);
74 for (Int_t iPad = 0; iPad < 2 * 1; iPad++) {
77 p->
opt =
"colz nostat";
79 can2dPads[0]->current = histStrip2d;
80 can2dPads[1]->current = histState;
81 name = fTitle +
"CanvasTimes";
87 canTimesPads[iPad] = p;
88 canTimes->GetPad(iPad + 1)->SetGrid();
90 canTimesPads[0]->current = histLeadingTime;
91 canTimesPads[1]->current = histAmp;
92 canTimesPads[2]->current = histLeadingTimeSpecific;
93 canTimesPads[3]->current = histAmpSpecific;
94 canTimesPads[4]->current = histStrip;
95 canTimesPads[5]->current = histStripSimult;
96 for (
size_t iPad = 0; iPad < canTimesPads.size(); iPad++)
97 if (canTimesPads[iPad]->current) {
98 Names.push_back(canTimesPads[iPad]->current->GetName());
101 for (
size_t iPad = 0; iPad < can2dPads.size(); iPad++)
102 if (can2dPads[iPad]->current) {
125 TClonesArray* digits = fDigiArrays->
tof400;
130 histSimultaneous.Reset();
132 for (Int_t digIndex = 0; digIndex < digits->GetEntriesFast(); digIndex++) {
137 histLeadingTime->Fill(td->
GetTime());
139 histStrip->Fill(strip);
140 histStrip2d->Fill(strip, td->
GetPlane(), 1);
141 if ((td->
GetPlane() == fSelectedPlane)) {
149 if (((td->
GetPlane() == fSelectedPlane) || (fSelectedPlane < 0))
150 && ((td->
GetStrip() == fSelectedStrip) || (fSelectedStrip < 0))
151 && ((td->
GetSide() == fSelectedSide) || (fSelectedSide < 0)))
154 histLeadingTimeSpecific->Fill(td->
GetTime());
164 histStripSimult->ResetStats();
166 s = ((histL->GetBinContent(binIndex) * histR->GetBinContent(binIndex)) != 0) ? 1 : 0;
168 histStripSimult->AddBinContent(s);
178 TString path =
"/" + fTitle +
"/";
179 fServer->Register(path, canTimes);
180 fServer->Register(path, can2d);
182 TString cmd =
"/" + fName +
"/->SetRefRun(%arg1%)";
183 TString cmdTitle = path +
"SetRefRun";
184 fServer->RegisterCommand(cmdTitle.Data(), cmd.Data(),
"button;");
185 fServer->Restrict(cmdTitle.Data(),
"visible=shift");
186 fServer->Restrict(cmdTitle.Data(),
"allow=shift");
187 fServer->Restrict(cmdTitle.Data(),
"deny=guest");
188 cmdTitle = path +
"ChangeSelection";
189 fServer->RegisterCommand(cmdTitle, TString(
"/") + fName.Data() +
"/->SetSelection(%arg1%,%arg2%,%arg3%)",
191 fServer->Restrict(cmdTitle,
"visible=shift");
192 fServer->Restrict(cmdTitle,
"allow=shift");
193 fServer->Restrict(cmdTitle.Data(),
"deny=guest");
194 cmdTitle = path + TString(
"Reset");
195 fServer->RegisterCommand(cmdTitle, TString(
"/") + fName.Data() +
"/->Reset()",
"button;");
196 fServer->Restrict(cmdTitle.Data(),
"visible=shift");
197 fServer->Restrict(cmdTitle.Data(),
"allow=shift");
206 fDir = outFile->mkdir(fTitle +
"_hists");
207 histLeadingTime->SetDirectory(
fDir);
208 histLeadingTimeSpecific->SetDirectory(
fDir);
209 histAmp->SetDirectory(
fDir);
210 histAmpSpecific->SetDirectory(
fDir);
211 histStrip->SetDirectory(
fDir);
212 histStripSimult->SetDirectory(
fDir);
213 histState->SetDirectory(
fDir);
216 Events =
new TClonesArray(
"BmnTof1Digit");
218 frecoTree->Branch(fTitle.Data(), &Events);
227 if (fSelectedPlane >= 0)
228 command = Form(
"%s.fPlane == %d", fTitle.Data(), fSelectedPlane);
229 if (fSelectedStrip >= 0) {
230 if (command.Length() > 0)
231 command = command +
" && ";
232 command = command + Form(
"%s.fStrip == %d", fTitle.Data(), fSelectedStrip);
234 if (fSelectedSide >= 0) {
235 if (command.Length() > 0)
236 command = command +
" && ";
237 command = command + Form(
"%s.fSide == %d", fTitle.Data(), fSelectedSide);
239 histAmpSpecific->Reset();
240 histLeadingTimeSpecific->Reset();
241 histAmpSpecific->SetTitle(
"Amplitude For: " + command);
242 histLeadingTimeSpecific->SetTitle(
"Leading Time For: " + command);
244 histAmpSpecific->SetTitle(
"Amplitude For: " + command);
245 TString direction =
"fAmplitude>>" + TString(histAmpSpecific->GetName());
247 frecoTree->Draw(direction.Data(), command.Data(),
"goff");
248 histLeadingTimeSpecific->SetTitle(
"Leading Time For: " + command);
249 direction =
"fTime>>" + TString(histLeadingTimeSpecific->GetName());
252 frecoTree->Draw(direction.Data(), command.Data(),
"goff");