Geant4-11
G4H2ToolsManager.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26
27// Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
28
29#include "G4H2ToolsManager.hh"
33
34#include "tools/histo/h2d"
35
36#include <fstream>
37
38using namespace G4Analysis;
39using std::to_string;
40
41//_____________________________________________________________________________
43 : G4VH2Manager(),
44 G4THnManager<tools::histo::h2d>(state, "H2")
45{}
46
47//
48// Utility functions
49//
50
51namespace {
52
53//_____________________________________________________________________________
55 const G4String& xunitName,
56 const G4String& yunitName,
57 const G4String& xfcnName,
58 const G4String& yfcnName,
59 G4BinScheme xbinScheme,
60 G4BinScheme ybinScheme)
61{
62 hnInformation->SetDimension(kX, xunitName, xfcnName, xbinScheme);
63 hnInformation->SetDimension(kY, yunitName, yfcnName, ybinScheme);
64}
65
66//_____________________________________________________________________________
67void AddH2Annotation(tools::histo::h2d* h2d,
68 const G4String& xunitName,
69 const G4String& yunitName,
70 const G4String& xfcnName,
71 const G4String& yfcnName)
72{
73 G4String xaxisTitle;
74 G4String yaxisTitle;
75 UpdateTitle(xaxisTitle, xunitName, xfcnName);
76 UpdateTitle(yaxisTitle, yunitName, yfcnName);
77 h2d->add_annotation(tools::histo::key_axis_x_title(), xaxisTitle);
78 h2d->add_annotation(tools::histo::key_axis_y_title(), yaxisTitle);
79}
80
81//_____________________________________________________________________________
82tools::histo::h2d* CreateToolsH2(
83 const G4String& title,
84 G4int nxbins, G4double xmin, G4double xmax,
85 G4int nybins, G4double ymin, G4double ymax,
86 const G4String& xunitName,
87 const G4String& yunitName,
88 const G4String& xfcnName,
89 const G4String& yfcnName,
90 const G4String& xbinSchemeName,
91 const G4String& ybinSchemeName,
92 std::string_view className)
93
94{
95 auto xunit = GetUnitValue(xunitName);
96 auto yunit = GetUnitValue(yunitName);
97 auto xfcn = GetFunction(xfcnName);
98 auto yfcn = GetFunction(yfcnName);
99 auto xbinScheme = GetBinScheme(xbinSchemeName);
100 auto ybinScheme = GetBinScheme(ybinSchemeName);
101
102 if ( xbinScheme != G4BinScheme::kLog && ybinScheme != G4BinScheme::kLog) {
103 if ( xbinScheme == G4BinScheme::kUser || ybinScheme == G4BinScheme::kUser) {
104 // This should never happen, but let's make sure about it
105 // by issuing a warning
106 Warn("User binning scheme setting was ignored.\n"
107 "Linear binning will be applied with given (nbins, xmin, xmax) values.",
108 className, "CreateToolsH2");
109 }
110 return new tools::histo::h2d(title,
111 nxbins, xfcn(xmin/xunit), xfcn(xmax/xunit),
112 nybins, yfcn(ymin/yunit), yfcn(ymax/yunit));
113 // h2 objects are deleted in destructor and reset when
114 // closing a file.
115 }
116 else {
117 // Compute edges
118 std::vector<G4double> xedges;
119 ComputeEdges(nxbins, xmin, xmax, xunit, xfcn, xbinScheme, xedges);
120 std::vector<G4double> yedges;
121 ComputeEdges(nybins, ymin, ymax, yunit, yfcn, ybinScheme, yedges);
122 return new tools::histo::h2d(title, xedges, yedges);
123 }
124}
125
126//_____________________________________________________________________________
127tools::histo::h2d* CreateToolsH2(
128 const G4String& title,
129 const std::vector<G4double>& xedges,
130 const std::vector<G4double>& yedges,
131 const G4String& xunitName,
132 const G4String& yunitName,
133 const G4String& xfcnName,
134 const G4String& yfcnName)
135{
136 auto xunit = GetUnitValue(xunitName);
137 auto yunit = GetUnitValue(yunitName);
138 auto xfcn = GetFunction(xfcnName);
139 auto yfcn = GetFunction(yfcnName);
140
141 // Apply function
142 std::vector<G4double> xnewEdges;
143 ComputeEdges(xedges, xunit, xfcn, xnewEdges);
144 std::vector<G4double> ynewEdges;
145 ComputeEdges(yedges, yunit, yfcn, ynewEdges);
146
147 return new tools::histo::h2d(title, xnewEdges, ynewEdges);
148 // h2 objects are deleted in destructor and reset when
149 // closing a file.
150}
151
152//_____________________________________________________________________________
153void ConfigureToolsH2(tools::histo::h2d* h2d,
154 G4int nxbins, G4double xmin, G4double xmax,
155 G4int nybins, G4double ymin, G4double ymax,
156 const G4String& xunitName,
157 const G4String& yunitName,
158 const G4String& xfcnName,
159 const G4String& yfcnName,
160 const G4String& xbinSchemeName,
161 const G4String& ybinSchemeName,
162 std::string_view className)
163{
164 auto xunit = GetUnitValue(xunitName);
165 auto yunit = GetUnitValue(yunitName);
166 auto xfcn = GetFunction(xfcnName);
167 auto yfcn = GetFunction(yfcnName);
168 auto xbinScheme = GetBinScheme(xbinSchemeName);
169 auto ybinScheme = GetBinScheme(ybinSchemeName);
170
171 if ( xbinScheme != G4BinScheme::kLog && ybinScheme != G4BinScheme::kLog) {
172 if ( xbinScheme == G4BinScheme::kUser || ybinScheme == G4BinScheme::kUser) {
173 // This should never happen, but let's make sure about it
174 // by issuing a warning
175 Warn("User binning scheme setting was ignored.\n"
176 "Linear binning will be applied with given (nbins, xmin, xmax) values.",
177 className, "ConfigureToolsH2");
178 }
179 h2d->configure(nxbins, xfcn(xmin/xunit), xfcn(xmax/xunit),
180 nybins, yfcn(ymin/yunit), yfcn(ymax/yunit));
181 }
182 else {
183 // Compute bins
184 std::vector<G4double> xedges;
185 ComputeEdges(nxbins, xmin, xmax, xunit, xfcn, xbinScheme, xedges);
186 std::vector<G4double> yedges;
187 ComputeEdges(nybins, ymin, ymax, yunit, yfcn, ybinScheme, yedges);
188 h2d->configure(xedges, yedges);
189 }
190}
191
192//_____________________________________________________________________________
193void ConfigureToolsH2(tools::histo::h2d* h2d,
194 const std::vector<G4double>& xedges,
195 const std::vector<G4double>& yedges,
196 const G4String& xunitName,
197 const G4String& yunitName,
198 const G4String& xfcnName,
199 const G4String& yfcnName)
200{
201 auto xunit = GetUnitValue(xunitName);
202 auto xfcn = GetFunction(xfcnName);
203 std::vector<G4double> xnewEdges;
204 ComputeEdges(xedges, xunit, xfcn, xnewEdges);
205
206 auto yunit = GetUnitValue(yunitName);
207 auto yfcn = GetFunction(yfcnName);
208 std::vector<G4double> ynewEdges;
209 ComputeEdges(yedges, yunit, yfcn, ynewEdges);
210
211 h2d->configure(xnewEdges, ynewEdges);
212}
213
214}
215
216
217//
218// private methods
219//
220
221//_____________________________________________________________________________
223 const G4String& xunitName,
224 const G4String& yunitName,
225 const G4String& xfcnName,
226 const G4String& yfcnName,
227 G4BinScheme xbinScheme,
228 G4BinScheme ybinScheme) const
229{
230 auto hnInformation = fHnManager->AddHnInformation(name, fkDimension);
231 hnInformation->AddDimension(xunitName, xfcnName, xbinScheme);
232 hnInformation->AddDimension(yunitName, yfcnName, ybinScheme);
233}
234
235//
236// protected methods
237//
238
239//_____________________________________________________________________________
241 G4int nxbins, G4double xmin, G4double xmax,
242 G4int nybins, G4double ymin, G4double ymax,
243 const G4String& xunitName, const G4String& yunitName,
244 const G4String& xfcnName, const G4String& yfcnName,
245 const G4String& xbinSchemeName,
246 const G4String& ybinSchemeName)
247
248{
249 Message(kVL4, "create", "H2", name);
250
251 tools::histo::h2d* h2d
252 = CreateToolsH2(title, nxbins, xmin, xmax, nybins, ymin, ymax,
253 xunitName, yunitName, xfcnName, yfcnName,
254 xbinSchemeName, ybinSchemeName, fkClass);
255
256 // Add annotation
257 AddH2Annotation(h2d, xunitName, yunitName, xfcnName, yfcnName);
258
259 // Save H2 information
260 auto xbinScheme = GetBinScheme(xbinSchemeName);
261 auto ybinScheme = GetBinScheme(ybinSchemeName);
263 name, xunitName, yunitName, xfcnName, yfcnName, xbinScheme, ybinScheme);
264
265 // Register histogram
266 G4int id = RegisterT(h2d, name);
267
268 Message(kVL2, "create", "H2", name);
269
270 return id;
271}
272
273//_____________________________________________________________________________
275 const std::vector<G4double>& xedges,
276 const std::vector<G4double>& yedges,
277 const G4String& xunitName, const G4String& yunitName,
278 const G4String& xfcnName, const G4String& yfcnName)
279
280{
281 Message(kVL4, "create", "H2", name);
282
283 tools::histo::h2d* h2d
284 = CreateToolsH2(title, xedges, yedges,
285 xunitName, yunitName, xfcnName, yfcnName);
286
287 // Add annotation
288 AddH2Annotation(h2d, xunitName, yunitName, xfcnName, yfcnName);
289
290 // Save H2 information
292 name, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser, G4BinScheme::kUser);
293
294 // Register histogram
295 G4int id = RegisterT(h2d, name);
296
297 Message(kVL2, "create", "H2", name);
298
299 return id;
300}
301
302//_____________________________________________________________________________
304 G4int nxbins, G4double xmin, G4double xmax,
305 G4int nybins, G4double ymin, G4double ymax,
306 const G4String& xunitName, const G4String& yunitName,
307 const G4String& xfcnName, const G4String& yfcnName,
308 const G4String& xbinSchemeName,
309 const G4String& ybinSchemeName)
310{
311 auto h2d = GetTInFunction(id, "SetH2", false, false);
312 if ( ! h2d ) return false;
313
314 auto info = fHnManager->GetHnInformation(id, "SetH2");
315
316 Message(kVL4, "configure", "H2", info->GetName());
317
318 // Configure tools h2
320 h2d, nxbins, xmin, xmax, nybins, ymin, ymax,
321 xunitName, yunitName, xfcnName, yfcnName, xbinSchemeName, ybinSchemeName,
322 fkClass);
323
324 // Add annotation
325 AddH2Annotation(h2d, xunitName, yunitName, xfcnName, yfcnName);
326
327 // Update information
328 auto xbinScheme = GetBinScheme(xbinSchemeName);
329 auto ybinScheme = GetBinScheme(ybinSchemeName);
331 info, xunitName, yunitName, xfcnName, yfcnName, xbinScheme, ybinScheme);
332
333 // Set activation
334 fHnManager->SetActivation(id, true);
335
336 return true;
337}
338
339//_____________________________________________________________________________
341 const std::vector<G4double>& xedges,
342 const std::vector<G4double>& yedges,
343 const G4String& xunitName, const G4String& yunitName,
344 const G4String& xfcnName, const G4String& yfcnName)
345{
346 auto h2d = GetTInFunction(id, "SetH2", false, false);
347 if ( ! h2d ) return false;
348
349 auto info = fHnManager->GetHnInformation(id, "SetH2");
350
351 Message(kVL4, "configure", "H2", info->GetName());
352
353 // Configure tools h2
354 ConfigureToolsH2(h2d, xedges, yedges, xunitName, yunitName, xfcnName, yfcnName);
355
356 // Add annotation
357 AddH2Annotation(h2d, xunitName, yunitName, xfcnName, yfcnName);
358
359 // Update information
361 info, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser, G4BinScheme::kUser);
362
363 // Set activation
364 fHnManager->SetActivation(id, true);
365
366 return true;
367}
368
369//_____________________________________________________________________________
371{
372 auto h2d = GetTInFunction(id, "ScaleH2", false, false);
373 if ( ! h2d ) return false;
374
375 return h2d->scale(factor);
376}
377
378//_____________________________________________________________________________
380 G4double xvalue, G4double yvalue,
381 G4double weight)
382{
383 auto h2d = GetTInFunction(id, "FillH2", true, false);
384 if ( ! h2d ) return false;
385
386 if ( fState.GetIsActivation() && ( ! fHnManager->GetActivation(id) ) ) {
387 return false;
388 }
389
391 = fHnManager->GetHnDimensionInformation(id, kX, "FillH2");
393 = fHnManager->GetHnDimensionInformation(id, kY, "FillH2");
394
395 h2d->fill(xInfo->fFcn(xvalue/xInfo->fUnit),
396 yInfo->fFcn(yvalue/yInfo->fUnit), weight);
397
398 if ( IsVerbose(kVL4) ) {
399 Message(kVL4, "fill", "H2",
400 " id " + to_string(id) +
401 " xvalue " + to_string(xvalue) +
402 " xfcn(xvalue/xunit) " + to_string(xInfo->fFcn(xvalue/xInfo->fUnit)) +
403 " yvalue " + to_string(yvalue) +
404 " yfcn(yvalue/yunit) " + to_string(yInfo->fFcn(yvalue/yInfo->fUnit)) +
405 " weight " + to_string(weight));
406 }
407
408 return true;
409}
410
411//_____________________________________________________________________________
413{
414 return GetTId(name, warn);
415}
416
417//_____________________________________________________________________________
419{
420 auto h2d = GetTInFunction(id, "GetH2NXbins");
421 if ( ! h2d ) return 0;
422
423 return GetNbins(*h2d, kX);
424}
425
426//_____________________________________________________________________________
428{
429// Returns xmin value with applied unit and histogram function
430
431 auto h2d = GetTInFunction(id, "GetH2Xmin");
432 if ( ! h2d ) return 0.;
433
434 return GetMin(*h2d, kX);
435}
436
437//_____________________________________________________________________________
439{
440 auto h2d = GetTInFunction(id, "GetH2Xmax");
441 if ( ! h2d ) return 0.;
442
443 return GetMax(*h2d, kX);
444}
445
446//_____________________________________________________________________________
448{
449 auto h2d = GetTInFunction(id, "GetH2XWidth", true, false);
450 if ( ! h2d ) return 0.;
451
452 return GetWidth(*h2d, kX, fHnManager->GetHnType());
453}
454
455//_____________________________________________________________________________
457{
458 auto h2d = GetTInFunction(id, "GetH2NYbins");
459 if ( ! h2d ) return 0;
460
461 return GetNbins(*h2d, kY);
462}
463
464//_____________________________________________________________________________
466{
467// Returns xmin value with applied unit and histogram function
468
469 auto h2d = GetTInFunction(id, "GetH2Ymin");
470 if ( ! h2d ) return 0.;
471
472 return GetMin(*h2d, kY);
473}
474
475//_____________________________________________________________________________
477{
478 auto h2d = GetTInFunction(id, "GetH2Ymax");
479 if ( ! h2d ) return 0.;
480
481 return GetMax(*h2d, kY);
482}
483
484//_____________________________________________________________________________
486{
487 auto h2d = GetTInFunction(id, "GetH2YWidth", true, false);
488 if ( ! h2d ) return 0.;
489
490 return GetWidth(*h2d, kY, fHnManager->GetHnType());
491}
492
493//_____________________________________________________________________________
495{
496 auto h2d = GetTInFunction(id, "SetH2Title");
497 if ( ! h2d ) return false;
498
499 return SetTitle(*h2d, title);
500}
501
502//_____________________________________________________________________________
504{
505 auto h2d = GetTInFunction(id, "SetH2XAxisTitle");
506 if ( ! h2d ) return false;
507
508 return SetAxisTitle(*h2d, kX, title);
509}
510
511//_____________________________________________________________________________
513{
514 auto h2d = GetTInFunction(id, "SetH2YAxisTitle");
515 if ( ! h2d ) return false;
516
517 return SetAxisTitle(*h2d, kY, title);
518}
519
520//_____________________________________________________________________________
522{
523 auto h2d = GetTInFunction(id, "SetH2ZAxisTitle");
524 if ( ! h2d ) return false;
525
526 return SetAxisTitle(*h2d, kZ, title);
527}
528
529//_____________________________________________________________________________
531{
532 auto h2d = GetTInFunction(id, "GetH2Title");
533 if ( ! h2d ) return "";
534
535 return GetTitle(*h2d);
536}
537
538//_____________________________________________________________________________
540{
541 auto h2d = GetTInFunction(id, "GetH2XAxisTitle");
542 if ( ! h2d ) return "";
543
544 return GetAxisTitle(*h2d, kX, fHnManager->GetHnType());
545}
546
547//_____________________________________________________________________________
549{
550 auto h2d = GetTInFunction(id, "GetH2YAxisTitle");
551 if ( ! h2d ) return "";
552
553 return GetAxisTitle(*h2d, kY, fHnManager->GetHnType());
554}
555
556//_____________________________________________________________________________
558{
559 auto h2d = GetTInFunction(id, "GetH2ZAxisTitle");
560 if ( ! h2d ) return "";
561
562 return GetAxisTitle(*h2d, kZ, fHnManager->GetHnType());
563}
564
565//_____________________________________________________________________________
567{
568// Write selected objects on ASCII file
569
570 // Do nothing if no histograms are selected
571 if ( ! fHnManager->IsAscii() ) return true;
572
573 // Write h2 histograms
574 for ( G4int i=0; i<G4int(fTVector.size()); ++i ) {
575 auto id = i + fHnManager->GetFirstId();
576 auto info = fHnManager->GetHnInformation(id,"WriteOnAscii");
577 // skip writing if activation is enabled and H1 is inactivated
578 if ( ! info->GetAscii() ) continue;
579 auto h2 = fTVector[i];
580
581 Message(kVL3, "write on ascii", "h2d", info->GetName());
582
583 output << "\n 2D histogram " << id << ": " << h2->title()
584 << "\n \n \t \t X \t\t Y \t\t Bin Height" << G4endl;
585
586 for (G4int j=0; j< G4int(h2->axis_x().bins()); ++j) {
587 for (G4int k=0; k< G4int(h2->axis_y().bins()); ++k) {
588 output << " " << j << "\t" << k << "\t"
589 << h2->axis_x().bin_center(j) << "\t"
590 << h2->axis_y().bin_center(k) << "\t"
591 << h2->bin_height(j, k) << G4endl;
592 }
593 }
594 }
595
596 return output.good();
597}
598
599//
600// public methods
601//
602
603//_____________________________________________________________________________
604G4int G4H2ToolsManager::AddH2(const G4String& name, tools::histo::h2d* h2d)
605{
606 Message(kVL4, "add", "H2", name);
607
608 // Add annotation
609 AddH2Annotation(h2d, "none", "none", "none", "none");
610 // Add information
611 AddH2Information(name, "none", "none", "none", "none",
613
614 // Register histogram
615 G4int id = RegisterT(h2d, name);
616
617 Message(kVL2, "add", "H2", name);
618
619 return id;
620}
621
622//_____________________________________________________________________________
624 const std::vector<tools::histo::h2d*>& h2Vector)
625{
626 AddTVector(h2Vector);
627}
628//_____________________________________________________________________________
629tools::histo::h2d* G4H2ToolsManager::GetH2(G4int id, G4bool warn,
630 G4bool onlyIfActive) const
631{
632 return GetTInFunction(id, "GetH2", warn, onlyIfActive);
633}
634
G4BinScheme
Definition: G4BinScheme.hh:39
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
static char className[]
Definition: G4Win32.cc:36
#define G4endl
Definition: G4ios.hh:57
virtual G4bool SetH2Title(G4int id, const G4String &title) final
virtual G4int CreateH2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear") final
virtual G4double GetH2XWidth(G4int id) const final
virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0) final
virtual G4double GetH2Ymin(G4int id) const final
void AddH2Information(const G4String &name, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme, G4BinScheme ybinScheme) const
G4H2ToolsManager(const G4AnalysisManagerState &state)
virtual G4bool WriteOnAscii(std::ofstream &output) final
virtual G4bool SetH2ZAxisTitle(G4int id, const G4String &title) final
virtual G4int GetH2Nybins(G4int id) const final
virtual G4bool ScaleH2(G4int id, G4double factor) final
static constexpr std::string_view fkClass
static constexpr G4int fkDimension
virtual G4double GetH2Xmax(G4int id) const final
virtual G4int GetH2Nxbins(G4int id) const final
virtual G4int GetH2Id(const G4String &name, G4bool warn=true) const final
virtual G4String GetH2ZAxisTitle(G4int id) const final
virtual G4bool SetH2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear") final
G4int AddH2(const G4String &name, tools::histo::h2d *h2d)
tools::histo::h2d * GetH2(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
void AddH2Vector(const std::vector< tools::histo::h2d * > &h2Vector)
virtual G4String GetH2YAxisTitle(G4int id) const final
virtual G4double GetH2Ymax(G4int id) const final
virtual G4bool SetH2YAxisTitle(G4int id, const G4String &title) final
virtual G4double GetH2YWidth(G4int id) const final
virtual G4bool SetH2XAxisTitle(G4int id, const G4String &title) final
virtual G4String GetH2XAxisTitle(G4int id) const final
virtual G4String GetH2Title(G4int id) const final
virtual G4double GetH2Xmin(G4int id) const final
void SetDimension(G4int dimension, const G4String &unitName, const G4String &fcnName, G4BinScheme binScheme)
std::vector< tools::histo::h2d * > fTVector
tools::histo::h2d * GetTInFunction(G4int id, std::string_view functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4AnalysisManagerState & fState
G4int GetTId(const G4String &name, G4bool warn=true) const
G4int RegisterT(tools::histo::h2d *t, const G4String &name)
void AddTVector(const std::vector< tools::histo::h2d * > &tVector)
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
std::shared_ptr< G4HnManager > fHnManager
G4bool IsVerbose(G4int verboseLevel) const
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)
constexpr G4int kVL2
G4double GetUnitValue(const G4String &unit)
constexpr G4int kVL3
void ComputeEdges(G4int nbins, G4double xmin, G4double xmax, G4double unit, G4Fcn fcn, G4BinScheme, std::vector< G4double > &edges)
Definition: G4BinScheme.cc:53
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
constexpr G4int kVL4
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
void UpdateTitle(G4String &title, const G4String &unitName, const G4String &fcnName)
constexpr G4int kX
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)
G4Fcn GetFunction(const G4String &fcnName)
Definition: G4Fcn.cc:36
constexpr G4int kZ
constexpr G4int kY
const char * name(G4int ptype)
void ConfigureToolsH2(tools::histo::h2d *h2d, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName)
void AddH2Annotation(tools::histo::h2d *h2d, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName)
void UpdateH2Information(G4HnInformation *hnInformation, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme, G4BinScheme ybinScheme)
tools::histo::h2d * CreateToolsH2(const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName)