CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 57 of file G4StepStatistics.h.

Constructor & Destructor Documentation

StepID::StepID ( const G4Step *  theG4Step)
inline

Definition at line 69 of file G4StepStatistics.h.

References gather_cfg::cout, theG4ProcessName, and theG4RegionName.

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

Member Function Documentation

G4int StepID::GetParticlePDGID ( ) const
inline

Definition at line 89 of file G4StepStatistics.h.

References theParticlePDGID.

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

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

Definition at line 88 of file G4StepStatistics.h.

References theG4ProcessName.

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

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

Definition at line 87 of file G4StepStatistics.h.

References theG4RegionName.

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

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

Definition at line 96 of file G4StepStatistics.h.

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

97  {
99  return (theParticlePDGID > id.GetParticlePDGID());
100  }
101  else if (strcmp(theG4RegionName,id.GetRegionName())!=0){
102  return strcmp(theG4RegionName,id.GetRegionName())>0 ? true : false;
103  }
104  else if (strcmp(theG4ProcessName,id.GetProcessName())!=0){
105  return strcmp(theG4ProcessName,id.GetProcessName())>0 ? true : false;
106  }
107  else {//The case in which they are all equal!
108  return false;
109  }
110  }
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 92 of file G4StepStatistics.h.

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

92  {
93  return ( strcmp(theG4RegionName,id.GetRegionName())==0 && strcmp(theG4ProcessName,id.GetProcessName())==0 && theParticlePDGID==id.GetParticlePDGID() ) ? true : false;
94  }
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 112 of file G4StepStatistics.h.

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

113  {
115  return (theParticlePDGID < id.GetParticlePDGID());
116  }
117  else if(strcmp(theG4RegionName,id.GetRegionName())!=0){
118  return strcmp(theG4RegionName,id.GetRegionName())<0 ? true : false;
119  }
120  else if (strcmp(theG4ProcessName,id.GetProcessName())!=0){
121  return strcmp(theG4ProcessName,id.GetProcessName())<0 ? true : false;
122  }
123  else {//The case in which they are all equal!
124  return false;
125  }
126  }
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 63 of file G4StepStatistics.h.

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

G4String StepID::theG4RegionName
private

Definition at line 61 of file G4StepStatistics.h.

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

G4int StepID::theParticlePDGID
private

Definition at line 65 of file G4StepStatistics.h.

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