ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
CaloD3PDMaker
src
MBTSFillerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id$
12
13
14
#include "
MBTSFillerTool.h
"
15
#include "
TileEvent/TileCell.h
"
16
#include "
TileIdentifier/TileTBID.h
"
17
#include "
AthenaKernel/errorcheck.h
"
18
#include "math.h"
19
20
21
namespace
D3PD
{
22
23
30
MBTSFillerTool::MBTSFillerTool
31
(
const
std::string&
type
,
32
const
std::string& name,
33
const
IInterface* parent)
34
:
BlockFillerTool
<
TileCell
> (
type
, name, parent)
35
{
36
declareProperty(
"SaveEtaPhiInfo"
,
m_saveEtaPhi
=
true
);
37
book
().ignore();
// Avoid coverity warnings
38
}
39
40
44
StatusCode
MBTSFillerTool::book
()
45
{
46
CHECK
(
addVariable
(
"E"
,
m_E
,
"MBTS counter energy."
) );
47
48
if
(
m_saveEtaPhi
) {
49
CHECK
(
addVariable
(
"eta"
,
m_eta
,
"MBTS counter eta."
) );
50
CHECK
(
addVariable
(
"phi"
,
m_phi
,
"MBTS counter phi."
) );
51
}
52
53
CHECK
(
addVariable
(
"time"
,
m_time
,
"MBTS counter time."
) );
54
CHECK
(
addVariable
(
"quality"
,
m_quality
,
"MBTS counter quality."
) );
55
CHECK
(
addVariable
(
"type"
,
m_type
,
"MBTS counter type. +-1, depending on side."
) );
56
CHECK
(
addVariable
(
"module"
,
m_module
,
"MBTS counter module. 0-7, depending on phi."
) );
57
CHECK
(
addVariable
(
"channel"
,
m_channel
,
"MBTS counter channel. 0-1, depending on eta. "
"Zero is closer to the beam pipe."
) );
58
59
return
StatusCode::SUCCESS;
60
}
61
62
71
StatusCode
MBTSFillerTool::fill
(
const
TileCell
& c) {
72
const
TileTBID
* tileid = 0;
73
CHECK
( detStore()->retrieve (tileid) );
74
75
*
m_E
= c.energy();
76
77
if
(
m_saveEtaPhi
) {
78
*
m_eta
= c.eta();
79
*
m_phi
= c.phi();
80
}
81
82
*
m_time
= c.time();
83
*
m_quality
= c.quality();
84
85
Identifier
id
= c.ID();
86
int
module = tileid->module(
id
);
87
88
*
m_type
= tileid->
type
(
id
);
89
*
m_module
=
module
;
90
*
m_channel
= tileid->
channel
(
id
);
91
92
return
StatusCode::SUCCESS;
93
}
94
95
96
}
// namespace D3PD
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
MBTSFillerTool.h
Block filler tool for MBTS information.
TileTBID.h
TileCell.h
D3PD::BlockFillerTool< TileCell >::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Definition
AddVariable.cxx:85
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition
BlockFillerTool.h:65
D3PD::MBTSFillerTool::m_time
float * m_time
Variable: Counter time.
Definition
MBTSFillerTool.h:67
D3PD::MBTSFillerTool::m_channel
int * m_channel
Variable: Counter channel.
Definition
MBTSFillerTool.h:80
D3PD::MBTSFillerTool::m_eta
float * m_eta
Variable: Counter eta.
Definition
MBTSFillerTool.h:61
D3PD::MBTSFillerTool::m_type
int * m_type
Variable: Counter type. +-1, depending on side.
Definition
MBTSFillerTool.h:73
D3PD::MBTSFillerTool::m_phi
float * m_phi
Variable: Counter phi.
Definition
MBTSFillerTool.h:64
D3PD::MBTSFillerTool::m_quality
int * m_quality
Variable: Counter quality.
Definition
MBTSFillerTool.h:70
D3PD::MBTSFillerTool::MBTSFillerTool
MBTSFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
MBTSFillerTool.cxx:31
D3PD::MBTSFillerTool::m_module
int * m_module
Variable: Counter module. 0-7, depending on phi.
Definition
MBTSFillerTool.h:76
D3PD::MBTSFillerTool::m_saveEtaPhi
bool m_saveEtaPhi
Definition
MBTSFillerTool.h:82
D3PD::MBTSFillerTool::fill
virtual StatusCode fill(const TileCell &c) override
Fill one block — type-safe version.
Definition
MBTSFillerTool.cxx:71
D3PD::MBTSFillerTool::book
virtual StatusCode book() final
Book variables for this block.
Definition
MBTSFillerTool.cxx:44
D3PD::MBTSFillerTool::m_E
float * m_E
Variable: Counter energy.
Definition
MBTSFillerTool.h:58
TileCell
Definition
TileCell.h:57
TileTBID
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
Definition
Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:65
TileTBID::type
int type(const Identifier &id) const
extract type field from TileTB identifier
Definition
Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:146
TileTBID::channel
int channel(const Identifier &id) const
extract channel field from TileTB identifier
Definition
Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:154
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
Identifier
Definition
IdentifierFieldParser.cxx:14
type
Generated on
for ATLAS Offline Software by
1.17.0