CMS 3D CMS Logo

Public Member Functions | Private Attributes

TotemT2OrganizationGem Class Reference

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

Inheritance diagram for TotemT2OrganizationGem:
TotemVDetectorOrganization TotemT2NumberingSchemeGem

List of all members.

Public Member Functions

uint32_t GetUnitID (const G4Step *aStep)
uint32_t GetUnitID (const G4Step *aStep) const
 TotemT2OrganizationGem ()
virtual ~TotemT2OrganizationGem ()

Private Attributes

int _currentCSC
int _currentDetectorPosition
int _currentLayer
int _currentPlane
int _currentUnitID
bool _needUpdateData
bool _needUpdateUnitID

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 28 of file TotemT2OrganizationGem.cc.

                                                 :
  _needUpdateUnitID(false), _needUpdateData(false),
  _currentUnitID(-1), _currentPlane(-1), _currentCSC(-1),
  _currentLayer(-1) {
  edm::LogInfo("ForwardSim") << "Creating TotemT2OrganizationGem";
}
TotemT2OrganizationGem::~TotemT2OrganizationGem ( ) [virtual]

Definition at line 35 of file TotemT2OrganizationGem.cc.

                                                  {
}

Member Function Documentation

uint32_t TotemT2OrganizationGem::GetUnitID ( const G4Step *  aStep)

Definition at line 42 of file TotemT2OrganizationGem.cc.

References _currentDetectorPosition, cuy::ii, and LogDebug.

Referenced by GetUnitID().

                                                                {

 G4VPhysicalVolume* physVol;
 uint32_t UNITA = 0;
 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
 int ii =0;
 for( ii = 0; ii < touch->GetHistoryDepth(); ii++ ){
   physVol = touch->GetVolume(ii);

#ifdef SCRIVI
   LogDebug("ForwardSim") << "physVol=" << physVol->GetName() << ", level=" 
                          << ii << ", physVol->GetCopyNo()=" 
                          << physVol->GetCopyNo();
#endif
   if (physVol->GetName() == "TotemT2gem") _currentDetectorPosition = 3;
 }
  
 physVol= touch->GetVolume(0);
  
 if(physVol->GetName() == "TotemT2gem")UNITA = 10 + physVol->GetCopyNo()  ;
 if(physVol->GetName() == "TotemT2gem_supporto")UNITA =20 +  physVol->GetCopyNo();
 if(physVol->GetName() == "TotemT2gem_detector7r")UNITA = 100 + physVol->GetCopyNo() + (touch->GetVolume(2)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_HC7r")UNITA = 200 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_drift7r")UNITA = 300 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_driftspace7r")UNITA = 400 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMa7r")UNITA = 500 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMb7r")UNITA = 600 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMc7r")UNITA = 700 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GAS7r")UNITA = 800 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMa17r")UNITA = 900 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMb17r")UNITA = 1000 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMc17r")UNITA = 1100 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GAS17r")UNITA = 1200 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMa27r")UNITA = 1300 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMb27r")UNITA = 1400 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GEMc27r")UNITA = 1500 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_GAS27r")UNITA = 1600 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_strips7r")UNITA = 1700 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_isol7r")UNITA = 1800 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_pads7r")UNITA = 1900 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;
 if(physVol->GetName() == "TotemT2gem_HC17r")UNITA = 2000 + touch->GetVolume(1)->GetCopyNo()+ (touch->GetVolume(3)->GetCopyNo())*1000;

 return UNITA;
}
uint32_t TotemT2OrganizationGem::GetUnitID ( const G4Step *  aStep) const [virtual]

Implements TotemVDetectorOrganization.

Definition at line 38 of file TotemT2OrganizationGem.cc.

References GetUnitID().

                                                                      {
  return const_cast<TotemT2OrganizationGem *>(this)->GetUnitID(aStep);
}

Member Data Documentation

Definition at line 47 of file TotemT2OrganizationGem.h.

Definition at line 45 of file TotemT2OrganizationGem.h.

Referenced by GetUnitID().

Definition at line 48 of file TotemT2OrganizationGem.h.

Definition at line 46 of file TotemT2OrganizationGem.h.

Definition at line 44 of file TotemT2OrganizationGem.h.

Definition at line 43 of file TotemT2OrganizationGem.h.

Definition at line 42 of file TotemT2OrganizationGem.h.