Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4H3ToolsManager Class Reference

#include <G4H3ToolsManager.hh>

+ Inheritance diagram for G4H3ToolsManager:

Public Member Functions

 G4H3ToolsManager (const G4AnalysisManagerState &state)
 
virtual ~G4H3ToolsManager ()
 
G4int AddH3 (const G4String &name, tools::histo::h3d *h3d)
 
void AddH3Vector (const std::vector< tools::histo::h3d * > &h3Vector)
 
tools::histo::h3d * GetH3 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
std::vector< tools::histo::h3d * >::iterator BeginH3 ()
 
std::vector< tools::histo::h3d * >::iterator EndH3 ()
 
std::vector< tools::histo::h3d * >::const_iterator BeginConstH3 () const
 
std::vector< tools::histo::h3d * >::const_iterator EndConstH3 () const
 
const std::vector< tools::histo::h3d * > & GetH3Vector () const
 
const std::vector< G4HnInformation * > & GetHnVector () const
 
- Public Member Functions inherited from G4VH3Manager
 G4VH3Manager ()
 
virtual ~G4VH3Manager ()
 
 G4VH3Manager (const G4VH3Manager &rhs)=delete
 
G4VH3Manageroperator= (const G4VH3Manager &rhs)=delete
 
- Public Member Functions inherited from G4THnManager< tools::histo::h3d >
 G4THnManager (const G4AnalysisManagerState &state, const G4String &hnType)
 
virtual ~G4THnManager ()
 
G4bool Reset ()
 
G4bool IsEmpty () const
 
void AddTVector (const std::vector< tools::histo::h3d * > &tVector)
 
void Merge (G4Mutex &mergeMutex, G4THnManager< tools::histo::h3d > *masterInstance)
 

Protected Member Functions

virtual G4int CreateH3 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear") final
 
virtual G4int CreateH3 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none") final
 
virtual G4bool SetH3 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear") final
 
virtual G4bool SetH3 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none") final
 
virtual G4bool ScaleH3 (G4int id, G4double factor) final
 
virtual G4bool FillH3 (G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0) final
 
virtual G4int GetH3Id (const G4String &name, G4bool warn=true) const final
 
virtual G4int GetH3Nxbins (G4int id) const final
 
virtual G4double GetH3Xmin (G4int id) const final
 
virtual G4double GetH3Xmax (G4int id) const final
 
virtual G4double GetH3XWidth (G4int id) const final
 
virtual G4int GetH3Nybins (G4int id) const final
 
virtual G4double GetH3Ymin (G4int id) const final
 
virtual G4double GetH3Ymax (G4int id) const final
 
virtual G4double GetH3YWidth (G4int id) const final
 
virtual G4int GetH3Nzbins (G4int id) const final
 
virtual G4double GetH3Zmin (G4int id) const final
 
virtual G4double GetH3Zmax (G4int id) const final
 
virtual G4double GetH3ZWidth (G4int id) const final
 
virtual G4bool SetH3Title (G4int id, const G4String &title) final
 
virtual G4bool SetH3XAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetH3YAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetH3ZAxisTitle (G4int id, const G4String &title) final
 
virtual G4String GetH3Title (G4int id) const final
 
virtual G4String GetH3XAxisTitle (G4int id) const final
 
virtual G4String GetH3YAxisTitle (G4int id) const final
 
virtual G4String GetH3ZAxisTitle (G4int id) const final
 
virtual G4bool WriteOnAscii (std::ofstream &output) final
 
virtual std::shared_ptr< G4HnManagerGetHnManager () final
 
virtual G4int CreateH3 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
 
virtual G4int CreateH3 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")=0
 
virtual G4bool SetH3 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
 
virtual G4bool SetH3 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")=0
 
virtual G4bool ScaleH3 (G4int id, G4double factor)=0
 
virtual G4bool FillH3 (G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)=0
 
