ATLAS Offline Software
Public Member Functions | List of all members
LVL1::L1TopoDataMaker Class Reference

#include <L1TopoDataMaker.h>

Collaboration diagram for LVL1::L1TopoDataMaker:

Public Member Functions

 L1TopoDataMaker ()
 Constructor. More...
 
virtual ~L1TopoDataMaker ()
 default destructor More...
 
virtual void makeCPCMXTopoData (const ROIB::RoIBResult *roibResult, DataVector< CPCMXTopoData > *topoData) const
 Fill DataVector of CPCMXTopoData from RoIBResult. More...
 
virtual void makeCPCMXTopoData (const std::vector< ROIB::EMTauResult > &roibData, DataVector< CPCMXTopoData > *topoData) const
 Fill DataVector of CPCMXTopoData from RoIBResult. More...
 
virtual void makeJetCMXTopoData (const ROIB::RoIBResult *roibResult, DataVector< JetCMXTopoData > *topoData) const
 Fill DataVector of JetCMXTopoData from RoIBResult. More...
 
virtual void makeJetCMXTopoData (const std::vector< ROIB::JetEnergyResult > &roibData, DataVector< JetCMXTopoData > *topoData) const
 Fill DataVector of JetCMXTopoData from RoIBResult. More...
 
virtual void makeEnergyTopoData (const ROIB::RoIBResult *roibResult, EnergyTopoData *topoData) const
 Fill EnergyTopoData from RoIBResult. More...
 
virtual void makeEnergyTopoData (const std::vector< ROIB::JetEnergyResult > &roibData, EnergyTopoData *topoData) const
 Fill EnergyTopoData from RoIBResult. More...
 

Detailed Description

This is a tool to reconstruct the CMX -> Topo simulation objects from the RoIBResult.

Author
Alan Watson Alan..nosp@m.Wats.nosp@m.on@ce.nosp@m.rn.c.nosp@m.h

Definition at line 34 of file L1TopoDataMaker.h.

Constructor & Destructor Documentation

◆ L1TopoDataMaker()

LVL1::L1TopoDataMaker::L1TopoDataMaker ( )

Constructor.

Definition at line 24 of file L1TopoDataMaker.cxx.

25 {}

◆ ~L1TopoDataMaker()

LVL1::L1TopoDataMaker::~L1TopoDataMaker ( )
virtual

default destructor

Destructor.

Definition at line 29 of file L1TopoDataMaker.cxx.

30 {}

Member Function Documentation

◆ makeCPCMXTopoData() [1/2]

void LVL1::L1TopoDataMaker::makeCPCMXTopoData ( const ROIB::RoIBResult roibResult,
DataVector< CPCMXTopoData > *  topoData 
) const
virtual

Fill DataVector of CPCMXTopoData from RoIBResult.

retrieve EMTauResult from RoIBResult.
Use other tool to fill CPCMXTopoData from it.

Definition at line 35 of file L1TopoDataMaker.cxx.

35  {
36 
40  const std::vector<ROIB::EMTauResult> &emTauResult = roibResult->eMTauResult();
41  makeCPCMXTopoData(emTauResult, topoData) ;
42 
43  return;
44 }

◆ makeCPCMXTopoData() [2/2]

void LVL1::L1TopoDataMaker::makeCPCMXTopoData ( const std::vector< ROIB::EMTauResult > &  roibData,
DataVector< CPCMXTopoData > *  topoData 
) const
virtual

Fill DataVector of CPCMXTopoData from RoIBResult.

Fill DataVector of CPCMXTopoData from vector of EMTauResult.

retrieve EM/Tau RoIs from EMTauResult.
extract RoI words from them
use vector of RoI words to populate output objects

Create CPCMXTopoData objects from RoI vector. This constructor will check each RoI word corresponds to the specified crate/cmx before filling it, so don't need to sort RoI words into separate vectors

Definition at line 48 of file L1TopoDataMaker.cxx.

48  {
49 
50  // Clear collection before filling
51  topoData->clear();
52 
57  std::vector<uint32_t> roiWords;
58 
59  for (const ROIB::EMTauResult & emtauResult : roibData) {
60  for (const ROIB::EMTauRoI & roi : emtauResult.roIVec() ) {
61  roiWords.push_back( roi.roIWord() );
62  }
63  }
64 
65 
69  for (int crate = 0; crate < 4; ++crate) {
70  for (int cmx = 0; cmx < 2; ++cmx) {
71  CPCMXTopoData* link = new CPCMXTopoData(crate, cmx, roiWords);
72  topoData->push_back(link);
73  }
74  }
75 
76  return;
77 }

◆ makeEnergyTopoData() [1/2]

void LVL1::L1TopoDataMaker::makeEnergyTopoData ( const ROIB::RoIBResult roibResult,
EnergyTopoData topoData 
) const
virtual

Fill EnergyTopoData from RoIBResult.

retrieve JetEnergyResult from RoIBResult.
Use other tool to fill EnergyTopoData from it.

Definition at line 128 of file L1TopoDataMaker.cxx.

128  {
129 
133  const std::vector< ROIB::JetEnergyResult > &jetEnergyResult = roibResult->jetEnergyResult();
134  makeEnergyTopoData(jetEnergyResult, topoData) ;
135 
136  return;
137 }

◆ makeEnergyTopoData() [2/2]

