ATLAS Offline Software
Loading...
Searching...
No Matches
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):
12
13// Local include(s):
15
16namespace xAOD {
17
18 static const size_t SIZE = CaloSampling::CaloSample::Unknown;
19
20 // Constructor
22
24 setRawEnergy )
26 setRawEt )
28 setRawEta )
30 setRawPhi )
32 setRoIword )
34 setNCells )
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
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
#define AUXSTORE_OBJECT_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a complex auxiliary property.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
CaloCell_ID::CaloSample CaloSample
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Description of a trigger calorimeter cluster.
void setRawEnergy(float)
set Raw Energy (no calibration)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static const size_t SIZE
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
setRawEt rawPhi
setRawEt setRawPhi nCells