ATLAS Offline Software
Loading...
Searching...
No Matches
JetRoI_v2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6// xAOD include(s):
8
9// Local include(s):
11
12namespace xAOD {
13
15 : SG::AuxElement() {
16
17 }
18
19 void JetRoI_v2::initialize( uint32_t roiword, float eta, float phi ) {
20
21 setRoIWord( roiword );
22 setEta( eta );
23 setPhi( phi );
24
25 return;
26 }
27
31 setRoIWord )
32
33 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, etScale, setEtScale )
34
35
38 float JetRoI_v2::etLarge() const {
39 if ( (roiWord() & 0xe0000000) == 0 ) {
40 if (etScale() == 0) return ( roiWord() & 0x3ff );
41 return ( (roiWord() & 0x3ff)*etScale() );
42 }
43 return 0;
44 }
45
46 float JetRoI_v2::etSmall() const {
47 if ( (roiWord() & 0xe0000000) == 0 ) {
48 if (etScale() == 0) return ( (roiWord()>>10) & 0x1ff );
49 return ( ((roiWord()>>10) & 0x1ff)*etScale() );
50 }
51 return 0;
52 }
53
56 setThrPattern )
57
58 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et4x4, setEt4x4 )
59 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et6x6, setEt6x6 )
60 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetRoI_v2, float, et8x8, setEt8x8 )
61
62
64 names( "thrNames" );
67 values( "thrValues" );
68
72 void JetRoI_v2::addThreshold( const std::string& name, float value ) {
73
74 names( *this ).push_back( name );
75 values( *this ).push_back( value );
76
77 return;
78 }
79
84
85 names( *this ).clear();
86 values( *this ).clear();
87
88 return;
89 }
90
91 AUXSTORE_OBJECT_GETTER( JetRoI_v2, std::vector< std::string >, thrNames )
92 AUXSTORE_OBJECT_GETTER( JetRoI_v2, std::vector< float >, thrValues )
93
94} // 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
AuxElement()
Default constructor.
Class describing a LVL1 jet region of interest.
Definition JetRoI_v2.h:35
float etLarge() const
The ET values stored in the RoI.
void addThreshold(const std::string &name, float value)
Add a new threshold that was passed by the RoI.
Definition JetRoI_v2.cxx:72
JetRoI_v2()
Default constructor.
Definition JetRoI_v2.cxx:14
void setPhi(float v)
Set the azimuthal angle of the jet candidate.
float etScale() const
The ET scale for RoI digits.
uint32_t roiWord() const
The "raw" RoI word describing the jet candidate.
void initialize(uint32_t roiword, float eta, float phi)
Initialise the object with its most important properties.
Definition JetRoI_v2.cxx:19
float etSmall() const
float eta() const
The pseudorapidity ( ) of the jet candidate.
float phi() const
The azimuthal angle ( ) of the jet candidate.
void setRoIWord(uint32_t value)
Set the "raw" RoI word, describing the jet candidate.
void clearThresholds()
Remove all the passed thresholds from the RoI.
Definition JetRoI_v2.cxx:83
void setEta(float v)
Set the pseudorapidity of the jet candidate.
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static const SG::AuxElement::Accessor< std::vector< std::string > > names("thrNames")
Accessor for the names of the passed thresholds.
static AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(EmTauRoI_v1, uint32_t, roiWord, setRoIWord) uint32_t EmTauRoI_v1 const SG::AuxElement::Accessor< std::vector< float > > values("thrValues")
This is a convenience function for accessing the threshold pattern part of the RoI.
setEventNumber uint32_t