void LVL1::L1TopoDataMaker::makeEnergyTopoData ( const std::vector< ROIB::JetEnergyResult > &  roibData,
EnergyTopoData topoData 
) const
virtual

Fill EnergyTopoData from RoIBResult.

Fill EnergyTopoData from vector of JetEnergyResult.

retrieve Jet RoIs from JetEnergyResult.
extract RoI words from them
use vector of RoI words to populate output object

Initialise EnergyTopoData object from RoI vector.

Definition at line 141 of file L1TopoDataMaker.cxx.

141  {
142 
143 
148  std::vector<uint32_t> roiWords;
149 
150  for (std::vector<ROIB::JetEnergyResult>::const_iterator itResult = roibData.begin(); itResult != roibData.end(); ++itResult) {
151  const std::vector<ROIB::JetEnergyRoI> rois = (*itResult).roIVec();
152  for (std::vector<ROIB::JetEnergyRoI>::const_iterator itRoI = rois.begin(); itRoI != rois.end(); ++itRoI) {
153  uint32_t roiWord = (*itRoI).roIWord();
154  if ((roiWord & 0xc0000000) == 0x40000000) roiWords.push_back(roiWord);
155  }
156  }
157 
160  topoData->addRoIs(roiWords);
161 
162  return;
163 }

◆ makeJetCMXTopoData() [1/2]

void LVL1::L1TopoDataMaker::makeJetCMXTopoData ( const ROIB::RoIBResult roibResult,
DataVector< JetCMXTopoData > *  topoData 
) const
virtual

Fill DataVector of JetCMXTopoData from RoIBResult.

retrieve JetEnergyResult from RoIBResult.
Use other tool to fill JetMXTopoData from it.

Definition at line 82 of file L1TopoDataMaker.cxx.

82  {
83 
87  const std::vector<ROIB::JetEnergyResult> &jetEnergyResult = roibResult->jetEnergyResult();
88  makeJetCMXTopoData(jetEnergyResult, topoData) ;
89 
90  return;
91 }

◆ makeJetCMXTopoData() [2/2]

void LVL1::L1TopoDataMaker::makeJetCMXTopoData ( const std::vector< ROIB::JetEnergyResult > &  roibData,
DataVector< JetCMXTopoData > *  topoData 
) const
virtual

Fill DataVector of JetCMXTopoData from RoIBResult.

Fill DataVector of JetCMXTopoData from vector of JetEnergyResult.

retrieve Jet RoIs from JetEnergyResult.
extract RoI words from them
use vector of RoI words to populate output objects

Create JetCMXTopoData objects from RoI vector. This constructor will check each RoI word corresponds to the specified crate before filling it, so don't need to sort RoI words into separate vectors

Definition at line 95 of file L1TopoDataMaker.cxx.

95  {
96 
97  // Clear collection before filling
98  topoData->clear();
99 
104  std::vector<uint32_t> roiWords;
105 
106  for (std::vector<ROIB::JetEnergyResult>::const_iterator itResult = roibData.begin(); itResult != roibData.end(); ++itResult) {
107  const std::vector<ROIB::JetEnergyRoI> rois = (*itResult).roIVec();
108  for (std::vector<ROIB::JetEnergyRoI>::const_iterator itRoI = rois.begin(); itRoI != rois.end(); ++itRoI) {
109  uint32_t roiWord = (*itRoI).roIWord();
110  if ((roiWord & 0xe0000000) == 0) roiWords.push_back(roiWord);
111  }
112  }
113 
117  for (int crate = 0; crate < 2; ++crate) {
118  JetCMXTopoData* link = new JetCMXTopoData(crate, roiWords);
119  topoData->push_back(link);
120  }
121 
122  return;
123 }

The documentation for this class was generated from the following files:
ROIB::EMTauResult
Definition: EMTauResult.h:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ROIB::RoIBResult::jetEnergyResult
const std::vector< JetEnergyResult > & jetEnergyResult() const
Gets the jet/energy part of the L1 RDO.
Definition: RoIBResult.cxx:64
ROIB::RoIBResult::eMTauResult
const std::vector< EMTauResult > & eMTauResult() const
Gets the egamma part of the L1 RDO.
Definition: RoIBResult.cxx:68
LVL1::L1TopoDataMaker::makeCPCMXTopoData
virtual void makeCPCMXTopoData(const ROIB::RoIBResult *roibResult, DataVector< CPCMXTopoData > *topoData) const
Fill DataVector of CPCMXTopoData from RoIBResult.
Definition: L1TopoDataMaker.cxx:35
LVL1::L1TopoDataMaker::makeJetCMXTopoData
virtual void makeJetCMXTopoData(const ROIB::RoIBResult *roibResult, DataVector< JetCMXTopoData > *topoData) const
Fill DataVector of JetCMXTopoData from RoIBResult.
Definition: L1TopoDataMaker.cxx:82
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
DataVector::clear
void clear()
Erase all the elements in the collection.
LVL1::L1TopoDataMaker::makeEnergyTopoData
virtual void makeEnergyTopoData(const ROIB::RoIBResult *roibResult, EnergyTopoData *topoData) const
Fill EnergyTopoData from RoIBResult.
Definition: L1TopoDataMaker.cxx:128
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ROIB::EMTauRoI
Definition: EMTauRoI.h:20
TriggerTest.rois
rois
Definition: TriggerTest.py:23