BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
VSPClusterAnalyser.C
Go to the documentation of this file.
1/*
2 * Macro:
3 *
4 *
5 * Author: D. Baranov
6 * Created: 18.07.2024
7 */
8
9#include "Rtypes.h"
10
11R__ADD_INCLUDE_PATH($VMCWORKDIR)
12
13// headers used within the code
14#include "TCanvas.h"
15#include "TH1F.h"
16#include "TH2D.h"
17
18using namespace std;
19
20// declarations
21void ShowSignalInLayer(BmnVSPModule* module, BmnVSPLayer& layer, Int_t ilayer, Int_t imodule, Int_t istation);
22void ShowStripNumbersOfClustersInModule(BmnVSPModule* module, Int_t layer_type, Int_t module_num, Int_t station_num);
23void ShowStripNumbersOfClustersInModule_FromBranches(Int_t event_num, Int_t module_num, Int_t station_num);
24void ShowReadoutPlane(BmnVSPModule* module, Int_t imodule, Int_t istation);
25void PaintBin(TCanvas* c, TH1F* h, Int_t bin, Double_t bin_height, Int_t fcolor, Int_t bcolor);
26void DrawMCMatches(TCanvas* c, TH1F* h, Int_t strip_num, BmnVSPLayer& layer);
27void DrawStripHits(TCanvas* c, TH1F* h, BmnVSPLayer& layer);
28void DrawMCStripLines(TCanvas* c, TH1F* h, BmnVSPModule* module, Int_t layer_num);
29void LoadDataFromMCPoints(BmnVSPStationSet* station_set, BmnVSPTransform* transf_set, Int_t event_num);
30void LoadDataFromDigits(BmnVSPStationSet* station_set, BmnVSPTransform* transf_set, Int_t event_num);
31
33{
34
35 // Using OpenGL that is needed for transparency (the common strip of two clusters)
36 gStyle->SetCanvasPreferGL(1);
37
38 //--------------------------------------------------------------------------
39
40 // Loading the configuration
41 TString gPathDetectorConfig = gSystem->Getenv("VMCWORKDIR");
42 gPathDetectorConfig += "/parameters/vsp/XMLConfigs/";
43 gPathDetectorConfig += "VSP_Run9.xml";
44
45 Int_t EventNum = 0;
46 Int_t ViewStationNum = 0;
47 Int_t ViewModuleNum = 3;
48
49 BmnVSPStationSet* StationSet = new BmnVSPStationSet(gPathDetectorConfig);
50
51 BmnVSPTransform* TransfSet = new BmnVSPTransform();
52 TransfSet->LoadFromXMLFile(gPathDetectorConfig);
53
54 // Load data from MC-points and add them to the detector
55 LoadDataFromMCPoints(StationSet, TransfSet, EventNum);
56
57 // Load data from digits
58 // LoadDataFromDigits(StationSet, TransfSet, EventNum);
59
60 // Data reconstruction
61 StationSet->ProcessPointsInDetector();
62
63 BmnVSPStation* Station = StationSet->GetStation(ViewStationNum);
64 BmnVSPModule* Module = Station->GetModule(ViewModuleNum);
65 vector<BmnVSPLayer> Layers = Module->GetStripLayers();
66
67 for (Int_t ilayer = 0; ilayer < Layers.size(); ++ilayer) {
68 BmnVSPLayer layer = Layers[ilayer];
69 ShowSignalInLayer(Module, layer, ilayer, ViewModuleNum, ViewStationNum);
70 }
71
72 ShowReadoutPlane(Module, ViewModuleNum, ViewStationNum);
73
74 ShowStripNumbersOfClustersInModule(Module, 0 /*lower || layer*/, ViewModuleNum, ViewStationNum);
75 ShowStripNumbersOfClustersInModule(Module, 1 /*upper // layer*/, ViewModuleNum, ViewStationNum);
76
77 ShowStripNumbersOfClustersInModule_FromBranches(EventNum, ViewModuleNum, ViewStationNum);
78
79 cout << "It's the end" << "\n";
80 // gApplication->Terminate();
81}
82//------------------------------------------------------------------------------
83
84void ShowSignalInLayer(BmnVSPModule* module, BmnVSPLayer& layer, Int_t ilayer, Int_t imodule, Int_t istation)
85{
86
87 // layer name
88 TString layer_textId = TString("layer[") + TString::Itoa(ilayer, 10) + TString("], ");
89 layer_textId += TString("module[") + TString::Itoa(imodule, 10) + TString("], ");
90 layer_textId += TString("station[") + TString::Itoa(istation, 10) + TString("]");
91
92 Int_t nStrips = layer.GetNStrips();
93 Int_t firstStripNumber = layer.GetFirstStripNumber();
94 Int_t lastStripNumber = layer.GetLastStripNumber();
95
96 cout << "Station[" << istation << "], Module[" << imodule << "], Layer[" << ilayer << "]:\n";
97 cout << " nStrips = " << nStrips << "\n";
98 cout << " firstStripNumber = " << firstStripNumber << "\n";
99 cout << " lastStripNumber = " << lastStripNumber << "\n";
100
101 TCanvas* layer_canv = new TCanvas(layer_textId + TString("_canv"), layer_textId, 0, 0, 1800, 1200);
102 layer_canv->SetGrid();
103 TH1F* layer_hist1f =
104 new TH1F(layer_textId + TString("_hist1f"), layer_textId, nStrips, firstStripNumber, lastStripNumber + 1);
105
106 layer_hist1f->Reset(); // clear previous data
107
108 // fill the histogram with layer data
109 for (Int_t istrip = firstStripNumber; istrip <= lastStripNumber; ++istrip) {
110 Double_t signal = layer.GetStripSignal(istrip);
111 layer_hist1f->Fill(istrip, signal);
112 }
113
114 layer_canv->cd();
115 layer_hist1f->SetFillColor(TColor::GetColor("#cccccc"));
116 layer_hist1f->SetLineColor(TColor::GetColor("#333333"));
117 layer_hist1f->GetXaxis()->SetLabelOffset(0.015);
118 layer_hist1f->GetXaxis()->SetLabelSize(0.02); // 0.035
119 layer_hist1f->GetYaxis()->SetLabelSize(0.02); // 0.035
120 layer_hist1f->Draw("HIST");
121 layer_canv->Update();
122
123 // statistics area
124 TPaveStats* stats_p = (TPaveStats*)layer_hist1f->FindObject("stats");
125 stats_p->SetX1NDC(0.85);
126 stats_p->SetX2NDC(0.995);
127 stats_p->SetY1NDC(0.9);
128 stats_p->SetY2NDC(0.95);
129 stats_p->SetOptStat(1100);
130
131 // legend
132 TLegend* legend = new TLegend(0.85, 0.77, 0.995, 0.9);
133 legend->Draw();
134
135 TLine* line_type1 = new TLine(0.86, 0.87, 0.88, 0.87);
136 line_type1->SetNDC(true);
137 line_type1->SetLineColor(TColor::GetColor("#990000"));
138 line_type1->SetLineWidth(3.0);
139 line_type1->SetLineStyle(2);
140 line_type1->Draw();
141
142 TText* text_type1 = new TText(0.89, 0.87, "strip hit (weighted cluster)");
143 text_type1->SetNDC(true);
144 text_type1->SetTextAlign(2);
145 text_type1->SetTextSize(0.015);
146 text_type1->SetTextFont(42);
147 text_type1->Draw();
148
149 TLine* line_type2 = new TLine(0.86, 0.85, 0.88, 0.85);
150 line_type2->SetNDC(true);
151 line_type2->SetLineColor(TColor::GetColor("#000099"));
152 line_type2->SetLineWidth(3.0);
153 line_type2->SetLineStyle(2);
154 line_type2->Draw();
155
156 TText* text_type2 = new TText(0.89, 0.85, "MC point position");
157 text_type2->SetNDC(true);
158 text_type2->SetTextAlign(2);
159 text_type2->SetTextSize(0.015);
160 text_type2->SetTextFont(42);
161 text_type2->Draw();
162
163 TText* text_type3a = new TText(0.86, 0.83, "v(v)");
164 text_type3a->SetNDC(true);
165 text_type3a->SetTextAlign(2);
166 text_type3a->SetTextSize(0.015);
167 text_type3a->SetTextFont(82);
168 text_type3a->Draw();
169
170 TText* text_type3 = new TText(0.89, 0.83, "MC number + strip signal");
171 text_type3->SetNDC(true);
172 text_type3->SetTextAlign(2);
173 text_type3->SetTextSize(0.015);
174 text_type3->SetTextFont(42);
175 text_type3->Draw();
176
177 TText* text_type4a = new TText(0.86, 0.81, "v(v)");
178 text_type4a->SetNDC(true);
179 text_type4a->SetTextAlign(2);
180 text_type4a->SetTextSize(0.015);
181 text_type4a->SetTextFont(82);
182 text_type4a->SetTextColor(TColor::GetColor("#990000"));
183 text_type4a->Draw();
184
185 TText* text_type4 = new TText(0.89, 0.81, "pos. + cluster signal");
186 text_type4->SetNDC(true);
187 text_type4->SetTextAlign(2);
188 text_type4->SetTextSize(0.015);
189 text_type4->SetTextFont(42);
190 text_type4->Draw();
191
192 TText* text_type5a = new TText(0.86, 0.79, "mc:v");
193 text_type5a->SetNDC(true);
194 text_type5a->SetTextAlign(2);
195 text_type5a->SetTextSize(0.015);
196 text_type5a->SetTextFont(82);
197 text_type5a->SetTextColor(TColor::GetColor("#000099"));
198 text_type5a->Draw();
199
200 TText* text_type5 = new TText(0.89, 0.79, "MC number");
201 text_type5->SetNDC(true);
202 text_type5->SetTextAlign(2);
203 text_type5->SetTextSize(0.015);
204 text_type5->SetTextFont(42);
205 text_type5->Draw();
206 //--------------------------------------------------------------------------
207
208 vector<StripCluster> StripClusters = layer.GetStripClusters();
209 Int_t nClusters = StripClusters.size();
210 cout << " nClusters = " << nClusters << "\n";
211
212 // define a color collection for clusters
213 vector<Int_t> colors = {3, 2, 5, 6, 7, 8, 29, 38, 41, 30, 43, 42, 45, 46, 0 /*curr_pos*/}; // color numbers:
214 // TColor
215
216 // run iteratively through clusters
217 for (Int_t icluster = 0; icluster < nClusters; ++icluster) {
218 cout << " cluster[" << icluster << "]:\n";
219 StripCluster cluster = StripClusters[icluster];
220
221 Int_t nStrips = cluster.GetClusterSize();
222 cout << " nStrips = " << nStrips << "\n";
223
224 for (Int_t istripInCluster = 0; istripInCluster < nStrips; ++istripInCluster) {
225 Int_t strip_num = cluster.Strips[istripInCluster];
226 Double_t signal = cluster.Signals[istripInCluster];
227
228 cout << " stripInCluster[" << istripInCluster << "]:\n";
229 cout << " strip_num = " << strip_num << "\n";
230 cout << " signal = " << signal << "\n";
231
232 Int_t bin = layer_hist1f->FindBin(strip_num);
233
234 PaintBin(layer_canv, layer_hist1f, bin, signal, colors[colors[colors.size() - 1]],
235 TColor::GetColor("#333333"));
236 DrawMCMatches(layer_canv, layer_hist1f, strip_num, layer);
237 }
238 if (colors[colors.size() - 1] == (colors.size() - 1))
239 colors[colors.size() - 1] = 0;
240 else
241 colors[colors.size() - 1]++;
242 }
243 //--------------------------------------------------------------------------
244
245 // Show strip hit positions on the current layer as vertical lines
246 DrawStripHits(layer_canv, layer_hist1f, layer);
247
248 // Show MC point positions on the current layer as vertical lines
249 DrawMCStripLines(layer_canv, layer_hist1f, module, ilayer);
250
251 cout << "\n";
252}
253//------------------------------------------------------------------------------
254
255void ShowStripNumbersOfClustersInModule(BmnVSPModule* module, Int_t layer_type, Int_t module_num, Int_t station_num)
256{
257
258 // module name
259 TString module_textId = TString("Strip numbers of all clusters in the module: ") + TString("layer_type[")
260 + TString::Format("%i", layer_type) + TString("], module[")
261 + TString::Format("%i", module_num) + TString("], ");
262 module_textId += TString("station[") + TString::Format("%i", station_num) + TString("]");
263
264 Int_t nStrips = 0;
265 Int_t firstStripNumber = 0;
266 Int_t lastStripNumber = 0;
267
268 vector<BmnVSPLayer> Layers = module->GetStripLayers();
269 for (Int_t ilayer = 0; ilayer < Layers.size(); ++ilayer) {
270 BmnVSPLayer layer = Layers[ilayer];
271 if (layer.GetType() == layer_type) {
272 if (layer.GetFirstStripNumber() < firstStripNumber)
273 firstStripNumber = layer.GetFirstStripNumber();
274 if (layer.GetLastStripNumber() > lastStripNumber)
275 lastStripNumber = layer.GetLastStripNumber();
276 }
277 }
278 nStrips = lastStripNumber - firstStripNumber + 1;
279
280 TCanvas* module_canv = new TCanvas(module_textId + TString("_canv"), module_textId, 0, 0, 1800, 1200);
281 module_canv->SetGrid();
282 TH1F* module_hist1f =
283 new TH1F(module_textId + TString("_hist1f"), module_textId, nStrips, firstStripNumber, lastStripNumber + 1);
284
285 for (Int_t ilayer = 0; ilayer < Layers.size(); ++ilayer) {
286 BmnVSPLayer layer = Layers[ilayer];
287 Int_t type = layer.GetType();
288
289 if (layer.GetType() == layer_type) {
290 vector<StripCluster> StripClusters = layer.GetStripClusters();
291 Int_t nClusters = StripClusters.size();
292
293 for (Int_t icluster = 0; icluster < nClusters; ++icluster) {
294 StripCluster cluster = StripClusters[icluster];
295 Int_t nStrips = cluster.GetClusterSize();
296
297 for (Int_t istripInCluster = 0; istripInCluster < nStrips; ++istripInCluster) {
298 Int_t strip_num = cluster.Strips[istripInCluster];
299 Double_t signal = cluster.Signals[istripInCluster];
300
301 module_hist1f->Fill(strip_num);
302 }
303 }
304 }
305 }
306 module_canv->cd();
307 module_hist1f->SetFillColor(TColor::GetColor("#cccccc"));
308 module_hist1f->SetLineColor(TColor::GetColor("#333333"));
309 module_hist1f->GetXaxis()->SetLabelOffset(0.015);
310 module_hist1f->GetXaxis()->SetLabelSize(0.02); // 0.035
311 module_hist1f->GetYaxis()->SetLabelSize(0.02); // 0.035
312 module_hist1f->Draw("hist");
313}
314//------------------------------------------------------------------------------
315
316void ShowStripNumbersOfClustersInModule_FromBranches(Int_t event_num, Int_t module_num, Int_t station_num)
317{
318
319 // Loading data from ROOT files
320 TString file_prefix = "";
321 // file_prefix = "_CC_4gev_b0_16fm";
322
323 // Input Lower clusters (||) for VSP
324 TClonesArray* fVSPLowerClusters_Array = new TClonesArray("");
325 TString fVSPLowerClusters_FileName = "$VMCWORKDIR/macro/run/bmndst";
326 fVSPLowerClusters_FileName += file_prefix;
327 fVSPLowerClusters_FileName += ".root";
328 TFile* fVSPLowerClusters_File = new TFile(fVSPLowerClusters_FileName, "READ");
329 TTree* fVSPLowerClusters_Tree = (TTree*)fVSPLowerClusters_File->Get("bmndata");
330 fVSPLowerClusters_Tree->GetBranch("BmnVSPLowerCluster")->SetAutoDelete(kTRUE);
331 fVSPLowerClusters_Tree->SetBranchAddress("BmnVSPLowerCluster", &fVSPLowerClusters_Array);
332
333 // Input Upper clusters (//) for VSP
334 TClonesArray* fVSPUpperClusters_Array = new TClonesArray("");
335 TString fVSPUpperClusters_FileName = "$VMCWORKDIR/macro/run/bmndst";
336 fVSPUpperClusters_FileName += file_prefix;
337 fVSPUpperClusters_FileName += ".root";
338 TFile* fVSPUpperClusters_File = new TFile(fVSPUpperClusters_FileName, "READ");
339 TTree* fVSPUpperClusters_Tree = (TTree*)fVSPUpperClusters_File->Get("bmndata");
340 fVSPUpperClusters_Tree->GetBranch("BmnVSPUpperCluster")->SetAutoDelete(kTRUE);
341 fVSPUpperClusters_Tree->SetBranchAddress("BmnVSPUpperCluster", &fVSPUpperClusters_Array);
342
343 // Set the current event
344 fVSPLowerClusters_Tree->GetEntry(event_num);
345 fVSPUpperClusters_Tree->GetEntry(event_num);
346
347 // module name
348 TString module_lowerStrips_textId = TString("Branch: Strip numbers of all clusters in the module: ")
349 + TString("Lower strips, module[") + TString::Format("%i", module_num)
350 + TString("], ");
351 module_lowerStrips_textId += TString("station[") + TString::Format("%i", station_num) + TString("]");
352
353 TString module_upperStrips_textId = TString("Branch: Strip numbers of all clusters in the module: ")
354 + TString("Upper strips, module[") + TString::Format("%i", module_num)
355 + TString("], ");
356 module_upperStrips_textId += TString("station[") + TString::Format("%i", station_num) + TString("]");
357
358 Int_t nStrips = 640;
359 Int_t firstStripNumber = 0;
360 Int_t lastStripNumber = 639;
361
362 TCanvas* module_lowerStrips_canv =
363 new TCanvas(module_lowerStrips_textId + TString("_canv"), module_lowerStrips_textId, 0, 0, 1800, 1200);
364 module_lowerStrips_canv->SetGrid();
365 TH1F* module_lowerStrips_hist1f =
366 new TH1F(module_lowerStrips_textId + TString("_hist1f"), module_lowerStrips_textId, nStrips, firstStripNumber,
367 lastStripNumber + 1);
368
369 TCanvas* module_upperStrips_canv =
370 new TCanvas(module_upperStrips_textId + TString("_canv"), module_upperStrips_textId, 0, 0, 1800, 1200);
371 module_upperStrips_canv->SetGrid();
372 TH1F* module_upperStrips_hist1f =
373 new TH1F(module_upperStrips_textId + TString("_hist1f"), module_upperStrips_textId, nStrips, firstStripNumber,
374 lastStripNumber + 1);
375
376 for (Int_t icluster = 0; icluster < fVSPLowerClusters_Array->GetEntries(); ++icluster) {
377 StripCluster* cluster = (StripCluster*)fVSPLowerClusters_Array->At(icluster);
378
379 if ((cluster->GetType() == 0) && (cluster->GetStation() == station_num) && (cluster->GetModule() == module_num))
380 {
381 Int_t nStrips = cluster->GetClusterSize();
382 for (Int_t istripInCluster = 0; istripInCluster < nStrips; ++istripInCluster) {
383 Int_t strip_num = cluster->Strips[istripInCluster];
384 Double_t signal = cluster->Signals[istripInCluster];
385
386 module_lowerStrips_hist1f->Fill(strip_num);
387 }
388 }
389 }
390
391 for (Int_t icluster = 0; icluster < fVSPUpperClusters_Array->GetEntries(); ++icluster) {
392 StripCluster* cluster = (StripCluster*)fVSPUpperClusters_Array->At(icluster);
393
394 if ((cluster->GetType() == 1) && (cluster->GetStation() == station_num) && (cluster->GetModule() == module_num))
395 {
396 Int_t nStrips = cluster->GetClusterSize();
397 for (Int_t istripInCluster = 0; istripInCluster < nStrips; ++istripInCluster) {
398 Int_t strip_num = cluster->Strips[istripInCluster];
399 Double_t signal = cluster->Signals[istripInCluster];
400
401 module_upperStrips_hist1f->Fill(strip_num);
402 }
403 }
404 }
405
406 module_lowerStrips_canv->cd();
407 module_lowerStrips_hist1f->SetFillColor(TColor::GetColor("#dddddd"));
408 module_lowerStrips_hist1f->SetLineColor(TColor::GetColor("#333333"));
409 module_lowerStrips_hist1f->GetXaxis()->SetLabelOffset(0.015);
410 module_lowerStrips_hist1f->GetXaxis()->SetLabelSize(0.02); // 0.035
411 module_lowerStrips_hist1f->GetYaxis()->SetLabelSize(0.02); // 0.035
412 module_lowerStrips_hist1f->Draw("hist");
413
414 module_upperStrips_canv->cd();
415 module_upperStrips_hist1f->SetFillColor(TColor::GetColor("#dddddd"));
416 module_upperStrips_hist1f->SetLineColor(TColor::GetColor("#333333"));
417 module_upperStrips_hist1f->GetXaxis()->SetLabelOffset(0.015);
418 module_upperStrips_hist1f->GetXaxis()->SetLabelSize(0.02); // 0.035
419 module_upperStrips_hist1f->GetYaxis()->SetLabelSize(0.02); // 0.035
420 module_upperStrips_hist1f->Draw("hist");
421}
422//------------------------------------------------------------------------------
423
424void ShowReadoutPlane(BmnVSPModule* module, Int_t imodule, Int_t istation)
425{
426
427 // module borders
428 Double_t x_min_module = module->GetXMinModule();
429 Double_t x_max_module = module->GetXMaxModule();
430 Double_t y_min_module = module->GetYMinModule();
431 Double_t y_max_module = module->GetYMaxModule();
432 Double_t x_size_module = module->GetXSize();
433 Double_t y_size_module = module->GetYSize();
434
435 // area borders for drawing
436 Double_t hborder_margin = 0;
437 Double_t hborder_left, hborder_right, hborder_bottom, hborder_top;
438 if (x_size_module >= y_size_module) {
439 hborder_margin = x_size_module * 0.05;
440 hborder_left = x_min_module - hborder_margin;
441 hborder_right = x_max_module + hborder_margin;
442 hborder_bottom = y_min_module - fabs(x_size_module - y_size_module) * 0.5 - hborder_margin;
443 hborder_top = y_max_module + fabs(x_size_module - y_size_module) * 0.5 + hborder_margin;
444 } else {
445 hborder_margin = y_size_module * 0.05;
446 hborder_left = x_min_module - fabs(x_size_module - y_size_module) * 0.5 - hborder_margin;
447 hborder_right = x_max_module + fabs(x_size_module - y_size_module) * 0.5 + hborder_margin;
448 hborder_bottom = y_min_module - hborder_margin;
449 hborder_top = y_max_module + hborder_margin;
450 }
451
452 // module name
453 TString module_textId = TString("module[") + TString::Format("%i", imodule) + TString("], ");
454 module_textId += TString("station[") + TString::Format("%i", istation) + TString("]");
455
456 TCanvas* module_canv = new TCanvas(module_textId + TString("_canv"), module_textId, 0, 0, 1600, 1600);
457 module_canv->SetGrid();
458 TH2D* module_hist2d = new TH2D(module_textId + TString("_hist1f"), module_textId, 100, hborder_left, hborder_right,
459 100, hborder_bottom, hborder_top);
460 module_hist2d->GetXaxis()->SetTitle("X(local, inverted)");
461 module_hist2d->GetYaxis()->SetTitle("Y");
462
463 module_canv->cd();
464 module_hist2d->SetFillColor(TColor::GetColor("#cccccc"));
465 module_hist2d->SetLineColor(TColor::GetColor("#333333"));
466 module_hist2d->GetXaxis()->SetLabelOffset(0.015);
467 module_hist2d->GetXaxis()->SetLabelSize(0.02); // 0.035
468 module_hist2d->GetYaxis()->SetLabelSize(0.02); // 0.035
469 module_hist2d->SetStats(0);
470 module_hist2d->Draw("");
471 module_canv->Update();
472
473 // drawing module borders on the area
474 Double_t x_borders_module[4] = {x_min_module, x_min_module, x_max_module, x_max_module};
475 Double_t y_borders_module[4] = {y_min_module, y_max_module, y_max_module, y_min_module};
476 for (Int_t ibpoint = 0; ibpoint < 4; ++ibpoint) {
477 // Lines between points on the XY plane
478 Double_t x1, y1, x2, y2;
479 if (ibpoint != 3) {
480 x1 = x_borders_module[ibpoint];
481 y1 = y_borders_module[ibpoint];
482 x2 = x_borders_module[ibpoint + 1];
483 y2 = y_borders_module[ibpoint + 1];
484 } else {
485 x1 = x_borders_module[ibpoint];
486 y1 = y_borders_module[ibpoint];
487 x2 = x_borders_module[0];
488 y2 = y_borders_module[0];
489 }
490 TLine* border_line = new TLine(x1, y1, x2, y2);
491 border_line->SetLineColor(TColor::GetColor("#333333"));
492 border_line->SetLineWidth(2.0);
493 module_canv->cd();
494 border_line->Draw();
495 }
496
497 // drawing mc points (real points in the current module)
498 Int_t nRealPointsInModule = module->GetNRealPoints();
499 for (Int_t irpoint = 0; irpoint < nRealPointsInModule; ++irpoint) {
500 // for(Int_t irpoint = 0; irpoint < 1; ++irpoint) {
501 Double_t x_rpoint = module->GetRealPointX(irpoint);
502 Double_t y_rpoint = module->GetRealPointY(irpoint);
503 Int_t mc_index = module->GetRealPointMC(irpoint);
504
505 TMarker* rpoint_marker = new TMarker(x_rpoint, y_rpoint, 2);
506 rpoint_marker->SetMarkerSize(1.5);
507 rpoint_marker->SetMarkerColor(TColor::GetColor("#0000cc"));
508 module_canv->cd();
509 rpoint_marker->Draw();
510
511 TString content = TString::Format("%i", mc_index);
512 TLatex* btext = new TLatex();
513 btext->SetText(x_rpoint + 0.01, y_rpoint + 0.01, content);
514 btext->SetTextAlign(11);
515 btext->SetTextFont(82);
516 btext->SetTextSize(0.015);
517 btext->SetTextColorAlpha(TColor::GetColor("#0000cc"), 1.0);
518 module_canv->cd();
519 btext->Draw();
520 }
521
522 // drawing hits (intersections in the current module)
523 Int_t nIntersectionPoints = module->GetNIntersectionPoints();
524 for (Int_t ihit = 0; ihit < nIntersectionPoints; ++ihit) {
525 Double_t x_hit = module->GetIntersectionPointX(ihit);
526 Double_t y_hit = module->GetIntersectionPointY(ihit);
527
528 TMarker* hit_marker = new TMarker(x_hit, y_hit, 5);
529 hit_marker->SetMarkerSize(1.5);
530 hit_marker->SetMarkerColor(TColor::GetColor("#aa0000"));
531 module_canv->cd();
532 hit_marker->Draw();
533 }
534
535 // layers processing --------------------------------------------------------
536 vector<BmnVSPLayer> Layers = module->GetStripLayers();
537 for (Int_t ilayer = 0; ilayer < Layers.size(); ++ilayer) {
538 BmnVSPLayer layer = Layers[ilayer];
539
540 // drawing borders for each layer in the module
541 Double_t x_min_layer = layer.GetXMinLayer();
542 Double_t x_max_layer = layer.GetXMaxLayer();
543 Double_t y_min_layer = layer.GetYMinLayer();
544 Double_t y_max_layer = layer.GetYMaxLayer();
545 Double_t x_borders_layer[4] = {x_min_layer, x_min_layer, x_max_layer, x_max_layer};
546 Double_t y_borders_layer[4] = {y_min_layer, y_max_layer, y_max_layer, y_min_layer};
547 for (Int_t ibpoint = 0; ibpoint < 4; ++ibpoint) {
548 // Lines between points on the XY plane
549 Double_t x1, y1, x2, y2;
550 if (ibpoint != 3) {
551 x1 = x_borders_layer[ibpoint];
552 y1 = y_borders_layer[ibpoint];
553 x2 = x_borders_layer[ibpoint + 1];
554 y2 = y_borders_layer[ibpoint + 1];
555 } else {
556 x1 = x_borders_layer[ibpoint];
557 y1 = y_borders_layer[ibpoint];
558 x2 = x_borders_layer[0];
559 y2 = y_borders_layer[0];
560 }
561 TLine* border_line = new TLine(x1, y1, x2, y2);
562 border_line->SetLineColor(TColor::GetColor("#333333"));
563 border_line->SetLineWidth(1.0);
564 module_canv->cd();
565 border_line->Draw();
566 }
567
568 //----------------------------------------------------------------------
569
570 for (Int_t istripHit = 0; istripHit < layer.GetNStripHits(); ++istripHit) {
571 Double_t strip_pos = layer.GetStripHitPos(istripHit);
572 Double_t B_val = layer.CalculateStripEquationB(strip_pos);
573 Double_t angle_rad = layer.GetAngleRad();
574 Double_t PiOver2MinusAngleRad = TMath::PiOver2() - angle_rad;
575
576 Double_t x1, y1, x2, y2;
577
578 if (layer.GetType() == 0 && ilayer == 0) {
579 cout << "strip_pos = " << strip_pos << "\n";
580 cout << "angle_rad = " << angle_rad << "\n";
581 cout << "B_val = " << B_val << "\n";
582 cout << "\n";
583 }
584
585 if (fabs(B_val) < 1e+6) {
586 x1 = (y_min_layer - B_val) / TMath::Tan(PiOver2MinusAngleRad);
587 if (x1 < x_min_layer)
588 x1 = x_min_layer;
589 if (x1 > x_max_layer)
590 x1 = x_max_layer;
591 y1 = TMath::Tan(PiOver2MinusAngleRad) * x1 + B_val;
592 if (y1 < y_min_layer)
593 y1 = y_min_layer;
594 if (y1 > y_max_layer)
595 y1 = y_max_layer;
596
597 x2 = (y_max_layer - B_val) / TMath::Tan(PiOver2MinusAngleRad);
598 if (x2 < x_min_layer)
599 x2 = x_min_layer;
600 if (x2 > x_max_layer)
601 x2 = x_max_layer;
602 y2 = TMath::Tan(PiOver2MinusAngleRad) * x2 + B_val;
603 if (y2 < y_min_layer)
604 y2 = y_min_layer;
605 if (y2 > y_max_layer)
606 y2 = y_max_layer;
607 } else {
608
609 if (layer.GetStripNumberingOrder() == LeftToRight) {
610 x1 =
611 layer.GetXLeftStripBorderPoint() + (strip_pos - layer.GetFirstStripNumber()) * layer.GetPitch();
612 } else {
613 x1 = layer.GetXRightStripBorderPoint()
614 - (strip_pos - layer.GetFirstStripNumber()) * layer.GetPitch();
615 }
616 y1 = y_min_layer;
617
618 x2 = x1;
619 y2 = y_max_layer;
620 }
621
622 TLine* strip_line = new TLine(x1, y1, x2, y2);
623 strip_line->SetLineColorAlpha(TColor::GetColor("#cc0000"), 0.3);
624 strip_line->SetLineWidth(1.0);
625 module_canv->cd();
626 strip_line->Draw();
627
628 TString content = TString::Format("%.1f", strip_pos);
629 TLatex* btext = new TLatex();
630 btext->SetText(x2, y2 + 0.01, content);
631 btext->SetTextAlign(21);
632 btext->SetTextFont(82);
633 btext->SetTextSize(0.015);
634 btext->SetTextColorAlpha(TColor::GetColor("#cc0000"), 1.0);
635 module_canv->cd();
636 btext->Draw();
637 }
638 }
639 //--------------------------------------------------------------------------
640}
641
642//------------------------------------------------------------------------------
643
644void PaintBin(TCanvas* c, TH1F* h, Int_t bin, Double_t bin_height, Int_t fcolor, Int_t bcolor)
645{
646
647 Double_t x1 = h->GetBinLowEdge(bin);
648 Double_t y1 = h->GetMinimum();
649 Double_t x2 = h->GetBinWidth(bin) + h->GetBinLowEdge(bin);
650 // Double_t y2 = h->GetBinContent(bin); //whole bin height: sum of signal
651 Double_t y2 = bin_height; // only signal of strip
652
653 Double_t alpha_density = 1.0;
654 if (fabs(bin_height / h->GetBinContent(bin)) >= 0.01)
655 alpha_density = 0.7;
656
657 TBox* b_filled = new TBox(x1, y1, x2, y2);
658 b_filled->SetFillColorAlpha(fcolor, alpha_density);
659
660 TBox* b_border = new TBox(x1, y1, x2, y2);
661 b_border->SetFillStyle(1);
662 b_border->SetLineColor(bcolor);
663 b_border->SetLineWidth(1);
664
665 c->cd();
666 b_filled->Draw("");
667 b_border->Draw("");
668}
669//------------------------------------------------------------------------------
670
671void DrawMCMatches(TCanvas* c, TH1F* h, Int_t strip_num, BmnVSPLayer& layer)
672{
673
674 BmnMatch match = layer.GetStripMatch(strip_num);
675
676 Int_t n_links = match.GetNofLinks();
677
678 Int_t most_probably_index = -1;
679 Double_t max_weight = 0;
680
681 Double_t height_shift = 0.0;
682 for (Int_t ilink = 0; ilink < n_links; ilink++) {
683 Int_t index = match.GetLink(ilink).GetIndex();
684 Double_t weight = match.GetLink(ilink).GetWeight();
685 if (weight > max_weight) {
686 max_weight = weight;
687 most_probably_index = index;
688 }
689 Int_t bin = h->FindBin(strip_num);
690 // TString content = TString::Format("%i", most_probably_index) + TString("(") + TString::Format("%.1f",
691 // max_weight) + TString(")");
692 TString content = TString::Format("%i", index) + TString("(") + TString::Format("%.1f", weight) + TString(")");
693 TLatex* btext = new TLatex();
694 btext->SetText(h->GetBinCenter(bin), h->GetBinContent(bin) + 0.5 + height_shift, content);
695 btext->SetTextAlign(21);
696 btext->SetTextFont(82);
697 btext->SetTextSize(0.015);
698 height_shift += 2.5;
699 c->cd();
700 btext->Draw();
701 }
702}
703//------------------------------------------------------------------------------
704
706{
707
708 Int_t nStripHits = layer.GetNStripHits();
709 cout << " nStripHits = " << nStripHits << "\n";
710
711 // run iteratively through strip hits
712 for (Int_t iStripHit = 0; iStripHit < nStripHits; ++iStripHit) {
713 cout << " stripHit[" << iStripHit << "]:\n";
714 Double_t strip_hit_pos = layer.GetStripHitPos(iStripHit);
715 Double_t strip_hit_signal = layer.GetStripHitTotalSignal(iStripHit);
716
717 cout << " strip_hit_pos = " << strip_hit_pos << "\n";
718 cout << " strip_hit_signal = " << strip_hit_signal << "\n";
719
720 Int_t bin = h->FindBin(strip_hit_pos);
721 Double_t x1_line = strip_hit_pos;
722 Double_t x2_line = strip_hit_pos;
723 Double_t y1_line = h->GetMinimum() - 1.0;
724 Double_t y2_line = h->GetBinContent(bin);
725
726 TLine* strip_hit_line = new TLine(x1_line, y1_line, x2_line, y2_line);
727 strip_hit_line->SetLineStyle(2);
728 strip_hit_line->SetLineWidth(2.0);
729 strip_hit_line->SetLineColor(TColor::GetColor("#990000"));
730
731 c->cd();
732 strip_hit_line->Draw();
733
734 TString content = TString::Format("%.1f", strip_hit_pos) + TString("(")
735 + TString::Format("%.1f", strip_hit_signal) + TString(")");
736 TLatex* btext = new TLatex();
737 btext->SetText(x1_line, y1_line, content);
738 btext->SetTextAlign(23);
739 btext->SetTextFont(82);
740 btext->SetTextColor(TColor::GetColor("#990000"));
741 btext->SetTextSize(0.015);
742 c->cd();
743 btext->Draw();
744 }
745}
746//------------------------------------------------------------------------------
747
748void DrawMCStripLines(TCanvas* c, TH1F* h, BmnVSPModule* module, Int_t layer_num)
749{
750
751 Int_t nRealPointsInModule = module->GetNRealPoints();
752
753 // run iteratively through real points
754 for (Int_t irpoint = 0; irpoint < nRealPointsInModule; ++irpoint) {
755 Double_t x = module->GetRealPointX(irpoint);
756 Double_t y = module->GetRealPointY(irpoint);
757 Int_t mc_index = module->GetRealPointMC(irpoint);
758
759 BmnVSPLayer& layer = module->GetStripLayer(layer_num);
760 Int_t layer_zoneID = layer.GetZoneID();
761
762 if (layer.IsPointInsideStripLayer(x, y)) {
763 Double_t strip_pos = layer.ConvertPointToStripPosition(x, y);
764
765 Int_t bin = h->FindBin(strip_pos);
766 Double_t x1_line = strip_pos;
767 Double_t x2_line = strip_pos;
768 Double_t y1_line = h->GetMinimum() - 5.0;
769 Double_t y2_line = h->GetBinContent(bin);
770
771 TLine* strip_mc_line = new TLine(x1_line, y1_line, x2_line, y2_line);
772 strip_mc_line->SetLineStyle(2);
773 strip_mc_line->SetLineWidth(2.0);
774 strip_mc_line->SetLineColor(TColor::GetColor("#000099"));
775 c->cd();
776 strip_mc_line->Draw();
777
778 TString content = TString("mc:") + TString::Format("%i", mc_index);
779 TLatex* btext = new TLatex();
780 btext->SetText(x1_line, y1_line, content);
781 btext->SetTextAlign(23);
782 btext->SetTextFont(82);
783 btext->SetTextColor(TColor::GetColor("#0000cc"));
784 btext->SetTextSize(0.015);
785 c->cd();
786 btext->Draw();
787 } else {
788 for (Int_t ilayer = 0; ilayer < module->GetNStripLayers(); ++ilayer) {
789 if (ilayer == layer_num)
790 continue;
791 BmnVSPLayer& curr_layer = module->GetStripLayer(ilayer);
792
793 if (layer_zoneID == curr_layer.GetZoneID()) {
794
795 Double_t strip_pos = curr_layer.ConvertPointToStripPosition(x, y);
796
797 Int_t bin = h->FindBin(strip_pos);
798 Double_t x1_line = strip_pos;
799 Double_t x2_line = strip_pos;
800 Double_t y1_line = h->GetMinimum() - 5.0;
801 Double_t y2_line = h->GetBinContent(bin);
802
803 TLine* strip_mc_line = new TLine(x1_line, y1_line, x2_line, y2_line);
804 strip_mc_line->SetLineStyle(2);
805 strip_mc_line->SetLineWidth(2.0);
806 strip_mc_line->SetLineColor(TColor::GetColor("#000099"));
807 c->cd();
808 strip_mc_line->Draw();
809
810 TString content = TString("mc:") + TString::Format("%i", mc_index);
811 TLatex* btext = new TLatex();
812 btext->SetText(x1_line, y1_line, content);
813 btext->SetTextAlign(23);
814 btext->SetTextFont(82);
815 btext->SetTextColor(TColor::GetColor("#0000cc"));
816 btext->SetTextSize(0.015);
817 c->cd();
818 btext->Draw();
819 }
820 }
821 }
822 }
823}
824//------------------------------------------------------------------------------
825
826void LoadDataFromMCPoints(BmnVSPStationSet* station_set, BmnVSPTransform* transf_set, Int_t event_num)
827{
828
829 // Reset the previous data before loading
830 station_set->Reset();
831
832 // Loading data from ROOT files
833 TString file_prefix = "";
834 // file_prefix = "_CC_4gev_b0_16fm";
835
836 // Input MC-points for VSP
837 TClonesArray* fVSPMCPoints_Array = new TClonesArray("");
838 TString fVSPMCPoints_FileName = "$VMCWORKDIR/macro/run/bmnsim";
839 fVSPMCPoints_FileName += file_prefix;
840 fVSPMCPoints_FileName += ".root";
841 TFile* fVSPMCPoints_File = new TFile(fVSPMCPoints_FileName, "READ");
842 TTree* fVSPMCPoints_Tree = (TTree*)fVSPMCPoints_File->Get("bmndata");
843 fVSPMCPoints_Tree->GetBranch("VSPPoint")->SetAutoDelete(kTRUE);
844 fVSPMCPoints_Tree->SetBranchAddress("VSPPoint", &fVSPMCPoints_Array);
845
846 // Set the current event
847 fVSPMCPoints_Tree->GetEntry(event_num);
848
849 Int_t n_points = fVSPMCPoints_Array->GetEntries();
850 Int_t added_points_cnt = 0;
851
852 for (Int_t ipoint = 0; ipoint < n_points; ++ipoint) {
853 BmnVSPPoint* mc_point = (BmnVSPPoint*)fVSPMCPoints_Array->At(ipoint);
854
855 Double_t x = -((FairMCPoint*)mc_point)->GetX(); // invert because in current geometry +x is left, -x is right
856 Double_t y = ((FairMCPoint*)mc_point)->GetY();
857 Double_t z = ((FairMCPoint*)mc_point)->GetZ();
858
859 Double_t px =
860 -((FairMCPoint*)mc_point)->GetPx(); // invert because in current geometry +x is left, -x is right
861 Double_t py = ((FairMCPoint*)mc_point)->GetPy();
862 Double_t pz = ((FairMCPoint*)mc_point)->GetPz();
863
864 Double_t d_eloss = mc_point->GetEnergyLoss() * 1e6; // in keV
865 Int_t ref_id = ipoint;
866
867 // Information from MC-points
868 Int_t mc_station_num = ((BmnVSPPoint*)mc_point)->GetStation();
869 Int_t mc_module_num = ((BmnVSPPoint*)mc_point)->GetModule();
870
871 // Transform MC-point coordinates to local coordinate system
872 if (transf_set && mc_station_num < station_set->GetNStations()) {
873 if (mc_module_num < station_set->GetStation(mc_station_num)->GetNModules()) {
874 Plane3D::Point loc_point =
875 transf_set->ApplyInverseTransforms(Plane3D::Point(-x, y, z), mc_station_num, mc_module_num);
876 Plane3D::Point loc_direct = transf_set->ApplyInverseTransforms(
877 Plane3D::Point(-(px + x), (py + y), (pz + z)), mc_station_num, mc_module_num);
878 x = -loc_point.X();
879 y = loc_point.Y();
880 z = loc_point.Z();
881
882 px = -(loc_direct.X() - loc_point.X());
883 py = loc_direct.Y() - loc_point.Y();
884 pz = loc_direct.Z() - loc_point.Z();
885 }
886 }
887
888 // adding the current point to the detector
889 if (station_set->AddPointToDetector(x, y, z, px, py, pz, d_eloss, ref_id))
890 added_points_cnt++;
891 }
892
893 cout << "------------------------------------\n";
894 cout << "LoadDataFromMCPoints:\n " << added_points_cnt << " of " << n_points
895 << " Monte-Carlo points have been added to the detector\n";
896 cout << "------------------------------------\n";
897}
898//------------------------------------------------------------------------------
899
900void LoadDataFromDigits(BmnVSPStationSet* station_set, BmnVSPTransform* transf_set, Int_t event_num)
901{
902
903 // Reset the previous data before loading
904 station_set->Reset();
905
906 // Loading data from ROOT files
907 TString file_prefix = "";
908 // file_prefix = "_CC_4gev_b0_16fm";
909
910 // Input Digits for VSP
911 TClonesArray* fVSPDigits_Array = new TClonesArray("");
912 TString fVSPDigits_FileName = "$VMCWORKDIR/macro/run/bmnsim";
913 fVSPDigits_FileName += file_prefix;
914 fVSPDigits_FileName += ".root";
915 TFile* fVSPDigits_File = new TFile(fVSPDigits_FileName, "READ");
916 TTree* fVSPDigits_Tree = (TTree*)fVSPDigits_File->Get("bmndata");
917 fVSPDigits_Tree->GetBranch("BmnVSPDigit")->SetAutoDelete(kTRUE);
918 fVSPDigits_Tree->SetBranchAddress("BmnVSPDigit", &fVSPDigits_Array);
919
920 // Set the current event
921 fVSPDigits_Tree->GetEntry(event_num);
922
923 Int_t n_digits = fVSPDigits_Array->GetEntries();
924 Int_t added_digits_cnt = 0;
925
926 for (Int_t idigit = 0; idigit < n_digits; idigit++) {
927 BmnVSPDigit* digit = (BmnVSPDigit*)fVSPDigits_Array->At(idigit);
928
929 BmnVSPStation* station = station_set->GetStation(digit->GetStation());
930 BmnVSPModule* module = station->GetModule(digit->GetModule());
931
932 if (module->SetStripSignalInLayerByZoneId(digit->GetStripLayer(), digit->GetStripNumber(),
933 digit->GetStripSignal()))
934 added_digits_cnt++;
935 }
936
937 cout << "------------------------------------\n";
938 cout << "LoadDataFromDigits:\n " << added_digits_cnt << " of " << n_digits
939 << " digits have been added to the detector\n";
940 cout << "------------------------------------\n";
941}
friend F32vec4 fabs(const F32vec4 &a)
Definition P4_F32vec4.h:52
int Int_t
double Double_t
constexpr Bool_t kTRUE
#define R__ADD_INCLUDE_PATH(PATH)
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
@ LeftToRight
Int_t GetStripNumber()
Int_t GetStripLayer()
Int_t GetStation()
Double_t GetStripSignal()
Int_t GetModule()
Double_t CalculateStripEquationB(Double_t strip_pos)
Int_t GetFirstStripNumber()
Definition BmnVSPLayer.h:47
StripLayerType GetType()
Definition BmnVSPLayer.h:49
Int_t GetLastStripNumber()
Definition BmnVSPLayer.h:48
Double_t GetXLeftStripBorderPoint()
Definition BmnVSPLayer.h:69
Double_t GetStripHitPos(Int_t num)
BmnMatch GetStripMatch(Int_t strip_num)
Double_t GetXMaxLayer()
Definition BmnVSPLayer.h:56
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t GetXMinLayer()
Definition BmnVSPLayer.h:55
Double_t GetYMaxLayer()
Definition BmnVSPLayer.h:58
Int_t GetNStripHits()
Int_t GetZoneID()
Definition BmnVSPLayer.h:46
Double_t GetXRightStripBorderPoint()
Definition BmnVSPLayer.h:71
Int_t GetNStrips()
vector< StripCluster > GetStripClusters()
Double_t GetStripSignal(Int_t strip_num)
Double_t GetYMinLayer()
Definition BmnVSPLayer.h:57
Double_t GetStripHitTotalSignal(Int_t num)
Double_t GetAngleRad()
Definition BmnVSPLayer.h:52
StripNumberingDirection GetStripNumberingOrder()
Definition BmnVSPLayer.h:68
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Double_t GetPitch()
Definition BmnVSPLayer.h:50
Bool_t SetStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
vector< BmnVSPLayer > & GetStripLayers()
Int_t GetNStripLayers()
Bool_t AddPointToDetector(Double_t xcoord, Double_t ycoord, Double_t zcoord, Double_t px, Double_t py, Double_t pz, Double_t dEloss, Int_t refID)
BmnVSPStation * GetStation(Int_t station_num)
BmnVSPModule * GetModule(Int_t module_num)
Bool_t LoadFromXMLFile(TString xml_config_file)
Plane3D::Point ApplyInverseTransforms(Plane3D::Point point, Int_t station, Int_t module)
PositionVector3D< Cartesian3D< T >, DefaultCoordinateSystemTag > Point
Int_t GetClusterSize()
Int_t GetType()
Int_t GetModule()
Int_t GetStation()
vector< Int_t > Strips
vector< Double_t > Signals
virtual void SetLabelSize(Float_t size=0.04)
virtual void SetLabelOffset(Float_t offset=0.005)
virtual void SetFillColor(Color_t fcolor)
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha)
virtual void SetFillStyle(Style_t fstyle)
virtual void SetLineStyle(Style_t lstyle)
virtual void SetLineWidth(Width_t lwidth)
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual void SetLineColor(Color_t lcolor)
virtual void SetMarkerColor(Color_t mcolor=1)
virtual void SetMarkerSize(Size_t msize=1)
virtual void SetTextAlign(Short_t align=11)
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha)
virtual void SetTextColor(Color_t tcolor=1)
virtual void SetTextFont(Font_t tfont=62)
virtual void SetTextSize(Float_t tsize=1)
void Draw(Option_t *option="") override
virtual void SetAutoDelete(bool autodel=true)
TVirtualPad * cd(Int_t subpadnumber=0) override
void Update() override
static Int_t GetColor(const char *hexcolor)
T * Get(const char *namecycle)
void Reset(Option_t *option="") override
virtual Double_t GetBinCenter(Int_t bin) const
TAxis * GetXaxis()
TObject * FindObject(const char *name) const override
TAxis * GetYaxis()
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual Double_t GetBinLowEdge(Int_t bin) const
virtual Double_t GetBinContent(Int_t bin) const
virtual Double_t GetBinWidth(Int_t bin) const
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
virtual void SetStats(Bool_t stats=kTRUE)
void Draw(Option_t *option="") override
virtual void SetNDC(Bool_t isNDC=kTRUE)
void Draw(Option_t *option="") override
virtual void SetTitle(const char *title="")
Int_t GetEntries() const override
TObject * At(Int_t idx) const override
virtual void Draw(Option_t *option="")
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
void SetOptStat(Int_t stat=1)
virtual void SetY1NDC(Double_t y1)
virtual void SetY2NDC(Double_t y2)
virtual void SetX1NDC(Double_t x1)
virtual void SetX2NDC(Double_t x2)
static TString Format(const char *fmt,...)
static TString Itoa(Int_t value, Int_t base)
virtual void SetText(Double_t x, Double_t y, const char *text)
virtual void SetNDC(Bool_t isNDC=kTRUE)
virtual TBranch * GetBranch(const char *name)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=nullptr)
void DrawStripHits(TCanvas *c, TH1F *h, BmnVSPLayer &layer)
void ShowReadoutPlane(BmnVSPModule *module, Int_t imodule, Int_t istation)
void ShowSignalInLayer(BmnVSPModule *module, BmnVSPLayer &layer, Int_t ilayer, Int_t imodule, Int_t istation)
void LoadDataFromMCPoints(BmnVSPStationSet *station_set, BmnVSPTransform *transf_set, Int_t event_num)
void DrawMCMatches(TCanvas *c, TH1F *h, Int_t strip_num, BmnVSPLayer &layer)
void PaintBin(TCanvas *c, TH1F *h, Int_t bin, Double_t bin_height, Int_t fcolor, Int_t bcolor)
void LoadDataFromDigits(BmnVSPStationSet *station_set, BmnVSPTransform *transf_set, Int_t event_num)
void ShowStripNumbersOfClustersInModule(BmnVSPModule *module, Int_t layer_type, Int_t module_num, Int_t station_num)
void DrawMCStripLines(TCanvas *c, TH1F *h, BmnVSPModule *module, Int_t layer_num)
void VSPClusterAnalyser()
void ShowStripNumbersOfClustersInModule_FromBranches(Int_t event_num, Int_t module_num, Int_t station_num)
constexpr Double_t PiOver2()
Double_t Tan(Double_t)
Definition json.hpp:4446