ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::eFexInputProvider Class Reference

#include <eFexInputProvider.h>

Inheritance diagram for LVL1::eFexInputProvider:
Collaboration diagram for LVL1::eFexInputProvider:

Public Member Functions

 eFexInputProvider (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~eFexInputProvider ()
 
virtual StatusCode initialize () override final
 
virtual StatusCode fillTopoInputEvent (TCS::TopoInputEvent &) const override final
 

Private Member Functions

void CalculateCoordinates (int32_t roiWord, double &eta, double &phi) const
 calculates eta and phi from roiWord More...
 
StatusCode fillEM (TCS::TopoInputEvent &inputEvent) const
 
StatusCode fillTau (TCS::TopoInputEvent &inputEvent) const
 

Private Attributes

ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
 
SG::ReadHandleKey< xAOD::eFexEMRoIContainerm_eEM_EDMKey {this, "eFexEMRoIKey", "L1_eEMRoI", "eFEXEM EDM"}
 
SG::ReadHandleKey< xAOD::eFexTauRoIContainerm_eTau_EDMKey {this, "eFexTauRoIKey", "L1_eTauRoI", "eFEXTau EDM"}
 

Static Private Attributes

static const double m_EtDouble_conversion = 0.1
 
static const double m_phiDouble_conversion = 0.05
 
static const double m_etaDouble_conversion = 0.025
 

Detailed Description

Definition at line 17 of file eFexInputProvider.h.

Constructor & Destructor Documentation

◆ eFexInputProvider()

eFexInputProvider::eFexInputProvider ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 27 of file eFexInputProvider.cxx.

28  :
29  base_class(type, name, parent)
30 {
31  declareInterface<LVL1::IInputTOBConverter>( this );
32 }

◆ ~eFexInputProvider()

eFexInputProvider::~eFexInputProvider ( )
virtual

Definition at line 34 of file eFexInputProvider.cxx.

35 {}

Member Function Documentation

◆ CalculateCoordinates()

void eFexInputProvider::CalculateCoordinates ( int32_t  roiWord,
double &  eta,
double &  phi 
) const
private

calculates eta and phi from roiWord

Definition at line 185 of file eFexInputProvider.cxx.

185  {
187  double TwoPI = 2 * M_PI;
188  CoordinateRange coordRange = get.coordinate( roiWord );
189 
190  eta = coordRange.eta();
191  phi = coordRange.phi();
192  if( phi > M_PI ) phi -= TwoPI;
193 }

◆ fillEM()

StatusCode eFexInputProvider::fillEM ( TCS::TopoInputEvent inputEvent) const
private

Definition at line 48 of file eFexInputProvider.cxx.

48  {
49  if (m_eEM_EDMKey.empty()) {
50  ATH_MSG_DEBUG("eFex EM input disabled, skip filling");
51  return StatusCode::SUCCESS;
52  }
53 
55  ATH_CHECK(eEM_EDM.isValid());
56 
57  for(const auto it : * eEM_EDM){
58  const xAOD::eFexEMRoI* eFexRoI = it;
59  ATH_MSG_DEBUG( "EDM eFex Number: "
60  << +eFexRoI->eFexNumber() // returns an 8 bit unsigned integer referring to the eFEX number
61  << " et: "
62  << eFexRoI->et() // returns the et value of the EM cluster in MeV
63  << " etTOB: "
64  << eFexRoI->etTOB() // returns the et value of the EM cluster in units of 100 MeV
65  << " eta: "
66  << eFexRoI->eta() // returns a floating point global eta
67  << " phi: "
68  << eFexRoI->phi() // returns a floating point global phi
69  << " iEtaTopo: "
70  << eFexRoI->iEtaTopo() // returns 40 x eta (custom function for L1Topo)
71  << " iPhiTopo: "
72  << eFexRoI->iPhiTopo() // returns 20 x phi (custom function for L1Topo)
73  << " reta: "
74  << eFexRoI->RetaThresholds() // jet disc 1
75  << " rhad: "
76  << eFexRoI->RhadThresholds() // jet disc 2
77  << " wstot: "
78  << eFexRoI->WstotThresholds() // jet disc 3
79  );
80 
81 
82  unsigned int EtTopo = eFexRoI->etTOB();
83  int etaTopo = eFexRoI->iEtaTopo();
84  int phiTopo = eFexRoI->iPhiTopo();
85  unsigned int reta = eFexRoI->RetaThresholds();
86  unsigned int rhad = eFexRoI->RhadThresholds();
87  unsigned int wstot = eFexRoI->WstotThresholds();
88 
89  //Em TOB
90  TCS::eEmTOB eem( EtTopo, etaTopo, static_cast<unsigned int>(phiTopo), TCS::EEM , static_cast<long int>(eFexRoI->word0()) );
91  eem.setEtDouble( static_cast<double>(EtTopo*m_EtDouble_conversion) );
92  eem.setEtaDouble( static_cast<double>(etaTopo*m_etaDouble_conversion) );
93  eem.setPhiDouble( static_cast<double>(phiTopo*m_phiDouble_conversion) );
94  eem.setReta( reta );
95  eem.setRhad( rhad );
96  eem.setWstot( wstot );
97 
98  inputEvent.addeEm( eem );
99 
100  auto mon_hEmEt = Monitored::Scalar("eEmTOBEt", eem.EtDouble());
101  auto mon_hEmREta = Monitored::Scalar("eEmTOBREta", eem.Reta());
102  auto mon_hEmRHad = Monitored::Scalar("eEmTOBRHad", eem.Rhad());
103  auto mon_hEmWsTot = Monitored::Scalar("eEmTOBWsTot", eem.Wstot());
104  auto mon_hEmPhi = Monitored::Scalar("eEmTOBPhi", eem.phi());
105  auto mon_hEmEta = Monitored::Scalar("eEmTOBEta", eem.eta());
106  Monitored::Group(m_monTool, mon_hEmEt, mon_hEmREta, mon_hEmRHad, mon_hEmWsTot, mon_hEmPhi, mon_hEmEta);
107 
108  }
109 
110  return StatusCode::SUCCESS;
111 }

◆ fillTau()

StatusCode eFexInputProvider::fillTau ( TCS::TopoInputEvent inputEvent) const
private

Definition at line 115 of file eFexInputProvider.cxx.

115  {
116  if (m_eTau_EDMKey.empty()) {
117  ATH_MSG_DEBUG("eFex Tau input disabled, skip filling");
118  return StatusCode::SUCCESS;
119  }
120 
122  ATH_CHECK(eTau_EDM.isValid());
123 
124  for(const auto it : * eTau_EDM){
125  const xAOD::eFexTauRoI* eFexTauRoI = it;
126  ATH_MSG_DEBUG( "EDM eFex Number: "
127  << +eFexTauRoI->eFexNumber() // returns an 8 bit unsigned integer referring to the eFEX number
128  << " et: "
129  << eFexTauRoI->et() // returns the et value of the Tau cluster in MeV
130  << " etTOB: "
131  << eFexTauRoI->etTOB() // returns the et value of the Tau cluster in units of 100 MeV
132  << " eta: "
133  << eFexTauRoI->eta() // returns a floating point global eta
134  << " phi: "
135  << eFexTauRoI->phi() // returns a floating point global phi
136  << " iEtaTopo: "
137  << eFexTauRoI->iEtaTopo() // returns 40 x eta (custom function for L1Topo)
138  << " iPhiTopo: "
139  << eFexTauRoI->iPhiTopo() // returns 20 x phi (custom function for L1Topo)
140  << " rCore: "
141  << eFexTauRoI->tauOneThresholds() // rCore or BDT working point (eTau algo agnostic accessor)
142  << " rHad: "
143  << eFexTauRoI->tauTwoThresholds() // rHad
144  );
145 
146 
147  unsigned int EtTopo = eFexTauRoI->etTOB();
148  int etaTopo = eFexTauRoI->iEtaTopo();
149  int phiTopo = eFexTauRoI->iPhiTopo();
150  unsigned int rCore = eFexTauRoI->tauOneThresholds();
151  unsigned int rHad = eFexTauRoI->tauTwoThresholds();
152 
153  //Tau TOB
154  TCS::eTauTOB etau( EtTopo, etaTopo, static_cast<unsigned int>(phiTopo), TCS::ETAU );
155  etau.setEtDouble( static_cast<double>(EtTopo*m_EtDouble_conversion) );
156  etau.setEtaDouble( static_cast<double>(etaTopo*m_etaDouble_conversion) );
157  etau.setPhiDouble( static_cast<double>(phiTopo*m_phiDouble_conversion) );
158 
159  etau.setRCore( rCore );
160  etau.setRHad( rHad );
161 
162  inputEvent.addeTau( etau );
163  inputEvent.addcTau( etau );
164 
165  auto mon_hTauEt = Monitored::Scalar("eTauTOBEt", etau.EtDouble());
166  auto mon_hTauRCore = Monitored::Scalar("eTauTOBRCore", etau.rCore());
167  auto mon_hTauRHad = Monitored::Scalar("eTauTOBRHad", etau.rHad());
168  auto mon_hTauPhi = Monitored::Scalar("eTauTOBPhi", etau.phi());
169  auto mon_hTauEta = Monitored::Scalar("eTauTOBEta", etau.eta());
170  Monitored::Group(m_monTool, mon_hTauEt, mon_hTauRCore, mon_hTauRHad, mon_hTauPhi, mon_hTauEta);
171  }
172 
173  return StatusCode::SUCCESS;
174 }

◆ fillTopoInputEvent()

StatusCode eFexInputProvider::fillTopoInputEvent ( TCS::TopoInputEvent inputEvent) const
finaloverridevirtual

Definition at line 177 of file eFexInputProvider.cxx.

177  {
178  ATH_CHECK(fillEM(inputEvent));
179  ATH_CHECK(fillTau(inputEvent));
180  return StatusCode::SUCCESS;
181 }

◆ initialize()

StatusCode eFexInputProvider::initialize ( )
finaloverridevirtual

Definition at line 38 of file eFexInputProvider.cxx.

38  {
39 
40  CHECK(m_eEM_EDMKey.initialize(SG::AllowEmpty));
41  CHECK(m_eTau_EDMKey.initialize(SG::AllowEmpty));
42 
43  if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
44  return StatusCode::SUCCESS;
45 }

Member Data Documentation

◆ m_eEM_EDMKey

SG::ReadHandleKey<xAOD::eFexEMRoIContainer> LVL1::eFexInputProvider::m_eEM_EDMKey {this, "eFexEMRoIKey", "L1_eEMRoI", "eFEXEM EDM"}
private

Definition at line 38 of file eFexInputProvider.h.

◆ m_etaDouble_conversion

const double eFexInputProvider::m_etaDouble_conversion = 0.025
staticprivate

Definition at line 44 of file eFexInputProvider.h.

◆ m_eTau_EDMKey

SG::ReadHandleKey<xAOD::eFexTauRoIContainer> LVL1::eFexInputProvider::m_eTau_EDMKey {this, "eFexTauRoIKey", "L1_eTauRoI", "eFEXTau EDM"}
private

Definition at line 39 of file eFexInputProvider.h.

◆ m_EtDouble_conversion

const double eFexInputProvider::m_EtDouble_conversion = 0.1
staticprivate

Definition at line 42 of file eFexInputProvider.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> LVL1::eFexInputProvider::m_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
private

Definition at line 36 of file eFexInputProvider.h.

◆ m_phiDouble_conversion

const double eFexInputProvider::m_phiDouble_conversion = 0.05
staticprivate

Definition at line 43 of file eFexInputProvider.h.


The documentation for this class was generated from the following files:
xAOD::eFexTauRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexTauRoI_v1.cxx:280
test_pyathena.eta
eta
Definition: test_pyathena.py:10
xAOD::eFexTauRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
LVL1::Coordinate::phi
double phi() const
return phi
Definition: Coordinate.cxx:50
xAOD::eFexEMRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexEMRoI_v1.cxx:262
xAOD::eFexTauRoI_v1::eta
float eta() const
setter for the above
LVL1::eFexInputProvider::fillEM
StatusCode fillEM(TCS::TopoInputEvent &inputEvent) const
Definition: eFexInputProvider.cxx:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LVL1::eFexInputProvider::m_phiDouble_conversion
static const double m_phiDouble_conversion
Definition: eFexInputProvider.h:43
xAOD::eFexTauRoI_v1::tauTwoThresholds
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
Definition: eFexTauRoI_v1.cxx:205
skel.it
it
Definition: skel.GENtoEVGEN.py:396
xAOD::eFexEMRoI_v1::eFexNumber
unsigned int eFexNumber() const
Methods to decode data from the TOB/RoI and return to the user.
Definition: eFexEMRoI_v1.cxx:116
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::wstot
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
Definition: TrigEMCluster_v1.cxx:49
xAOD::eFexEMRoI_v1
Class describing a LVL1 eFEX EM region of interest.
Definition: eFexEMRoI_v1.h:33
LVL1::eFexInputProvider::m_eTau_EDMKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eTau_EDMKey
Definition: eFexInputProvider.h:39
xAOD::eFexTauRoI
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition: eFexTauRoI.h:16
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
TCS::TopoInputEvent::addeTau
StatusCode addeTau(const eTauTOB &eTau)
Definition: TopoInputEvent.cxx:61
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
xAOD::eFexEMRoI_v1::word0
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
xAOD::eFexTauRoI_v1::tauOneThresholds
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
Definition: eFexTauRoI_v1.cxx:201
LVL1::eFexInputProvider::m_EtDouble_conversion
static const double m_EtDouble_conversion
Definition: eFexInputProvider.h:42
LVL1::CoordinateRange
CoordinateRange class declaration.
Definition: CoordinateRange.h:36
LVL1::eFexInputProvider::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: eFexInputProvider.h:36
xAOD::eFexTauRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexTauRoI_v1.cxx:272
TCS::eTauTOB
Definition: eTauTOB.h:13
xAOD::eFexTauRoI_v1
Class describing a LVL1 eFEX tau region of interest.
Definition: eFexTauRoI_v1.h:29
xAOD::eFexEMRoI_v1::RetaThresholds
unsigned int RetaThresholds() const
Jet Discriminant 1 (R_eta) results.
Definition: eFexEMRoI_v1.cxx:177
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TCS::eEmTOB
Definition: eEmTOB.h:13
xAOD::eFexEMRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexEMRoI_v1.cxx:254
LVL1::eFexInputProvider::fillTau
StatusCode fillTau(TCS::TopoInputEvent &inputEvent) const
Definition: eFexInputProvider.cxx:115
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::eFexEMRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexEMRoI_v1.cxx:157
xAOD::eFexEMRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFexInputProvider::m_eEM_EDMKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eEM_EDMKey
Definition: eFexInputProvider.h:38
xAOD::eFexTauRoI_v1::phi
float phi() const
Seed supercell index within central tower (0 -> 3)
xAOD::eFexTauRoI_v1::eFexNumber
unsigned int eFexNumber() const
eFEX number
Definition: eFexTauRoI_v1.cxx:114
xAOD::eFexEMRoI_v1::WstotThresholds
unsigned int WstotThresholds() const
Jet Discriminant 3 (W_stot) results.
Definition: eFexEMRoI_v1.cxx:185
xAOD::eFexEMRoI_v1::eta
float eta() const
setter for the above
LVL1::eFexInputProvider::m_etaDouble_conversion
static const double m_etaDouble_conversion
Definition: eFexInputProvider.h:44
TCS::TopoInputEvent::addeEm
StatusCode addeEm(const eEmTOB &eEm)
Definition: TopoInputEvent.cxx:51
LVL1::Coordinate::eta
double eta() const
return eta
Definition: Coordinate.cxx:45
LVL1::CPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: CPRoIDecoder.h:37
xAOD::eFexTauRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexTauRoI_v1.cxx:155
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
TCS::TopoInputEvent::addcTau
StatusCode addcTau(const eTauTOB &eTau)
Definition: TopoInputEvent.cxx:66
TCS::ETAU
@ ETAU
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:22
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
xAOD::eFexEMRoI_v1::RhadThresholds
unsigned int RhadThresholds() const
Jet Discriminant 2 (R_had) results.
Definition: eFexEMRoI_v1.cxx:181
xAOD::eFexEMRoI_v1::phi
float phi() const
Seed supercell index within central tower (0 -> 3)
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
TCS::EEM
@ EEM
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:21