virtual G4int GetH3Id (const G4String &name, G4bool warn=true) const =0
 
virtual G4int GetH3Nxbins (G4int id) const =0
 
virtual G4double GetH3Xmin (G4int id) const =0
 
virtual G4double GetH3Xmax (G4int id) const =0
 
virtual G4double GetH3XWidth (G4int id) const =0
 
virtual G4int GetH3Nybins (G4int id) const =0
 
virtual G4double GetH3Ymin (G4int id) const =0
 
virtual G4double GetH3Ymax (G4int id) const =0
 
virtual G4double GetH3YWidth (G4int id) const =0
 
virtual G4int GetH3Nzbins (G4int id) const =0
 
virtual G4double GetH3Zmin (G4int id) const =0
 
virtual G4double GetH3Zmax (G4int id) const =0
 
virtual G4double GetH3ZWidth (G4int id) const =0
 
virtual G4bool SetH3Title (G4int id, const G4String &title)=0
 
virtual G4bool SetH3XAxisTitle (G4int id, const G4String &title)=0
 
virtual G4bool SetH3YAxisTitle (G4int id, const G4String &title)=0
 
virtual G4bool SetH3ZAxisTitle (G4int id, const G4String &title)=0
 
virtual G4String GetH3Title (G4int id) const =0
 
virtual G4String GetH3XAxisTitle (G4int id) const =0
 
virtual G4String GetH3YAxisTitle (G4int id) const =0
 
virtual G4String GetH3ZAxisTitle (G4int id) const =0
 
virtual G4bool WriteOnAscii (std::ofstream &output)=0
 
virtual std::shared_ptr< G4HnManagerGetHnManager ()=0
 
- Protected Member Functions inherited from G4THnManager< tools::histo::h3d >
std::vector< tools::histo::h3d * >::iterator BeginT ()
 
std::vector< tools::histo::h3d * >::iterator EndT ()
 
std::vector< tools::histo::h3d * >::const_iterator BeginConstT () const
 
std::vector< tools::histo::h3d * >::const_iterator EndConstT () const
 
