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

Definition at line 27 of file TotemT2OrganizationGem.cc.

27  {
28  edm::LogInfo("ForwardSim") << "Creating TotemT2OrganizationGem";
29 }
TotemT2OrganizationGem::~TotemT2OrganizationGem ( )
override

Definition at line 31 of file TotemT2OrganizationGem.cc.

31  {
32 }

Member Function Documentation

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

Implements TotemVDetectorOrganization.

Definition at line 34 of file TotemT2OrganizationGem.cc.

References cuy::ii, and LogDebug.

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