44 fNameData.Form(
"%s", data_histo->GetName());
45 fNameZreal.Form(
"PID:H=%s_G=%s", data_histo->GetName(),
g->GetName());
46 fNameZvsE.Form(
"PIDvsEres:H=%s_G=%s", data_histo->GetName(),
g->GetName());
47 hzvsexmax = data_histo->GetXaxis()->GetXmax();
48 hzvsdexmax = data_histo->GetYaxis()->GetXmax();
51 g->GetIdentifiers()->Sort();
52 hzrealxmin = ((
KVIDentifier*)
g->GetIdentifiers()->First())->GetPID() - 1.0;
53 hzrealxmax = ((
KVIDentifier*)
g->GetIdentifiers()->Last())->GetPID() + 1.0;
54 hzvseymin = hzrealxmin;
55 hzvseymax = hzrealxmax;
57 if (
g->HasMassIDCapability() && !
g->InheritsFrom(
"KVIDZAFromZGrid")) {
58 hzrealbins = 150 * (hzrealxmax - hzrealxmin);
59 hzvseybins = hzrealbins;
64 fMain->Connect(
"CloseWindow()",
"KVTestIDGridDialog",
this,
66 fMain->DontCallClose();
76 fHdataNameLabel =
new TGLabel(fHdataFrame,
"Name of data histo (TH2F)");
77 fHdataNameEntry =
new TGTextEntry(fNameData, fHdataFrame);
78 fHdataNameEntry->SetWidth(150);
86 fHzrealNameLabel =
new TGLabel(fHzrealNameFrame,
"Name of PID histo (TH1F)");
87 fHzrealNameEntry =
new TGTextEntry(fNameZreal, fHzrealNameFrame);
88 fHzrealNameEntry->SetWidth(150);
95 fHzrealBinsLabel =
new TGLabel(fHzrealBinsFrame,
"nbins");
96 fHzrealBinsLabel->ChangeOptions(fHzrealBinsLabel->GetOptions() |
kFixedSize);
97 fHzrealBinsLabel->Resize(60, fHzrealBinsLabel->GetHeight());
100 fHzrealXminLabel =
new TGLabel(fHzrealBinsFrame,
"xmin");
101 fHzrealXminLabel->ChangeOptions(fHzrealXminLabel->GetOptions() |
kFixedSize);
102 fHzrealXminLabel->Resize(tw, fHzrealXminLabel->GetHeight());
105 fHzrealXmaxLabel =
new TGLabel(fHzrealBinsFrame,
"xmax");
106 fHzrealXmaxLabel->ChangeOptions(fHzrealXmaxLabel->GetOptions() |
kFixedSize);
107 fHzrealXmaxLabel->Resize(tw, fHzrealXmaxLabel->GetHeight());
122 fHzvseFrame =
new TGGroupFrame(fMain,
"PID vs. E histo");
125 fHzvseNameLabel =
new TGLabel(fHzvseNameFrame,
"Name of histo (TH2F)");
126 fHzvseNameEntry =
new TGTextEntry(fNameZvsE, fHzvseNameFrame);
127 fHzvseNameEntry->SetWidth(150);
132 fHzvseXBinsLabel =
new TGLabel(fHzvseXBinsFrame,
"E : nbins");
133 fHzvseXBinsLabel->ChangeOptions(fHzvseXBinsLabel->GetOptions() |
kFixedSize);
134 fHzvseXBinsLabel->Resize(60, fHzvseXBinsLabel->GetHeight());
137 fHzvseXminLabel =
new TGLabel(fHzvseXBinsFrame,
"min");
138 fHzvseXminLabel->ChangeOptions(fHzvseXminLabel->GetOptions() |
kFixedSize);
139 fHzvseXminLabel->Resize(tw, fHzvseXminLabel->GetHeight());
142 fHzvseXmaxLabel =
new TGLabel(fHzvseXBinsFrame,
"max");
143 fHzvseXmaxLabel->ChangeOptions(fHzvseXmaxLabel->GetOptions() |
kFixedSize);
144 fHzvseXmaxLabel->Resize(tw, fHzvseXmaxLabel->GetHeight());
157 fHzvsdeXBinsLabel =
new TGLabel(fHzvsdeXBinsFrame,
"DE : nbins");
158 fHzvsdeXBinsLabel->ChangeOptions(fHzvsdeXBinsLabel->GetOptions() |
kFixedSize);
159 fHzvsdeXBinsLabel->Resize(60, fHzvsdeXBinsLabel->GetHeight());
160 fHzvsdeXBinsLabel->SetTextJustify(
kTextRight);
162 fHzvsdeXminLabel =
new TGLabel(fHzvsdeXBinsFrame,
"min");
163 fHzvsdeXminLabel->ChangeOptions(fHzvsdeXminLabel->GetOptions() |
kFixedSize);
164 fHzvsdeXminLabel->Resize(tw, fHzvsdeXminLabel->GetHeight());
167 fHzvsdeXmaxLabel =
new TGLabel(fHzvsdeXBinsFrame,
"max");
168 fHzvsdeXmaxLabel->ChangeOptions(fHzvsdeXmaxLabel->GetOptions() |
kFixedSize);
169 fHzvsdeXmaxLabel->Resize(tw, fHzvsdeXmaxLabel->GetHeight());
182 fHzvseYBinsLabel =
new TGLabel(fHzvseYBinsFrame,
"PID: nbins");
183 fHzvseYBinsLabel->ChangeOptions(fHzvseYBinsLabel->GetOptions() |
kFixedSize);
184 fHzvseYBinsLabel->Resize(60, fHzvseYBinsLabel->GetHeight());
187 fHzvseYminLabel =
new TGLabel(fHzvseYBinsFrame,
"min");
188 fHzvseYminLabel->ChangeOptions(fHzvseYminLabel->GetOptions() |
kFixedSize);
189 fHzvseYminLabel->Resize(tw, fHzvseYminLabel->GetHeight());
192 fHzvseYmaxLabel =
new TGLabel(fHzvseYBinsFrame,
"max");
193 fHzvseYmaxLabel->ChangeOptions(fHzvseYmaxLabel->GetOptions() |
kFixedSize);
194 fHzvseYmaxLabel->Resize(tw, fHzvseYmaxLabel->GetHeight());
213 fProgressBar->ShowPosition();
214 fProgressBar->SetBarColor(
"red");
219 fTestButton->Connect(
"Clicked()",
"KVTestIDGridDialog",
this,
221 fCloseButton =
new TGTextButton(fButtonsFrame,
"&Close");
222 fCloseButton->Connect(
"Clicked()",
"KVTestIDGridDialog",
this,
225 fButtonsFrame->AddFrame(fTestButton,
229 fButtonsFrame->AddFrame(fCloseButton,
234 fMain->AddFrame(fHdataFrame,
237 fMain->AddFrame(fHzrealFrame,
240 fMain->AddFrame(fHzvseFrame,
243 fMain->AddFrame(fProgressBar,
246 fMain->AddFrame(fButtonsFrame,
251 fMain->MapSubwindows();
252 fMain->Resize(fMain->GetDefaultSize());
255 fMain->CenterOnParent();
257 fMain->SetWindowName(
"Test ID grid");