CMS 3D CMS Logo

HcalTB02XtalNumberingScheme.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalTestBeam
4 // Class : HcalTB02XtalNumberingScheme
5 //
6 // Implementation:
7 // Numbering scheme for crystal calorimeter in 2002 test beam
8 //
9 // Original Author:
10 // Created: Sun 21 10:14:34 CEST 2006
11 //
12 
13 // system include files
14 
15 // user include files
18 
19 //
20 // constructors and destructor
21 //
22 
24  edm::LogVerbatim("HcalTBSim") << "Creating HcalTB02XtalNumberingScheme";
25 }
26 
28  edm::LogVerbatim("HcalTBSim") << "Deleting HcalTB02XtalNumberingScheme";
29 }
30 
31 //
32 // member functions
33 //
34 
35 int HcalTB02XtalNumberingScheme::getUnitID(const G4Step* aStep) const {
36  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
37  int idx = touch->GetReplicaNumber(0);
38  int idl = 0;
39  if (touch->GetHistoryDepth() > 0)
40  idl = touch->GetReplicaNumber(1);
41  int idunit = idl * 100 + idx;
42  edm::LogVerbatim("HcalTBSim") << "HcalTB02XtalNumberingScheme:: Row " << idl << " Column " << idl << " idunit = " << idunit;
43  return idunit;
44 }
int getUnitID(const G4Step *aStep) const override