ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEMCluster_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: TrigEMCluster_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 constexpr size_t SIZE = CaloSampling::CaloSample::Unknown;
19
20 // Constructor
22
24 setEnergy )
26 setEt )
28 setEta )
30 setPhi )
32 setE237 )
34 setE277 )
36 setFracs1 )
38 setWeta2 )
40 setEhad1 )
42 setEta1 )
44 setEmaxs1 )
46 setE2tsts1 )
48 setE233 )
50 setWstot )
51
52 float TrigEMCluster_v1::energy(const CaloSample sampling) const {
53 static const Accessor< std::vector <float > > eAcc("energySample");
54 const std::vector<float>& var = eAcc( *this );
55 if( var.size() <= static_cast< size_t >( sampling ) ) {
56 std::cerr << "xAOD::TrigEMCluster_v1::energy ERROR Invalid/unknown "
57 << "sampling (" << sampling << ") requested" << std::endl;
58 return 0;
59 }
60 return var[ sampling ];
61 }
62
64 const float theEnergy) {
65 static const Accessor< std::vector <float > > eAcc("energySample");
66 std::vector<float>& var = eAcc( *this );
67 if( var.size() < SIZE ) var.resize( SIZE );
68 if( var.size() <= static_cast< size_t >( sampling ) ) {
69 std::cerr << "xAOD::TrigEMCluster_v1::setEnergy ERROR "
70 << "Invalid/unknown sampling (" << sampling
71 << ") requested" << std::endl;
72 return false;
73 }
74 var[ sampling ] = theEnergy;
75 return true;
76 }
77
78 AUXSTORE_OBJECT_GETTER( TrigEMCluster_v1, std::vector< float >,
79 energySample )
80
81} // namespace xAOD
Scalar eta() const
pseudorapidity method
#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.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
Description of a trigger EM cluster.
void setEnergy(float energy)
set Energy (calibrated)
CaloSampling::CaloSample CaloSample
A convenience typedef.
float energy() const
get Energy (calibrated)
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setEt setPhi setE277 setWeta2 eta1
static const size_t SIZE
setEt setPhi setE277 weta2
setEt setPhi setE277 setWeta2 setEta1 e2tsts1
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
setEt setPhi e277
TrigCaloCluster_v1 TrigCaloCluster
Define the latest version of the trigger calorimeter cluster class.