tools::histo::h3d * GetTInFunction (G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
 
G4int RegisterT (tools::histo::h3d *t, const G4String &name)
 
G4int GetTId (const G4String &name, G4bool warn=true) const
 

Additional Inherited Members

- Protected Attributes inherited from G4THnManager< tools::histo::h3d >
const G4AnalysisManagerStatefState
 
std::vector< tools::histo::h3d * > fTVector
 
std::map< G4String, G4intfNameIdMap
 
std::shared_ptr< G4HnManagerfHnManager
 

Detailed Description

Definition at line 52 of file G4H3ToolsManager.hh.

Constructor & Destructor Documentation

◆ G4H3ToolsManager()

G4H3ToolsManager::G4H3ToolsManager ( const G4AnalysisManagerState state)
explicit

Definition at line 44 of file G4H3ToolsManager.cc.

◆ ~G4H3ToolsManager()

G4H3ToolsManager::~G4H3ToolsManager ( )
virtual

Definition at line 50 of file G4H3ToolsManager.cc.

51{}

Member Function Documentation

◆ AddH3()

G4int G4H3ToolsManager::AddH3 ( const G4String name,
tools::histo::h3d *  h3d 
)

Definition at line 723 of file G4H3ToolsManager.cc.

724{
725#ifdef G4VERBOSE
726 if ( fState.GetVerboseL4() )
727 fState.GetVerboseL4()->Message("add", "H3", name);
728#endif
729
730 // Add annotation
731 AddH3Annotation(h3d, "none", "none", "none", "none", "none", "none");
732 // Add information
733 AddH3Information(name, "none", "none", "none", "none", "none", "none",
734 G4BinScheme::kLinear, G4BinScheme::kLinear, G4BinScheme::kLinear);
735
736 // Register histogram
737 G4int id = RegisterT(h3d, name);
738
739#ifdef G4VERBOSE
740 if ( fState.GetVerboseL2() )
741 fState.GetVerboseL2()->Message("add", "H3", name);
742#endif
743 return id;
744}
int G4int
Definition: G4Types.hh:85
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:82
G4int RegisterT(tools::histo::h3d *t, const G4String &name)

Referenced by G4XmlAnalysisReader::ReadH3Impl(), G4CsvAnalysisReader::ReadH3Impl(), G4Hdf5AnalysisReader::ReadH3Impl(), and G4RootAnalysisReader::ReadH3Impl().

◆ AddH3Vector()

void G4H3ToolsManager::AddH3Vector ( const std::vector< tools::histo::h3d * > &  h3Vector)

Definition at line 747 of file G4H3ToolsManager.cc.

749{
750 AddTVector(h3Vector);
751}
void AddTVector(const std::vector< tools::histo::h3d * > &tVector)

◆ BeginConstH3()

std::vector< tools::histo::h3d * >::const_iterator G4H3ToolsManager::BeginConstH3 ( ) const
inline

Definition at line 206 of file G4H3ToolsManager.hh.

207{ return BeginConstT(); }
std::vector< tools::histo::h3d * >::const_iterator BeginConstT() const

◆ BeginH3()

std::vector< tools::histo::h3d * >::iterator G4H3ToolsManager::BeginH3 ( )
inline

Definition at line 199 of file G4H3ToolsManager.hh.

200{ return BeginT(); }
std::vector< tools::histo::h3d * >::iterator BeginT()

◆ CreateH3() [1/2]

G4int G4H3ToolsManager::CreateH3 ( const G4String name,
const G4String title,
const std::vector< G4double > &  xedges,
const std::vector< G4double > &  yedges,
const std::vector< G4double > &  zedges,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String zunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String zfcnName = "none" 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 345 of file G4H3ToolsManager.cc.

354{
355#ifdef G4VERBOSE
356 if ( fState.GetVerboseL4() )
357 fState.GetVerboseL4()->Message("create", "H3", name);
358#endif
359 tools::histo::h3d* h3d
360 = CreateToolsH3(title, xedges, yedges, zedges,
361 xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
362
363 // Add annotation
364 AddH3Annotation(h3d, xunitName, yunitName, zunitName,
365 xfcnName, yfcnName, zfcnName);
366
367 // Save H3 information
368 AddH3Information(
369 name, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
370 G4BinScheme::kUser, G4BinScheme::kUser, G4BinScheme::kUser);
371
372 // Register histogram
373 G4int id = RegisterT(h3d, name);
374
375#ifdef G4VERBOSE
376 if ( fState.GetVerboseL2() )
377 fState.GetVerboseL2()->Message("create", "H3", name);
378#endif
379
380 return id;
381}

◆ CreateH3() [2/2]

G4int G4H3ToolsManager::CreateH3 ( const G4String name,
const G4String title,
G4int  nxbins,
G4double  xmin,
G4double  xmax,
G4int  nybins,
G4double  ymin,
G4double  ymax,
G4int  nzbins,
G4double  zmin,
G4double  zmax,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String zunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String zfcnName = "none",
const G4String xbinScheme = "linear",
const G4String ybinScheme = "linear",
const G4String zbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 297 of file G4H3ToolsManager.cc.

309{
310#ifdef G4VERBOSE
311 if ( fState.GetVerboseL4() )
312 fState.GetVerboseL4()->Message("create", "H3", name);
313#endif
314 tools::histo::h3d* h3d
315 = CreateToolsH3(title,
316 nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax,
317 xunitName, yunitName, zunitName,
318 xfcnName, yfcnName, zfcnName,
319 xbinSchemeName, ybinSchemeName, zbinSchemeName);
320
321 // Add annotation
322 AddH3Annotation(h3d, xunitName, yunitName, zunitName,
323 xfcnName, yfcnName, zfcnName);
324
325 // Save H3 information
326 auto xbinScheme = GetBinScheme(xbinSchemeName);
327 auto ybinScheme = GetBinScheme(ybinSchemeName);
328 auto zbinScheme = GetBinScheme(zbinSchemeName);
329 AddH3Information(
330 name, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
331 xbinScheme, ybinScheme, zbinScheme);
332
333 // Register histogram
334 G4int id = RegisterT(h3d, name);
335
336#ifdef G4VERBOSE
337 if ( fState.GetVerboseL2() )
338 fState.GetVerboseL2()->Message("create", "H3", name);
339#endif
340
341 return id;
342}
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:35

◆ EndConstH3()

std::vector< tools::histo::h3d * >::const_iterator G4H3ToolsManager::EndConstH3 ( ) const
inline

Definition at line 210 of file G4H3ToolsManager.hh.

211{ return EndConstT(); }
std::vector< tools::histo::h3d * >::const_iterator EndConstT() const

◆ EndH3()

std::vector< tools::histo::h3d * >::iterator G4H3ToolsManager::EndH3 ( )
inline

Definition at line 202 of file G4H3ToolsManager.hh.

203{ return EndT(); }
std::vector< tools::histo::h3d * >::iterator EndT()

◆ FillH3()

G4bool G4H3ToolsManager::FillH3 ( G4int  id,
G4double  xvalue,
G4double  yvalue,
G4double  zvalue,
G4double  weight = 1.0 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 477 of file G4H3ToolsManager.cc.

480{
481 auto h3d = GetTInFunction(id, "FillH3", true, false);
482 if ( ! h3d ) return false;
483
484 if ( fState.GetIsActivation() && ( ! fHnManager->GetActivation(id) ) ) {
485 return false;
486 }
487
489 = fHnManager->GetHnDimensionInformation(id, kX, "FillH3");
491 = fHnManager->GetHnDimensionInformation(id, kY, "FillH3");
493 = fHnManager->GetHnDimensionInformation(id, kZ, "FillH3");
494
495 h3d->fill(xInfo->fFcn(xvalue/xInfo->fUnit),
496 yInfo->fFcn(yvalue/yInfo->fUnit),
497 zInfo->fFcn(zvalue/zInfo->fUnit), weight);
498#ifdef G4VERBOSE
499 if ( fState.GetVerboseL4() ) {
500 G4ExceptionDescription description;
501 description << " id " << id
502 << " xvalue " << xvalue
503 << " xfcn(xvalue/xunit) " << xInfo->fFcn(xvalue/xInfo->fUnit)
504 << " yvalue " << yvalue
505 << " yfcn(yvalue/yunit) " << yInfo->fFcn(yvalue/yInfo->fUnit)
506 << " zvalue " << zvalue
507 << " zfcn(zvalue/zunit) " << zInfo->fFcn(zvalue/zInfo->fUnit)
508 << " weight " << weight;
509 fState.GetVerboseL4()->Message("fill", "H3", description);
510 }
511#endif
512 return true;
513}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:85
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY
const G4int kZ
const G4int kX

◆ GetH3()

tools::histo::h3d * G4H3ToolsManager::GetH3 ( G4int  id,
G4bool  warn = true,
G4bool  onlyIfActive = true 
) const

Definition at line 754 of file G4H3ToolsManager.cc.

756{
757 return GetTInFunction(id, "GetH3", warn, onlyIfActive);
758}

◆ GetH3Id()

G4int G4H3ToolsManager::GetH3Id ( const G4String name,
G4bool  warn = true 
) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 516 of file G4H3ToolsManager.cc.

517{
518 return GetTId(name, warn);
519}
G4int GetTId(const G4String &name, G4bool warn=true) const

◆ GetH3Nxbins()

G4int G4H3ToolsManager::GetH3Nxbins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 522 of file G4H3ToolsManager.cc.

523{
524 auto h3d = GetTInFunction(id, "GetH3NXbins");
525 if ( ! h3d ) return 0;
526
527 return GetNbins(*h3d, kX);
528}
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)

◆ GetH3Nybins()

G4int G4H3ToolsManager::GetH3Nybins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 560 of file G4H3ToolsManager.cc.

561{
562 auto h3d = GetTInFunction(id, "GetH3NYbins");
563 if ( ! h3d ) return 0;
564
565 return GetNbins(*h3d, kY);
566}

◆ GetH3Nzbins()

G4int G4H3ToolsManager::GetH3Nzbins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 598 of file G4H3ToolsManager.cc.

599{
600 auto h3d = GetTInFunction(id, "GetH3NZbins");
601 if ( ! h3d ) return 0;
602
603 return GetNbins(*h3d, kZ);
604}

◆ GetH3Title()

G4String G4H3ToolsManager::GetH3Title ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 672 of file G4H3ToolsManager.cc.

673{
674 auto h3d = GetTInFunction(id, "GetH3Title");
675 if ( ! h3d ) return "";
676
677 return GetTitle(*h3d);
678}
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)

◆ GetH3Vector()

const std::vector< tools::histo::h3d * > & G4H3ToolsManager::GetH3Vector ( ) const
inline

Definition at line 213 of file G4H3ToolsManager.hh.

214{ return fTVector; }
std::vector< tools::histo::h3d * > fTVector
Definition: G4THnManager.hh:83

Referenced by G4ToolsAnalysisManager::MergeImpl(), and G4GenericAnalysisManager::WriteImpl().

◆ GetH3XAxisTitle()

G4String G4H3ToolsManager::GetH3XAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 681 of file G4H3ToolsManager.cc.

682{
683 auto h3d = GetTInFunction(id, "GetH3XAxisTitle");
684 if ( ! h3d ) return "";
685
686 return GetAxisTitle(*h3d, kX, fHnManager->GetHnType());
687}
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)

◆ GetH3Xmax()

G4double G4H3ToolsManager::GetH3Xmax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 542 of file G4H3ToolsManager.cc.

543{
544 auto h3d = GetTInFunction(id, "GetH3Xmax");
545 if ( ! h3d ) return 0.;
546
547 return GetMax(*h3d, kX);
548}
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)

◆ GetH3Xmin()

G4double G4H3ToolsManager::GetH3Xmin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 531 of file G4H3ToolsManager.cc.

532{
533// Returns xmin value with applied unit and histogram function
534
535 auto h3d = GetTInFunction(id, "GetH3Xmin");
536 if ( ! h3d ) return 0.;
537
538 return GetMin(*h3d, kX);
539}
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)

