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 PPSPixelNumberingScheme

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::LogInfo("PPSSim") << "Creating PPSPixelOrganization";
23 }

◆ ~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.

29  {
30  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
31  G4VPhysicalVolume* physVol;
32  int ii = 0;
33 
34  for (ii = 0; ii < touch->GetHistoryDepth(); ii++) {
35  physVol = touch->GetVolume(ii);
36 
37  edm::LogInfo("PPSSim") << "physVol=" << physVol->GetName() << ", level=" << ii
38  << ", physVol->GetCopyNo()=" << physVol->GetCopyNo();
39 
40  if (physVol->GetName().contains("Envelop")) {
41  currentPlane_ = physVol->GetCopyNo() - 1;
42  } else if (physVol->GetName() == "RP_box_primary_vacuum") {
43  int cpy_no = physVol->GetCopyNo();
44  currentArm_ = (cpy_no / 100) % 10;
45  currentStation_ = (cpy_no / 10) % 10;
46  currentRP_ = cpy_no % 10;
47  }
48  }
49 
50  edm::LogInfo("PPSSim") << currentArm_ << " " << currentRP_ << " " << currentPlane_;
51 
53  uint32_t kk = id.rawId();
54  edm::LogInfo("PPSSim") << " ID " << kk;
55  return id.rawId();
56 }

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

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.

PPSPixelOrganization::currentUnitID_
int currentUnitID_
Definition: PPSPixelOrganization.h:36
PPSPixelOrganization::currentArm_
int currentArm_
Definition: PPSPixelOrganization.h:37
edm::LogInfo
Definition: MessageLogger.h:254
PPSPixelOrganization::currentRP_
int currentRP_
Definition: PPSPixelOrganization.h:39
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
PPSPixelOrganization::currentStation_
int currentStation_
Definition: PPSPixelOrganization.h:38
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
PPSPixelOrganization::currentPlane_
int currentPlane_
Definition: PPSPixelOrganization.h:40
cuy.ii
ii
Definition: cuy.py:590