![]() |
![]() |
#include <SimG4CMS/Forward/interface/TotemT2OrganizationGem.h>
Public Member Functions | |
uint32_t | GetUnitID (const G4Step *aStep) const |
uint32_t | GetUnitID (const G4Step *aStep) |
TotemT2OrganizationGem () | |
virtual | ~TotemT2OrganizationGem () |
Private Attributes | |
int | _currentCSC |
int | _currentDetectorPosition |
int | _currentLayer |
int | _currentPlane |
int | _currentUnitID |
bool | _needUpdateData |
bool | _needUpdateUnitID |
Usage: Used in TotemSD to get unique ID of sensitive detector element
Definition at line 27 of file TotemT2OrganizationGem.h.
TotemT2OrganizationGem::TotemT2OrganizationGem | ( | ) |
Definition at line 28 of file TotemT2OrganizationGem.cc.
00028 : 00029 _needUpdateUnitID(false), _needUpdateData(false), 00030 _currentUnitID(-1), _currentPlane(-1), _currentCSC(-1), 00031 _currentLayer(-1) { 00032 edm::LogInfo("ForwardSim") << "Creating TotemT2OrganizationGem"; 00033 }
TotemT2OrganizationGem::~TotemT2OrganizationGem | ( | ) | [virtual] |
uint32_t TotemT2OrganizationGem::GetUnitID | ( | const G4Step * | aStep | ) | const [virtual] |
Implements TotemVDetectorOrganization.
Definition at line 38 of file TotemT2OrganizationGem.cc.
References GetUnitID().
00038 { 00039 return const_cast<TotemT2OrganizationGem *>(this)->GetUnitID(aStep); 00040 }
uint32_t TotemT2OrganizationGem::GetUnitID | ( | const G4Step * | aStep | ) |
Definition at line 42 of file TotemT2OrganizationGem.cc.
References _currentDetectorPosition, and LogDebug.
Referenced by GetUnitID().
00042 { 00043 00044 G4VPhysicalVolume* physVol; 00045 uint32_t UNITA = 0; 00046 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable(); 00047 int ii =0; 00048 for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){ 00049 physVol = touch->GetVolume(ii); 00050 00051 #ifdef SCRIVI 00052 LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level=" 00053 << ii << ", physVol->GetCopyNo()=" 00054 << physVol->GetCopyNo(); 00055 #endif 00056 if (physVol->GetName() == "TotemT2gem") _currentDetectorPosition = 3; 00057 } 00058 00059 physVol= touch->GetVolume(0); 00060 00061 if(physVol->GetName() == "TotemT2gem")UNITA = 10 + physVol->GetCopyNo() ; 00062 if(physVol->GetName() == "TotemT2gem_supporto")UNITA =20 + physVol->GetCopyNo(); 00063 if(physVol->GetName() == "TotemT2gem_detector7r")UNITA = 100 + physVol->GetCopyNo() + (touch->GetVolume(2)->GetCopyNo())*1000; 00064 if(physVol->GetName() == "TotemT2gem_HC7r")UNITA = 200 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00065 if(physVol->GetName() == "TotemT2gem_drift7r")UNITA = 300 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00066 if(physVol->GetName() == "TotemT2gem_driftspace7r")UNITA = 400 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00067 if(physVol->GetName() == "TotemT2gem_GEMa7r")UNITA = 500 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00068 if(physVol->GetName() == "TotemT2gem_GEMb7r")UNITA = 600 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00069 if(physVol->GetName() == "TotemT2gem_GEMc7r")UNITA = 700 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00070 if(physVol->GetName() == "TotemT2gem_GAS7r")UNITA = 800 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00071 if(physVol->GetName() == "TotemT2gem_GEMa17r")UNITA = 900 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00072 if(physVol->GetName() == "TotemT2gem_GEMb17r")UNITA = 1000 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00073 if(physVol->GetName() == "TotemT2gem_GEMc17r")UNITA = 1100 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00074 if(physVol->GetName() == "TotemT2gem_GAS17r")UNITA = 1200 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00075 if(physVol->GetName() == "TotemT2gem_GEMa27r")UNITA = 1300 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00076 if(physVol->GetName() == "TotemT2gem_GEMb27r")UNITA = 1400 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00077 if(physVol->GetName() == "TotemT2gem_GEMc27r")UNITA = 1500 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00078 if(physVol->GetName() == "TotemT2gem_GAS27r")UNITA = 1600 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00079 if(physVol->GetName() == "TotemT2gem_strips7r")UNITA = 1700 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00080 if(physVol->GetName() == "TotemT2gem_isol7r")UNITA = 1800 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00081 if(physVol->GetName() == "TotemT2gem_pads7r")UNITA = 1900 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00082 if(physVol->GetName() == "TotemT2gem_HC17r")UNITA = 2000 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000; 00083 00084 return UNITA; 00085 }
int TotemT2OrganizationGem::_currentCSC [private] |
Definition at line 47 of file TotemT2OrganizationGem.h.
int TotemT2OrganizationGem::_currentLayer [private] |
Definition at line 48 of file TotemT2OrganizationGem.h.
int TotemT2OrganizationGem::_currentPlane [private] |
Definition at line 46 of file TotemT2OrganizationGem.h.
int TotemT2OrganizationGem::_currentUnitID [private] |
Definition at line 44 of file TotemT2OrganizationGem.h.
bool TotemT2OrganizationGem::_needUpdateData [private] |
Definition at line 43 of file TotemT2OrganizationGem.h.
Definition at line 42 of file TotemT2OrganizationGem.h.