ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 {
35  ATH_CHECK( detStore()->retrieve (m_tileID, "TileID") );
36  ATH_CHECK( detStore()->retrieve (m_lvl1Helper, "CaloLVL1_ID") );
38  ATH_CHECK( m_ttSvc.retrieve() );
40  return StatusCode::SUCCESS;
41 }

◆ matchCell2Tower() [1/2]

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

Definition at line 44 of file L1CaloMatchCell2Tower.cxx.

47 {
49  matchCell2Tower (**cabling, caloCell, ttId1, ttId2);
50 }

◆ 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 }

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.

◆ 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.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
TileCablingService::pmt2tt_id
Identifier pmt2tt_id(const Identifier &id) const
Definition: TileCablingService.cxx:375
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LVL1::L1CaloMatchCell2Tower::matchCell2Tower
virtual void matchCell2Tower(const CaloCell *caloCell, Identifier &ttId1, Identifier &ttId2) const override
Definition: L1CaloMatchCell2Tower.cxx:44
CaloLVL1_ID::region
int region(const Identifier id) const
return region according to :
Definition: CaloLVL1_ID.h:647
CaloLVL1_ID::layer
int layer(const Identifier id) const
return layer according to :
Definition: CaloLVL1_ID.h:665
LVL1::L1CaloMatchCell2Tower::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
Definition: L1CaloMatchCell2Tower.h:60
CaloLVL1_ID::is_hec
bool is_hec(const Identifier id) const
Test wether given tower or layer is part of the HEC.
Definition: CaloLVL1_ID.h:703
CaloLVL1_ID::phi
int phi(const Identifier id) const
return phi according to :
Definition: CaloLVL1_ID.h:659
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::L1CaloMatchCell2Tower::m_caloMgr
const CaloIdManager * m_caloMgr
Definition: L1CaloMatchCell2Tower.h:58
LVL1::L1CaloMatchCell2Tower::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: L1CaloMatchCell2Tower.h:67
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
CaloIdManager::getCaloCell_ID
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
Definition: CaloIdManager.cxx:63
CaloLVL1_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: CaloLVL1_ID.h:653
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
CaloLVL1_ID::pos_neg_z
int pos_neg_z(const Identifier id) const
return pos_neg_z according to :
Definition: CaloLVL1_ID.h:635
LVL1::L1CaloMatchCell2Tower::m_ttSvc
ToolHandle< CaloTriggerTowerService > m_ttSvc
Definition: L1CaloMatchCell2Tower.h:64
Tile_Base_ID::pmt_id
Identifier pmt_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:640
LVL1::L1CaloMatchCell2Tower::m_tileCablingService
const TileCablingService * m_tileCablingService
Definition: L1CaloMatchCell2Tower.h:61
CaloLVL1_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: CaloLVL1_ID.h:641
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
CaloLVL1_ID::tower_id
Identifier tower_id(int pos_neg_z, int sampling, int region, int eta, int phi) const
build a tower identifier
Definition: CaloLVL1_ID.h:429
TileCablingService::cell2tt_id
Identifier cell2tt_id(const Identifier &id) const
Definition: TileCablingService.cxx:368
LVL1::L1CaloMatchCell2Tower::m_tileID
const TileID * m_tileID
Definition: L1CaloMatchCell2Tower.h:59