CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
StepID Class Reference

#include <G4StepStatistics.h>

Public Member Functions

G4int GetParticlePDGID () const
 
G4String GetProcessName () const
 
G4String GetRegionName () const
 
bool operator< (const StepID &id) const
 
bool operator== (const StepID &id) const
 
bool operator> (const StepID &id) const
 
 StepID (const G4Step *theG4Step)
 

Private Attributes

G4String theG4ProcessName
 
G4String theG4RegionName
 
G4int theParticlePDGID
 

Detailed Description

Definition at line 56 of file G4StepStatistics.h.

Constructor & Destructor Documentation

StepID::StepID ( const G4Step *  theG4Step)
inline

Definition at line 67 of file G4StepStatistics.h.

References gather_cfg::cout, theG4ProcessName, and theG4RegionName.

68  : theG4RegionName("UNDEFINED"),
69  theG4ProcessName("UNDEFINED"),
70  theParticlePDGID(theG4Step->GetTrack()->GetDefinition()->GetPDGEncoding()) {
71  std::cout << "Start" << std::endl;
72  if (theG4Step->GetPreStepPoint()->GetPhysicalVolume()) {
73  theG4RegionName = theG4Step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
74  }
75  std::cout << "Physical Volume" << std::endl;
76  if (theG4Step->GetPreStepPoint()->GetProcessDefinedStep()) {
77  theG4ProcessName = theG4Step->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
78  }
79  std::cout << "Process Name" << std::endl;
80  }
G4String theG4RegionName
G4String theG4ProcessName
G4int theParticlePDGID
tuple cout
Definition: gather_cfg.py:144

Member Function Documentation

G4int StepID::GetParticlePDGID ( ) const
inline

Definition at line 85 of file G4StepStatistics.h.

References theParticlePDGID.

Referenced by operator<(), operator==(), operator>(), and G4StepStatistics::update().

85 { return theParticlePDGID; }
G4int theParticlePDGID
G4String StepID::GetProcessName ( ) const
inline

Definition at line 84 of file G4StepStatistics.h.

References theG4ProcessName.

Referenced by operator<(), operator==(), operator>(), and G4StepStatistics::update().

84 { return theG4ProcessName; }
G4String theG4ProcessName
G4String StepID::GetRegionName ( ) const
inline

Definition at line 83 of file G4StepStatistics.h.

References theG4RegionName.

Referenced by operator<(), operator==(), operator>(), and G4StepStatistics::update().

83 { return theG4RegionName; }
G4String theG4RegionName
bool StepID::operator< ( const StepID id) const
inline

Definition at line 95 of file G4StepStatistics.h.

References GetParticlePDGID(), GetProcessName(), GetRegionName(), theG4ProcessName, theG4RegionName, and theParticlePDGID.

95  {
96  if (theParticlePDGID != id.GetParticlePDGID()) {
97  return (theParticlePDGID > id.GetParticlePDGID());
98  } else if (strcmp(theG4RegionName, id.GetRegionName()) != 0) {
99  return strcmp(theG4RegionName, id.GetRegionName()) > 0 ? true : false;
100  } else if (strcmp(theG4ProcessName, id.GetProcessName()) != 0) {
101  return strcmp(theG4ProcessName, id.GetProcessName()) > 0 ? true : false;
102  } else { // The case in which they are all equal!
103  return false;
104  }
105  }
G4String theG4RegionName
G4String theG4ProcessName
G4String GetProcessName() const
G4int theParticlePDGID
G4int GetParticlePDGID() const
G4String GetRegionName() const
bool StepID::operator== ( const StepID id) const
inline

Definition at line 88 of file G4StepStatistics.h.

References GetParticlePDGID(), GetProcessName(), GetRegionName(), theG4ProcessName, theG4RegionName, and theParticlePDGID.

88  {
89  return (strcmp(theG4RegionName, id.GetRegionName()) == 0 && strcmp(theG4ProcessName, id.GetProcessName()) == 0 &&
91  ? true
92  : false;
93  }
G4String theG4RegionName
G4String theG4ProcessName
G4String GetProcessName() const
G4int theParticlePDGID
G4int GetParticlePDGID() const
G4String GetRegionName() const
bool StepID::operator> ( const StepID id) const
inline

Definition at line 107 of file G4StepStatistics.h.

References GetParticlePDGID(), GetProcessName(), GetRegionName(), theG4ProcessName, theG4RegionName, and theParticlePDGID.

107  {
108  if (theParticlePDGID != id.GetParticlePDGID()) {
109  return (theParticlePDGID < id.GetParticlePDGID());
110  } else if (strcmp(theG4RegionName, id.GetRegionName()) != 0) {
111  return strcmp(theG4RegionName, id.GetRegionName()) < 0 ? true : false;
112  } else if (strcmp(theG4ProcessName, id.GetProcessName()) != 0) {
113  return strcmp(theG4ProcessName, id.GetProcessName()) < 0 ? true : false;
114  } else { // The case in which they are all equal!
115  return false;
116  }
117  }
G4String theG4RegionName
G4String theG4ProcessName
G4String GetProcessName() const
G4int theParticlePDGID
G4int GetParticlePDGID() const
G4String GetRegionName() const

Member Data Documentation

G4String StepID::theG4ProcessName
private

Definition at line 61 of file G4StepStatistics.h.

Referenced by GetProcessName(), operator<(), operator==(), operator>(), and StepID().

G4String StepID::theG4RegionName
private

Definition at line 59 of file G4StepStatistics.h.

Referenced by GetRegionName(), operator<(), operator==(), operator>(), and StepID().

G4int StepID::theParticlePDGID
private

Definition at line 63 of file G4StepStatistics.h.

Referenced by GetParticlePDGID(), operator<(), operator==(), and operator>().