Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4P2ToolsManager Class Reference

#include <G4P2ToolsManager.hh>

Inheritance diagram for G4P2ToolsManager:
Collaboration diagram for G4P2ToolsManager:

Public Member Functions

 G4P2ToolsManager (const G4AnalysisManagerState &state)
 
virtual ~G4P2ToolsManager ()
 
G4int AddP2 (const G4String &name, tools::histo::p2d *p2d)
 
void AddP2Vector (const std::vector< tools::histo::p2d * > &p2Vector)
 
tools::histo::p2d * GetP2 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
std::vector< tools::histo::p2d * >
::iterator 
BeginP2 ()
 
std::vector< tools::histo::p2d * >
::iterator 
EndP2 ()
 
std::vector< tools::histo::p2d * >
::const_iterator 
BeginConstP2 () const
 
std::vector< tools::histo::p2d * >
::const_iterator 
EndConstP2 () const
 
const std::vector
< tools::histo::p2d * > & 
GetP2Vector () const
 
const std::vector
< G4HnInformation * > & 
GetHnVector () const
 
- Public Member Functions inherited from G4VP2Manager
 G4VP2Manager ()
 
virtual ~G4VP2Manager ()
 
 G4VP2Manager (const G4VP2Manager &rhs)=delete
 
G4VP2Manageroperator= (const G4VP2Manager &rhs)=delete
 
- Public Member Functions inherited from G4THnManager< tools::histo::p2d >
 G4THnManager (const G4AnalysisManagerState &state, const G4String &hnType)
 
virtual ~G4THnManager ()
 
G4bool Reset ()
 
G4bool IsEmpty () const
 

Protected Member Functions

virtual G4int CreateP2 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, 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") final
 
virtual G4int CreateP2 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, G4double zmin=0, G4double zmax=0, 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 SetP2 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, 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") final
 
virtual G4bool SetP2 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, G4double zmin=0, G4double zmax=0, 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 ScaleP2 (G4int id, G4double factor) final
 
virtual G4bool FillP2 (G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0) final
 
virtual G4int GetP2Id (const G4String &name, G4bool warn=true) const final
 
virtual G4int GetP2Nxbins (G4int id) const final
 
virtual G4double GetP2Xmin (G4int id) const final
 
virtual G4double GetP2Xmax (G4int id) const final
 
virtual G4double GetP2XWidth (G4int id) const final
 
virtual G4int GetP2Nybins (G4int id) const final
 
virtual G4double GetP2Ymin (G4int id) const final
 
virtual G4double GetP2Ymax (G4int id) const final
 
virtual G4double GetP2YWidth (G4int id) const final
 
virtual G4double GetP2Zmin (G4int id) const final
 
virtual G4double GetP2Zmax (G4int id) const final
 
virtual G4bool SetP2Title (G4int id, const G4String &title) final
 
virtual G4bool SetP2XAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetP2YAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetP2ZAxisTitle (G4int id, const G4String &title) final
 
virtual G4String GetP2Title (G4int id) const final
 
virtual G4String GetP2XAxisTitle (G4int id) const final
 
virtual G4String GetP2YAxisTitle (G4int id) const final
 