◆ GetH3XWidth()

G4double G4H3ToolsManager::GetH3XWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 551 of file G4H3ToolsManager.cc.

552{
553 auto h3d = GetTInFunction(id, "GetH3XWidth", true, false);
554 if ( ! h3d ) return 0.;
555
556 return GetWidth(*h3d, kX, fHnManager->GetHnType());
557}
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)

◆ GetH3YAxisTitle()

G4String G4H3ToolsManager::GetH3YAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 690 of file G4H3ToolsManager.cc.

691{
692 auto h3d = GetTInFunction(id, "GetH3YAxisTitle");
693 if ( ! h3d ) return "";
694
695 return GetAxisTitle(*h3d, kY, fHnManager->GetHnType());
696}

◆ GetH3Ymax()

G4double G4H3ToolsManager::GetH3Ymax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 580 of file G4H3ToolsManager.cc.

581{
582 auto h3d = GetTInFunction(id, "GetH3Ymax");
583 if ( ! h3d ) return 0.;
584
585 return GetMax(*h3d, kY);
586}

◆ GetH3Ymin()

G4double G4H3ToolsManager::GetH3Ymin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 569 of file G4H3ToolsManager.cc.

570{
571// Returns xmin value with applied unit and histogram function
572
573 auto h3d = GetTInFunction(id, "GetH3Ymin");
574 if ( ! h3d ) return 0.;
575
576 return GetMin(*h3d, kY);
577}

