CMS 3D CMS Logo

List of all members | Public Member Functions
TotemT2OrganizationGem Class Reference

#include <SimG4CMS/Forward/interface/TotemT2OrganizationGem.h>

Inheritance diagram for TotemT2OrganizationGem:
TotemVDetectorOrganization TotemT2NumberingSchemeGem

Public Member Functions

uint32_t getUnitID (const G4Step *aStep) const override
 
 TotemT2OrganizationGem ()
 
 ~TotemT2OrganizationGem () override
 
- Public Member Functions inherited from TotemVDetectorOrganization
 TotemVDetectorOrganization ()
 
virtual ~TotemVDetectorOrganization ()
 

Detailed Description

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

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

Definition at line 27 of file TotemT2OrganizationGem.h.

Constructor & Destructor Documentation

◆ TotemT2OrganizationGem()

TotemT2OrganizationGem::TotemT2OrganizationGem ( )

Definition at line 28 of file TotemT2OrganizationGem.cc.

28  {
29  edm::LogVerbatim("ForwardSim") << "Creating TotemT2OrganizationGem";
30 }
Log< level::Info, true > LogVerbatim

◆ ~TotemT2OrganizationGem()

TotemT2OrganizationGem::~TotemT2OrganizationGem ( )
override

Definition at line 32 of file TotemT2OrganizationGem.cc.

32 {}

Member Function Documentation

◆ getUnitID()

uint32_t TotemT2OrganizationGem::getUnitID ( const G4Step *  aStep) const
overridevirtual

Implements TotemVDetectorOrganization.

Definition at line 34 of file TotemT2OrganizationGem.cc.

References ForwardName::getName(), cuy::ii, LogDebug, and AlCaHLTBitMon_QueryRunRegistry::string.

34  {
35  G4VPhysicalVolume* physVol;
36  uint32_t UNITA = 0;
37  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
38 
39 #ifdef SCRIVI
40  for (int ii = 0; ii < touch->GetHistoryDepth(); ii++) {
41  physVol = touch->GetVolume(ii);
42  LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level=" << ii
43  << ", physVol->GetCopyNo()=" << physVol->GetCopyNo();
44  }
45 #endif
46 
47  physVol = touch->GetVolume(0);
48 
49  std::string dName = ForwardName::getName(physVol->GetName());
50  if (dName == "TotemT2gem")
51  UNITA = 10 + physVol->GetCopyNo();
52  else if (dName == "TotemT2gem_supporto")
53  UNITA = 20 + physVol->GetCopyNo();
54  else if (dName == "TotemT2gem_detector7r")
55  UNITA = 100 + physVol->GetCopyNo() + (touch->GetVolume(2)->GetCopyNo()) * 1000;
56  else if (dName == "TotemT2gem_HC7r")
57  UNITA = 200 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
58  else if (dName == "TotemT2gem_drift7r")
59  UNITA = 300 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
60  else if (dName == "TotemT2gem_driftspace7r")
61  UNITA = 400 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
62  else if (dName == "TotemT2gem_GEMa7r")
63  UNITA = 500 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
64  else if (dName == "TotemT2gem_GEMb7r")
65  UNITA = 600 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
66  else if (dName == "TotemT2gem_GEMc7r")
67  UNITA = 700 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
68  else if (dName == "TotemT2gem_GAS7r")
69  UNITA = 800 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
70  else if (dName == "TotemT2gem_GEMa17r")
71  UNITA = 900 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
72  else if (dName == "TotemT2gem_GEMb17r")
73  UNITA = 1000 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
74  else if (dName == "TotemT2gem_GEMc17r")
75  UNITA = 1100 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
76  else if (dName == "TotemT2gem_GAS17r")
77  UNITA = 1200 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
78  else if (dName == "TotemT2gem_GEMa27r")
79  UNITA = 1300 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
80  else if (dName == "TotemT2gem_GEMb27r")
81  UNITA = 1400 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
82  else if (dName == "TotemT2gem_GEMc27r")
83  UNITA = 1500 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
84  else if (dName == "TotemT2gem_GAS27r")
85  UNITA = 1600 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
86  else if (dName == "TotemT2gem_strips7r")
87  UNITA = 1700 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
88  else if (dName == "TotemT2gem_isol7r")
89  UNITA = 1800 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
90  else if (dName == "TotemT2gem_pads7r")
91  UNITA = 1900 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
92  else if (dName == "TotemT2gem_HC17r")
93  UNITA = 2000 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
94 
95  return UNITA;
96 }
ii
Definition: cuy.py:589
std::string getName(const G4String &)
Definition: ForwardName.cc:3
#define LogDebug(id)