CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 //#define EDM_ML_DEBUG
20 //
21 // constructors and destructor
22 //
23 
25  edm::LogVerbatim("HcalTBSim") << "Creating HcalTB02XtalNumberingScheme";
26 }
27 
29 #ifdef EDM_ML_DEBUG
30  edm::LogVerbatim("HcalTBSim") << "Deleting HcalTB02XtalNumberingScheme";
31 #endif
32 }
33 
34 //
35 // member functions
36 //
37 
38 int HcalTB02XtalNumberingScheme::getUnitID(const G4Step* aStep) const {
39  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
40  int idx = touch->GetReplicaNumber(0);
41  int idl = 0;
42  if (touch->GetHistoryDepth() > 0)
43  idl = touch->GetReplicaNumber(1);
44  int idunit = idl * 100 + idx;
45 #ifdef EDM_ML_DEBUG
46  edm::LogVerbatim("HcalTBSim") << "HcalTB02XtalNumberingScheme:: Row " << idl << " Column " << idl
47  << " idunit = " << idunit;
48 #endif
49  return idunit;
50 }
Log< level::Info, true > LogVerbatim
int getUnitID(const G4Step *aStep) const override