ATLAS Offline Software
L1JetCMXTools.h
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 #ifndef LVL1L1JETCMXTOOLS_H
7 #define LVL1L1JETCMXTOOLS_H
8 
9 #include <string>
10 #include <vector>
11 
13 #include "GaudiKernel/ServiceHandle.h"
16 #include "TrigConfData/L1Menu.h"
17 
18 namespace LVL1 {
19 
36 class L1JetCMXTools : virtual public IL1JetCMXTools, public AthAlgTool {
37  public:
38  L1JetCMXTools(const std::string& type, const std::string& name,
39  const IInterface* parent);
40 
42  virtual ~L1JetCMXTools();
43 
45  virtual StatusCode initialize();
46 
48  virtual void formCMXJetTob(const xAOD::JEMTobRoIContainer* jemRoiVec,
49  xAOD::CMXJetTobContainer* cmxTobVec) const;
50 
52  virtual void formCMXJetTob(
53  const std::vector<const xAOD::JEMTobRoIContainer*>& jemRoiColls,
54  xAOD::CMXJetTobContainer* cmxTobVec, int peak) const;
55 
57  virtual void formCMXJetHits(const xAOD::CMXJetTobContainer* cmxTobVec,
58  xAOD::CMXJetHitsContainer* cmxHitsVec) const;
59 
61  virtual void formCMXJetHitsCrate(
62  const xAOD::CMXJetTobContainer* cmxTobVec,
63  xAOD::CMXJetHitsContainer* cmxHitsCrate) const;
64 
66  virtual void formCMXJetHitsSystem(
67  const xAOD::CMXJetHitsContainer* cmxHitsCrate,
68  xAOD::CMXJetHitsContainer* cmxHitsSys) const;
70  virtual void formCMXJetHitsTopo(const xAOD::CMXJetTobContainer* cmxTobVec,
71  xAOD::CMXJetHitsContainer* cmxHitsTopo) const;
72 
73  private:
75 
76  typedef std::vector<uint32_t> HitsVector;
77  typedef std::vector<uint32_t> ErrorVector;
78 
80  void getHits(const xAOD::CMXJetTob* tob, HitsVector& hit10, HitsVector& hit11,
81  HitsVector& hit20, HitsVector& hit21) const;
82 
84  void addOverflow(ErrorVector& hitErr, const ErrorVector& tobErr) const;
86  void addCMXJetHits(HitsVector& vec1, const HitsVector& vec2,
87  HitsType type) const;
89  unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits,
90  int vecBits, int nthresh) const;
91 
94  xAOD::CMXJetHitsContainer* cmxHitsVec2) const;
95 
97  const HitsVector& hits0, const HitsVector& hits1,
98  const ErrorVector& err0, const ErrorVector& err1,
99  int crate, int source, int peak) const;
100 
101  SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };
103  int m_crates;
111  bool m_debug;
112 };
113 
114 } // end of namespace
115 
116 #endif
LVL1::L1JetCMXTools::formCMXJetHitsTopo
virtual void formCMXJetHitsTopo(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsTopo) const
form partial CMX-Jet hits (topo) from system CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:263
D3PDMakerTestInstan::vec2
std::vector< D3PDTest::MyVec2 > vec2
Definition: D3PDMakerTestDict.h:14
LVL1::L1JetCMXTools::m_modules
int m_modules
Number of JEM modules per crate.
Definition: L1JetCMXTools.h:105
LVL1::L1JetCMXTools::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: L1JetCMXTools.cxx:48
LVL1::L1JetCMXTools::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: L1JetCMXTools.h:101
LVL1::L1JetCMXTools::addCMXJetHits
void addCMXJetHits(HitsVector &vec1, const HitsVector &vec2, HitsType type) const
Add hits from second vector to first.
Definition: L1JetCMXTools.cxx:409
SG::ReadHandleKey< TrigConf::L1Menu >
LVL1::L1JetCMXTools::getHits
void getHits(const xAOD::CMXJetTob *tob, HitsVector &hit10, HitsVector &hit11, HitsVector &hit20, HitsVector &hit21) const
Get hit map.
Definition: L1JetCMXTools.cxx:330
LVL1::L1JetCMXTools::m_debug
bool m_debug
Debug flag.
Definition: L1JetCMXTools.h:111
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::L1JetCMXTools::HitsType
HitsType
Definition: L1JetCMXTools.h:74
LVL1::L1JetCMXTools::mergeCMXJetHits
void mergeCMXJetHits(xAOD::CMXJetHitsContainer *cmxHitsVec1, xAOD::CMXJetHitsContainer *cmxHitsVec2) const
Merge CMX-Jet hits vectors.
Definition: L1JetCMXTools.cxx:468
LVL1::L1JetCMXTools::MAIN_HITS
@ MAIN_HITS
Definition: L1JetCMXTools.h:74
LVL1::L1JetCMXTools::HitsVector
std::vector< uint32_t > HitsVector
Definition: L1JetCMXTools.h:76
LVL1::L1JetCMXTools::addHits
unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits, int nthresh) const
Increment JEM/CMX hit word.
Definition: L1JetCMXTools.cxx:429
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::IL1JetCMXTools
Definition: IL1JetCMXTools.h:30
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1JetCMXTools::formCMXJetHits
virtual void formCMXJetHits(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsVec) const
form complete CMX-Jet hits from CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:144
LVL1::L1JetCMXTools::m_crates
int m_crates
Number of crates.
Definition: L1JetCMXTools.h:103
LVL1::L1JetCMXTools::~L1JetCMXTools
virtual ~L1JetCMXTools()
default destructor
Definition: L1JetCMXTools.cxx:44
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::CMXJetTob_v1
Description of CMXJetTob_v1.
Definition: CMXJetTob_v1.h:27
TrigConf::name
Definition: HLTChainList.h:35
LVL1::L1JetCMXTools::ErrorVector
std::vector< uint32_t > ErrorVector
Definition: L1JetCMXTools.h:77
LVL1::L1JetCMXTools::addOverflow
void addOverflow(ErrorVector &hitErr, const ErrorVector &tobErr) const
Add overflow bit.
Definition: L1JetCMXTools.cxx:391
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1::L1JetCMXTools::L1JetCMXTools
L1JetCMXTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: L1JetCMXTools.cxx:34
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::L1JetCMXTools
Definition: L1JetCMXTools.h:36
LVL1::L1JetCMXTools::saveCMXJetHits
void saveCMXJetHits(xAOD::CMXJetHitsContainer *cmxHitsVec, const HitsVector &hits0, const HitsVector &hits1, const ErrorVector &err0, const ErrorVector &err1, int crate, int source, int peak) const
Save non-zero CMX-Jet hits.
Definition: L1JetCMXTools.cxx:483
copySelective.source
string source
Definition: copySelective.py:32
LVL1::L1JetCMXTools::FORWARD_HITS
@ FORWARD_HITS
Definition: L1JetCMXTools.h:74
IL1JetCMXTools.h
LVL1::L1JetCMXTools::m_sysCrate
int m_sysCrate
System crate number.
Definition: L1JetCMXTools.h:109
AthAlgTool
Definition: AthAlgTool.h:26
L1Menu.h
LVL1::L1JetCMXTools::formCMXJetTob
virtual void formCMXJetTob(const xAOD::JEMTobRoIContainer *jemRoiVec, xAOD::CMXJetTobContainer *cmxTobVec) const
form CMX-Jet TOBs from RoIs - single slice
Definition: L1JetCMXTools.cxx:58
LVL1::L1JetCMXTools::formCMXJetHitsSystem
virtual void formCMXJetHitsSystem(const xAOD::CMXJetHitsContainer *cmxHitsCrate, xAOD::CMXJetHitsContainer *cmxHitsSys) const
form partial CMX-Jet hits (system) from crate CMX-Jet hits
Definition: L1JetCMXTools.cxx:219
LVL1::L1JetCMXTools::m_maxTobs
int m_maxTobs
Maximum number of TOBs per module to CMXs.
Definition: L1JetCMXTools.h:107
LVL1::L1JetCMXTools::formCMXJetHitsCrate
virtual void formCMXJetHitsCrate(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsCrate) const
form partial CMX-Jet hits (crate) from CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:164