ATLAS Offline Software
L1CPHitsTools.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
5 // L1CPHitsTools.h,
7 
8  /***************************************************************************
9  * *
10  * *
11  ***************************************************************************/
12 
13 #ifndef LVL1L1CPHITSTOOLS_H
14 #define LVL1L1CPHITSTOOLS_H
15 
16 #include <string>
17 #include <vector>
18 
22 
23 namespace LVL1
24 {
25 
26 class CMMCPHits;
27 class CPMHits;
28 class CPMRoI;
29 class EmTauROI;
30 
45 class L1CPHitsTools : virtual public IL1CPHitsTools, public AthAlgTool
46 {
47  public:
48 
49  L1CPHitsTools(const std::string& type, const std::string& name,
50  const IInterface* parent);
51 
53  virtual ~L1CPHitsTools ();
54 
56  virtual StatusCode initialize();
58  virtual StatusCode finalize ();
59 
61  virtual void formCPMRoI(const DataVector<EmTauROI>* emTauRoiVec,
62  DataVector<CPMRoI>* cpmRoiVec) const;
64  virtual void formCPMHits(const DataVector<CPMRoI>* cpmRoiVec,
65  DataVector<CPMHits>* cpmHitsVec) const;
67  virtual void formCPMHits(
68  const std::vector<const DataVector<CPMRoI>*>& cpmRoiColls,
69  DataVector<CPMHits>* cpmHitsVec, int peak) const;
71  virtual void formCMMCPHits(const DataVector<CPMHits>* cpmHitsVec,
72  DataVector<CMMCPHits>* cmmHitsVec) const;
74  virtual void formCMMCPHitsModule(const DataVector<CPMHits>* cpmHitsVec,
75  DataVector<CMMCPHits>* cmmHitsMod) const;
77  virtual void formCMMCPHitsCrate(const DataVector<CMMCPHits>* cmmHitsMod,
78  DataVector<CMMCPHits>* cmmHitsCrate) const;
80  virtual void formCMMCPHitsSystem(const DataVector<CMMCPHits>* cmmHitsCrate,
81  DataVector<CMMCPHits>* cmmHitsSys) const;
82 
83  private:
84 
85  typedef std::vector<unsigned int> HitsVector;
86  typedef std::vector<int> ErrorVector;
87 
89  void addCMMCPHits(HitsVector& vec1, const HitsVector& vec2) const;
91  unsigned int addHits(unsigned int hitMult, unsigned int hitVec,
92  int multBits, int vecBits) const;
94  void mergeCMMCPHits(DataVector<CMMCPHits>* cmmHitsVec1,
95  DataVector<CMMCPHits>* cmmHitsVec2) const;
97  void saveCMMCPHits(DataVector<CMMCPHits>* cmmHitsVec,
98  const HitsVector& hits0, const HitsVector& hits1,
99  int crate, int dataId, int peak) const;
100 
101  bool m_debug = false;
102 
103 };
104 
105 } // end of namespace
106 
107 #endif
LVL1::L1CPHitsTools::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: L1CPHitsTools.cxx:43
D3PDMakerTestInstan::vec2
std::vector< D3PDTest::MyVec2 > vec2
Definition: D3PDMakerTestDict.h:14
LVL1::L1CPHitsTools::formCPMRoI
virtual void formCPMRoI(const DataVector< EmTauROI > *emTauRoiVec, DataVector< CPMRoI > *cpmRoiVec) const
EmTauROI to CPMRoI conversion.
Definition: L1CPHitsTools.cxx:61
LVL1::L1CPHitsTools::L1CPHitsTools
L1CPHitsTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: L1CPHitsTools.cxx:25
LVL1::L1CPHitsTools::addHits
unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const
Increment CPM/CMM hit word.
Definition: L1CPHitsTools.cxx:291
LVL1::L1CPHitsTools::formCMMCPHitsSystem
virtual void formCMMCPHitsSystem(const DataVector< CMMCPHits > *cmmHitsCrate, DataVector< CMMCPHits > *cmmHitsSys) const
form partial CMM-CP hits (system) from crate CMM-CP hits
Definition: L1CPHitsTools.cxx:245
LVL1::L1CPHitsTools::formCMMCPHitsModule
virtual void formCMMCPHitsModule(const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsMod) const
form partial CMM-CP hits (module) from CPM hits
Definition: L1CPHitsTools.cxx:168
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::L1CPHitsTools::mergeCMMCPHits
void mergeCMMCPHits(DataVector< CMMCPHits > *cmmHitsVec1, DataVector< CMMCPHits > *cmmHitsVec2) const
Merge CMM-CP hits vectors.
Definition: L1CPHitsTools.cxx:331
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::CPMHits
CPMHits_v1 CPMHits
Define the latest version of the CPMHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMHits.h:14
LVL1::L1CPHitsTools::~L1CPHitsTools
virtual ~L1CPHitsTools()
default destructor
Definition: L1CPHitsTools.cxx:36
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigConf::name
Definition: HLTChainList.h:35
LVL1::L1CPHitsTools::m_debug
bool m_debug
Definition: L1CPHitsTools.h:104
LVL1::L1CPHitsTools::finalize
virtual StatusCode finalize()
standard Athena-Algorithm method
Definition: L1CPHitsTools.cxx:54
LVL1::L1CPHitsTools::formCMMCPHitsCrate
virtual void formCMMCPHitsCrate(const DataVector< CMMCPHits > *cmmHitsMod, DataVector< CMMCPHits > *cmmHitsCrate) const
form partial CMM-CP hits (crate) from module CMM-CP hits
Definition: L1CPHitsTools.cxx:189
IL1CPHitsTools.h
LVL1::L1CPHitsTools::ErrorVector
std::vector< int > ErrorVector
Definition: L1CPHitsTools.h:89
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::L1CPHitsTools::HitsVector
std::vector< unsigned int > HitsVector
Definition: L1CPHitsTools.h:88
LVL1::L1CPHitsTools::formCMMCPHits
virtual void formCMMCPHits(const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsVec) const
form complete CMM-CP hits from CPM hits
Definition: L1CPHitsTools.cxx:152
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::L1CPHitsTools::formCPMHits
virtual void formCPMHits(const DataVector< CPMRoI > *cpmRoiVec, DataVector< CPMHits > *cpmHitsVec) const
form CPM hits from RoIs - single slice
Definition: L1CPHitsTools.cxx:74
LVL1::L1CPHitsTools::addCMMCPHits
void addCMMCPHits(HitsVector &vec1, const HitsVector &vec2) const
Add hits from second vector to first.
Definition: L1CPHitsTools.cxx:275
xAOD::CMMCPHits
CMMCPHits_v1 CMMCPHits
Define the latest version of the CMMCPHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMMCPHits.h:17
xAOD::CPMRoI
CPMRoI_v1 CPMRoI
Define the latest version of the CPMRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMRoI.h:14
LVL1::L1CPHitsTools::saveCMMCPHits
void saveCMMCPHits(DataVector< CMMCPHits > *cmmHitsVec, const HitsVector &hits0, const HitsVector &hits1, int crate, int dataId, int peak) const
Save non-zero CMM-CP hits.
Definition: L1CPHitsTools.cxx:346