CMS 3D CMS Logo

TotemT2OrganizationGem.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Forward
4 // Class : TotemT2OrganizationGem
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Tue May 16 10:14:34 CEST 2006
11 //
12 
13 // system include files
14 
15 // user include files
19 
20 #include "G4VPhysicalVolume.hh"
21 #include "G4VTouchable.hh"
22 
23 //
24 // constructors and destructor
25 //
26 
27 TotemT2OrganizationGem ::TotemT2OrganizationGem() { edm::LogInfo("ForwardSim") << "Creating TotemT2OrganizationGem"; }
28 
30 
31 uint32_t TotemT2OrganizationGem ::getUnitID(const G4Step* aStep) const {
32  G4VPhysicalVolume* physVol;
33  uint32_t UNITA = 0;
34  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
35  int ii = 0;
36  for (ii = 0; ii < touch->GetHistoryDepth(); ii++) {
37  physVol = touch->GetVolume(ii);
38 
39 #ifdef SCRIVI
40  LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level=" << ii
41  << ", physVol->GetCopyNo()=" << physVol->GetCopyNo();
42 #endif
43  }
44 
45  physVol = touch->GetVolume(0);
46 
47  if (physVol->GetName() == "TotemT2gem")
48  UNITA = 10 + physVol->GetCopyNo();
49  if (physVol->GetName() == "TotemT2gem_supporto")
50  UNITA = 20 + physVol->GetCopyNo();
51  if (physVol->GetName() == "TotemT2gem_detector7r")
52  UNITA = 100 + physVol->GetCopyNo() + (touch->GetVolume(2)->GetCopyNo()) * 1000;
53  if (physVol->GetName() == "TotemT2gem_HC7r")
54  UNITA = 200 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
55  if (physVol->GetName() == "TotemT2gem_drift7r")
56  UNITA = 300 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
57  if (physVol->GetName() == "TotemT2gem_driftspace7r")
58  UNITA = 400 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
59  if (physVol->GetName() == "TotemT2gem_GEMa7r")
60  UNITA = 500 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
61  if (physVol->GetName() == "TotemT2gem_GEMb7r")
62  UNITA = 600 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
63  if (physVol->GetName() == "TotemT2gem_GEMc7r")
64  UNITA = 700 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
65  if (physVol->GetName() == "TotemT2gem_GAS7r")
66  UNITA = 800 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
67  if (physVol->GetName() == "TotemT2gem_GEMa17r")
68  UNITA = 900 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
69  if (physVol->GetName() == "TotemT2gem_GEMb17r")
70  UNITA = 1000 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
71  if (physVol->GetName() == "TotemT2gem_GEMc17r")
72  UNITA = 1100 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
73  if (physVol->GetName() == "TotemT2gem_GAS17r")
74  UNITA = 1200 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
75  if (physVol->GetName() == "TotemT2gem_GEMa27r")
76  UNITA = 1300 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
77  if (physVol->GetName() == "TotemT2gem_GEMb27r")
78  UNITA = 1400 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
79  if (physVol->GetName() == "TotemT2gem_GEMc27r")
80  UNITA = 1500 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
81  if (physVol->GetName() == "TotemT2gem_GAS27r")
82  UNITA = 1600 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
83  if (physVol->GetName() == "TotemT2gem_strips7r")
84  UNITA = 1700 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
85  if (physVol->GetName() == "TotemT2gem_isol7r")
86  UNITA = 1800 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
87  if (physVol->GetName() == "TotemT2gem_pads7r")
88  UNITA = 1900 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
89  if (physVol->GetName() == "TotemT2gem_HC17r")
90  UNITA = 2000 + touch->GetVolume(1)->GetCopyNo() + (touch->GetVolume(3)->GetCopyNo()) * 1000;
91 
92  return UNITA;
93 }
TotemT2OrganizationGem.h
MessageLogger.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
TotemNumberMerger.h
TotemT2OrganizationGem::TotemT2OrganizationGem
TotemT2OrganizationGem()
Definition: TotemT2OrganizationGem.cc:27
TotemT2OrganizationGem::getUnitID
uint32_t getUnitID(const G4Step *aStep) const override
Definition: TotemT2OrganizationGem.cc:31
TotemT2OrganizationGem::~TotemT2OrganizationGem
~TotemT2OrganizationGem() override
Definition: TotemT2OrganizationGem.cc:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
cuy.ii
ii
Definition: cuy.py:589