CMS 3D CMS Logo

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

#include <PPSDiamondOrganization.h>

Inheritance diagram for PPSDiamondOrganization:
PPSVDetectorOrganization

Public Member Functions

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

Private Attributes

unsigned int theArm_
 
unsigned int theDetector_
 
unsigned int thePlane_
 
unsigned int theRoman_pot_
 
unsigned int theStation_
 

Detailed Description

Definition at line 11 of file PPSDiamondOrganization.h.

Constructor & Destructor Documentation

◆ PPSDiamondOrganization()

PPSDiamondOrganization::PPSDiamondOrganization ( )

◆ ~PPSDiamondOrganization()

PPSDiamondOrganization::~PPSDiamondOrganization ( )
overridedefault

Member Function Documentation

◆ unitID()

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

Implements PPSVDetectorOrganization.

Definition at line 20 of file PPSDiamondOrganization.cc.

References DetId::rawId(), theArm_, theDetector_, thePlane_, theRoman_pot_, and theStation_.

20  {
21  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
22  G4VPhysicalVolume* physVol = touch->GetVolume(0);
23  int coNum = physVol->GetCopyNo();
24  edm::LogVerbatim("PPSSimDiamond") << " %%%% PhysVol: " << physVol->GetName() << " coNum=" << coNum;
25  theDetector_ = coNum % 100;
26  thePlane_ = coNum / 100;
27 
28  G4VPhysicalVolume* physVolVac = touch->GetVolume(3);
29  if (nullptr == physVolVac) {
30  edm::LogError("PPSSimDiamond") << "Physical volume Primary_Vacuum not found for " << physVol->GetName()
31  << "; cannot determine CTPPSDiamondDetId.";
32  } else {
33  int cpy_no = physVolVac->GetCopyNo();
34  theArm_ = (cpy_no / 100) % 10;
35  theStation_ = (cpy_no / 10) % 10;
36  theRoman_pot_ = cpy_no % 10;
37  }
39 }
Log< level::Info, true > LogVerbatim
Log< level::Error, false > LogError
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...

Member Data Documentation

◆ theArm_

unsigned int PPSDiamondOrganization::theArm_
private

Definition at line 19 of file PPSDiamondOrganization.h.

Referenced by unitID().

◆ theDetector_

unsigned int PPSDiamondOrganization::theDetector_
private

Definition at line 23 of file PPSDiamondOrganization.h.

Referenced by unitID().

◆ thePlane_

unsigned int PPSDiamondOrganization::thePlane_
private

Definition at line 22 of file PPSDiamondOrganization.h.

Referenced by unitID().

◆ theRoman_pot_

unsigned int PPSDiamondOrganization::theRoman_pot_
private

Definition at line 21 of file PPSDiamondOrganization.h.

Referenced by unitID().

◆ theStation_

unsigned int PPSDiamondOrganization::theStation_
private

Definition at line 20 of file PPSDiamondOrganization.h.

Referenced by unitID().