8 const Int_t NTimeBins = 5000;
9 const Int_t TimeUpper = 100;
10 const Int_t TimeLower = -100;
11 const Int_t NAmpBins = 500;
12 const Int_t AmpUpper = 200;
17 name = fTitle +
"_Leading_Time";
18 histLeadingTime =
new TH1D(name, name, NTimeBins, TimeLower, TimeUpper);
19 histLeadingTime->GetXaxis()->SetTitle(
"Time, ns");
20 histLeadingTime->GetYaxis()->SetTitle(
"Activations count");
21 name = fTitle +
"_Leading_Time_Specific";
22 histLeadingTimeSpecific =
new TH1D(name, name, NTimeBins, TimeLower, TimeUpper);
23 histLeadingTimeSpecific->GetXaxis()->SetTitle(
"Time, ns");
24 histLeadingTimeSpecific->GetYaxis()->SetTitle(
"Activations count");
25 name = fTitle +
"_Amplitude";
26 histAmp =
new TH1D(name, name, NAmpBins, 0, AmpUpper);
27 histAmp->GetXaxis()->SetTitle(
"Amplitude, ns");
28 histAmp->GetYaxis()->SetTitle(
"Activations count");
29 name = fTitle +
"_Amplitude_Specific";
30 histAmpSpecific =
new TH1D(name, name, NAmpBins, 0, AmpUpper);
31 histAmpSpecific->GetXaxis()->SetTitle(
"Amplitude, ns");
32 histAmpSpecific->GetYaxis()->SetTitle(
"Activations count");
33 name = fTitle +
"_Strip";
36 histStrip->GetXaxis()->SetTitle(
"Strip #");
37 histStrip->GetYaxis()->SetTitle(
"Activations count");
43 histSimultaneous.SetDirectory(0);
44 histL->SetDirectory(0);
45 histR->SetDirectory(0);
49 name = fTitle +
"CanvasTimes";
55 canTimesPads[iPad] = p;
56 canTimes->GetPad(iPad + 1)->SetGrid();
58 canTimesPads[0]->current = histLeadingTime;
59 canTimesPads[1]->current = histAmp;
60 canTimesPads[2]->current = histLeadingTimeSpecific;
61 canTimesPads[3]->current = histAmpSpecific;
62 canTimesPads[4]->current = histStrip;
64 for (
size_t iPad = 0; iPad < canTimesPads.size(); iPad++) {
65 if (canTimesPads[iPad]->current) {
66 Names.push_back(canTimesPads[iPad]->current->GetName());
70 canTimesPads[4]->logy =
true;
87 const Double_t ch2ns = 0.02344;
88 TClonesArray* digits = fDigiArrays->
tof700;
90 digits = fDigiArrays->
tof701;
95 histSimultaneous.Reset();
98 for (Int_t digIndex = 0; digIndex < digits->GetEntriesFast(); digIndex++) {
101 histLeadingTime->Fill(td->
GetTime());
104 if (((td->
GetPlane() == fSelectedPlane) || (fSelectedPlane < 0))
105 && ((td->
GetStrip() == fSelectedStrip) || (fSelectedStrip < 0)))
108 histLeadingTimeSpecific->Fill(td->
GetTime());
122 TString path =
"/" + fTitle +
"/";
123 fServer->Register(path, canTimes);
125 TString cmd =
"/" + fName +
"/->SetRefRun(%arg1%)";
126 TString cmdTitle = path +
"SetRefRun";
127 fServer->RegisterCommand(cmdTitle.Data(), cmd.Data(),
"button;");
128 fServer->Restrict(cmdTitle.Data(),
"visible=shift");
129 fServer->Restrict(cmdTitle.Data(),
"allow=shift");
130 fServer->Restrict(cmdTitle.Data(),
"deny=guest");
131 fServer->SetItemField(path.Data(),
"_monitoring",
"2000");
132 fServer->SetItemField(path.Data(),
"_layout",
"grid3x3");
133 cmdTitle = path +
"ChangeSlection";
134 fServer->RegisterCommand(cmdTitle, TString(
"/") + fName.Data() +
"/->SetSelection(%arg1%,%arg2%)",
"button;");
135 fServer->Restrict(cmdTitle.Data(),
"visible=shift");
136 fServer->Restrict(cmdTitle.Data(),
"allow=shift");
137 fServer->Restrict(cmdTitle.Data(),
"deny=guest");
138 cmdTitle = path + TString(
"Reset");
139 fServer->RegisterCommand(cmdTitle, TString(
"/") + fName.Data() +
"/->Reset()",
"button;");
140 fServer->Restrict(cmdTitle.Data(),
"visible=shift");
141 fServer->Restrict(cmdTitle.Data(),
"allow=shift");
142 fServer->Restrict(cmdTitle.Data(),
"deny=guest");
150 fDir = outFile->mkdir(fTitle +
"_hists");
151 histLeadingTime->SetDirectory(
fDir);
152 histLeadingTimeSpecific->SetDirectory(
fDir);
153 histAmp->SetDirectory(
fDir);
154 histAmpSpecific->SetDirectory(
fDir);
155 histStrip->SetDirectory(
fDir);
160 Events =
new TClonesArray(
"BmnTof2Digit");
162 frecoTree->Branch(fTitle.Data(), &Events);
170 if (fSelectedPlane >= 0)
171 command = Form(
"fPlane == %d", fSelectedPlane);
172 if (fSelectedStrip >= 0) {
173 if (command.Length() > 0)
174 command = command +
" && ";
175 command = command + Form(
"fStrip == %d", fSelectedStrip);
177 if (fSelectedSide >= 0) {
178 if (command.Length() > 0)
179 command = command +
" && ";
180 command = command + Form(
"fSide == %d", fSelectedSide);
182 histAmpSpecific->Reset();
183 histAmpSpecific->SetTitle(
"Amplitude For: " + command);
184 histLeadingTimeSpecific->Reset();
185 histLeadingTimeSpecific->SetTitle(
"Leading Time For: " + command);
187 TString direction =
"fAmplitude>>" + TString(histAmpSpecific->GetName());
189 direction =
"fTime>>" + TString(histLeadingTimeSpecific->GetName());