ATLAS Offline Software
Loading...
Searching...
No Matches
EmTauRoI_v1.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// System include(s):
7#include <stdexcept>
8
9// xAOD include(s):
11
12// Local include(s):
14
15namespace xAOD {
16
21
22 void EmTauRoI_v1::initialize( uint32_t roiword, float eta, float phi ) {
23
24 setRoIWord( roiword );
25 setEta( eta );
26 setPhi( phi );
27
28 return;
29 }
30
38
39 const uint32_t roi = roiWord();
40 if( ( roi & 0xc0000000 ) == 0 ) {
41 return CPRoIWord;
42 } else if( ( roi & 0xf0000000 ) == 0xa0000000 ) {
43 return EMRoIWord;
44 } else if( ( roi & 0xf0000000 ) == 0xb0000000 ) {
45 return TauRoIWord;
46 }
47
48 throw std::runtime_error( "xAOD::EmTauRoI_v1::roiType() "
49 "Unknown RoI word type found" );
50 return static_cast< RoIType >( -1 );
51 }
52
56 setRoIWord )
57
58
62
63 return ( roiWord() & 0xffff );
64 }
65
66 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, core, setCore )
67 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, emClus, setEmClus )
68 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, tauClus,
69 setTauClus )
70 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, emIsol, setEmIsol )
72 setHadIsol )
73 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EmTauRoI_v1, float, hadCore,
74 setHadCore )
75
76
78 names( "thrNames" );
81 values( "thrValues" );
82
86 void EmTauRoI_v1::addThreshold( const std::string& name, float value ) {
87
88 names( *this ).push_back( name );
89 values( *this ).push_back( value );
90
91 return;
92 }
93
98
99 names( *this ).clear();
100 values( *this ).clear();
101
102 return;
103 }
104
105 AUXSTORE_OBJECT_GETTER( EmTauRoI_v1, std::vector< std::string >, thrNames )
106 AUXSTORE_OBJECT_GETTER( EmTauRoI_v1, std::vector< float >, thrValues )
107
108} // 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 em/tau region of interest.
Definition EmTauRoI_v1.h:35
void setRoIWord(uint32_t value)
Set the "raw" RoI word, describing the em/tau candidate.
EmTauRoI_v1()
Default constructor.
uint32_t roiWord() const
The "raw" RoI word describing the em/tau candidate.
RoIType roiType() const
Get the type of the RoI word.
RoIType
RoI word types.
Definition EmTauRoI_v1.h:45
@ EMRoIWord
This is a Run 2 EM RoI word.
Definition EmTauRoI_v1.h:47
@ CPRoIWord
This is a Run 1 EM/Tau RoI word.
Definition EmTauRoI_v1.h:46
@ TauRoIWord
This is a Run 2 Tau RoI word.
Definition EmTauRoI_v1.h:48
void setPhi(float v)
Set the azimuthal angle of the em/tau candidate.
void clearThresholds()
Remove all the passed thresholds from the RoI.
void addThreshold(const std::string &name, float value)
Add a new threshold that was passed by the RoI.
uint32_t thrPattern() const
The pattern describing which thresholds were passed by the jet.
float phi() const
The azimuthal angle ( ) of the em/tau candidate.
float eta() const
The pseudorapidity ( ) of the em/tau candidate.
void initialize(uint32_t roiword, float eta, float phi)
Initialise the object with its most important properties.
void setEta(float v)
Set the pseudorapidity of the em/tau 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.
setThrPattern hadIsol
setEventNumber uint32_t