ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODTrigCalo
Root
TrigCaloCluster_v1.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: TrigCaloCluster_v1.cxx 596561 2014-05-12 12:10:42Z krasznaa $
6
7
// System include(s):
8
#include <iostream>
9
10
// xAOD include(s):
11
#include "
xAODCore/AuxStoreAccessorMacros.h
"
12
13
// Local include(s):
14
#include "
xAODTrigCalo/versions/TrigCaloCluster_v1.h
"
15
16
namespace
xAOD
{
17
18
static
const
size_t
SIZE
= CaloSampling::CaloSample::Unknown;
19
20
// Constructor
21
TrigCaloCluster_v1::TrigCaloCluster_v1
() {}
22
23
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
float
, rawEnergy,
24
setRawEnergy )
25
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
float
,
rawEt
,
26
setRawEt )
27
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
float
, rawEta,
28
setRawEta )
29
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
float
,
rawPhi
,
30
setRawPhi )
31
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
long
, RoIword,
32
setRoIword )
33
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
int
,
nCells
,
34
setNCells )
35
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
(
TrigCaloCluster_v1
,
unsigned
int
,
36
clusterQuality, setClusterQuality )
37
38
float
TrigCaloCluster_v1
::rawEnergy(
const
CaloSample
sampling)
const
{
39
static
const
Accessor< std::vector <float > > eAcc(
"rawEnergySample"
);
40
const
std::vector<float>& var = eAcc( *
this
);
41
if
( var.size() <=
static_cast<
size_t
>
( sampling ) ) {
42
std::cerr <<
"xAOD::TrigCaloCluster_v1::rawEnergy ERROR Invalid/unknown "
43
<<
"sampling ("
<< sampling <<
") requested"
<< std::endl;
44
return
0;
45
}
46
return
var[ sampling ];
47
}
48
49
bool
TrigCaloCluster_v1::setRawEnergy
(
const
CaloSample
sampling,
50
const
float
theEnergy) {
51
static
const
Accessor< std::vector <float > > eAcc(
"rawEnergySample"
);
52
std::vector<float>& var = eAcc( *
this
);
53
if
( var.size() <
SIZE
) var.resize(
SIZE
);
54
if
( var.size() <=
static_cast<
size_t
>
( sampling ) ) {
55
std::cerr <<
"xAOD::TrigCaloCluster_v1::setRawEnergy ERROR "
56
<<
"Invalid/unknown sampling ("
<< sampling
57
<<
") requested"
<< std::endl;
58
return
false
;
59
}
60
var
[ sampling ] =
theEnergy
;
61
return
true
;
62
}
63
64
AUXSTORE_OBJECT_GETTER
(
TrigCaloCluster_v1
, std::vector< float >,
65
rawEnergySample )
66
67
}
// namespace xAOD
AuxStoreAccessorMacros.h
AUXSTORE_OBJECT_GETTER
#define AUXSTORE_OBJECT_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a complex auxiliary property.
Definition
AuxStoreAccessorMacros.h:165
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
Definition
AuxStoreAccessorMacros.h:36
CaloSample
CaloCell_ID::CaloSample CaloSample
Definition
CaloCellCollector.cxx:18
TrigCaloCluster_v1.h
xAOD::TrigCaloCluster_v1
Description of a trigger calorimeter cluster.
Definition
TrigCaloCluster_v1.h:28
xAOD::TrigCaloCluster_v1::setRawEnergy
void setRawEnergy(float)
set Raw Energy (no calibration)
xAOD::TrigCaloCluster_v1::TrigCaloCluster_v1
TrigCaloCluster_v1()
Constructor.
Definition
TrigCaloCluster_v1.cxx:21
const
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition
PowhegPythia8EvtGen_jetjet.py:12
beamspotnt.var
var
Definition
bin/beamspotnt.py:1393
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::SIZE
static const size_t SIZE
Definition
TrigCaloCluster_v1.cxx:18
xAOD::rawEt
rawEt
Definition
TrigCaloCluster_v1.cxx:25
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::rawPhi
setRawEt rawPhi
Definition
TrigCaloCluster_v1.cxx:29
xAOD::nCells
setRawEt setRawPhi nCells
Definition
TrigCaloCluster_v1.cxx:33
Generated on
for ATLAS Offline Software by
1.17.0