CMS 3D CMS Logo

Public Member Functions | Private Attributes

TotemRPOrganization Class Reference

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

Inheritance diagram for TotemRPOrganization:
TotemVDetectorOrganization TotemRPNumberingScheme

List of all members.

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

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


Constructor & Destructor Documentation

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.

                                            {
}

Member Function Documentation

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);
}

Member Data Documentation

Definition at line 51 of file TotemRPOrganization.h.

Definition at line 49 of file TotemRPOrganization.h.

Referenced by GetUnitID().

Definition at line 52 of file TotemRPOrganization.h.

Definition at line 50 of file TotemRPOrganization.h.

Definition at line 48 of file TotemRPOrganization.h.

Definition at line 46 of file TotemRPOrganization.h.

Definition at line 45 of file TotemRPOrganization.h.