CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TotemRPOrganization Class Reference

#include <SimG4CMS/Forward/interface/TotemRPOrganization.h>

Inheritance diagram for TotemRPOrganization:
TotemVDetectorOrganization TotemRPNumberingScheme

Public Member Functions

uint32_t GetUnitID (const G4Step *aStep)
 
uint32_t GetUnitID (const G4Step *aStep) const override
 
 TotemRPOrganization ()
 
 ~TotemRPOrganization () override
 
- Public Member Functions inherited from TotemVDetectorOrganization
 TotemVDetectorOrganization ()
 
virtual ~TotemVDetectorOrganization ()
 

Private Attributes

int _currentCSC
 
int _currentDetectorPosition
 
int _currentLayer
 
int _currentPlane
 
int _currentUnitID
 
bool _needUpdateData
 
bool _needUpdateUnitID
 

Detailed Description

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 29 of file TotemRPOrganization.h.

Constructor & Destructor Documentation

TotemRPOrganization::TotemRPOrganization ( )

Definition at line 26 of file TotemRPOrganization.cc.

26  :
29 
30  edm::LogInfo("ForwardSim") << "Creating TotemRPOrganization";
31 }
TotemRPOrganization::~TotemRPOrganization ( )
override

Definition at line 33 of file TotemRPOrganization.cc.

33  {
34 }

Member Function Documentation

uint32_t TotemRPOrganization::GetUnitID ( const G4Step *  aStep)

Definition at line 44 of file TotemRPOrganization.cc.

References _currentDetectorPosition, cuy::ii, and LogDebug.

Referenced by GetUnitID().

44  {
45 
46  G4VPhysicalVolume* physVol;
47  int32_t UNITA=0;
48  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
49  int ii =0;
50  for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){
51  physVol = touch->GetVolume(ii);
52 
53 #ifdef SCRIVI
54  LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level="
55  << ii << ", physVol->GetCopyNo()="
56  << physVol->GetCopyNo();
57 #endif
58  if (physVol->GetName() == "myRP") _currentDetectorPosition = 3;
59 
60  }
61  physVol= touch->GetVolume(0);//aStep->GetPreStepPoint()->GetPhysicalVolume();
62 
63  if(physVol->GetName() == "myRP") UNITA=(touch->GetVolume(5)->GetCopyNo())*1111;
64 
65 #ifdef SCRIVI
66  LogDebug("ForwardSim") << "\nUNITA-RP " << UNITA << "\n\n";
67 #endif
68  return UNITA;
69 }
#define LogDebug(id)
ii
Definition: cuy.py:588
uint32_t TotemRPOrganization::GetUnitID ( const G4Step *  aStep) const
overridevirtual

Implements TotemVDetectorOrganization.

Definition at line 40 of file TotemRPOrganization.cc.

References GetUnitID().

40  {
41  return const_cast<TotemRPOrganization *>(this)->GetUnitID(aStep);
42 }
uint32_t GetUnitID(const G4Step *aStep)

Member Data Documentation

int TotemRPOrganization::_currentCSC
private

Definition at line 50 of file TotemRPOrganization.h.

int TotemRPOrganization::_currentDetectorPosition
private

Definition at line 48 of file TotemRPOrganization.h.

Referenced by GetUnitID().

int TotemRPOrganization::_currentLayer
private

Definition at line 51 of file TotemRPOrganization.h.

int TotemRPOrganization::_currentPlane
private

Definition at line 49 of file TotemRPOrganization.h.

int TotemRPOrganization::_currentUnitID
private

Definition at line 47 of file TotemRPOrganization.h.

bool TotemRPOrganization::_needUpdateData
private

Definition at line 45 of file TotemRPOrganization.h.

bool TotemRPOrganization::_needUpdateUnitID
private

Definition at line 44 of file TotemRPOrganization.h.