CMS 3D CMS Logo

Public Member Functions | Private Attributes

StepID Class Reference

#include <G4StepStatistics.h>

List of all members.

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.

    :
    theG4RegionName("UNDEFINED"),
    theG4ProcessName("UNDEFINED"),
    theParticlePDGID(theG4Step->GetTrack()->GetDefinition()->GetPDGEncoding())
    {
      std::cout<<"Start"<<std::endl;
      if (theG4Step->GetPreStepPoint()->GetPhysicalVolume()) {
          theG4RegionName = theG4Step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion()->GetName();
        }
      std::cout<<"Physical Volume"<<std::endl;
      if (theG4Step->GetPreStepPoint()->GetProcessDefinedStep()){
          theG4ProcessName = theG4Step->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();
        }
      std::cout<<"Process Name"<<std::endl;
    }

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().

{ return theParticlePDGID; }
G4String StepID::GetProcessName ( ) const [inline]

Definition at line 88 of file G4StepStatistics.h.

References theG4ProcessName.

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

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

Definition at line 87 of file G4StepStatistics.h.

References theG4RegionName.

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

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

    {
      if (theParticlePDGID != id.GetParticlePDGID()){
        return (theParticlePDGID > id.GetParticlePDGID());
      }
      else if (strcmp(theG4RegionName,id.GetRegionName())!=0){
        return strcmp(theG4RegionName,id.GetRegionName())>0 ? true : false;
      }
      else if (strcmp(theG4ProcessName,id.GetProcessName())!=0){
        return strcmp(theG4ProcessName,id.GetProcessName())>0 ? true : false;
      }
      else {//The case in which they are all equal!
        return false;
      }
    }
bool StepID::operator== ( const StepID id) const [inline]

Definition at line 92 of file G4StepStatistics.h.

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

                                         {
    return ( strcmp(theG4RegionName,id.GetRegionName())==0 && strcmp(theG4ProcessName,id.GetProcessName())==0 && theParticlePDGID==id.GetParticlePDGID() ) ? true : false;
  }
bool StepID::operator> ( const StepID id) const [inline]

Definition at line 112 of file G4StepStatistics.h.

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

    {
      if(theParticlePDGID != id.GetParticlePDGID()){
        return (theParticlePDGID < id.GetParticlePDGID());
      }
      else if(strcmp(theG4RegionName,id.GetRegionName())!=0){
        return strcmp(theG4RegionName,id.GetRegionName())<0 ? true : false;
      }
      else if (strcmp(theG4ProcessName,id.GetProcessName())!=0){
        return strcmp(theG4ProcessName,id.GetProcessName())<0 ? true : false;
      }
      else {//The case in which they are all equal!
        return false;
      }
    }

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>().