Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4H3ToolsManager Class Reference

#include <G4H3ToolsManager.hh>

Inheritance diagram for G4H3ToolsManager:
Collaboration 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
 

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
< G4HnManager
GetHnManager () final
 
- Protected Member Functions inherited from G4THnManager< tools::histo::h3d >
void AddTVector (const std::vector< tools::histo::h3d * > &tVector)
 
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 53 of file G4H3ToolsManager.hh.

Constructor & Destructor Documentation

G4H3ToolsManager::G4H3ToolsManager ( const G4AnalysisManagerState state)
explicit

Definition at line 45 of file G4H3ToolsManager.cc.

G4H3ToolsManager::~G4H3ToolsManager ( )
virtual

Definition at line 51 of file G4H3ToolsManager.cc.

52 {}

Member Function Documentation

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

Definition at line 724 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 748 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

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

Definition at line 207 of file G4H3ToolsManager.hh.

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

Here is the call graph for this function:

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

Definition at line 200 of file G4H3ToolsManager.hh.

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

Here is the call graph for this function:

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 298 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

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 346 of file G4H3ToolsManager.cc.

355 {
356 #ifdef G4VERBOSE
357  if ( fState.GetVerboseL4() )
358  fState.GetVerboseL4()->Message("create", "H3", name);
359 #endif
360  tools::histo::h3d* h3d
361  = CreateToolsH3(title, xedges, yedges, zedges,
362  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
363 
364  // Add annotation
365  AddH3Annotation(h3d, xunitName, yunitName, zunitName,
366  xfcnName, yfcnName, zfcnName);
367 
368  // Save H3 information
369  AddH3Information(
370  name, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
372 
373  // Register histogram
374  G4int id = RegisterT(h3d, name);
375 
376 #ifdef G4VERBOSE
377  if ( fState.GetVerboseL2() )
378  fState.GetVerboseL2()->Message("create", "H3", name);
379 #endif
380 
381  return id;
382 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
int G4int
Definition: G4Types.hh:78
G4int RegisterT(tools::histo::h3d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const

Here is the call graph for this function:

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

Definition at line 211 of file G4H3ToolsManager.hh.

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

Here is the call graph for this function:

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

Definition at line 203 of file G4H3ToolsManager.hh.

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

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 478 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

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

Definition at line 755 of file G4H3ToolsManager.cc.

757 {
758  return GetTInFunction(id, "GetH3", warn, onlyIfActive);
759 }
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 517 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

G4int G4H3ToolsManager::GetH3Nxbins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 523 of file G4H3ToolsManager.cc.

524 {
525  auto h3d = GetTInFunction(id, "GetH3NXbins");
526  if ( ! h3d ) return 0;
527 
528  return GetNbins(*h3d, kX);
529 }
const G4int kX
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4int G4H3ToolsManager::GetH3Nybins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 561 of file G4H3ToolsManager.cc.

562 {
563  auto h3d = GetTInFunction(id, "GetH3NYbins");
564  if ( ! h3d ) return 0;
565 
566  return GetNbins(*h3d, kY);
567 }
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)
const G4int kY

Here is the call graph for this function:

G4int G4H3ToolsManager::GetH3Nzbins ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 599 of file G4H3ToolsManager.cc.

600 {
601  auto h3d = GetTInFunction(id, "GetH3NZbins");
602  if ( ! h3d ) return 0;
603 
604  return GetNbins(*h3d, kZ);
605 }
const G4int kZ
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4int GetNbins(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4String G4H3ToolsManager::GetH3Title ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 673 of file G4H3ToolsManager.cc.

674 {
675  auto h3d = GetTInFunction(id, "GetH3Title");
676  if ( ! h3d ) return "";
677 
678  return GetTitle(*h3d);
679 }
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Definition at line 214 of file G4H3ToolsManager.hh.

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

Here is the caller graph for this function:

G4String G4H3ToolsManager::GetH3XAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 682 of file G4H3ToolsManager.cc.

683 {
684  auto h3d = GetTInFunction(id, "GetH3XAxisTitle");
685  if ( ! h3d ) return "";
686 
687  return GetAxisTitle(*h3d, kX, fHnManager->GetHnType());
688 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Xmax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 543 of file G4H3ToolsManager.cc.

544 {
545  auto h3d = GetTInFunction(id, "GetH3Xmax");
546  if ( ! h3d ) return 0.;
547 
548  return GetMax(*h3d, kX);
549 }
const G4int kX
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Xmin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 532 of file G4H3ToolsManager.cc.

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

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3XWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 552 of file G4H3ToolsManager.cc.

553 {
554  auto h3d = GetTInFunction(id, "GetH3XWidth", true, false);
555  if ( ! h3d ) return 0.;
556 
557  return GetWidth(*h3d, kX, fHnManager->GetHnType());
558 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4String G4H3ToolsManager::GetH3YAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 691 of file G4H3ToolsManager.cc.

692 {
693  auto h3d = GetTInFunction(id, "GetH3YAxisTitle");
694  if ( ! h3d ) return "";
695 
696  return GetAxisTitle(*h3d, kY, fHnManager->GetHnType());
697 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Ymax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 581 of file G4H3ToolsManager.cc.

582 {
583  auto h3d = GetTInFunction(id, "GetH3Ymax");
584  if ( ! h3d ) return 0.;
585 
586  return GetMax(*h3d, kY);
587 }
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)
const G4int kY

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Ymin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 570 of file G4H3ToolsManager.cc.

571 {
572 // Returns xmin value with applied unit and histogram function
573 
574  auto h3d = GetTInFunction(id, "GetH3Ymin");
575  if ( ! h3d ) return 0.;
576 
577  return GetMin(*h3d, kY);
578 }
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3YWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 590 of file G4H3ToolsManager.cc.

591 {
592  auto h3d = GetTInFunction(id, "GetH3YWidth", true, false);
593  if ( ! h3d ) return 0.;
594 
595  return GetWidth(*h3d, kY, fHnManager->GetHnType());
596 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4String G4H3ToolsManager::GetH3ZAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 700 of file G4H3ToolsManager.cc.

701 {
702  auto h3d = GetTInFunction(id, "GetH3ZAxisTitle");
703  if ( ! h3d ) return "";
704 
705  return GetAxisTitle(*h3d, kZ, fHnManager->GetHnType());
706 }
const G4int kZ
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Zmax ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 619 of file G4H3ToolsManager.cc.

620 {
621  auto h3d = GetTInFunction(id, "GetH3Zmax");
622  if ( ! h3d ) return 0.;
623 
624  return GetMax(*h3d, kZ);
625 }
const G4int kZ
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4double GetMax(const G4ToolsBaseHisto &baseHisto, G4int dimension)

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3Zmin ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 608 of file G4H3ToolsManager.cc.

609 {
610 // Returns xmin value with applied unit and histogram function
611 
612  auto h3d = GetTInFunction(id, "GetH3Zmin");
613  if ( ! h3d ) return 0.;
614 
615  return GetMin(*h3d, kZ);
616 }
const G4int kZ
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4H3ToolsManager::GetH3ZWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VH3Manager.

Definition at line 628 of file G4H3ToolsManager.cc.

629 {
630  auto h3d = GetTInFunction(id, "GetH3ZWidth", true, false);
631  if ( ! h3d ) return 0.;
632 
633  return GetWidth(*h3d, kZ, fHnManager->GetHnType());
634 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
const G4int kZ
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 220 of file G4H3ToolsManager.hh.

221 { return std::shared_ptr<G4HnManager>(fHnManager); }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const std::vector< G4HnInformation * > & G4H3ToolsManager::GetHnVector ( ) const
inline

Definition at line 217 of file G4H3ToolsManager.hh.

218 { return fHnManager->GetHnVector(); }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83

Here is the caller graph for this function:

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

Implements G4VH3Manager.

Definition at line 469 of file G4H3ToolsManager.cc.

470 {
471  auto h3d = GetTInFunction(id, "ScaleH3", false, false);
472  if ( ! h3d ) return false;
473 
474  return h3d->scale(factor);
475 }
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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 385 of file G4H3ToolsManager.cc.

396 {
397  auto h3d = GetTInFunction(id, "SetH3", false, false);
398  if ( ! h3d ) return false;
399 
400  auto info = fHnManager->GetHnInformation(id, "SetH3");
401 #ifdef G4VERBOSE
402  if ( fState.GetVerboseL4() )
403  fState.GetVerboseL4()->Message("configure", "H3", info->GetName());
404 #endif
405 
406  // Configure tools h3
407  ConfigureToolsH3(
408  h3d, nxbins, xmin, xmax, nybins, ymin, ymax, nzbins, zmin, zmax,
409  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
410  xbinSchemeName, ybinSchemeName, zbinSchemeName);
411 
412  // Add annotation
413  AddH3Annotation(h3d, xunitName, yunitName, zunitName,
414  xfcnName, yfcnName, zfcnName);
415 
416  // Update information
417  auto xbinScheme = GetBinScheme(xbinSchemeName);
418  auto ybinScheme = GetBinScheme(ybinSchemeName);
419  auto zbinScheme = GetBinScheme(zbinSchemeName);
420  UpdateH3Information(
421  info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
422  xbinScheme, ybinScheme, zbinScheme);
423 
424  // Set activation
425  fHnManager->SetActivation(id, true);
426 
427  return true;
428 }
const XML_Char XML_Encoding * info
Definition: expat.h:530
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36

Here is the call graph for this function:

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 431 of file G4H3ToolsManager.cc.

439 {
440  auto h3d = GetTInFunction(id, "SetH3", false, false);
441  if ( ! h3d ) return false;
442 
443  auto info = fHnManager->GetHnInformation(id, "SetH3");
444 #ifdef G4VERBOSE
445  if ( fState.GetVerboseL4() )
446  fState.GetVerboseL4()->Message("configure", "H3", info->GetName());
447 #endif
448 
449  // Configure tools h3
450  ConfigureToolsH3(h3d, xedges, yedges, zedges,
451  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
452 
453  // Add annotation
454  AddH3Annotation(h3d, xunitName, yunitName, zunitName,
455  xfcnName, yfcnName, zfcnName);
456 
457  // Update information
458  UpdateH3Information(
459  info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
461 
462  // Set activation
463  fHnManager->SetActivation(id, true);
464 
465  return true;
466 }
const XML_Char XML_Encoding * info
Definition: expat.h:530
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 637 of file G4H3ToolsManager.cc.

638 {
639  auto h3d = GetTInFunction(id, "SetH3Title");
640  if ( ! h3d ) return false;
641 
642  return SetTitle(*h3d, title);
643 }
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4bool SetTitle(G4ToolsBaseHisto &baseHisto, const G4String &title)

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 646 of file G4H3ToolsManager.cc.

647 {
648  auto h3d = GetTInFunction(id, "SetH3XAxisTitle");
649  if ( ! h3d ) return false;
650 
651  return SetAxisTitle(*h3d, kX, title);
652 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
const G4int kX
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 655 of file G4H3ToolsManager.cc.

656 {
657  auto h3d = GetTInFunction(id, "SetH3YAxisTitle");
658  if ( ! h3d ) return false;
659 
660  return SetAxisTitle(*h3d, kY, title);
661 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 664 of file G4H3ToolsManager.cc.

665 {
666  auto h3d = GetTInFunction(id, "SetH3ZAxisTitle");
667  if ( ! h3d ) return false;
668 
669  return SetAxisTitle(*h3d, kZ, title);
670 }
const G4int kZ
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
tools::histo::h3d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

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

Implements G4VH3Manager.

Definition at line 709 of file G4H3ToolsManager.cc.

710 {
711 // Write selected objects on ASCII file
712 // According to the implementation by Michel Maire, originally in
713 // extended examples.
714 // Not yet available for H3
715 
716  return ! fHnManager->IsAscii();
717 }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83

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