ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::L1CaloMatchCell2Tower Class Reference

#include <L1CaloMatchCell2Tower.h>

Inheritance diagram for LVL1::L1CaloMatchCell2Tower:
Collaboration diagram for LVL1::L1CaloMatchCell2Tower:

Public Member Functions

virtual StatusCode initialize () override
virtual void matchCell2Tower (const CaloCell *caloCell, Identifier &ttId1, Identifier &ttId2) const override
virtual void matchCell2Tower (const LArOnOffIdMapping &cabling, const CaloCell *caloCell, Identifier &ttId1, Identifier &ttId2) const override

Private Attributes

const CaloIdManagerm_caloMgr = nullptr
const TileIDm_tileID = nullptr
const CaloLVL1_IDm_lvl1Helper = nullptr
const TileCablingServicem_tileCablingService = nullptr
ToolHandle< CaloTriggerTowerServicem_ttSvc { this, "CaloTriggerTowerService", "CaloTriggerTowerService", "CaloTriggerTowerService" }
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey { this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" }

Detailed Description

Definition at line 40 of file L1CaloMatchCell2Tower.h.

Member Function Documentation

◆ initialize()

StatusCode L1CaloMatchCell2Tower::initialize ( )
overridevirtual

Definition at line 32 of file L1CaloMatchCell2Tower.cxx.

33{
34 ATH_CHECK( detStore()->retrieve (m_caloMgr) );
35 ATH_CHECK( detStore()->retrieve (m_tileID, "TileID") );
36 ATH_CHECK( detStore()->retrieve (m_lvl1Helper, "CaloLVL1_ID") );
37 ATH_CHECK( m_cablingKey.initialize() );
38 ATH_CHECK( m_ttSvc.retrieve() );
40 return StatusCode::SUCCESS;
41}
#define ATH_CHECK
Evaluate an expression and check for errors.
const TileCablingService * m_tileCablingService
ToolHandle< CaloTriggerTowerService > m_ttSvc
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
static const TileCablingService * getInstance()
get pointer to service instance

◆ matchCell2Tower() [1/2]

void L1CaloMatchCell2Tower::matchCell2Tower ( const CaloCell * caloCell,
Identifier & ttId1,
Identifier & ttId2 ) const
overridevirtual

Definition at line 44 of file L1CaloMatchCell2Tower.cxx.

47{
48 SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey);
49 matchCell2Tower (**cabling, caloCell, ttId1, ttId2);
50}
virtual void matchCell2Tower(const CaloCell *caloCell, Identifier &ttId1, Identifier &ttId2) const override

◆ matchCell2Tower() [2/2]

void L1CaloMatchCell2Tower::matchCell2Tower ( const LArOnOffIdMapping & cabling,
const CaloCell * caloCell,
Identifier & ttId1,
Identifier & ttId2 ) const
overridevirtual

Definition at line 53 of file L1CaloMatchCell2Tower.cxx.

57{
58 const Identifier invalidId(0);
59 ttId1 = invalidId;
60 ttId2 = invalidId;
61 const Identifier cellId(caloCell->ID());
62
63 const CaloCell_ID* caloCellHelper = m_caloMgr->getCaloCell_ID();
64
65 // Tile cells
66 if (caloCellHelper->is_tile(cellId)) {
67
68 int section = caloCellHelper->section(cellId);
69 int sample = caloCellHelper->sample(cellId);
70
71 // gap detector - D4 & C10 cells
72 // both pmt of D4 belong to the same TT
73 if(section==3 && (sample==1 || sample==2) ) {
74 ttId1 = m_tileCablingService->cell2tt_id(cellId);
75
76 // barrel & ext. barrel - D cells
77 } else if( (section==1 || section==2) && sample==2) {
78
79 // special treatment of D-cells
80 // each pmt is affected to a different trigger tower
81 // each D-CaloCell is then added to 2 TT. This must ne taken into account when computing the TT energy
82 // from the CaloCells by dividing the D-cell energy by 2.
83 ttId1 = m_tileCablingService->pmt2tt_id(m_tileID->pmt_id(cellId, 0));
84 ttId2 = m_tileCablingService->pmt2tt_id(m_tileID->pmt_id(cellId, 1));
85
86 // barrel & ext. barrel - A & BC cells
87 } else if( (section==1 || section==2) && (sample==0 || sample==1) ) {
88 ttId1 = m_tileCablingService->cell2tt_id(cellId);
89 }
90
91 //LArg cells
92 } else {
93 //whichTTID ttId returns a layer_id, not a tower_id !
94 const Identifier layerId(m_ttSvc->whichTTID(cellId));
95
96 // We are not calling here m_ttSvc->is_in_lvl1(cellId) but use directly its code for a performance reason
97 // By doing so we save a redundant and costly call to m_ttSvc->whichTTID()
98 bool lvl1(true);
99 if(caloCellHelper->is_em_barrel(cellId)) {
100 int samp=caloCellHelper->sampling(cellId);
101 if(samp==0) {
102 int eta=caloCellHelper->eta(cellId);
103 if(eta==60) {
104 lvl1 = false ;
105 }
106 }
107 } else {
108 if(m_lvl1Helper->is_hec(layerId)) {
109 int layer(m_lvl1Helper->layer(layerId));
110 if(layer == 3){
111 lvl1 = false ;
112 }
113 }
114 }
115
116 if(lvl1) {
117 // check if the channel is connected
118 HWIdentifier channelID = cabling.createSignalChannelID(cellId);
119 if(cabling.isOnlineConnected(channelID)) {
120
121 // As we don't want the layer information embedded in the identifier, we recreate a tower Id
122 ttId1 = m_lvl1Helper->tower_id( m_lvl1Helper->pos_neg_z(layerId), m_lvl1Helper->sampling(layerId), m_lvl1Helper->region(layerId), m_lvl1Helper->eta(layerId), m_lvl1Helper->phi(layerId));
123 }
124 }
125 }
126
127}
Scalar eta() const
pseudorapidity method
static const ITkStripOnlineId invalidId
void section(const std::string &sec)
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int section(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
int sample(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
@ layer
Definition HitInfo.h:79

Member Data Documentation

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LVL1::L1CaloMatchCell2Tower::m_cablingKey { this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" }
private

Definition at line 66 of file L1CaloMatchCell2Tower.h.

67{ this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" };

◆ m_caloMgr

const CaloIdManager* LVL1::L1CaloMatchCell2Tower::m_caloMgr = nullptr
private

Definition at line 58 of file L1CaloMatchCell2Tower.h.

◆ m_lvl1Helper

const CaloLVL1_ID* LVL1::L1CaloMatchCell2Tower::m_lvl1Helper = nullptr
private

Definition at line 60 of file L1CaloMatchCell2Tower.h.

◆ m_tileCablingService

const TileCablingService* LVL1::L1CaloMatchCell2Tower::m_tileCablingService = nullptr
private

Definition at line 61 of file L1CaloMatchCell2Tower.h.

◆ m_tileID

const TileID* LVL1::L1CaloMatchCell2Tower::m_tileID = nullptr
private

Definition at line 59 of file L1CaloMatchCell2Tower.h.

◆ m_ttSvc

ToolHandle<CaloTriggerTowerService> LVL1::L1CaloMatchCell2Tower::m_ttSvc { this, "CaloTriggerTowerService", "CaloTriggerTowerService", "CaloTriggerTowerService" }
private

Definition at line 63 of file L1CaloMatchCell2Tower.h.

64{ this, "CaloTriggerTowerService", "CaloTriggerTowerService", "CaloTriggerTowerService" };

The documentation for this class was generated from the following files: