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 56 of file G4StepStatistics.h.

Constructor & Destructor Documentation

StepID::StepID ( const G4Step *  theG4Step)
inline

Definition at line 68 of file G4StepStatistics.h.

References gather_cfg::cout, theG4ProcessName, and theG4RegionName.

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

Member Function Documentation

G4int StepID::GetParticlePDGID ( ) const
inline

Definition at line 88 of file G4StepStatistics.h.

References theParticlePDGID.

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

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

Definition at line 87 of file G4StepStatistics.h.

References theG4ProcessName.

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

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

Definition at line 86 of file G4StepStatistics.h.

References theG4RegionName.

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

86 { 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.

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

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

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

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

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

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

G4String StepID::theG4RegionName
private

Definition at line 60 of file G4StepStatistics.h.

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

G4int StepID::theParticlePDGID
private

Definition at line 64 of file G4StepStatistics.h.

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