CMS 3D CMS Logo

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

#include <SimG4CMS/PPS/interface/PPSPixelOrganization.h>

Inheritance diagram for PPSPixelOrganization:
PPSVDetectorOrganization

Public Member Functions

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

Private Attributes

int currentArm_
 
int currentPlane_
 
int currentRP_
 
int currentStation_
 
int currentUnitID_
 

Detailed Description

Description: This class manages the UnitID that labels PPS sensitive volumes

Usage: Used in PPSPixelSD to get unique ID of sensitive detector element

Definition at line 25 of file PPSPixelOrganization.h.

Constructor & Destructor Documentation

◆ PPSPixelOrganization()

PPSPixelOrganization::PPSPixelOrganization ( )

Definition at line 20 of file PPSPixelOrganization.cc.

22  edm::LogVerbatim("PPSSim") << "Creating PPSPixelOrganization";
23 }
Log< level::Info, true > LogVerbatim

◆ ~PPSPixelOrganization()

PPSPixelOrganization::~PPSPixelOrganization ( )
overridedefault

Member Function Documentation

◆ unitID()

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

Implements PPSVDetectorOrganization.

Definition at line 29 of file PPSPixelOrganization.cc.

References currentArm_, currentPlane_, currentRP_, currentStation_, triggerObjects_cff::id, and GetRecoTauVFromDQM_MC_cff::kk.

29  {
30  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
31  G4VPhysicalVolume* physVol = touch->GetVolume(0);
32  int coNum = physVol->GetCopyNo();
33  edm::LogVerbatim("PPSPixelSim") << "PPSPixelSim: PhysVol= " << physVol->GetName() << " coNum=" << coNum;
34  currentPlane_ = coNum - 1;
35 
36  G4VPhysicalVolume* physVolVac = touch->GetVolume(3);
37  if (nullptr == physVolVac) {
38  edm::LogError("PPSPixelSim") << "Physical volume RP_box_primary_vacuum not found for " << physVol->GetName()
39  << "; cannot determine CTPPSPixelDetId.";
40  } else {
41  int cpy_no = physVolVac->GetCopyNo();
42  currentArm_ = (cpy_no / 100) % 10;
43  currentStation_ = (cpy_no / 10) % 10;
44  currentRP_ = cpy_no % 10;
45  }
46 
47  edm::LogVerbatim("PPSPixelSim") << " arm=" << currentArm_ << " station=" << currentStation_
48  << " roman_pot=" << currentRP_ << " detector=" << currentPlane_;
50  uint32_t kk = id.rawId();
51  edm::LogVerbatim("PPSPixelSim") << "PPSPixelSim: ID=" << kk;
52  return kk;
53 }
Log< level::Info, true > LogVerbatim
Log< level::Error, false > LogError

Member Data Documentation

◆ currentArm_

int PPSPixelOrganization::currentArm_
private

Definition at line 37 of file PPSPixelOrganization.h.

Referenced by unitID().

◆ currentPlane_

int PPSPixelOrganization::currentPlane_
private

Definition at line 40 of file PPSPixelOrganization.h.

Referenced by unitID().

◆ currentRP_

int PPSPixelOrganization::currentRP_
private

Definition at line 39 of file PPSPixelOrganization.h.

Referenced by unitID().

◆ currentStation_

int PPSPixelOrganization::currentStation_
private

Definition at line 38 of file PPSPixelOrganization.h.

Referenced by unitID().

◆ currentUnitID_

int PPSPixelOrganization::currentUnitID_
private

Definition at line 36 of file PPSPixelOrganization.h.