Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimG4CMS
HcalTestBeam
src
HcalTB04XtalNumberingScheme.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HcalTestBeam
4
// Class : HcalTB04XtalNumberingScheme
5
//
6
// Implementation:
7
// Numbering scheme for crystal calorimeter in 2004 test beam
8
//
9
// Original Author:
10
// Created: Tue 16 10:14:34 CEST 2006
11
// $Id: HcalTB04XtalNumberingScheme.cc,v 1.3 2006/11/13 10:32:15 sunanda Exp $
12
//
13
14
// system include files
15
16
// user include files
17
#include "
SimG4CMS/HcalTestBeam/interface/HcalTB04XtalNumberingScheme.h
"
18
#include "
SimG4CMS/Calo/interface/HcalTestNumberingScheme.h
"
19
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
20
21
using namespace
std;
22
23
//
24
// constructors and destructor
25
//
26
27
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
() :
28
EcalNumberingScheme
() {
29
edm::LogInfo
(
"HcalTBSim"
) <<
"Creating HcalTB04XtalNumberingScheme"
;
30
}
31
32
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
() {
33
edm::LogInfo
(
"HcalTBSim"
) <<
"Deleting HcalTB04XtalNumberingScheme"
;
34
}
35
36
//
37
// member functions
38
//
39
40
uint32_t
HcalTB04XtalNumberingScheme::getUnitID
(
const
EcalBaseNumber
& baseNumber)
const
{
41
42
int
idx=0, idl=0;
43
if
(baseNumber.
getLevels
()<1) {
44
edm::LogWarning
(
"HcalTBSim"
) <<
"HcalTB04XtalNumberingScheme::getUnitID: "
45
<<
"No level found in EcalBaseNumber "
46
<<
"Returning 0"
;
47
}
else
{
48
idx = baseNumber.
getCopyNumber
(0);
49
if
(baseNumber.
getLevels
() > 1) idl = baseNumber.
getCopyNumber
(1);
50
}
51
int
det = 10;
52
uint32_t idunit =
HcalTestNumbering::packHcalIndex
(det,0,1,idl,idx,1);
53
54
LogDebug
(
"HcalTBSim"
) <<
"HcalTB04XtalNumberingScheme : Crystal "
<< idx
55
<<
" Layer "
<< idl <<
" UnitID = 0x"
<< std::hex
56
<< idunit << std::dec;
57
58
return
idunit;
59
60
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
MessageLogger.h
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
HcalTB04XtalNumberingScheme()
Definition:
HcalTB04XtalNumberingScheme.cc:27
edm::LogWarning
Definition:
MessageLogger.h:140
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition:
EcalBaseNumber.cc:27
HcalTB04XtalNumberingScheme.h
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition:
HcalTestNumbering.cc:7
EcalNumberingScheme
Definition:
EcalNumberingScheme.h:14
HcalTB04XtalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const EcalBaseNumber &baseNumber) const
Definition:
HcalTB04XtalNumberingScheme.cc:40
edm::LogInfo
Definition:
MessageLogger.h:214
EcalBaseNumber
Definition:
EcalBaseNumber.h:13
HcalTestNumberingScheme.h
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
~HcalTB04XtalNumberingScheme()
Definition:
HcalTB04XtalNumberingScheme.cc:32
EcalBaseNumber::getLevels
int getLevels() const
Definition:
EcalBaseNumber.cc:22
Generated for CMSSW Reference Manual by
1.8.5