CMS 3D CMS Logo

List of all members | Public Member Functions
TotemRPOrganization Class Reference

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

Inheritance diagram for TotemRPOrganization:
TotemVDetectorOrganization TotemRPNumberingScheme

Public Member Functions

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

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

Constructor & Destructor Documentation

TotemRPOrganization::TotemRPOrganization ( )

Definition at line 26 of file TotemRPOrganization.cc.

26  {
27 
28  edm::LogInfo("ForwardSim") << "Creating TotemRPOrganization";
29 }
TotemRPOrganization::~TotemRPOrganization ( )
override

Definition at line 31 of file TotemRPOrganization.cc.

31  {
32 }

Member Function Documentation

uint32_t TotemRPOrganization::getUnitID ( const G4Step *  aStep) const
overridevirtual

Implements TotemVDetectorOrganization.

Definition at line 38 of file TotemRPOrganization.cc.

References cuy::ii, and LogDebug.

38  {
39 
40  G4VPhysicalVolume* physVol;
41  int32_t UNITA=0;
42  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
43  int ii =0;
44  for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){
45  physVol = touch->GetVolume(ii);
46 
47 #ifdef SCRIVI
48  LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level="
49  << ii << ", physVol->GetCopyNo()="
50  << physVol->GetCopyNo();
51 #endif
52  }
53  physVol= touch->GetVolume(0);//aStep->GetPreStepPoint()->GetPhysicalVolume();
54 
55  if(physVol->GetName() == "myRP") UNITA=(touch->GetVolume(5)->GetCopyNo())*1111;
56 
57 #ifdef SCRIVI
58  LogDebug("ForwardSim") << "\nUNITA-RP " << UNITA << "\n\n";
59 #endif
60  return UNITA;
61 }
#define LogDebug(id)
ii
Definition: cuy.py:590