virtual G4String GetP2ZAxisTitle (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::p2d >
void AddTVector (const std::vector< tools::histo::p2d * > &tVector)
 
std::vector< tools::histo::p2d * >
::iterator 
BeginT ()
 
std::vector< tools::histo::p2d * >
::iterator 
EndT ()
 
std::vector< tools::histo::p2d * >
::const_iterator 
BeginConstT () const
 
std::vector< tools::histo::p2d * >
::const_iterator 
EndConstT () const
 
tools::histo::p2d * GetTInFunction (G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
 
G4int RegisterT (tools::histo::p2d *t, const G4String &name)
 
G4int GetTId (const G4String &name, G4bool warn=true) const
 

Additional Inherited Members

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

Detailed Description

Definition at line 52 of file G4P2ToolsManager.hh.

Constructor & Destructor Documentation

G4P2ToolsManager::G4P2ToolsManager ( const G4AnalysisManagerState state)
explicit

Definition at line 45 of file G4P2ToolsManager.cc.

G4P2ToolsManager::~G4P2ToolsManager ( )
virtual

Definition at line 51 of file G4P2ToolsManager.cc.

52 {}

Member Function Documentation

G4int G4P2ToolsManager::AddP2 ( const G4String name,
tools::histo::p2d *  p2d 
)

Definition at line 723 of file G4P2ToolsManager.cc.

724 {
725 #ifdef G4VERBOSE
726  if ( fState.GetVerboseL4() )
727  fState.GetVerboseL4()->Message("add", "P2", name);
728 #endif
729 
730  // Add annotation
731  AddP2Annotation(p2d, "none", "none", "none", "none", "none", "none");
732  // Add information
733  AddP2Information(name, "none", "none", "none", "none", "none", "none",
735 
736  // Register profile
737  G4int id = RegisterT(p2d, name);
738 
739 #ifdef G4VERBOSE
740  if ( fState.GetVerboseL2() )
741  fState.GetVerboseL2()->Message("add", "P2", name);
742 #endif
743  return id;
744 }
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::p2d *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 G4P2ToolsManager::AddP2Vector ( const std::vector< tools::histo::p2d * > &  p2Vector)

Definition at line 747 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

std::vector< tools::histo::p2d * >::const_iterator G4P2ToolsManager::BeginConstP2 ( ) const
inline

Definition at line 202 of file G4P2ToolsManager.hh.

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

Here is the call graph for this function:

std::vector< tools::histo::p2d * >::iterator G4P2ToolsManager::BeginP2 ( )
inline

Definition at line 195 of file G4P2ToolsManager.hh.

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

Here is the call graph for this function:

G4int G4P2ToolsManager::CreateP2 ( const G4String name,
const G4String title,
G4int  nxbins,
G4double  xmin,
G4double  xmax,
G4int  nybins,
G4double  ymin,
G4double  ymax,
G4double  zmin = 0,
G4double  zmax = 0,
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" 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 317 of file G4P2ToolsManager.cc.

328 {
329 #ifdef G4VERBOSE
330  if ( fState.GetVerboseL4() )
331  fState.GetVerboseL4()->Message("create", "P2", name);
332 #endif
333  tools::histo::p2d* p2d
334  = CreateToolsP2(title,
335  nxbins, xmin, xmax, nybins, ymin, ymax, zmin, zmax,
336  xunitName, yunitName, zunitName,
337  xfcnName, yfcnName, zfcnName,
338  xbinSchemeName, ybinSchemeName);
339 
340  // Add annotation
341  AddP2Annotation(p2d, xunitName, yunitName, zunitName,
342  xfcnName, yfcnName, zfcnName);
343 
344  // Save P2 information
345  auto xbinScheme = GetBinScheme(xbinSchemeName);
346  auto ybinScheme = GetBinScheme(ybinSchemeName);
347  AddP2Information(
348  name, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
349  xbinScheme, ybinScheme);
350 
351  // Register profile
352  G4int id = RegisterT(p2d, name);
353 
354 #ifdef G4VERBOSE
355  if ( fState.GetVerboseL2() )
356  fState.GetVerboseL2()->Message("create", "P2", name);
357 #endif
358 
359  return id;
360 }
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::p2d *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 G4P2ToolsManager::CreateP2 ( const G4String name,
const G4String title,
const std::vector< G4double > &  xedges,
const std::vector< G4double > &  yedges,
G4double  zmin = 0,
G4double  zmax = 0,
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 G4VP2Manager.

Definition at line 363 of file G4P2ToolsManager.cc.

372 {
373 #ifdef G4VERBOSE
374  if ( fState.GetVerboseL4() )
375  fState.GetVerboseL4()->Message("create", "P2", name);
376 #endif
377  tools::histo::p2d* p2d
378  = CreateToolsP2(title, xedges, yedges, zmin, zmax,
379  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
380 
381  // Add annotation
382  AddP2Annotation(
383  p2d, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
384 
385  // Save P2 information
386  AddP2Information(
387  name, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
389 
390  // Register profile
391  G4int id = RegisterT(p2d, name);
392 
393 #ifdef G4VERBOSE
394  if ( fState.GetVerboseL2() )
395  fState.GetVerboseL2()->Message("create", "P2", name);
396 #endif
397 
398  return id;
399 }
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::p2d *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::p2d * >::const_iterator G4P2ToolsManager::EndConstP2 ( ) const
inline

Definition at line 206 of file G4P2ToolsManager.hh.

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

Here is the call graph for this function:

std::vector< tools::histo::p2d * >::iterator G4P2ToolsManager::EndP2 ( )
inline

Definition at line 198 of file G4P2ToolsManager.hh.

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

Here is the call graph for this function:

G4bool G4P2ToolsManager::FillP2 ( G4int  id,
G4double  xvalue,
G4double  yvalue,
G4double  zvalue,
G4double  weight = 1.0 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 493 of file G4P2ToolsManager.cc.

496 {
497  auto p2d = GetTInFunction(id, "FillP2", true, false);
498  if ( ! p2d ) return false;
499 
500  if ( fState.GetIsActivation() && ( ! fHnManager->GetActivation(id) ) ) {
501  return false;
502  }
503 
504  auto xInfo
505  = fHnManager->GetHnDimensionInformation(id, kX, "FillP2");
506  auto yInfo
507  = fHnManager->GetHnDimensionInformation(id, kY, "FillP2");
508  auto zInfo
509  = fHnManager->GetHnDimensionInformation(id, kZ, "FillP2");
510 
511  p2d->fill(xInfo->fFcn(xvalue/xInfo->fUnit),
512  yInfo->fFcn(yvalue/yInfo->fUnit),
513  zInfo->fFcn(zvalue/zInfo->fUnit), weight);
514 #ifdef G4VERBOSE
515  if ( fState.GetVerboseL4() ) {
516  G4ExceptionDescription description;
517  //description << " id " << id
518  // << " xvalue " << xvalue << " yvalue " << yvalue << " zvalue " << zvalue;
519  description << " id " << id
520  << " xvalue " << xvalue
521  << " xfcn(xvalue/xunit) " << xInfo->fFcn(xvalue/xInfo->fUnit)
522  << " yvalue " << yvalue
523  << " yfcn(yvalue/yunit) " << yInfo->fFcn(yvalue/yInfo->fUnit)
524  << " zvalue " << zvalue
525  << " zfcn(zvalue/zunit) " << zInfo->fFcn(zvalue/zInfo->fUnit)
526  << " weight " << weight;
527  fState.GetVerboseL4()->Message("fill", "P2", description);
528  }
529 #endif
530  return true;
531 }
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::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

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

Implements G4VP2Manager.

Definition at line 215 of file G4P2ToolsManager.hh.

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

Definition at line 212 of file G4P2ToolsManager.hh.

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

Here is the caller graph for this function:

tools::histo::p2d * G4P2ToolsManager::GetP2 ( G4int  id,
G4bool  warn = true,
G4bool  onlyIfActive = true 
) const

Definition at line 754 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4int G4P2ToolsManager::GetP2Id ( const G4String name,
G4bool  warn = true 
) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 534 of file G4P2ToolsManager.cc.

535 {
536  return GetTId(name, warn);
537 }
G4int GetTId(const G4String &name, G4bool warn=true) const

Here is the call graph for this function:

G4int G4P2ToolsManager::GetP2Nxbins ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 540 of file G4P2ToolsManager.cc.

541 {
542  auto p2d = GetTInFunction(id, "GetP2NXbins");
543  if ( ! p2d ) return 0;
544 
545  return GetNbins(*p2d, kX);
546 }
const G4int kX
tools::histo::p2d * 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 G4P2ToolsManager::GetP2Nybins ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 578 of file G4P2ToolsManager.cc.

579 {
580  auto p2d = GetTInFunction(id, "GetP2NYbins");
581  if ( ! p2d ) return 0;
582 
583  return GetNbins(*p2d, kY);
584 }
tools::histo::p2d * 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:

G4String G4P2ToolsManager::GetP2Title ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 672 of file G4P2ToolsManager.cc.

673 {
674  auto p2d = GetTInFunction(id, "GetP2Title");
675  if ( ! p2d ) return "";
676 
677  return GetTitle(*p2d);
678 }
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
tools::histo::p2d * 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::p2d * > & G4P2ToolsManager::GetP2Vector ( ) const
inline

Definition at line 209 of file G4P2ToolsManager.hh.

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

Here is the caller graph for this function:

G4String G4P2ToolsManager::GetP2XAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 681 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4double G4P2ToolsManager::GetP2Xmax ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 560 of file G4P2ToolsManager.cc.

561 {
562  auto p2d = GetTInFunction(id, "GetP2Xmax");
563  if ( ! p2d ) return 0.;
564 
565  return GetMax(*p2d, kX);
566 }
const G4int kX
tools::histo::p2d * 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 G4P2ToolsManager::GetP2Xmin ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 549 of file G4P2ToolsManager.cc.

550 {
551 // Returns xmin value with applied unit and profile function
552 
553  auto p2d = GetTInFunction(id, "GetP2Xmin");
554  if ( ! p2d ) return 0.;
555 
556  return GetMin(*p2d, kX);
557 }
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
const G4int kX
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4double G4P2ToolsManager::GetP2XWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 569 of file G4P2ToolsManager.cc.

570 {
571  auto p2d = GetTInFunction(id, "GetP2XWidth", true, false);
572  if ( ! p2d ) return 0.;
573 
574  return GetWidth(*p2d, kX, fHnManager->GetHnType());
575 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4String G4P2ToolsManager::GetP2YAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 690 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4double G4P2ToolsManager::GetP2Ymax ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 598 of file G4P2ToolsManager.cc.

599 {
600  auto p2d = GetTInFunction(id, "GetP2Ymax");
601  if ( ! p2d ) return 0.;
602 
603  return GetMax(*p2d, kY);
604 }
tools::histo::p2d * 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 G4P2ToolsManager::GetP2Ymin ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 587 of file G4P2ToolsManager.cc.

588 {
589 // Returns xmin value with applied unit and profile function
590 
591  auto p2d = GetTInFunction(id, "GetP2Ymin");
592  if ( ! p2d ) return 0.;
593 
594  return GetMin(*p2d, kY);
595 }
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4double G4P2ToolsManager::GetP2YWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 607 of file G4P2ToolsManager.cc.

608 {
609  auto p2d = GetTInFunction(id, "GetP2YWidth", true, false);
610  if ( ! p2d ) return 0.;
611 
612  return GetWidth(*p2d, kY, fHnManager->GetHnType());
613 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY

Here is the call graph for this function:

G4String G4P2ToolsManager::GetP2ZAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 699 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4double G4P2ToolsManager::GetP2Zmax ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 627 of file G4P2ToolsManager.cc.

628 {
629  auto p2d = GetTInFunction(id, "GetP2Zmax");
630  if ( ! p2d ) return 0.;
631 
632  return GetMax(*p2d, kZ);
633 }
const G4int kZ
tools::histo::p2d * 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 G4P2ToolsManager::GetP2Zmin ( G4int  id) const
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 616 of file G4P2ToolsManager.cc.

617 {
618 // Returns xmin value with applied unit and profile function
619 
620  auto p2d = GetTInFunction(id, "GetP2Zmin");
621  if ( ! p2d ) return 0.;
622 
623  return GetMin(*p2d, kZ);
624 }
const G4int kZ
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P2ToolsManager::ScaleP2 ( G4int  id,
G4double  factor 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 484 of file G4P2ToolsManager.cc.

485 {
486  auto p2d = GetTInFunction(id, "ScaleP2", false, false);
487  if ( ! p2d ) return false;
488 
489  return p2d->scale(factor);
490 }
tools::histo::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P2ToolsManager::SetP2 ( G4int  id,
G4int  nxbins,
G4double  xmin,
G4double  xmax,
G4int  nybins,
G4double  ymin,
G4double  ymax,
G4double  zmin = 0,
G4double  zmax = 0,
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" 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 402 of file G4P2ToolsManager.cc.

412 {
413  auto p2d = GetTInFunction(id, "SetP2", false, false);
414  if ( ! p2d ) return false;
415 
416  auto info = fHnManager->GetHnInformation(id, "SetP2");
417 #ifdef G4VERBOSE
418  if ( fState.GetVerboseL4() )
419  fState.GetVerboseL4()->Message("configure", "P2", info->GetName());
420 #endif
421 
422  // Configure tools p2
423  ConfigureToolsP2(
424  p2d, nxbins, xmin, xmax, nybins, ymin, ymax, zmin, zmax,
425  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
426  xbinSchemeName, ybinSchemeName);
427 
428  // Add annotation
429  AddP2Annotation(p2d, xunitName, yunitName, zunitName,
430  xfcnName, yfcnName, zfcnName);
431 
432  // Update information
433  auto xbinScheme = GetBinScheme(xbinSchemeName);
434  auto ybinScheme = GetBinScheme(ybinSchemeName);
435  UpdateP2Information(
436  info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
437  xbinScheme, ybinScheme);
438 
439  // Set activation
440  fHnManager->SetActivation(id, true);
441 
442  return true;
443 }
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::p2d * 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 G4P2ToolsManager::SetP2 ( G4int  id,
const std::vector< G4double > &  xedges,
const std::vector< G4double > &  yedges,
G4double  zmin = 0,
G4double  zmax = 0,
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 G4VP2Manager.

Definition at line 446 of file G4P2ToolsManager.cc.

454 {
455  auto p2d = GetTInFunction(id, "SetP2", false, false);
456  if ( ! p2d ) return false;
457 
458  auto info = fHnManager->GetHnInformation(id, "SetP2");
459 #ifdef G4VERBOSE
460  if ( fState.GetVerboseL4() )
461  fState.GetVerboseL4()->Message("configure", "P2", info->GetName());
462 #endif
463 
464  // Configure tools p2
465  ConfigureToolsP2(p2d, xedges, yedges, zmin, zmax,
466  xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName);
467 
468  // Add annotation
469  AddP2Annotation(p2d, xunitName, yunitName, zunitName,
470  xfcnName, yfcnName, zfcnName);
471 
472  // Update information
473  UpdateP2Information(
474  info, xunitName, yunitName, zunitName, xfcnName, yfcnName, zfcnName,
476 
477  // Set activation
478  fHnManager->SetActivation(id, true);
479 
480  return true;
481 }
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::p2d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const

Here is the call graph for this function:

G4bool G4P2ToolsManager::SetP2Title ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 636 of file G4P2ToolsManager.cc.

637 {
638  auto p2d = GetTInFunction(id, "SetP2Title");
639  if ( ! p2d ) return false;
640 
641  return SetTitle(*p2d, title);
642 }
tools::histo::p2d * 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 G4P2ToolsManager::SetP2XAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 645 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4bool G4P2ToolsManager::SetP2YAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 654 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

G4bool G4P2ToolsManager::SetP2ZAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP2Manager.

Definition at line 663 of file G4P2ToolsManager.cc.

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

Here is the call graph for this function:

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

Implements G4VP2Manager.

Definition at line 708 of file G4P2ToolsManager.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 P2
714 
715  return ! fHnManager->IsAscii();
716 }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83

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