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  bool foundEnvelop = false;
34  bool foundPhysVol = false;
35 
36  while (ii < touch->GetHistoryDepth() && (foundEnvelop == false || foundPhysVol == false)) {
37  physVol = touch->GetVolume(ii);
38 
39  edm::LogInfo("PPSSim") << "physVol=" << physVol->GetName() << ", level=" << ii
40  << ", physVol->GetCopyNo()=" << physVol->GetCopyNo();
41 
42  if (physVol->GetName().contains("Envelop")) {
43  currentPlane_ = physVol->GetCopyNo() - 1;
44  foundEnvelop = true;
45  } else if (physVol->GetName().contains("RP_box_primary_vacuum")) {
46  int cpy_no = physVol->GetCopyNo();
47  currentArm_ = (cpy_no / 100) % 10;
48  currentStation_ = (cpy_no / 10) % 10;
49  currentRP_ = cpy_no % 10;
50  foundPhysVol = true;
51  }
52  ++ii;
53  }
54 
55  if (foundPhysVol) {
56  edm::LogInfo("PPSSim") << "Arm, RP, plane = " << currentArm_ << " " << currentRP_ << " " << currentPlane_;
57  } else {
58  edm::LogError("PPSSim") << "Physical volume RP_box_primary_vacuum not found. Cannot determine CTPPSPixelDetId.";
59  }
60 
62  uint32_t kk = id.rawId();
63  edm::LogInfo("PPSSim") << " ID " << kk;
64  return id.rawId();
65 }

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
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PPSPixelOrganization::currentRP_
int currentRP_
Definition: PPSPixelOrganization.h:39
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
PPSPixelOrganization::currentStation_
int currentStation_
Definition: PPSPixelOrganization.h:38
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
PPSPixelOrganization::currentPlane_
int currentPlane_
Definition: PPSPixelOrganization.h:40
cuy.ii
ii
Definition: cuy.py:590