#include <SimG4CMS/Forward/interface/TotemRPOrganization.h>
Public Member Functions | |
uint32_t | GetUnitID (const G4Step *aStep) |
uint32_t | GetUnitID (const G4Step *aStep) const |
TotemRPOrganization () | |
virtual | ~TotemRPOrganization () |
Private Attributes | |
int | _currentCSC |
int | _currentDetectorPosition |
int | _currentLayer |
int | _currentPlane |
int | _currentUnitID |
bool | _needUpdateData |
bool | _needUpdateUnitID |
Description: This class manages the UnitID that labels TotemRP sensitive volumes
Usage: Used in TotemSD to get unique ID of sensitive detector element
Definition at line 30 of file TotemRPOrganization.h.
TotemRPOrganization::TotemRPOrganization | ( | ) |
Definition at line 27 of file TotemRPOrganization.cc.
: _needUpdateUnitID(false), _needUpdateData(false), _currentUnitID(-1), _currentPlane(-1), _currentCSC(-1), _currentLayer(-1) { edm::LogInfo("ForwardSim") << "Creating TotemRPOrganization"; }
TotemRPOrganization::~TotemRPOrganization | ( | ) | [virtual] |
Definition at line 34 of file TotemRPOrganization.cc.
{ }
uint32_t TotemRPOrganization::GetUnitID | ( | const G4Step * | aStep | ) |
Definition at line 45 of file TotemRPOrganization.cc.
References _currentDetectorPosition, and LogDebug.
Referenced by GetUnitID().
{ G4VPhysicalVolume* physVol; int32_t UNITA=0; const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable(); int ii =0; for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){ physVol = touch->GetVolume(ii); #ifdef SCRIVI LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level=" << ii << ", physVol->GetCopyNo()=" << physVol->GetCopyNo(); #endif if (physVol->GetName() == "myRP") _currentDetectorPosition = 3; } physVol= touch->GetVolume(0);//aStep->GetPreStepPoint()->GetPhysicalVolume(); if(physVol->GetName() == "myRP") UNITA=(touch->GetVolume(5)->GetCopyNo())*1111; #ifdef SCRIVI LogDebug("ForwardSim") << "\nUNITA-RP " << UNITA << "\n\n"; #endif return UNITA; }
uint32_t TotemRPOrganization::GetUnitID | ( | const G4Step * | aStep | ) | const [virtual] |
Implements TotemVDetectorOrganization.
Definition at line 41 of file TotemRPOrganization.cc.
References GetUnitID().
{ return const_cast<TotemRPOrganization *>(this)->GetUnitID(aStep); }
int TotemRPOrganization::_currentCSC [private] |
Definition at line 51 of file TotemRPOrganization.h.
int TotemRPOrganization::_currentDetectorPosition [private] |
Definition at line 49 of file TotemRPOrganization.h.
Referenced by GetUnitID().
int TotemRPOrganization::_currentLayer [private] |
Definition at line 52 of file TotemRPOrganization.h.
int TotemRPOrganization::_currentPlane [private] |
Definition at line 50 of file TotemRPOrganization.h.
int TotemRPOrganization::_currentUnitID [private] |
Definition at line 48 of file TotemRPOrganization.h.
bool TotemRPOrganization::_needUpdateData [private] |
Definition at line 46 of file TotemRPOrganization.h.
bool TotemRPOrganization::_needUpdateUnitID [private] |
Definition at line 45 of file TotemRPOrganization.h.