CMS 3D CMS Logo

Public Member Functions | Private Attributes

SimTracer Class Reference

#include <SimG4Core/HelpfulWatchers/interface/SimTracer.h>

Inheritance diagram for SimTracer:
SimWatcher

List of all members.

Public Member Functions

 SimTracer (const edm::ParameterSet &pSet)
void update (const G4Step *iStep)

Private Attributes

bool m_verbose

Detailed Description

Description: Prints a message for each Oscar signal

Usage: <usage>

Definition at line 45 of file SimTracer.h.


Constructor & Destructor Documentation

SimTracer::SimTracer ( const edm::ParameterSet pSet) [inline]

Definition at line 58 of file SimTracer.h.

                                          : 
   m_verbose(pSet.getUntrackedParameter<bool>("verbose",false)) {
   }

Member Function Documentation

void SimTracer::update ( const G4Step *  iStep) [inline]

Definition at line 73 of file SimTracer.h.

References gather_cfg::cout, m_verbose, and pos.

                                    { 
   std::cout <<"++ signal G4Step " ;
   if(m_verbose) {
      const G4StepPoint* post = iStep->GetPostStepPoint();
      const G4ThreeVector pos = post->GetPosition();
      std::cout << "( "<<pos.x()<<","<<pos.y()<<","<<pos.z()<<") ";
      if(post->GetPhysicalVolume()) {
         std::cout << post->GetPhysicalVolume()->GetName();
      }
   }
   std::cout <<std::endl; 
}

Member Data Documentation

bool SimTracer::m_verbose [private]

Definition at line 96 of file SimTracer.h.

Referenced by update().