◆ GetH3YWidth()

G4double G4H3ToolsManager::GetH3YWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 589 of file G4H3ToolsManager.cc.

590{
591 auto h3d = GetTInFunction(id, "GetH3YWidth", true, false);
592 if ( ! h3d ) return 0.;
593
594 return GetWidth(*h3d, kY, fHnManager->GetHnType());
595}

◆ GetH3ZAxisTitle()

G4String G4H3ToolsManager::GetH3ZAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 699 of file G4H3ToolsManager.cc.

700{
701 auto h3d = GetTInFunction(id, "GetH3ZAxisTitle");
702 if ( ! h3d ) return "";
703
704 return GetAxisTitle(*h3d, kZ, fHnManager->GetHnType());
705}

◆ GetH3Zmax()

G4double G4H3ToolsManager::GetH3Zmax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 618 of file G4H3ToolsManager.cc.

619{
620 auto h3d = GetTInFunction(id, "GetH3Zmax");
621 if ( ! h3d ) return 0.;
622
623 return GetMax(*h3d, kZ);
624}

◆ GetH3Zmin()

G4double G4H3ToolsManager::GetH3Zmin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 607 of file G4H3ToolsManager.cc.

608{
609// Returns xmin value with applied unit and histogram function
610
611 auto h3d = GetTInFunction(id, "GetH3Zmin");
612 if ( ! h3d ) return 0.;
613
614 return GetMin(*h3d, kZ);
615}

