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::TotemRPOrganization ( )

Definition at line 26 of file TotemRPOrganization.cc.

26 { edm::LogVerbatim("ForwardSim") << "Creating TotemRPOrganization"; }
Log< level::Info, true > LogVerbatim

◆ ~TotemRPOrganization()

TotemRPOrganization::~TotemRPOrganization ( )
override

Definition at line 28 of file TotemRPOrganization.cc.

28 {}

Member Function Documentation

◆ getUnitID()

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

Implements TotemVDetectorOrganization.

Definition at line 34 of file TotemRPOrganization.cc.

References cuy::ii, and LogDebug.

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