Geant4  10.02.p03
G4P1ToolsManager Class Reference

#include <G4P1ToolsManager.hh>

Inheritance diagram for G4P1ToolsManager:
Collaboration diagram for G4P1ToolsManager:

Public Member Functions

 G4P1ToolsManager (const G4AnalysisManagerState &state)
 
virtual ~G4P1ToolsManager ()
 
G4int AddP1 (const G4String &name, tools::histo::p1d *p1d)
 
void AddP1Vector (const std::vector< tools::histo::p1d *> &p1Vector)
 
tools::histo::p1d * GetP1 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
std::vector< tools::histo::p1d * >::iterator BeginP1 ()
 
std::vector< tools::histo::p1d * >::iterator EndP1 ()
 
std::vector< tools::histo::p1d * >::const_iterator BeginConstP1 () const
 
std::vector< tools::histo::p1d * >::const_iterator EndConstP1 () const
 
const std::vector< tools::histo::p1d * > & GetP1Vector () const
 
const std::vector< G4HnInformation * > & GetHnVector () const
 
- Public Member Functions inherited from G4VP1Manager
 G4VP1Manager ()
 
virtual ~G4VP1Manager ()
 
 G4VP1Manager (const G4VP1Manager &rhs)=delete
 
G4VP1Manageroperator= (const G4VP1Manager &rhs)=delete
 
- Public Member Functions inherited from G4THnManager< tools::histo::p1d >
 G4THnManager (const G4AnalysisManagerState &state, const G4String &hnType)
 
virtual ~G4THnManager ()
 
G4bool Reset ()
 
G4bool IsEmpty () const
 

Protected Member Functions

