CMS 3D CMS Logo

List of all members | Public Member Functions
PPSStripOrganization Class Reference

#include <PPSStripOrganization.h>

Inheritance diagram for PPSStripOrganization:
TotemRPVDetectorOrganization PPSStripNumberingScheme

Public Member Functions

 PPSStripOrganization ()
 
uint32_t unitID (const G4Step *aStep) override
 
 ~PPSStripOrganization () override=default
 
- Public Member Functions inherited from TotemRPVDetectorOrganization
 TotemRPVDetectorOrganization ()
 
virtual ~TotemRPVDetectorOrganization ()
 

Detailed Description

Definition at line 8 of file PPSStripOrganization.h.

Constructor & Destructor Documentation

PPSStripOrganization::PPSStripOrganization ( )
inlinedefault
PPSStripOrganization::~PPSStripOrganization ( )
overridedefault

Member Function Documentation

uint32_t PPSStripOrganization::unitID ( const G4Step *  aStep)
overridevirtual

Implements TotemRPVDetectorOrganization.

Definition at line 12 of file PPSStripOrganization.cc.

References hgcalTestNeighbor_cfi::detector, cuy::ii, DetId::rawId(), and relativeConstraints::station.

12  {
13  G4VPhysicalVolume* physVol;
14  unsigned int arm = 0;
15  unsigned int station = 0;
16  unsigned int roman_pot = 0;
17  unsigned int detector = 0;
18 
19  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
20 
21  for (int ii = 0; ii < touch->GetHistoryDepth(); ii++) {
22  physVol = touch->GetVolume(ii);
23  if (physVol->GetName() == "RP_Silicon_Detector") {
24  detector = physVol->GetCopyNo();
25  } else if (physVol->GetName() == "RP_box_primary_vacuum") {
26  int cpy_no = physVol->GetCopyNo();
27  arm = (cpy_no / 100) % 10;
28  station = (cpy_no / 10) % 10;
29  roman_pot = cpy_no % 10;
30  }
31  }
32  return TotemRPDetId(arm, station, roman_pot, detector).rawId();
33 }
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:30
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ii
Definition: cuy.py:590