ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloCells2TriggerTowers.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGT1CALOCALIBTOOLS_L1CALOCELLS2TRIGGERTOWERS_H
6#define TRIGT1CALOCALIBTOOLS_L1CALOCELLS2TRIGGERTOWERS_H
7
8// Athena Includes
9#include "AsgTools/AsgTool.h"
11#include "GaudiKernel/ToolHandle.h"
13
14// Calo includes
19#include "CaloEvent/CaloCell.h"
21
22// LAr includes
26
27// Tile includes
31
32// PABC interface include
34
35// STL includes
36#include <map>
37#include <vector>
38#include <string>
39
40
49
50namespace LVL1 {
51
52class
54{
57public:
59 L1CaloCells2TriggerTowers( const std::string& name );
67
68 virtual StatusCode initialize() override;
69 virtual StatusCode finalize() override;
70
71 // To associate CaloCell to the trigger tower they belong to
72 // This method must be called before any other method in order
73 // to setup correctly the CaloCell-TT map
74 virtual bool initCaloCellsTriggerTowers(const CaloCellContainer& cellContainer) override;
75 virtual bool initLArDigitsTriggerTowers(const LArDigitContainer& larDigitContainer) override;
76 virtual bool initTileDigitsTriggerTowers(const TileDigitsContainer& tileDigitsContainer) override;
77
78 // John Morris <john.morris@cern.ch> 15/2/2011
79 // Moving most useful functions to the top of this file for clarity
80 virtual std::vector<const CaloCell*> caloCells(const Identifier& ttId) const override;
81 virtual std::vector<std::vector<const CaloCell*> > caloCellsByLayer(const Identifier& ttId) const override;
82 virtual std::vector<int> layerNames(const Identifier& ttID) const override;
83 virtual int layerNames(const CaloCell* cell) const override;
84 virtual float energy(const std::vector<const CaloCell*> &cells) const override;
85 virtual float et(const std::vector<const CaloCell*> &cells) const override;
86 virtual float energy(const Identifier& ttId) const override;
87 virtual float et(const Identifier& ttId) const override;
88
89 // Return a vector digits belonging the to requested trigger tower
90 virtual std::vector<double> samples(const Identifier& ttId) const override;
91 virtual std::vector<const LArDigit*> larDigits(const Identifier& ttId) const override;
92 virtual std::vector<const TileDigits*> tileDigits(const Identifier& ttId) const override;
93
94 virtual void dumpCaloCells() const override;
95 virtual void dumpCaloCells(const Identifier& ttId) const override;
96
97 virtual void dumpDigits(const Identifier& ttId) const override;
98
99 virtual void dumpLArDigits(const Identifier& ttId) const override; /* ttId must be a LAr TTId */
100 virtual void dumpLArDigits() const override;
101
102 virtual void dumpTileDigits(const Identifier& ttId) const override; /* ttId must be a Tile TTId */
103 virtual void dumpTileDigits() const override;
104
105protected:
106 virtual float calcEnergyOrEt(const std::vector<const CaloCell*> &cells, const unsigned int mode) const override;
107
108 virtual void reset() override;
109 virtual void resetCaloCells() override;
110 virtual void resetLArDigits() override;
111 virtual void resetTileDigits() override;
112
113
114 virtual void dump(const std::vector<const CaloCell*>& vCells) const override;
115 virtual void dump(const std::vector<const LArDigit*>& vCells) const override;
116 virtual void dump(const std::vector<const TileDigits*>& vCells) const override;
117
118private:
119 // Id helpers
123
124 // Services
126 {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
127 ToolHandle<LVL1::IL1CaloMatchCell2Tower> m_cellMatch
128 { this, "L1CaloMatchCell2Tower", "LVL1::L1CaloMatchCell2Tower", "L1CaloMatchCell2Tower" };
129 ToolHandle<CaloTriggerTowerService> m_ttSvc
130 { this, "CaloTriggerTowerService", "CaloTriggerTowerService"};
131
133
137
138 // Offline TT Id - vector of CaloCell map
139 std::map<unsigned int, std::vector<const CaloCell*> > m_mTTCaloCells;
140 std::map<unsigned int, std::vector<const LArDigit*> > m_mTTLArDigits;
141 std::map<unsigned int, std::vector<const TileDigits*> > m_mTTTileDigits;
142
143};
144} // end of namespace
145#endif
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Map from calo cells to trigger towers.
float et(const xAOD::jFexSRJetRoI *j)
Container class for CaloCell.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
Helper class for offline TT identifiers.
Definition CaloLVL1_ID.h:66
Container class for LArDigit.
virtual void dumpCaloCells() const override
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual void dumpLArDigits(const Identifier &ttId) const override
virtual float calcEnergyOrEt(const std::vector< const CaloCell * > &cells, const unsigned int mode) const override
virtual std::vector< std::vector< const CaloCell * > > caloCellsByLayer(const Identifier &ttId) const override
L1CaloCells2TriggerTowers(L1CaloCells2TriggerTowers &&rhs)=delete
virtual std::vector< const CaloCell * > caloCells(const Identifier &ttId) const override
virtual std::vector< const LArDigit * > larDigits(const Identifier &ttId) const override
ToolHandle< CaloTriggerTowerService > m_ttSvc
virtual bool initLArDigitsTriggerTowers(const LArDigitContainer &larDigitContainer) override
virtual std::vector< int > layerNames(const Identifier &ttID) const override
virtual std::vector< double > samples(const Identifier &ttId) const override
virtual bool initCaloCellsTriggerTowers(const CaloCellContainer &cellContainer) override
Declare the interface that the class provides.
L1CaloCells2TriggerTowers & operator=(const L1CaloCells2TriggerTowers &rhs)=delete
std::map< unsigned int, std::vector< const TileDigits * > > m_mTTTileDigits
ToolHandle< LVL1::IL1CaloMatchCell2Tower > m_cellMatch
virtual float energy(const std::vector< const CaloCell * > &cells) const override
L1CaloCells2TriggerTowers(const std::string &name)
Create a proper constructor for Athena.
const TileCablingService * m_tileCablingService
std::map< unsigned int, std::vector< const LArDigit * > > m_mTTLArDigits
L1CaloCells2TriggerTowers(const L1CaloCells2TriggerTowers &rhs)=delete
std::map< unsigned int, std::vector< const CaloCell * > > m_mTTCaloCells
L1CaloCells2TriggerTowers()=delete
delete the big 4
virtual bool initTileDigitsTriggerTowers(const TileDigitsContainer &tileDigitsContainer) override
virtual void dumpTileDigits(const Identifier &ttId) const override
virtual std::vector< const TileDigits * > tileDigits(const Identifier &ttId) const override
virtual void dumpDigits(const Identifier &ttId) const override
Helper class for TileCal offline identifiers.
Definition TileID.h:67
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
-event-from-file
void initialize()