CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 // $Id: HcalTB02XtalNumberingScheme.cc,v 1.1 2006/06/04 13:59:38 sunanda Exp $
12 //
13 
14 // system include files
15 
16 // user include files
19 
20 //
21 // constructors and destructor
22 //
23 
26  edm::LogInfo("HcalTBSim") << "Creating HcalTB02XtalNumberingScheme";
27 }
28 
30  edm::LogInfo("HcalTBSim") << "Deleting HcalTB02XtalNumberingScheme";
31 }
32 
33 //
34 // member functions
35 //
36 
37 int HcalTB02XtalNumberingScheme::getUnitID(const G4Step* aStep) const {
38 
39  const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
40  int idx=touch->GetReplicaNumber(0);
41  int idl=0;
42  if (touch->GetHistoryDepth() > 0) idl = touch->GetReplicaNumber(1);
43  int idunit = idl*100 + idx;
44  LogDebug("HcalTBSim") << "HcalTB02XtalNumberingScheme:: Row " << idl
45  << " Column " << idl << " idunit = " << idunit;
46  return idunit;
47 }
#define LogDebug(id)
virtual int getUnitID(const G4Step *aStep) const