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