virtual G4int CreateP1 (const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear") final
 
virtual G4int CreateP1 (const G4String &name, const G4String &title, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none") final
 
virtual G4bool SetP1 (G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear") final
 
virtual G4bool SetP1 (G4int id, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none") final
 
virtual G4bool ScaleP1 (G4int id, G4double factor) final
 
virtual G4bool FillP1 (G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0) final
 
virtual G4int GetP1Id (const G4String &name, G4bool warn=true) const final
 
virtual G4int GetP1Nbins (G4int id) const final
 
virtual G4double GetP1Xmin (G4int id) const final
 
virtual G4double GetP1Xmax (G4int id) const final
 
virtual G4double GetP1XWidth (G4int id) const final
 
virtual G4double GetP1Ymin (G4int id) const final
 
virtual G4double GetP1Ymax (G4int id) const final
 
virtual G4bool SetP1Title (G4int id, const G4String &title) final
 
virtual G4bool SetP1XAxisTitle (G4int id, const G4String &title) final
 
virtual G4bool SetP1YAxisTitle (G4int id, const G4String &title) final
 
virtual G4String GetP1Title (G4int id) const final
 
virtual G4String GetP1XAxisTitle (G4int id) const final
 
virtual G4String GetP1YAxisTitle (G4int id) const final
 
virtual std::shared_ptr< G4HnManagerGetHnManager () final
 
- Protected Member Functions inherited from G4THnManager< tools::histo::p1d >
void AddTVector (const std::vector< tools::histo::p1d * > &tVector)
 
std::vector< tools::histo::p1d *>::iterator BeginT ()
 
std::vector< tools::histo::p1d *>::iterator EndT ()
 
std::vector< tools::histo::p1d *>::const_iterator BeginConstT () const
 
std::vector< tools::histo::p1d *>::const_iterator EndConstT () const
 
tools::histo::p1d * GetTInFunction (G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
 
G4int RegisterT (tools::histo::p1d *t, const G4String &name)
 
G4int GetTId (const G4String &name, G4bool warn=true) const
 

Private Member Functions

void AddP1Information (const G4String &name, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme) const
 

Static Private Attributes

static const G4int kDimension = 1
 

Additional Inherited Members

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

Detailed Description

Definition at line 53 of file G4P1ToolsManager.hh.

Constructor & Destructor Documentation

◆ G4P1ToolsManager()

G4P1ToolsManager::G4P1ToolsManager ( const G4AnalysisManagerState state)
explicit

Definition at line 49 of file G4P1ToolsManager.cc.

◆ ~G4P1ToolsManager()

G4P1ToolsManager::~G4P1ToolsManager ( )
virtual

Definition at line 55 of file G4P1ToolsManager.cc.

56 {}
Here is the call graph for this function:

Member Function Documentation

◆ AddP1()

G4int G4P1ToolsManager::AddP1 ( const G4String name,
tools::histo::p1d *  p1d 
)

Definition at line 536 of file G4P1ToolsManager.cc.

537 {
538 #ifdef G4VERBOSE
539  if ( fState.GetVerboseL4() )
540  fState.GetVerboseL4()->Message("add", "P1", name);
541 #endif
542 
543  // Add annotation
544  AddP1Annotation(p1d, "none", "none", "none", "none");
545  // Add information
546  AddP1Information(name, "none", "none", "none", "none", G4BinScheme::kLinear);
547 
548  // Register profile
549  auto id = RegisterT(p1d, name);
550 
551 #ifdef G4VERBOSE
552  if ( fState.GetVerboseL2() )
553  fState.GetVerboseL2()->Message("add", "P1", name);
554 #endif
555  return id;
556 }
void AddP1Information(const G4String &name, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme) const
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddP1Information()

void G4P1ToolsManager::AddP1Information ( const G4String name,
const G4String xunitName,
const G4String yunitName,
const G4String xfcnName,
const G4String yfcnName,
G4BinScheme  xbinScheme 
) const
private

Definition at line 215 of file G4P1ToolsManager.cc.

221 {
222  auto hnInformation = fHnManager->AddHnInformation(name, 2);
223  hnInformation->AddDimension(xunitName, xfcnName, xbinScheme);
224  hnInformation->AddDimension(yunitName, yfcnName, G4BinScheme::kLinear);
225 }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
Here is the caller graph for this function:

◆ AddP1Vector()

void G4P1ToolsManager::AddP1Vector ( const std::vector< tools::histo::p1d *> &  p1Vector)

Definition at line 559 of file G4P1ToolsManager.cc.

561 {
562  AddTVector(p1Vector);
563 }
void AddTVector(const std::vector< tools::histo::p1d * > &tVector)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginConstP1()

std::vector< tools::histo::p1d * >::const_iterator G4P1ToolsManager::BeginConstP1 ( ) const
inline

Definition at line 179 of file G4P1ToolsManager.hh.

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

◆ BeginP1()

std::vector< tools::histo::p1d * >::iterator G4P1ToolsManager::BeginP1 ( )
inline

Definition at line 172 of file G4P1ToolsManager.hh.

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

◆ CreateP1() [1/2]

G4int G4P1ToolsManager::CreateP1 ( const G4String name,
const G4String title,
G4int  nbins,
G4double  xmin,
G4double  xmax,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String xbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 232 of file G4P1ToolsManager.cc.

238 {
239 #ifdef G4VERBOSE
240  if ( fState.GetVerboseL4() )
241  fState.GetVerboseL4()->Message("create", "P1", name);
242 #endif
243  tools::histo::p1d* p1d
244  = CreateToolsP1(title, nbins, xmin, xmax, ymin, ymax,
245  xunitName, yunitName, xfcnName, yfcnName,
246  xbinSchemeName);
247 
248  // Add annotation
249  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
250 
251  // Save P1 information
252  auto xbinScheme = GetBinScheme(xbinSchemeName);
254  name, xunitName, yunitName, xfcnName, yfcnName, xbinScheme);
255 
256  // Register profile
257  G4int id = RegisterT(p1d, name);
258 
259 #ifdef G4VERBOSE
260  if ( fState.GetVerboseL2() )
261  fState.GetVerboseL2()->Message("create", "P1", name);
262 #endif
263  return id;
264 }
void AddP1Information(const G4String &name, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme) const
int G4int
Definition: G4Types.hh:78
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:

◆ CreateP1() [2/2]

G4int G4P1ToolsManager::CreateP1 ( const G4String name,
const G4String title,
const std::vector< G4double > &  edges,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 267 of file G4P1ToolsManager.cc.

272 {
273 #ifdef G4VERBOSE
274  if ( fState.GetVerboseL4() )
275  fState.GetVerboseL4()->Message("create", "P1", name);
276 #endif
277  tools::histo::p1d* p1d
278  = CreateToolsP1(title, edges, ymin, ymax,
279  xunitName, yunitName, xfcnName, yfcnName);
280 
281  // Add annotation
282  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
283 
284  // Save P1 information
286  name, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser);
287 
288  // Register profile
289  G4int id = RegisterT(p1d, name);
290 
291 #ifdef G4VERBOSE
292  if ( fState.GetVerboseL2() )
293  fState.GetVerboseL2()->Message("create", "P1", name);
294 #endif
295  return id;
296 }
void AddP1Information(const G4String &name, const G4String &xunitName, const G4String &yunitName, const G4String &xfcnName, const G4String &yfcnName, G4BinScheme xbinScheme) const
int G4int
Definition: G4Types.hh:78
G4int RegisterT(tools::histo::p1d *t, const G4String &name)
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:

◆ EndConstP1()

std::vector< tools::histo::p1d * >::const_iterator G4P1ToolsManager::EndConstP1 ( ) const
inline

Definition at line 183 of file G4P1ToolsManager.hh.

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

◆ EndP1()

std::vector< tools::histo::p1d * >::iterator G4P1ToolsManager::EndP1 ( )
inline

Definition at line 175 of file G4P1ToolsManager.hh.

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

◆ FillP1()

G4bool G4P1ToolsManager::FillP1 ( G4int  id,
G4double  xvalue,
G4double  yvalue,
G4double  weight = 1.0 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 378 of file G4P1ToolsManager.cc.

380 {
381  auto p1d = GetTInFunction(id, "FillP1", true, false);
382  if ( ! p1d ) return false;
383 
384  if ( fState.GetIsActivation() && ( ! fHnManager->GetActivation(id) ) ) {
385  //G4cout << "Skipping FillP1 for " << id << G4endl;
386  return false;
387  }
388 
389  auto xInfo
390  = fHnManager->GetHnDimensionInformation(id, kX, "FillP1");
391  auto yInfo
392  = fHnManager->GetHnDimensionInformation(id, kY, "FillP1");
393 
394  p1d->fill(xInfo->fFcn(xvalue/xInfo->fUnit),
395  yInfo->fFcn(yvalue/yInfo->fUnit), weight);
396 
397 #ifdef G4VERBOSE
398  if ( fState.GetVerboseL4() ) {
399  G4ExceptionDescription description;
400  description << " id " << id
401  << " xvalue " << xvalue
402  << " xfcn(xvalue/xunit) " << xInfo->fFcn(xvalue/xInfo->fUnit)
403  << " yvalue " << yvalue
404  << " yfcn(yvalue/yunit) " << yInfo->fFcn(yvalue/yInfo->fUnit)
405  << " weight " << weight;
406  fState.GetVerboseL4()->Message("fill", "P1", description);
407  }
408 #endif
409  return true;
410 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
double weight
Definition: plottest35.C:25
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4AnalysisVerbose * GetVerboseL4() const
const G4int kY
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:

◆ GetHnManager()

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

Implements G4VP1Manager.

Definition at line 192 of file G4P1ToolsManager.hh.

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

◆ GetHnVector()

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

Definition at line 189 of file G4P1ToolsManager.hh.

190 { return fHnManager->GetHnVector(); }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
Here is the caller graph for this function:

◆ GetP1()

tools::histo::p1d * G4P1ToolsManager::GetP1 ( G4int  id,
G4bool  warn = true,
G4bool  onlyIfActive = true 
) const

Definition at line 566 of file G4P1ToolsManager.cc.

568 {
569  return GetTInFunction(id, "GetP1", warn, onlyIfActive);
570 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1Id()

G4int G4P1ToolsManager::GetP1Id ( const G4String name,
G4bool  warn = true 
) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 413 of file G4P1ToolsManager.cc.

414 {
415  return GetTId(name, warn);
416 }
G4int GetTId(const G4String &name, G4bool warn=true) const
Here is the call graph for this function:

◆ GetP1Nbins()

G4int G4P1ToolsManager::GetP1Nbins ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 419 of file G4P1ToolsManager.cc.

420 {
421  auto p1d = GetTInFunction(id, "GetP1Nbins");
422  if ( ! p1d ) return 0;
423 
424  return GetNbins(*p1d, kX);
425 }
const G4int kX
tools::histo::p1d * 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:

◆ GetP1Title()

G4String G4P1ToolsManager::GetP1Title ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 504 of file G4P1ToolsManager.cc.

505 {
506  auto p1d = GetTInFunction(id, "GetP1Title");
507  if ( ! p1d ) return "";
508 
509  return GetTitle(*p1d);
510 }
G4String GetTitle(const G4ToolsBaseHisto &baseHisto)
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1Vector()

const std::vector< tools::histo::p1d * > & G4P1ToolsManager::GetP1Vector ( ) const
inline

Definition at line 186 of file G4P1ToolsManager.hh.

187 { return fTVector; }
std::vector< tools::histo::p1d *> fTVector
Definition: G4THnManager.hh:81
Here is the caller graph for this function:

◆ GetP1XAxisTitle()

G4String G4P1ToolsManager::GetP1XAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 514 of file G4P1ToolsManager.cc.

515 {
516  auto p1d = GetTInFunction(id, "GetP1XAxisTitle");
517  if ( ! p1d ) return "";
518 
519  return GetAxisTitle(*p1d, kX, fHnManager->GetHnType());
520 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1Xmax()

G4double G4P1ToolsManager::GetP1Xmax ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 439 of file G4P1ToolsManager.cc.

440 {
441  auto p1d = GetTInFunction(id, "GetP1Xmax");
442  if ( ! p1d ) return 0;
443 
444  return GetMax(*p1d, kX);
445 }
const G4int kX
tools::histo::p1d * 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:

◆ GetP1Xmin()

G4double G4P1ToolsManager::GetP1Xmin ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 428 of file G4P1ToolsManager.cc.

429 {
430 // Returns xmin value with applied unit and profile function
431 
432  auto p1d = GetTInFunction(id, "GetP1Xmin");
433  if ( ! p1d ) return 0;
434 
435  return GetMin(*p1d, kX);
436 }
G4double GetMin(const G4ToolsBaseHisto &baseHisto, G4int dimension)
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1XWidth()

G4double G4P1ToolsManager::GetP1XWidth ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 448 of file G4P1ToolsManager.cc.

449 {
450  auto p1d = GetTInFunction(id, "GetP1XWidth", true, false);
451  if ( ! p1d ) return 0;
452 
453  return GetWidth(*p1d, kX, fHnManager->GetHnType());
454 }
G4double GetWidth(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1YAxisTitle()

G4String G4P1ToolsManager::GetP1YAxisTitle ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 523 of file G4P1ToolsManager.cc.

524 {
525  auto p1d = GetTInFunction(id, "GetP1YAxisTitle");
526  if ( ! p1d ) return "";
527 
528  return GetAxisTitle(*p1d, kY, fHnManager->GetHnType());
529 }
G4String GetAxisTitle(const G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &hnType)
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY
Here is the call graph for this function:

◆ GetP1Ymax()

G4double G4P1ToolsManager::GetP1Ymax ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 468 of file G4P1ToolsManager.cc.

469 {
470  auto p1d = GetTInFunction(id, "GetP1Ymax");
471  if ( ! p1d ) return 0;
472 
473  return p1d->max_v();
474 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ GetP1Ymin()

G4double G4P1ToolsManager::GetP1Ymin ( G4int  id) const
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 457 of file G4P1ToolsManager.cc.

458 {
459 // Returns xmin value with applied unit and profile function
460 
461  auto p1d = GetTInFunction(id, "GetP1Ymin");
462  if ( ! p1d ) return 0;
463 
464  return p1d->min_v();
465 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ ScaleP1()

G4bool G4P1ToolsManager::ScaleP1 ( G4int  id,
G4double  factor 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 369 of file G4P1ToolsManager.cc.

370 {
371  auto p1d = GetTInFunction(id, "ScaleP1", false, false);
372  if ( ! p1d ) return false;
373 
374  return p1d->scale(factor);
375 }
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
static const G4double factor
Here is the call graph for this function:

◆ SetP1() [1/2]

G4bool G4P1ToolsManager::SetP1 ( G4int  id,
G4int  nbins,
G4double  xmin,
G4double  xmax,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none",
const G4String xbinScheme = "linear" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 299 of file G4P1ToolsManager.cc.

305 {
306  auto p1d = GetTInFunction(id, "SetP1", false, false);
307  if ( ! p1d ) return false;
308 
309  auto info = fHnManager->GetHnInformation(id,"SetP1");
310 #ifdef G4VERBOSE
311  if ( fState.GetVerboseL4() )
312  fState.GetVerboseL4()->Message("configure", "P1", info->GetName());
313 #endif
314 
315  // Configure tools p1
316  ConfigureToolsP1(
317  p1d, nbins, xmin, xmax, ymin, ymax,
318  xunitName, yunitName, xfcnName, yfcnName, xbinSchemeName);
319 
320  // Add annotation
321  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
322 
323  // Update information
324  auto xbinScheme = GetBinScheme(xbinSchemeName);
325  UpdateP1Information(
326  info, xunitName, yunitName, xfcnName, yfcnName, xbinScheme);
327 
328  // Set activation
329  fHnManager->SetActivation(id, true);
330 
331  return true;
332 }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
G4BinScheme GetBinScheme(const G4String &binSchemeName)
Definition: G4BinScheme.cc:36
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:

◆ SetP1() [2/2]

G4bool G4P1ToolsManager::SetP1 ( G4int  id,
const std::vector< G4double > &  edges,
G4double  ymin = 0,
G4double  ymax = 0,
const G4String xunitName = "none",
const G4String yunitName = "none",
const G4String xfcnName = "none",
const G4String yfcnName = "none" 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 335 of file G4P1ToolsManager.cc.

340 {
341  auto p1d = GetTInFunction(id, "SetP1", false, false);
342  if ( ! p1d ) return false;
343 
344  auto info = fHnManager->GetHnInformation(id,"SetP1");
345 #ifdef G4VERBOSE
346  if ( fState.GetVerboseL4() )
347  fState.GetVerboseL4()->Message("configure", "P1", info->GetName());
348 #endif
349 
350  // Configure tools p1
351  ConfigureToolsP1(p1d, edges, ymin, ymax,
352  xunitName, yunitName, xfcnName, yfcnName);
353 
354  // Add annotation
355  AddP1Annotation(p1d, xunitName, yunitName, xfcnName, yfcnName);
356 
357  // Update information
358  UpdateP1Information(
359  info, xunitName, yunitName, xfcnName, yfcnName, G4BinScheme::kUser);
360 
361  // Set activation
362  fHnManager->SetActivation(id, true);
363 
364  return true;
365 }
std::shared_ptr< G4HnManager > fHnManager
Definition: G4THnManager.hh:83
const G4AnalysisManagerState & fState
Definition: G4THnManager.hh:80
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
Here is the call graph for this function:

◆ SetP1Title()

G4bool G4P1ToolsManager::SetP1Title ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 477 of file G4P1ToolsManager.cc.

478 {
479  auto p1d = GetTInFunction(id, "SetP1Title");
480  if ( ! p1d ) return false;
481 
482  return SetTitle(*p1d, title);
483 }
hist SetTitle("Cytoplasm intensity on transverse section")
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ SetP1XAxisTitle()

G4bool G4P1ToolsManager::SetP1XAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 486 of file G4P1ToolsManager.cc.

487 {
488  auto p1d = GetTInFunction(id, "SetP1XAxisTitle");
489  if ( ! p1d ) return false;
490 
491  return SetAxisTitle(*p1d, kX, title);
492 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
const G4int kX
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
Here is the call graph for this function:

◆ SetP1YAxisTitle()

G4bool G4P1ToolsManager::SetP1YAxisTitle ( G4int  id,
const G4String title 
)
finalprotectedvirtual

Implements G4VP1Manager.

Definition at line 495 of file G4P1ToolsManager.cc.

496 {
497  auto p1d = GetTInFunction(id, "SetP1YAxisTitle");
498  if ( ! p1d ) return false;
499 
500  return SetAxisTitle(*p1d, kY, title);
501 }
G4bool SetAxisTitle(G4ToolsBaseHisto &baseHisto, G4int dimension, const G4String &title)
tools::histo::p1d * GetTInFunction(G4int id, G4String functionName, G4bool warn=true, G4bool onlyIfActive=true) const
const G4int kY
Here is the call graph for this function:

Member Data Documentation

◆ kDimension

const G4int G4P1ToolsManager::kDimension = 1
staticprivate

Definition at line 167 of file G4P1ToolsManager.hh.


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