CMS 3D CMS Logo

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

#include <PPSDiamondOrganization.h>

Inheritance diagram for PPSDiamondOrganization:
PPSVDetectorOrganization PPSDiamondNumberingScheme

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 ( )

Definition at line 17 of file PPSDiamondOrganization.cc.

18  : theArm_(-1), theStation_(-1), theRoman_pot_(-1), thePlane_(-1), theDetector_(-1) {}

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

20  {
21  G4VPhysicalVolume* physVol;
22  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
23 
24  for (int ii = 0; ii < touch->GetHistoryDepth(); ii++) {
25  physVol = touch->GetVolume(ii);
26 
27  if (physVol->GetName() == "CTPPS_Diamond_Segment" || physVol->GetName() == "CTPPS_UFSD_Segment") {
28  theDetector_ = physVol->GetCopyNo() % 100;
29  thePlane_ = physVol->GetCopyNo() / 100;
30  LogDebug("PPSSimDiamond") << "\n---------------------CTPPS_Diamond_Segment-------------------------------------"
31  "------------------------------";
32  LogDebug("PPSSimDiamond") << "\t\t\t\t\tDetector name " << physVol->GetName()
33  << " copynumber= " << physVol->GetCopyNo();
34  LogDebug("PPSSimDiamond") << "\t\t\t\t\tdetector= " << theDetector_ << " plane= " << thePlane_ << " ii = " << ii;
35  }
36 
37  else if (physVol->GetName() == "Primary_Vacuum") {
38  int cpy_no = physVol->GetCopyNo();
39  theArm_ = (cpy_no / 100) % 10;
40  theStation_ = (cpy_no / 10) % 10;
41  theRoman_pot_ = cpy_no % 10;
42  }
43  LogDebug("PPSSimDiamond") << "Diamond"
44  << "physVol =" << physVol->GetName() << ", level=" << ii
45  << ", physVol->GetCopyNo()=" << physVol->GetCopyNo() << std::endl;
46  }
48 }

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

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().

PPSDiamondOrganization::theArm_
unsigned int theArm_
Definition: PPSDiamondOrganization.h:19
PPSDiamondOrganization::theRoman_pot_
unsigned int theRoman_pot_
Definition: PPSDiamondOrganization.h:21
PPSDiamondOrganization::theStation_
unsigned int theStation_
Definition: PPSDiamondOrganization.h:20
PPSDiamondOrganization::theDetector_
unsigned int theDetector_
Definition: PPSDiamondOrganization.h:23
CTPPSDiamondDetId
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Definition: CTPPSDiamondDetId.h:24
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
PPSDiamondOrganization::thePlane_
unsigned int thePlane_
Definition: PPSDiamondOrganization.h:22
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
cuy.ii
ii
Definition: cuy.py:590