◆ GetH3ZWidth()

G4double G4H3ToolsManager::GetH3ZWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 627 of file G4H3ToolsManager.cc.

628{
629 auto h3d = GetTInFunction(id, "GetH3ZWidth", true, false);
630 if ( ! h3d ) return 0.;
631
632 return GetWidth(*h3d, kZ, fHnManager->GetHnType());
633}

◆ GetHnManager()

std::shared_ptr< G4HnManager > G4H3ToolsManager::GetHnManager ( )
inlinefinalprotectedvirtual

Implements G4VH3Manager.

Definition at line 219 of file G4H3ToolsManager.hh.

220{ return std::shared_ptr<G4HnManager>(fHnManager); }

◆ GetHnVector()

const std::vector< G4HnInformation * > & G4H3ToolsManager::GetHnVector ( ) const
inline

Definition at line 216 of file G4H3ToolsManager.hh.

217{ return fHnManager->GetHnVector(); }

Referenced by G4ToolsAnalysisManager::MergeImpl(), and G4GenericAnalysisManager::WriteImpl().

◆ ScaleH3()

G4bool G4H3ToolsManager::ScaleH3 ( G4int  id,
G4double  factor 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 468 of file G4H3ToolsManager.cc.

469{
470 auto h3d = GetTInFunction(id, "ScaleH3", false, false);
471 if ( ! h3d ) return false;
472
473 return h3d->scale(factor);
474}

◆ SetH3() [1/2]

G4bool G4H3ToolsManager::SetH3 ( G4int  id,
const std::vector< G4double > &  xedges,
const std::vector< G4double > &  yedges,
const std::vector< G4double > &  zedges,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String zunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String zfcnName = "none" 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 430 of file G4H3ToolsManager.cc.

438{
439 auto h3d = GetTInFunction(id, "SetH3", false, false);
440 if ( ! h3d ) return false;
441
442 auto info = fHnManager->GetHnInformation(id, "SetH3");
443#ifdef G4VERBOSE
444 if ( fState.GetVerboseL4() )
445 fState.GetVerboseL4()->Message("configure", "H3", info->GetName());
446#endif
447
448 // Configure tools h3
449 ConfigureToolsH3(h3d, xedges, yedges, zedges,
450 xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
451
452 // Add annotation
453 AddH3Annotation(h3d, xunitName, yunitName, zunitName,
454 xfcnName, yfcnName, zfcnName);
455
456 // Update information
457 UpdateH3Information(
458 info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
459 G4BinScheme::kUser, G4BinScheme::kUser, G4BinScheme::kUser);
460
461 // Set activation
462 fHnManager->SetActivation(id, true);
463
464 return true;
465}

◆ SetH3() [2/2]

G4bool G4H3ToolsManager::SetH3 ( G4int  id,
G4int  nxbins,
G4double  xmin,
G4double  xmax,
G4int  nybins,
G4double  ymin,
G4double  ymax,
G4int  nzbins,
G4double  zmin,
G4double  zmax,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String zunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String zfcnName = "none",
const G4String xbinScheme = "linear",
const G4String ybinScheme = "linear",
const G4String zbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 384 of file G4H3ToolsManager.cc.

395{
396 auto h3d = GetTInFunction(id, "SetH3", false, false);
397 if ( ! h3d ) return false;
398
399 auto info = fHnManager->GetHnInformation(id, "SetH3");
400#ifdef G4VERBOSE
401 if ( fState.GetVerboseL4() )
402 fState.GetVerboseL4()->Message("configure", "H3", info->GetName());
403#endif
404
405 // Configure tools h3
406 ConfigureToolsH3(
407 h3d, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax,
408 xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
409 xbinSchemeName, ybinSchemeName, zbinSchemeName);
410
411 // Add annotation
412 AddH3Annotation(h3d, xunitName, yunitName, zunitName,
413 xfcnName, yfcnName, zfcnName);
414
415 // Update information
416 auto xbinScheme = GetBinScheme(xbinSchemeName);
417 auto ybinScheme = GetBinScheme(ybinSchemeName);
418 auto zbinScheme = GetBinScheme(zbinSchemeName);
419 UpdateH3Information(
420 info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
421 xbinScheme, ybinScheme, zbinScheme);
422
423 // Set activation
424 fHnManager->SetActivation(id, true);
425
426 return true;
427}

◆ SetH3Title()

G4bool G4H3ToolsManager::SetH3Title ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 636 of file G4H3ToolsManager.cc.

637{
638 auto h3d = GetTInFunction(id, "SetH3Title");
639 if ( ! h3d ) return false;
640
641 return SetTitle(*h3d, title);
642}
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)

◆ SetH3XAxisTitle()

G4bool G4H3ToolsManager::SetH3XAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 645 of file G4H3ToolsManager.cc.

646{
647 auto h3d = GetTInFunction(id, "SetH3XAxisTitle");
648 if ( ! h3d ) return false;
649
650 return SetAxisTitle(*h3d, kX, title);
651}
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)

◆ SetH3YAxisTitle()

G4bool G4H3ToolsManager::SetH3YAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 654 of file G4H3ToolsManager.cc.

655{
656 auto h3d = GetTInFunction(id, "SetH3YAxisTitle");
657 if ( ! h3d ) return false;
658
659 return SetAxisTitle(*h3d, kY, title);
660}

◆ SetH3ZAxisTitle()

G4bool G4H3ToolsManager::SetH3ZAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 663 of file G4H3ToolsManager.cc.

664{
665 auto h3d = GetTInFunction(id, "SetH3ZAxisTitle");
666 if ( ! h3d ) return false;
667
668 return SetAxisTitle(*h3d, kZ, title);
669}

◆ WriteOnAscii()

G4bool G4H3ToolsManager::WriteOnAscii ( std::ofstream &  output)
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 708 of file G4H3ToolsManager.cc.

709{
710// Write selected objects on ASCII file
711// According to the implementation by Michel Maire, originally in
712// extended examples.
713// Not yet available for H3
714
715 return ! fHnManager->IsAscii();
716}

The documentation for this class was generated from the following files: