Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "SimG4CMS/HcalTestBeam/interface/HcalTB02XtalNumberingScheme.h"
00018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00019
00020
00021
00022
00023
00024 HcalTB02XtalNumberingScheme::HcalTB02XtalNumberingScheme() :
00025 HcalTB02NumberingScheme() {
00026 edm::LogInfo("HcalTBSim") << "Creating HcalTB02XtalNumberingScheme";
00027 }
00028
00029 HcalTB02XtalNumberingScheme::~HcalTB02XtalNumberingScheme() {
00030 edm::LogInfo("HcalTBSim") << "Deleting HcalTB02XtalNumberingScheme";
00031 }
00032
00033
00034
00035
00036
00037 int HcalTB02XtalNumberingScheme::getUnitID(const G4Step* aStep) const {
00038
00039 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
00040 int idx=touch->GetReplicaNumber(0);
00041 int idl=0;
00042 if (touch->GetHistoryDepth() > 0) idl = touch->GetReplicaNumber(1);
00043 int idunit = idl*100 + idx;
00044 LogDebug("HcalTBSim") << "HcalTB02XtalNumberingScheme:: Row " << idl
00045 << " Column " << idl << " idunit = " << idunit;
00046 return idunit;
00047 }