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

#include <L1CaloOfflineTriggerTowerTools.h>

Inheritance diagram for LVL1::L1CaloOfflineTriggerTowerTools:
Collaboration diagram for LVL1::L1CaloOfflineTriggerTowerTools:

Public Types

typedef std::map< Identifier, const TileTTL1Cell * > IdTTL1CellMapType
typedef std::vector< constCaloCell * >::const_iterator Itr_vCaloCells
typedef std::vector< std::vector< constCaloCell * > >::const_iterator Itr_vvCaloCells

Public Member Functions

 L1CaloOfflineTriggerTowerTools (const std::string &name)
 Create a proper constructor for Athena.
virtual ~L1CaloOfflineTriggerTowerTools ()
 destructor
 L1CaloOfflineTriggerTowerTools ()=delete
 delete the big 4
 L1CaloOfflineTriggerTowerTools (const L1CaloOfflineTriggerTowerTools &rhs)=delete
 L1CaloOfflineTriggerTowerTools (L1CaloOfflineTriggerTowerTools &&rhs)=delete
L1CaloOfflineTriggerTowerToolsoperator= (const L1CaloOfflineTriggerTowerTools &rhs)=delete
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
virtual StatusCode finalize () override
virtual int emPpmCrate (const TriggerTower *tt) const override
virtual int emPpmModule (const TriggerTower *tt) const override
virtual int emPpmSubmodule (const TriggerTower *tt) const override
virtual int emPpmChannel (const TriggerTower *tt) const override
virtual unsigned int emCoolChannelId (const TriggerTower *tt) const override
virtual std::vector< int > emLocation (const TriggerTower *tt) const override
virtual std::vector< unsigned int > emRxId (const TriggerTower *tt) const override
virtual int hadPpmCrate (const TriggerTower *tt) const override
virtual int hadPpmModule (const TriggerTower *tt) const override
virtual int hadPpmSubmodule (const TriggerTower *tt) const override
virtual int hadPpmChannel (const TriggerTower *tt) const override
virtual unsigned int hadCoolChannelId (const TriggerTower *tt) const override
virtual std::vector< int > hadLocation (const TriggerTower *tt) const override
virtual std::vector< unsigned int > hadRxId (const TriggerTower *tt) const override
virtual int hadIsTile (const TriggerTower *tt) const override
virtual std::vector< const CaloCell * > emCells (const TriggerTower *tt) const override
virtual int emNCells (const TriggerTower *tt) const override
virtual std::vector< int > emNCellsByLayer (const TriggerTower *tt) const override
virtual std::vector< int > emNCellsByReceiver (const TriggerTower *tt) const override
virtual std::vector< std::vector< int > > emNCellsByReceiverByLayer (const TriggerTower *tt) const override
virtual std::vector< int > emTTCellsLayerNames (const TriggerTower *tt) const override
virtual std::vector< std::vector< int > > emTTCellsLayerNamesByReceiver (const TriggerTower *tt) const override
virtual float emTTCellsEnergy (const TriggerTower *tt) const override
virtual std::vector< float > emTTCellsEnergyByLayer (const TriggerTower *tt) const override
virtual std::vector< float > emTTCellsEnergyByReceiver (const TriggerTower *tt, const int mode=0) const override
virtual float emTTCellsEt (const TriggerTower *tt) const override
virtual std::vector< float > emTTCellsEtByLayer (const TriggerTower *tt) const override
virtual std::vector< float > emTTCellsEtByReceiver (const TriggerTower *tt, const int mode=0) const override
virtual std::vector< const CaloCell * > hadCells (const TriggerTower *tt) const override
virtual int hadNCells (const TriggerTower *tt) const override
virtual std::vector< int > hadNCellsByLayer (const TriggerTower *tt) const override
virtual std::vector< int > hadNCellsByReceiver (const TriggerTower *tt) const override
virtual std::vector< std::vector< int > > hadNCellsByReceiverByLayer (const TriggerTower *tt) const override
virtual std::vector< int > hadTTCellsLayerNames (const TriggerTower *tt) const override
virtual std::vector< std::vector< int > > hadTTCellsLayerNamesByReceiver (const TriggerTower *tt) const override
virtual float hadTTCellsEnergy (const TriggerTower *tt) const override
virtual std::vector< float > hadTTCellsEnergyByLayer (const TriggerTower *tt) const override
virtual std::vector< float > hadTTCellsEnergyByReceiver (const TriggerTower *tt, const int mode=0) const override
virtual float hadTTCellsEt (const TriggerTower *tt) const override
virtual std::vector< float > hadTTCellsEtByLayer (const TriggerTower *tt) const override
virtual std::vector< float > hadTTCellsEtByReceiver (const TriggerTower *tt, const int mode=0) const override
virtual float tileCellEnergy (const TriggerTower *tt, IdTTL1CellMapType &map) const override
virtual float emCaloQuality (const TriggerTower *tt) const override
virtual float emNCellsNonNominal (const TriggerTower *tt) const override
virtual std::vector< float > emNCellsNonNominalByLayer (const TriggerTower *tt) const override
virtual std::vector< std::vector< float > > emNCellsNonNominalByReceiverByLayer (const TriggerTower *tt) const override
virtual float emNonNominalMeanScale (const TriggerTower *tt) const override
virtual std::vector< float > emNonNominalMeanScaleByLayer (const TriggerTower *tt) const override
virtual std::vector< float > emNonNominalMeanScaleByReceiver (const TriggerTower *tt) const override
virtual std::vector< std::vector< float > > emNonNominalMeanScaleByReceiverByLayer (const TriggerTower *tt) const override
virtual float hadCaloQuality (const TriggerTower *tt) const override
virtual float hadNCellsNonNominal (const TriggerTower *tt) const override
virtual std::vector< float > hadNCellsNonNominalByLayer (const TriggerTower *tt) const override
virtual std::vector< std::vector< float > > hadNCellsNonNominalByReceiverByLayer (const TriggerTower *tt) const override
virtual float hadNonNominalMeanScale (const TriggerTower *tt) const override
virtual std::vector< float > hadNonNominalMeanScaleByLayer (const TriggerTower *tt) const override
virtual std::vector< float > hadNonNominalMeanScaleByReceiver (const TriggerTower *tt) const override
virtual std::vector< std::vector< float > > hadNonNominalMeanScaleByReceiverByLayer (const TriggerTower *tt) const override
virtual const coral::AttributeList * emDbAttributes (const TriggerTower *tt, const CondAttrListCollection *dbAttrList) const override
virtual std::vector< const coral::AttributeList * > emDbRxGainsAttributes (const TriggerTower *tt, const CondAttrListCollection *dbAttrList) const override
virtual const coral::AttributeList * hadDbAttributes (const TriggerTower *tt, const CondAttrListCollection *dbAttrList) const override
virtual std::vector< const coral::AttributeList * > hadDbRxGainsAttributes (const TriggerTower *tt, const CondAttrListCollection *dbAttrList) const override
std::vector< int > emSuperCellIdentifiers (const TriggerTower *tt) const
std::vector< int > hadSuperCellIdentifiers (const TriggerTower *tt) const
virtual unsigned int ModuleId (const coral::AttributeList *attrList) const override
virtual unsigned int ErrorCode (const coral::AttributeList *attrList) const override
virtual unsigned long long PprDacScanResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprPedestalRunResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprNoiseRunResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprTimingResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprSatBcidResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprFirFilterResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual unsigned long long PprLutValuesResultsTimeStamp (const coral::AttributeList *attrList) const override
virtual double DacOffset (const coral::AttributeList *attrList) const override
virtual double DacSlope (const coral::AttributeList *attrList) const override
virtual double PedMean (const coral::AttributeList *attrList) const override
virtual unsigned int PedValue (const coral::AttributeList *attrList) const override
virtual unsigned int FullDelayData (const coral::AttributeList *attrList) const override
virtual unsigned short int SyncDelayBcid (const coral::AttributeList *attrList) const override
virtual unsigned short int InBcidNegedge (const coral::AttributeList *attrList) const override
virtual unsigned short int ExtBcidThreshold (const coral::AttributeList *attrList) const override
virtual unsigned short int SatBcidThreshLow (const coral::AttributeList *attrList) const override
virtual unsigned short int SatBcidThreshHigh (const coral::AttributeList *attrList) const override
virtual unsigned short int SatBcidLevel (const coral::AttributeList *attrList) const override
virtual unsigned short int BcidEnergyRangeLow (const coral::AttributeList *attrList) const override
virtual unsigned short int BcidEnergyRangeHigh (const coral::AttributeList *attrList) const override
virtual unsigned short int FirStartBit (const coral::AttributeList *attrList) const override
virtual short FirCoeff1 (const coral::AttributeList *attrList) const override
virtual short FirCoeff2 (const coral::AttributeList *attrList) const override
virtual short FirCoeff3 (const coral::AttributeList *attrList) const override
virtual short FirCoeff4 (const coral::AttributeList *attrList) const override
virtual short FirCoeff5 (const coral::AttributeList *attrList) const override
virtual unsigned short LutStrategy (const coral::AttributeList *attrList) const override
virtual unsigned short LutOffset (const coral::AttributeList *attrList) const override
virtual unsigned short LutNoiseCut (const coral::AttributeList *attrList) const override
virtual unsigned short LutSlope (const coral::AttributeList *attrList) const override
virtual unsigned int DeadChannel (const coral::AttributeList *attrList) const override
virtual unsigned int DisabledTower (const coral::AttributeList *attrList) const override
virtual float RxGain (const coral::AttributeList *attrList) const override
virtual unsigned int RxStatus (const coral::AttributeList *attrList) const override
virtual void LArHV (const SG::ReadCondHandleKey< ILArHVScaleCorr > &scaleCorrKey, const SG::ReadCondHandleKey< LArOnOffIdMapping > &cablingKey) override
virtual void caloCells (const CaloCellContainer *cells) override
Identifier ID (const double eta, const double phi, int layer) const
virtual Identifier emID (const double eta, const double phi) const override
virtual Identifier hadID (const double eta, const double phi) const override
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

virtual int pos_neg_z (const double eta) const override
virtual int region (const double eta) const override
virtual int ieta (const double eta) const override
virtual int iphi (const double eta, const double phi) const override
virtual std::vector< L1CaloRxCoolChannelIdemReceivers (const TriggerTower *tt) const override
virtual std::vector< L1CaloRxCoolChannelIdhadReceivers (const TriggerTower *tt) const override
virtual std::vector< std::vector< const CaloCell * > > sortFCAL23Cells (const std::vector< const CaloCell * > &cells, const double eta) const override
virtual std::vector< std::vector< const CaloCell * > > sortFCAL23Cells (const std::vector< const CaloCell * > &cells, const std::vector< unsigned int > &rxId) const override
virtual std::vector< std::vector< const CaloCell * > > sortEMCrackCells (const std::vector< const CaloCell * > &cells) const override
virtual float LArNonNominalHV (const std::vector< const CaloCell * > &cells) const override
virtual float LArNonNominalHV (const CaloCell *cell, const ILArHVScaleCorr *scaleCorr, const ILArHVScaleCorr *onlineScaleCorr, const LArOnOffIdMapping *cabling) const override
virtual float LArHVScale (const std::vector< const CaloCell * > &cells) const override
virtual float LArHVScale (const CaloCell *cell, const ILArHVScaleCorr *scaleCorr, const ILArHVScaleCorr *onlineScaleCorr, const LArOnOffIdMapping *cabling) const override
virtual float TileNonNominal (const std::vector< const CaloCell * > &cells) const override
virtual float TileNonNominal (const CaloCell *cell) const override
virtual float LArCaloQuality (const std::vector< const CaloCell * > &cells) const override
virtual float TileCaloQuality (const std::vector< const CaloCell * > &cells) const override
std::vector< int > SuperCellIdentifiers (const std::vector< const CaloCell * > &cells) const
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< LVL1::IL1CaloTTIdToolsm_l1CaloTTIdTools
ToolHandle< LVL1::IL1CaloCells2TriggerTowersm_cells2tt
const CaloIdManagerm_caloMgr
ToolHandle< CaloTriggerTowerServicem_ttSvc
const TTOnlineIDm_ttOnlineIdHelper
const CaloLVL1_IDm_lvl1Helper
const LArOnlineIDm_larOnlineID
ToolHandle< ICaloSuperCellIDToolm_scidtool
bool m_isLArHVCorrToolSet
double m_LArHVNonNomPara
SG::ReadCondHandleKey< ILArHVScaleCorrm_scaleCorrKey
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey
const TileHWIDm_tileHWID
ToolHandle< ITileBadChanToolm_tileBadChanTool
ToolHandle< LVL1::IL1CaloFcal23Cells2RxMappingToolm_rxMapTool
SG::ReadCondHandleKey< ILArHVScaleCorrm_onlineScaleCorrKey { this, "OnlineLArHVScaleCorr", "LArHVScaleCorr", "" }
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 68 of file L1CaloOfflineTriggerTowerTools.h.

Member Typedef Documentation

◆ IdTTL1CellMapType

◆ Itr_vCaloCells

Definition at line 85 of file L1CaloOfflineTriggerTowerTools.h.

◆ Itr_vvCaloCells

typedef std::vector<std::vector<constCaloCell*>>::const_iterator LVL1::L1CaloOfflineTriggerTowerTools::Itr_vvCaloCells

Definition at line 86 of file L1CaloOfflineTriggerTowerTools.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ L1CaloOfflineTriggerTowerTools() [1/4]

LVL1::L1CaloOfflineTriggerTowerTools::L1CaloOfflineTriggerTowerTools ( const std::string & name)

Create a proper constructor for Athena.

constructor

Definition at line 16 of file L1CaloOfflineTriggerTowerTools.cxx.

16 :
17 asg::AsgTool( name ),
18 m_l1CaloTTIdTools("LVL1::L1CaloTTIdTools/L1CaloTTIdTools"),
19 m_cells2tt("LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers", this),
20 m_ttSvc("CaloTriggerTowerService"),
21 m_scidtool ("CaloSuperCellIDTool"),
23 m_cablingKey(""),
24 m_tileBadChanTool("TileBadChanTool"),
25 m_rxMapTool("LVL1::L1CaloFcal23Cells2RxMappingTool/L1CaloFcal23Cells2RxMappingTool")
26 {
27 m_caloMgr = 0;
29 m_lvl1Helper = 0;
30 m_larOnlineID = 0;
32 m_tileHWID = 0;
33
34 declareProperty("LArHVNonNomPara",m_LArHVNonNomPara = 1.003);
35 declareProperty("TileBadChanTool", m_tileBadChanTool);
36 declareProperty("RxMappingTool",m_rxMapTool);
37 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ToolHandle< CaloTriggerTowerService > m_ttSvc
ToolHandle< ICaloSuperCellIDTool > m_scidtool
ToolHandle< LVL1::IL1CaloCells2TriggerTowers > m_cells2tt
ToolHandle< LVL1::IL1CaloTTIdTools > m_l1CaloTTIdTools
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
ToolHandle< LVL1::IL1CaloFcal23Cells2RxMappingTool > m_rxMapTool
SG::ReadCondHandleKey< ILArHVScaleCorr > m_scaleCorrKey

◆ ~L1CaloOfflineTriggerTowerTools()

virtual LVL1::L1CaloOfflineTriggerTowerTools::~L1CaloOfflineTriggerTowerTools ( )
inlinevirtual

destructor

Definition at line 77 of file L1CaloOfflineTriggerTowerTools.h.

77{}

◆ L1CaloOfflineTriggerTowerTools() [2/4]

LVL1::L1CaloOfflineTriggerTowerTools::L1CaloOfflineTriggerTowerTools ( )
delete

delete the big 4

◆ L1CaloOfflineTriggerTowerTools() [3/4]

LVL1::L1CaloOfflineTriggerTowerTools::L1CaloOfflineTriggerTowerTools ( const L1CaloOfflineTriggerTowerTools & rhs)
delete

◆ L1CaloOfflineTriggerTowerTools() [4/4]

LVL1::L1CaloOfflineTriggerTowerTools::L1CaloOfflineTriggerTowerTools ( L1CaloOfflineTriggerTowerTools && rhs)
delete

Member Function Documentation

◆ BcidEnergyRangeHigh()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::BcidEnergyRangeHigh ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1519 of file L1CaloOfflineTriggerTowerTools.cxx.

1519 {
1520 unsigned short int value = 0;
1521 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1522 if((*attrList)[attrNum].specification().name() == "BcidEnergyRangeHigh"){
1523 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1524 break;
1525 }
1526 }
1527 return value;
1528 }

◆ BcidEnergyRangeLow()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::BcidEnergyRangeLow ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1508 of file L1CaloOfflineTriggerTowerTools.cxx.

1508 {
1509 unsigned short int value = 0;
1510 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1511 if((*attrList)[attrNum].specification().name() == "BcidEnergyRangeLow"){
1512 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1513 break;
1514 }
1515 }
1516 return value;
1517 }

◆ caloCells()

void LVL1::L1CaloOfflineTriggerTowerTools::caloCells ( const CaloCellContainer * cells)
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1741 of file L1CaloOfflineTriggerTowerTools.cxx.

1741 {
1742 m_cells2tt->initCaloCellsTriggerTowers(*cells);
1743 }

◆ DacOffset()

double LVL1::L1CaloOfflineTriggerTowerTools::DacOffset ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1385 of file L1CaloOfflineTriggerTowerTools.cxx.

1385 {
1386 double value = 0;
1387 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1388 if((*attrList)[attrNum].specification().name() == "DacOffset"){
1389 value = (double) (*attrList)[attrNum].data<double>();
1390 break;
1391 }
1392 }
1393 return value;
1394 }

◆ DacSlope()

double LVL1::L1CaloOfflineTriggerTowerTools::DacSlope ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1396 of file L1CaloOfflineTriggerTowerTools.cxx.

1396 {
1397 double value = 0;
1398 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1399 if((*attrList)[attrNum].specification().name() == "DacSlope"){
1400 value = (double) (*attrList)[attrNum].data<double>();
1401 break;
1402 }
1403 }
1404 return value;
1405 }

◆ DeadChannel()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::DeadChannel ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1655 of file L1CaloOfflineTriggerTowerTools.cxx.

1655 {
1656 unsigned int value = 0;
1657 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1658 if((*attrList)[attrNum].specification().name() == "ErrorCode"){
1659 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1660 break;
1661 }
1662 }
1663 return value;
1664 }

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ DisabledTower()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::DisabledTower ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1642 of file L1CaloOfflineTriggerTowerTools.cxx.

1642 {
1643 unsigned int value = 0;
1644 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1645 if((*attrList)[attrNum].specification().name() == "disabledBits"){
1646 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1647 break;
1648 }
1649 }
1650 return value;
1651 }

◆ emCaloQuality()

float LVL1::L1CaloOfflineTriggerTowerTools::emCaloQuality ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 880 of file L1CaloOfflineTriggerTowerTools.cxx.

880 {
881 Identifier Id = this->emID(tt->eta(),tt->phi());
882 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
883 return this->LArCaloQuality(cells);
884 }
virtual float LArCaloQuality(const std::vector< const CaloCell * > &cells) const override
virtual Identifier emID(const double eta, const double phi) const override

◆ emCells()

std::vector< const CaloCell * > LVL1::L1CaloOfflineTriggerTowerTools::emCells ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 260 of file L1CaloOfflineTriggerTowerTools.cxx.

260 {
261 Identifier Id = this->emID(tt->eta(),tt->phi());
262 return m_cells2tt->caloCells(Id);
263 }

◆ emCoolChannelId()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::emCoolChannelId ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 71 of file L1CaloOfflineTriggerTowerTools.cxx.

71 {
72 Identifier Id = this->emID(tt->eta(),tt->phi());
73 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
74 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
75 return coolId.id();
76 }
unsigned int id() const

◆ emDbAttributes()

const coral::AttributeList * LVL1::L1CaloOfflineTriggerTowerTools::emDbAttributes ( const TriggerTower * tt,
const CondAttrListCollection * dbAttrList ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1193 of file L1CaloOfflineTriggerTowerTools.cxx.

1193 {
1194 unsigned int coolId = this->emCoolChannelId(tt);
1196 const coral::AttributeList* attrList = 0;
1197 for(Itr_db i=dbAttrList->begin();i!=dbAttrList->end();++i){
1198 if(i->first == coolId){
1199 attrList = &(i->second);
1200 break;
1201 }
1202 }
1203 return attrList;
1204 }
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
ChanAttrListMap::const_iterator const_iterator
virtual unsigned int emCoolChannelId(const TriggerTower *tt) const override

◆ emDbRxGainsAttributes()

std::vector< const coral::AttributeList * > LVL1::L1CaloOfflineTriggerTowerTools::emDbRxGainsAttributes ( const TriggerTower * tt,
const CondAttrListCollection * dbAttrList ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1207 of file L1CaloOfflineTriggerTowerTools.cxx.

1207 {
1208
1209 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
1210 std::vector<const coral::AttributeList*> v_attr;
1212 typedef std::vector<L1CaloRxCoolChannelId>::const_iterator Itr_Id;
1213
1214 for(Itr_Id a=rx.begin();a!=rx.end();++a){
1215 for(Itr_db i=dbAttrList->begin();i!=dbAttrList->end();++i){
1216 if(i->first == (*a).id()){
1217 v_attr.push_back( &(i->second) );
1218 }
1219 }
1220 }
1221 return v_attr;
1222 }
static Double_t a
virtual std::vector< L1CaloRxCoolChannelId > emReceivers(const TriggerTower *tt) const override

◆ emID()

Identifier LVL1::L1CaloOfflineTriggerTowerTools::emID ( const double eta,
const double phi ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1733 of file L1CaloOfflineTriggerTowerTools.cxx.

1733 {
1734 return m_lvl1Helper->tower_id(this->pos_neg_z(eta),0,this->region(eta),this->ieta(eta),this->iphi(eta,phi));
1735 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
virtual int region(const double eta) const override
virtual int iphi(const double eta, const double phi) const override
virtual int pos_neg_z(const double eta) const override
virtual int ieta(const double eta) const override

◆ emLocation()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::emLocation ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 78 of file L1CaloOfflineTriggerTowerTools.cxx.

78 {
79 std::vector<int> location;
80 Identifier Id = this->emID(tt->eta(),tt->phi());
81 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
82 location.push_back(m_ttOnlineIdHelper->crate(HWId));
83 location.push_back(m_ttOnlineIdHelper->module(HWId));
84 location.push_back(m_ttOnlineIdHelper->submodule(HWId));
85 location.push_back(m_ttOnlineIdHelper->channel(HWId));
86 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
87 location.push_back(coolId.id());
88 return location;
89 }

◆ emNCells()

int LVL1::L1CaloOfflineTriggerTowerTools::emNCells ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 265 of file L1CaloOfflineTriggerTowerTools.cxx.

265 {
266 Identifier Id = this->emID(tt->eta(),tt->phi());
267 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
268 return cells.size();
269 }

◆ emNCellsByLayer()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::emNCellsByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 271 of file L1CaloOfflineTriggerTowerTools.cxx.

271 {
272 Identifier Id = this->emID(tt->eta(),tt->phi());
273 std::vector<int> v;
274 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
275 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
276 v.push_back((*i).size());
277 }
278 return v;
279 }
std::vector< std::vector< constCaloCell * > >::const_iterator Itr_vvCaloCells

◆ emNCellsByReceiver()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::emNCellsByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 281 of file L1CaloOfflineTriggerTowerTools.cxx.

281 {
282 Identifier Id = this->emID(tt->eta(),tt->phi());
283 std::vector<int> v;
284 std::vector<std::vector<const CaloCell*> > cells = this->sortEMCrackCells(m_cells2tt->caloCells(Id));
285 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
286 v.push_back((*i).size());
287 }
288 return v;
289 }
virtual std::vector< std::vector< const CaloCell * > > sortEMCrackCells(const std::vector< const CaloCell * > &cells) const override

◆ emNCellsByReceiverByLayer()

std::vector< std::vector< int > > LVL1::L1CaloOfflineTriggerTowerTools::emNCellsByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 291 of file L1CaloOfflineTriggerTowerTools.cxx.

291 {
292 Identifier Id = this->emID(tt->eta(),tt->phi());
293 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
294 std::vector<int> v1;
295 std::vector<int> v2;
296 std::vector<std::vector<int> > v;
297 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
298 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
299 if ((*i).empty()) continue;
300 if (rx.size() == 2) {
301 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortEMCrackCells((*i));
302 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
303 if ((*j).empty()) continue;
304 if (j == cellsRx.begin()) v1.push_back((*j).size());
305 else v2.push_back((*j).size());
306 }
307 } else if (rx.size() == 1) v1.push_back((*i).size());
308 }
309 v.push_back(std::move(v1));
310 if (rx.size() == 2) v.push_back(std::move(v2));
311 return v;
312 }

◆ emNCellsNonNominal()

float LVL1::L1CaloOfflineTriggerTowerTools::emNCellsNonNominal ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 886 of file L1CaloOfflineTriggerTowerTools.cxx.

886 {
887 if(m_isLArHVCorrToolSet == false){return -9.9;}
888 Identifier Id = this->emID(tt->eta(),tt->phi());
889 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
890 return this->LArNonNominalHV( cells );
891 }
virtual float LArNonNominalHV(const std::vector< const CaloCell * > &cells) const override

◆ emNCellsNonNominalByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emNCellsNonNominalByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 893 of file L1CaloOfflineTriggerTowerTools.cxx.

893 {
894 std::vector<float> nNonNomHV;
895 if(m_isLArHVCorrToolSet == false){return nNonNomHV;}
896
897 Identifier Id = this->emID(tt->eta(),tt->phi());
898 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
899 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
900 nNonNomHV.push_back( this->LArNonNominalHV( (*i) ) );
901 }
902 return nNonNomHV;
903 }

◆ emNCellsNonNominalByReceiverByLayer()

std::vector< std::vector< float > > LVL1::L1CaloOfflineTriggerTowerTools::emNCellsNonNominalByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 905 of file L1CaloOfflineTriggerTowerTools.cxx.

905 {
906 std::vector<std::vector<float> > nNonNomHV;
907 if(m_isLArHVCorrToolSet == false){return nNonNomHV;}
908 Identifier Id = this->emID(tt->eta(),tt->phi());
909 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
910 std::vector<float> v1;
911 std::vector<float> v2;
912 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
913 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
914 if ((*i).empty()) continue;
915 if (rx.size() == 2) {
916 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortEMCrackCells((*i));
917 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
918 if ((*j).empty()) continue;
919 if (j == cellsRx.begin()) v1.push_back(this->LArNonNominalHV((*j)));
920 else v2.push_back(this->LArNonNominalHV((*j)));
921 }
922 } else if (rx.size() == 1) v1.push_back(this->LArNonNominalHV((*i)));
923 }
924 nNonNomHV.push_back(std::move(v1));
925 if (rx.size() == 2) nNonNomHV.push_back(std::move(v2));
926 return nNonNomHV;
927 }

◆ emNonNominalMeanScale()

float LVL1::L1CaloOfflineTriggerTowerTools::emNonNominalMeanScale ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 929 of file L1CaloOfflineTriggerTowerTools.cxx.

929 {
930 if(m_isLArHVCorrToolSet == false){return -9.9;}
931 Identifier Id = this->emID(tt->eta(),tt->phi());
932 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
933 return this->LArHVScale( cells );
934 }
virtual float LArHVScale(const std::vector< const CaloCell * > &cells) const override

◆ emNonNominalMeanScaleByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emNonNominalMeanScaleByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 936 of file L1CaloOfflineTriggerTowerTools.cxx.

936 {
937 std::vector<float> NonNomHV;
938 if(m_isLArHVCorrToolSet == false){return NonNomHV;}
939 Identifier Id = this->emID(tt->eta(),tt->phi());
940 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
941 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
942 NonNomHV.push_back( this->LArHVScale( (*i ) ) );
943 }
944 return NonNomHV;
945 }

◆ emNonNominalMeanScaleByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emNonNominalMeanScaleByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 948 of file L1CaloOfflineTriggerTowerTools.cxx.

948 {
949
950 std::vector<float> output;
951 if(m_isLArHVCorrToolSet == false){return output;}
952 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
953 Identifier Id = this->emID(tt->eta(),tt->phi());
954 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
955
956 if(rx.size() == 2){
957 std::vector<std::vector<const CaloCell*> > vvcells = this->sortEMCrackCells(cells);
958 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
959 output.push_back( this->LArHVScale( (*i) ) );
960 }
961 }
962
963 if(rx.size() == 1){
964 output.push_back( this->LArHVScale( cells ) );
965 }
966
967 return output;
968 }
output
Definition merge.py:16

◆ emNonNominalMeanScaleByReceiverByLayer()

std::vector< std::vector< float > > LVL1::L1CaloOfflineTriggerTowerTools::emNonNominalMeanScaleByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 970 of file L1CaloOfflineTriggerTowerTools.cxx.

970 {
971 std::vector<std::vector<float> > output;
972 if(m_isLArHVCorrToolSet == false){return output;}
973 Identifier Id = this->emID(tt->eta(),tt->phi());
974 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
975 std::vector<float> v1;
976 std::vector<float> v2;
977 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
978 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
979 if ((*i).empty()) continue;
980 if (rx.size() == 2) {
981 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortEMCrackCells((*i));
982 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
983 if ((*j).empty()) continue;
984 if (j == cellsRx.begin()) v1.push_back(this->LArHVScale((*j)));
985 else v2.push_back(this->LArHVScale((*j)));
986 }
987 } else if (rx.size() == 1) v1.push_back(this->LArHVScale((*i)));
988 }
989 output.push_back(std::move(v1));
990 if (rx.size() == 2) output.push_back(std::move(v2));
991 return output;
992 }

◆ emPpmChannel()

int LVL1::L1CaloOfflineTriggerTowerTools::emPpmChannel ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 65 of file L1CaloOfflineTriggerTowerTools.cxx.

65 {
66 Identifier Id = this->emID(tt->eta(),tt->phi());
67 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
68 return m_ttOnlineIdHelper->channel(HWId);
69 }

◆ emPpmCrate()

int LVL1::L1CaloOfflineTriggerTowerTools::emPpmCrate ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 47 of file L1CaloOfflineTriggerTowerTools.cxx.

47 {
48 Identifier Id = this->emID(tt->eta(),tt->phi());
49 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
50 return m_ttOnlineIdHelper->crate(HWId);
51 }

◆ emPpmModule()

int LVL1::L1CaloOfflineTriggerTowerTools::emPpmModule ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 53 of file L1CaloOfflineTriggerTowerTools.cxx.

53 {
54 Identifier Id = this->emID(tt->eta(),tt->phi());
55 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
56 return m_ttOnlineIdHelper->module(HWId);
57 }

◆ emPpmSubmodule()

int LVL1::L1CaloOfflineTriggerTowerTools::emPpmSubmodule ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 59 of file L1CaloOfflineTriggerTowerTools.cxx.

59 {
60 Identifier Id = this->emID(tt->eta(),tt->phi());
61 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
62 return m_ttOnlineIdHelper->submodule(HWId);
63 }

◆ emReceivers()

std::vector< L1CaloRxCoolChannelId > LVL1::L1CaloOfflineTriggerTowerTools::emReceivers ( const TriggerTower * tt) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 91 of file L1CaloOfflineTriggerTowerTools.cxx.

91 {
92 Identifier Id = this->emID(tt->eta(),tt->phi());
93 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
94 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
95 std::vector<L1CaloRxCoolChannelId> rx = m_ttSvc->cnvCoolChannelIdToRxId(coolId);
96
97 std::vector<L1CaloRxCoolChannelId> output;
98
99 // Sort EM Crack recievers. End cap first, barrel second
100 if(rx.size() == 3){
101
102 // For the EM crack region, there are 3 recievers.
103 // 1 Rx have Crate 0 or 1 - correspond to the barrel before the Octopus cable magic - ignore
104 // 2 Rx have Crate 2 or 3 - correspond to the Rx we want:
105 // 1 Rx has inputConn() == 0 - EMEC receiver
106 // 1 Rx has inputConn() == 2 - Barrel receiver
107
108
109 typedef std::vector<L1CaloRxCoolChannelId>::const_iterator Itr_Id;
110 std::vector<L1CaloRxCoolChannelId> rx2;
111 for(Itr_Id a=rx.begin();a!=rx.end();++a){
112 if((*a).crate() == 2 || (*a).crate() == 3){ // Select only interesting recievers
113 rx2.push_back(*a);
114 }
115 }
116
117 if(rx2.size() == 2){
118
119 unsigned int inputA = rx2.at(0).inputConn();
120 unsigned int inputB = rx2.at(1).inputConn();
121
122 // End cap first, barrel second
123 if(inputA == 2 && inputB == 0){
124 output.push_back(rx2.at(1));
125 output.push_back(rx2.at(0));
126 }
127 if(inputA == 0 && inputB == 2){
128 output.push_back(rx2.at(0));
129 output.push_back(rx2.at(1));
130 }
131 }
132
133 }
134
135 if(rx.size() == 1){
136 output.push_back(rx.at(0));
137 }
138
139 return output;
140 }

◆ emRxId()

std::vector< unsigned int > LVL1::L1CaloOfflineTriggerTowerTools::emRxId ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 142 of file L1CaloOfflineTriggerTowerTools.cxx.

142 {
143 typedef std::vector<L1CaloRxCoolChannelId>::const_iterator Itr;
144 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
145 std::vector<unsigned int> output;
146 for(Itr i=rx.begin();i!=rx.end();++i){
147 output.push_back( (*i).id() );
148 }
149 return output;
150 }

◆ emSuperCellIdentifiers()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::emSuperCellIdentifiers ( const TriggerTower * tt) const

Definition at line 1161 of file L1CaloOfflineTriggerTowerTools.cxx.

1161 {
1162 Identifier Id = this->emID(tt->eta(),tt->phi());
1163 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1164 return this->SuperCellIdentifiers( cells );
1165 }
std::vector< int > SuperCellIdentifiers(const std::vector< const CaloCell * > &cells) const

◆ emTTCellsEnergy()

float LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEnergy ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 342 of file L1CaloOfflineTriggerTowerTools.cxx.

342 {
343 Identifier Id = this->emID(tt->eta(),tt->phi());
344 return m_cells2tt->energy( m_cells2tt->caloCells(Id) );
345 }

◆ emTTCellsEnergyByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEnergyByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 347 of file L1CaloOfflineTriggerTowerTools.cxx.

347 {
348 Identifier Id = this->emID(tt->eta(),tt->phi());
349 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
350 std::vector<float> eByLayer;
351 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
352 eByLayer.push_back( m_cells2tt->energy( *i ) );
353 }
354 return eByLayer;
355 }

◆ emTTCellsEnergyByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEnergyByReceiver ( const TriggerTower * tt,
const int mode = 0 ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 357 of file L1CaloOfflineTriggerTowerTools.cxx.

357 {
358 // Mode 0 : Return vector<float> even if it has 1 entry. Equivelent to emTTCellsEnergy
359 // Mode 1 : Return vecotr<float> only if size is > 2. D3PDs don't need this
360 std::vector<float> output;
361 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
362 Identifier Id = this->emID(tt->eta(),tt->phi());
363 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
364
365 if(rx.size() == 2){
366 std::vector<std::vector<const CaloCell*> > vvcells = this->sortEMCrackCells(cells);
367 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
368 output.push_back( m_cells2tt->energy( (*i) ) );
369 }
370 }
371
372 if(rx.size() == 1 && mode == 0){
373 output.push_back( m_cells2tt->energy( cells ) );
374 }
375
376 return output;
377 }

◆ emTTCellsEt()

float LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEt ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 379 of file L1CaloOfflineTriggerTowerTools.cxx.

379 {
380 Identifier Id = this->emID(tt->eta(),tt->phi());
381 return m_cells2tt->et( m_cells2tt->caloCells(Id) );
382 }

◆ emTTCellsEtByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEtByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 384 of file L1CaloOfflineTriggerTowerTools.cxx.

384 {
385 Identifier Id = this->emID(tt->eta(),tt->phi());
386 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
387 std::vector<float> eByLayer;
388 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
389 eByLayer.push_back( m_cells2tt->et( *i ) );
390 }
391 return eByLayer;
392 }

◆ emTTCellsEtByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsEtByReceiver ( const TriggerTower * tt,
const int mode = 0 ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 394 of file L1CaloOfflineTriggerTowerTools.cxx.

394 {
395 // Mode 0 : Return vector<float> even if it has 1 entry. Equivelent to emTTCellsEt
396 // Mode 1 : Return vecotr<float> only if size is > 2. D3PDs don't need this
397 std::vector<float> output;
398 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
399 Identifier Id = this->emID(tt->eta(),tt->phi());
400 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
401
402 if(rx.size() == 2){
403 std::vector<std::vector<const CaloCell*> > vvcells = this->sortEMCrackCells(cells);
404 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
405 output.push_back( m_cells2tt->et( (*i) ) );
406 }
407 }
408
409 if(rx.size() == 1 && mode == 0){
410 output.push_back( m_cells2tt->et( cells ) );
411 }
412
413 return output;
414 }

◆ emTTCellsLayerNames()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsLayerNames ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 314 of file L1CaloOfflineTriggerTowerTools.cxx.

314 {
315 Identifier Id = this->emID(tt->eta(),tt->phi());
316 return m_cells2tt->layerNames(Id);
317 }

◆ emTTCellsLayerNamesByReceiver()

std::vector< std::vector< int > > LVL1::L1CaloOfflineTriggerTowerTools::emTTCellsLayerNamesByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 319 of file L1CaloOfflineTriggerTowerTools.cxx.

319 {
320 Identifier Id = this->emID(tt->eta(),tt->phi());
321 std::vector<L1CaloRxCoolChannelId> rx = this->emReceivers(tt);
322 std::vector<int> v1;
323 std::vector<int> v2;
324 std::vector<std::vector<int> > v;
325 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
326 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
327 if ((*i).empty()) continue;
328 if (rx.size() == 2) {
329 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortEMCrackCells((*i));
330 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
331 if ((*j).empty()) continue;
332 if (j == cellsRx.begin()) v1.push_back(m_cells2tt->layerNames((*j)[0]));
333 else v2.push_back(m_cells2tt->layerNames((*j)[0]));
334 }
335 } else if (rx.size() == 1) v1.push_back(m_cells2tt->layerNames((*i)[0]));
336 }
337 v.push_back(std::move(v1));
338 if (rx.size() == 2) v.push_back(std::move(v2));
339 return v;
340 }

◆ ErrorCode()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::ErrorCode ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1297 of file L1CaloOfflineTriggerTowerTools.cxx.

1297 {
1298 unsigned int value = 0;
1299 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1300 if((*attrList)[attrNum].specification().name() == "ErrorCode"){
1301 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1302 break;
1303 }
1304 }
1305 return value;
1306 }

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ ExtBcidThreshold()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::ExtBcidThreshold ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1464 of file L1CaloOfflineTriggerTowerTools.cxx.

1464 {
1465 unsigned short int value = 0;
1466 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1467 if((*attrList)[attrNum].specification().name() == "ExtBcidThreshold"){
1468 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1469 break;
1470 }
1471 }
1472 return value;
1473 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode LVL1::L1CaloOfflineTriggerTowerTools::finalize ( )
overridevirtual

Definition at line 1701 of file L1CaloOfflineTriggerTowerTools.cxx.

1701 {
1702 return StatusCode::SUCCESS;
1703 }

◆ FirCoeff1()

short LVL1::L1CaloOfflineTriggerTowerTools::FirCoeff1 ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1541 of file L1CaloOfflineTriggerTowerTools.cxx.

1541 {
1542 short value = 0;
1543 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1544 if((*attrList)[attrNum].specification().name() == "FirCoeff1"){
1545 value = (short) (*attrList)[attrNum].data<short>();
1546 break;
1547 }
1548 }
1549 return value;
1550 }

◆ FirCoeff2()

short LVL1::L1CaloOfflineTriggerTowerTools::FirCoeff2 ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1552 of file L1CaloOfflineTriggerTowerTools.cxx.

1552 {
1553 short value = 0;
1554 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1555 if((*attrList)[attrNum].specification().name() == "FirCoeff2"){
1556 value = (short) (*attrList)[attrNum].data<short>();
1557 break;
1558 }
1559 }
1560 return value;
1561 }

◆ FirCoeff3()

short LVL1::L1CaloOfflineTriggerTowerTools::FirCoeff3 ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1563 of file L1CaloOfflineTriggerTowerTools.cxx.

1563 {
1564 short value = 0;
1565 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1566 if((*attrList)[attrNum].specification().name() == "FirCoeff3"){
1567 value = (short) (*attrList)[attrNum].data<short>();
1568 break;
1569 }
1570 }
1571 return value;
1572 }

◆ FirCoeff4()

short LVL1::L1CaloOfflineTriggerTowerTools::FirCoeff4 ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1574 of file L1CaloOfflineTriggerTowerTools.cxx.

1574 {
1575 short value = 0;
1576 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1577 if((*attrList)[attrNum].specification().name() == "FirCoeff4"){
1578 value = (short) (*attrList)[attrNum].data<short>();
1579 break;
1580 }
1581 }
1582 return value;
1583 }

◆ FirCoeff5()

short LVL1::L1CaloOfflineTriggerTowerTools::FirCoeff5 ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1585 of file L1CaloOfflineTriggerTowerTools.cxx.

1585 {
1586 short value = 0;
1587 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1588 if((*attrList)[attrNum].specification().name() == "FirCoeff5"){
1589 value = (short) (*attrList)[attrNum].data<short>();
1590 break;
1591 }
1592 }
1593 return value;
1594 }

◆ FirStartBit()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::FirStartBit ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1530 of file L1CaloOfflineTriggerTowerTools.cxx.

1530 {
1531 unsigned short int value = 0;
1532 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1533 if((*attrList)[attrNum].specification().name() == "FirStartBit"){
1534 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1535 break;
1536 }
1537 }
1538 return value;
1539 }

◆ FullDelayData()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::FullDelayData ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1429 of file L1CaloOfflineTriggerTowerTools.cxx.

1429 {
1430 unsigned int value = 0;
1431 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1432 if((*attrList)[attrNum].specification().name() == "FullDelayData"){
1433 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1434 break;
1435 }
1436 }
1437 return value;
1438 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ hadCaloQuality()

float LVL1::L1CaloOfflineTriggerTowerTools::hadCaloQuality ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 997 of file L1CaloOfflineTriggerTowerTools.cxx.

997 {
998 Identifier Id = this->hadID(tt->eta(),tt->phi());
999 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1000 bool isTile = m_lvl1Helper->is_tile(Id);
1001
1002 if(isTile == true){return this->TileCaloQuality(cells);}
1003 if(isTile == false){return this->LArCaloQuality(cells);}
1004 return -9.9;
1005 }
virtual Identifier hadID(const double eta, const double phi) const override
virtual float TileCaloQuality(const std::vector< const CaloCell * > &cells) const override

◆ hadCells()

std::vector< const CaloCell * > LVL1::L1CaloOfflineTriggerTowerTools::hadCells ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 442 of file L1CaloOfflineTriggerTowerTools.cxx.

442 {
443 Identifier Id = this->hadID(tt->eta(),tt->phi());
444 return m_cells2tt->caloCells(Id);
445 }

◆ hadCoolChannelId()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::hadCoolChannelId ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 178 of file L1CaloOfflineTriggerTowerTools.cxx.

178 {
179 Identifier Id = this->hadID(tt->eta(),tt->phi());
180 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
181 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
182 return coolId.id();
183 }

◆ hadDbAttributes()

const coral::AttributeList * LVL1::L1CaloOfflineTriggerTowerTools::hadDbAttributes ( const TriggerTower * tt,
const CondAttrListCollection * dbAttrList ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1226 of file L1CaloOfflineTriggerTowerTools.cxx.

1226 {
1227 unsigned int coolId = this->hadCoolChannelId(tt);
1229 const coral::AttributeList* attrList = 0;
1230 for(Itr_db i=dbAttrList->begin();i!=dbAttrList->end();++i){
1231 if(i->first == coolId){
1232 attrList = &(i->second);
1233 break;
1234 }
1235 }
1236 return attrList;
1237 }
virtual unsigned int hadCoolChannelId(const TriggerTower *tt) const override

◆ hadDbRxGainsAttributes()

std::vector< const coral::AttributeList * > LVL1::L1CaloOfflineTriggerTowerTools::hadDbRxGainsAttributes ( const TriggerTower * tt,
const CondAttrListCollection * dbAttrList ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1239 of file L1CaloOfflineTriggerTowerTools.cxx.

1239 {
1240
1241 std::vector<L1CaloRxCoolChannelId> rx = this->hadReceivers(tt);
1242 std::vector<const coral::AttributeList*> v_attr;
1244 typedef std::vector<L1CaloRxCoolChannelId>::const_iterator Itr_Id;
1245
1246 for(Itr_Id a=rx.begin();a!=rx.end();++a){
1247 for(Itr_db i=dbAttrList->begin();i!=dbAttrList->end();++i){
1248 if(i->first == (*a).id()){
1249 v_attr.push_back( &(i->second) );
1250 }
1251 }
1252 }
1253 return v_attr;
1254 }
virtual std::vector< L1CaloRxCoolChannelId > hadReceivers(const TriggerTower *tt) const override

◆ hadID()

Identifier LVL1::L1CaloOfflineTriggerTowerTools::hadID ( const double eta,
const double phi ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1737 of file L1CaloOfflineTriggerTowerTools.cxx.

1737 {
1738 return m_lvl1Helper->tower_id(this->pos_neg_z(eta),1,this->region(eta),this->ieta(eta),this->iphi(eta,phi));
1739 }

◆ hadIsTile()

int LVL1::L1CaloOfflineTriggerTowerTools::hadIsTile ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 198 of file L1CaloOfflineTriggerTowerTools.cxx.

198 {
199 Identifier Id = this->hadID(tt->eta(),tt->phi());
200 if(m_lvl1Helper->is_tile(Id) == true){
201 return 1;
202 }
203 return 0;
204 }

◆ hadLocation()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::hadLocation ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 185 of file L1CaloOfflineTriggerTowerTools.cxx.

185 {
186 std::vector<int> location;
187 Identifier Id = this->hadID(tt->eta(),tt->phi());
188 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
189 location.push_back(m_ttOnlineIdHelper->crate(HWId));
190 location.push_back(m_ttOnlineIdHelper->module(HWId));
191 location.push_back(m_ttOnlineIdHelper->submodule(HWId));
192 location.push_back(m_ttOnlineIdHelper->channel(HWId));
193 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
194 location.push_back(coolId.id());
195 return location;
196 }

◆ hadNCells()

int LVL1::L1CaloOfflineTriggerTowerTools::hadNCells ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 447 of file L1CaloOfflineTriggerTowerTools.cxx.

447 {
448 Identifier Id = this->hadID(tt->eta(),tt->phi());
449 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
450 return cells.size();
451 }

◆ hadNCellsByLayer()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 453 of file L1CaloOfflineTriggerTowerTools.cxx.

453 {
454 Identifier Id = this->hadID(tt->eta(),tt->phi());
455 std::vector<int> v;
456 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
457 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
458 v.push_back((*i).size());
459 }
460 return v;
461 }

◆ hadNCellsByReceiver()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 463 of file L1CaloOfflineTriggerTowerTools.cxx.

463 {
464 std::vector<unsigned int> rx = this->hadRxId(tt);
465 Identifier Id = this->hadID(tt->eta(),tt->phi());
466
467 std::vector<int> v;
468 std::vector<std::vector<const CaloCell*> > cells = this->sortFCAL23Cells(m_cells2tt->caloCells(Id),rx);
469 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
470 v.push_back((*i).size());
471 }
472 return v;
473 }
virtual std::vector< unsigned int > hadRxId(const TriggerTower *tt) const override
virtual std::vector< std::vector< const CaloCell * > > sortFCAL23Cells(const std::vector< const CaloCell * > &cells, const double eta) const override

◆ hadNCellsByReceiverByLayer()

std::vector< std::vector< int > > LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 475 of file L1CaloOfflineTriggerTowerTools.cxx.

475 {
476 Identifier Id = this->hadID(tt->eta(),tt->phi());
477 std::vector<unsigned int> rx = this->hadRxId(tt);
478 std::vector<int> v1;
479 std::vector<int> v2;
480 std::vector<std::vector<int> > v;
481 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
482 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
483 if ((*i).empty()) continue;
484 if (rx.size() == 2) {
485 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortFCAL23Cells((*i),rx);
486 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
487 if ((*j).empty()) continue;
488 if (j == cellsRx.begin()) v1.push_back((*j).size());
489 else v2.push_back((*j).size());
490 }
491 } else if (rx.size() == 1) v1.push_back((*i).size());
492 }
493 v.push_back(std::move(v1));
494 if (rx.size() == 2) v.push_back(std::move(v2));
495 return v;
496 }

◆ hadNCellsNonNominal()

float LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsNonNominal ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1008 of file L1CaloOfflineTriggerTowerTools.cxx.

1008 {
1009 Identifier Id = this->hadID(tt->eta(),tt->phi());
1010 bool isTile = m_lvl1Helper->is_tile(Id);
1011 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1012
1013 if(isTile == false && m_isLArHVCorrToolSet == false){return -9.9;}
1014
1015 if(isTile == false && m_isLArHVCorrToolSet == true){
1016 return this->LArNonNominalHV( cells );
1017 }
1018
1019 if(isTile == true){
1020 return this->TileNonNominal( cells );
1021 }
1022 return -9.9;
1023 }
virtual float TileNonNominal(const std::vector< const CaloCell * > &cells) const override

◆ hadNCellsNonNominalByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsNonNominalByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1026 of file L1CaloOfflineTriggerTowerTools.cxx.

1026 {
1027 std::vector<float> nNonNomHV;
1028 Identifier Id = this->hadID(tt->eta(),tt->phi());
1029 bool isTile = m_lvl1Helper->is_tile(Id);
1030 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
1031 if(isTile == false && m_isLArHVCorrToolSet == false){return nNonNomHV;}
1032 if(isTile == false && m_isLArHVCorrToolSet == true){
1033 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
1034 nNonNomHV.push_back( this->LArNonNominalHV( (*i) ) );
1035 }
1036 }
1037
1038 if(isTile == true){
1039 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
1040 nNonNomHV.push_back( this->TileNonNominal( (*i) ) );
1041 }
1042 }
1043
1044 return nNonNomHV;
1045
1046 }

◆ hadNCellsNonNominalByReceiverByLayer()

std::vector< std::vector< float > > LVL1::L1CaloOfflineTriggerTowerTools::hadNCellsNonNominalByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1048 of file L1CaloOfflineTriggerTowerTools.cxx.

1048 {
1049 std::vector<std::vector<float> > nNonNomHV;
1050 Identifier Id = this->hadID(tt->eta(),tt->phi());
1051 bool isTile = m_lvl1Helper->is_tile(Id);
1052 if(isTile == false && m_isLArHVCorrToolSet == false){return nNonNomHV;}
1053 std::vector<unsigned int> rx = this->hadRxId(tt);
1054 std::vector<float> v1;
1055 std::vector<float> v2;
1056 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
1057 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
1058 if ((*i).empty()) continue;
1059 if (rx.size() == 2) {
1060 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortFCAL23Cells((*i),rx);
1061 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
1062 if ((*j).empty()) continue;
1063 if (j == cellsRx.begin()) v1.push_back( (isTile == false) ? this->LArNonNominalHV((*j))
1064 : this->TileNonNominal((*j)));
1065 else v2.push_back( (isTile == false) ? this->LArNonNominalHV((*j))
1066 : this->TileNonNominal((*j)));
1067 }
1068 } else if (rx.size() == 1) v1.push_back( (isTile == false) ? this->LArNonNominalHV((*i))
1069 : this->TileNonNominal((*i)));
1070 }
1071 nNonNomHV.push_back(std::move(v1));
1072 if (rx.size() == 2) nNonNomHV.push_back(std::move(v2));
1073 return nNonNomHV;
1074 }

◆ hadNonNominalMeanScale()

float LVL1::L1CaloOfflineTriggerTowerTools::hadNonNominalMeanScale ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1076 of file L1CaloOfflineTriggerTowerTools.cxx.

1076 {
1077
1078 Identifier Id = this->hadID(tt->eta(),tt->phi());
1079 bool isTile = m_lvl1Helper->is_tile(Id);
1080 if(isTile == true){return -9.9;}
1081
1082 if(m_isLArHVCorrToolSet == false){return -9.9;}
1083 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1084 return this->LArHVScale( cells );
1085
1086 }

◆ hadNonNominalMeanScaleByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadNonNominalMeanScaleByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1088 of file L1CaloOfflineTriggerTowerTools.cxx.

1088 {
1089 std::vector<float> NonNomHV;
1090 Identifier Id = this->hadID(tt->eta(),tt->phi());
1091 bool isTile = m_lvl1Helper->is_tile(Id);
1092 if(isTile == true){return NonNomHV;}
1093
1094 if(m_isLArHVCorrToolSet == false){return NonNomHV;}
1095 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
1096
1097 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
1098 NonNomHV.push_back( this->LArHVScale( (*i ) ) );
1099 }
1100 return NonNomHV;
1101 }

◆ hadNonNominalMeanScaleByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadNonNominalMeanScaleByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1103 of file L1CaloOfflineTriggerTowerTools.cxx.

1103 {
1104
1105 std::vector<float> output;
1106 if(m_isLArHVCorrToolSet == false){return output;}
1107 std::vector<unsigned int> rx = this->hadRxId(tt);
1108 Identifier Id = this->hadID(tt->eta(),tt->phi());
1109
1110 bool isTile = m_lvl1Helper->is_tile(Id);
1111 if(isTile == true){return output;}
1112
1113 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1114
1115 if(rx.size() == 2){
1116 std::vector<std::vector<const CaloCell*> > vvcells = this->sortFCAL23Cells(cells,rx);
1117 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
1118 output.push_back( this->LArHVScale( (*i) ) );
1119 }
1120 }
1121
1122 if(rx.size() == 1){
1123 output.push_back( this->LArHVScale( cells ) );
1124 }
1125
1126 return output;
1127
1128 }

◆ hadNonNominalMeanScaleByReceiverByLayer()

std::vector< std::vector< float > > LVL1::L1CaloOfflineTriggerTowerTools::hadNonNominalMeanScaleByReceiverByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1130 of file L1CaloOfflineTriggerTowerTools.cxx.

1130 {
1131 std::vector<std::vector<float> > output;
1132 Identifier Id = this->hadID(tt->eta(),tt->phi());
1133 bool isTile = m_lvl1Helper->is_tile(Id);
1134 if(isTile == true || m_isLArHVCorrToolSet == false){return output;}
1135 std::vector<unsigned int> rx = this->hadRxId(tt);
1136 std::vector<float> v1;
1137 std::vector<float> v2;
1138 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
1139 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
1140 if ((*i).empty()) continue;
1141 if (rx.size() == 2) {
1142 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortFCAL23Cells((*i),rx);
1143 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
1144 if ((*j).empty()) continue;
1145 if (j == cellsRx.begin()) v1.push_back(this->LArHVScale((*j)));
1146 else v2.push_back(this->LArHVScale((*j)));
1147 }
1148 } else if (rx.size() == 1) v1.push_back(this->LArHVScale((*i)));
1149 }
1150 output.push_back(std::move(v1));
1151 if (rx.size() == 2) output.push_back(std::move(v2));
1152 return output;
1153 }

◆ hadPpmChannel()

int LVL1::L1CaloOfflineTriggerTowerTools::hadPpmChannel ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 172 of file L1CaloOfflineTriggerTowerTools.cxx.

172 {
173 Identifier Id = this->hadID(tt->eta(),tt->phi());
174 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
175 return m_ttOnlineIdHelper->channel(HWId);
176 }

◆ hadPpmCrate()

int LVL1::L1CaloOfflineTriggerTowerTools::hadPpmCrate ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 154 of file L1CaloOfflineTriggerTowerTools.cxx.

154 {
155 Identifier Id = this->hadID(tt->eta(),tt->phi());
156 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
157 return m_ttOnlineIdHelper->crate(HWId);
158 }

◆ hadPpmModule()

int LVL1::L1CaloOfflineTriggerTowerTools::hadPpmModule ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 160 of file L1CaloOfflineTriggerTowerTools.cxx.

160 {
161 Identifier Id = this->hadID(tt->eta(),tt->phi());
162 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
163 return m_ttOnlineIdHelper->module(HWId);
164 }

◆ hadPpmSubmodule()

int LVL1::L1CaloOfflineTriggerTowerTools::hadPpmSubmodule ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 166 of file L1CaloOfflineTriggerTowerTools.cxx.

166 {
167 Identifier Id = this->hadID(tt->eta(),tt->phi());
168 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
169 return m_ttOnlineIdHelper->submodule(HWId);
170 }

◆ hadReceivers()

std::vector< L1CaloRxCoolChannelId > LVL1::L1CaloOfflineTriggerTowerTools::hadReceivers ( const TriggerTower * tt) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 206 of file L1CaloOfflineTriggerTowerTools.cxx.

206 {
207 Identifier Id = this->hadID(tt->eta(),tt->phi());
208 HWIdentifier HWId = m_ttSvc->createTTChannelID(Id);
209 L1CaloCoolChannelId coolId = m_ttSvc->createL1CoolChannelId(HWId);
210 std::vector<L1CaloRxCoolChannelId> rx = m_ttSvc->cnvCoolChannelIdToRxId(coolId);
211
212 std::vector<L1CaloRxCoolChannelId> output;
213
214 // Sort FCAL 23 recievers. Always have -ve eta first and +ve eta second
215 if(rx.size() == 2){
216
217 // Odd receiver is lowest |eta|
218 unsigned int inputPairA = rx.at(0).inputPair();
219 unsigned int inputPairB = rx.at(1).inputPair();
220
221 bool oddA(false),oddB(false);
222 if(inputPairA % 2 != 0){oddA = true;}
223 if(inputPairB % 2 != 0){oddB = true;}
224
225 if(oddA == true && oddB == false){
226 output.push_back(rx.at(0));
227 output.push_back(rx.at(1));
228 }
229 if(oddA == false && oddB == true){
230 output.push_back(rx.at(1));
231 output.push_back(rx.at(0));
232 }
233
234 }
235 if(rx.size() == 1){
236 output.push_back(rx.at(0));
237 }
238
239 return output;
240 }

◆ hadRxId()

std::vector< unsigned int > LVL1::L1CaloOfflineTriggerTowerTools::hadRxId ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 243 of file L1CaloOfflineTriggerTowerTools.cxx.

243 {
244 typedef std::vector<L1CaloRxCoolChannelId>::const_iterator Itr;
245 std::vector<L1CaloRxCoolChannelId> rx = this->hadReceivers(tt);
246 std::vector<unsigned int> output;
247 for(Itr i=rx.begin();i!=rx.end();++i){
248 output.push_back( (*i).id() );
249 }
250 return output;
251 }

◆ hadSuperCellIdentifiers()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::hadSuperCellIdentifiers ( const TriggerTower * tt) const

Definition at line 1167 of file L1CaloOfflineTriggerTowerTools.cxx.

1167 {
1168 Identifier Id = this->hadID(tt->eta(),tt->phi());
1169 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
1170 return this->SuperCellIdentifiers( cells );
1171 }

◆ hadTTCellsEnergy()

float LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEnergy ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 526 of file L1CaloOfflineTriggerTowerTools.cxx.

526 {
527 Identifier Id = this->hadID(tt->eta(),tt->phi());
528 return m_cells2tt->energy( m_cells2tt->caloCells(Id) );
529 }

◆ hadTTCellsEnergyByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEnergyByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 531 of file L1CaloOfflineTriggerTowerTools.cxx.

531 {
532 Identifier Id = this->hadID(tt->eta(),tt->phi());
533 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
534 std::vector<float> eByLayer;
535 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
536 eByLayer.push_back( m_cells2tt->energy( *i ) );
537 }
538 return eByLayer;
539 }

◆ hadTTCellsEnergyByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEnergyByReceiver ( const TriggerTower * tt,
const int mode = 0 ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 541 of file L1CaloOfflineTriggerTowerTools.cxx.

541 {
542 // Mode 0 : Return vector<float> even if it has 1 entry. Equivelent to hadTTCellsEnergy
543 // Mode 1 : Return vecotr<float> only if size is > 2. D3PDs don't need this
544 std::vector<float> output;
545 std::vector<unsigned int> rx = this->hadRxId(tt);
546 Identifier Id = this->hadID(tt->eta(),tt->phi());
547 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
548
549 if(rx.size() == 2){
550 std::vector<std::vector<const CaloCell*> > vvcells = this->sortFCAL23Cells(cells,rx);
551 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
552 output.push_back( m_cells2tt->energy( (*i) ) );
553 }
554 }
555
556 if(rx.size() == 1 && mode == 0){
557 output.push_back( m_cells2tt->energy( cells ) );
558 }
559
560 return output;
561 }

◆ hadTTCellsEt()

float LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEt ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 563 of file L1CaloOfflineTriggerTowerTools.cxx.

563 {
564 Identifier Id = this->hadID(tt->eta(),tt->phi());
565 return m_cells2tt->et( m_cells2tt->caloCells(Id) );
566 }

◆ hadTTCellsEtByLayer()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEtByLayer ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 568 of file L1CaloOfflineTriggerTowerTools.cxx.

568 {
569 Identifier Id = this->hadID(tt->eta(),tt->phi());
570 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
571 std::vector<float> eByLayer;
572 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
573 eByLayer.push_back( m_cells2tt->et( *i ) );
574 }
575 return eByLayer;
576 }

◆ hadTTCellsEtByReceiver()

std::vector< float > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsEtByReceiver ( const TriggerTower * tt,
const int mode = 0 ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 579 of file L1CaloOfflineTriggerTowerTools.cxx.

579 {
580 // Mode 0 : Return vector<float> even if it has 1 entry. Equivelent to hadTTCellsEt
581 // Mode 1 : Return vecotr<float> only if size is > 2. D3PDs don't need this
582 std::vector<float> output;
583 std::vector<unsigned int> rx = this->hadRxId(tt);
584 Identifier Id = this->hadID(tt->eta(),tt->phi());
585 std::vector<const CaloCell*> cells = m_cells2tt->caloCells(Id);
586
587 if(rx.size() == 2){
588 std::vector<std::vector<const CaloCell*> > vvcells = this->sortFCAL23Cells(cells,rx);
589 for(Itr_vvCaloCells i=vvcells.begin();i!=vvcells.end();++i){
590 output.push_back( m_cells2tt->et( (*i) ) );
591 }
592 }
593
594 if(rx.size() == 1 && mode == 0){
595 output.push_back( m_cells2tt->et( cells ) );
596 }
597
598 return output;
599 }

◆ hadTTCellsLayerNames()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsLayerNames ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 498 of file L1CaloOfflineTriggerTowerTools.cxx.

498 {
499 Identifier Id = this->hadID(tt->eta(),tt->phi());
500 return m_cells2tt->layerNames(Id);
501 }

◆ hadTTCellsLayerNamesByReceiver()

std::vector< std::vector< int > > LVL1::L1CaloOfflineTriggerTowerTools::hadTTCellsLayerNamesByReceiver ( const TriggerTower * tt) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 503 of file L1CaloOfflineTriggerTowerTools.cxx.

503 {
504 Identifier Id = this->hadID(tt->eta(),tt->phi());
505 std::vector<unsigned int> rx = this->hadRxId(tt);
506 std::vector<int> v1;
507 std::vector<int> v2;
508 std::vector<std::vector<int> > v;
509 std::vector<std::vector<const CaloCell*> > cells = m_cells2tt->caloCellsByLayer(Id);
510 for(Itr_vvCaloCells i=cells.begin();i!=cells.end();++i){
511 if ((*i).empty()) continue;
512 if (rx.size() == 2) {
513 std::vector<std::vector<const CaloCell*> > cellsRx = this->sortFCAL23Cells((*i),rx);
514 for(Itr_vvCaloCells j=cellsRx.begin();j!=cellsRx.end();++j){
515 if ((*j).empty()) continue;
516 if (j == cellsRx.begin()) v1.push_back(m_cells2tt->layerNames((*j)[0]));
517 else v2.push_back(m_cells2tt->layerNames((*j)[0]));
518 }
519 } else if (rx.size() == 1) v1.push_back(m_cells2tt->layerNames((*i)[0]));
520 }
521 v.push_back(std::move(v1));
522 if (rx.size() == 2) v.push_back(std::move(v2));
523 return v;
524 }

◆ ID()

Identifier LVL1::L1CaloOfflineTriggerTowerTools::ID ( const double eta,
const double phi,
int layer ) const

Definition at line 1729 of file L1CaloOfflineTriggerTowerTools.cxx.

1729 {
1730 return m_lvl1Helper->tower_id(this->pos_neg_z(eta),layer,this->region(eta),this->ieta(eta),this->iphi(eta,phi));
1731 }

◆ ieta()

int LVL1::L1CaloOfflineTriggerTowerTools::ieta ( const double eta) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1721 of file L1CaloOfflineTriggerTowerTools.cxx.

1721 {
1722 return m_l1CaloTTIdTools->etaIndex(eta);
1723 }

◆ InBcidNegedge()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::InBcidNegedge ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1452 of file L1CaloOfflineTriggerTowerTools.cxx.

1452 {
1453 unsigned short int value = 0;
1454 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1455 if((*attrList)[attrNum].specification().name() == "InBcidNegedge"){
1456 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1457 break;
1458 }
1459 }
1460 return value;
1461 }

◆ initialize()

StatusCode LVL1::L1CaloOfflineTriggerTowerTools::initialize ( void )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 1673 of file L1CaloOfflineTriggerTowerTools.cxx.

1673 {
1674 ATH_CHECK( detStore()->retrieve(m_caloMgr) );
1675
1676 m_ttOnlineIdHelper = m_caloMgr->getTTOnlineID();
1677 if(!m_ttOnlineIdHelper){ATH_MSG_ERROR("Could not access TTOnlineId helper");return StatusCode::FAILURE;}
1678
1679 m_lvl1Helper = m_caloMgr->getLVL1_ID();
1680 if(!m_lvl1Helper){ATH_MSG_ERROR("Could not access CaloLVL1_ID helper");return StatusCode::FAILURE;}
1681
1682 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
1683 ATH_CHECK( m_tileBadChanTool.retrieve() );
1684 ATH_CHECK( m_rxMapTool.retrieve() );
1685 ATH_CHECK( detStore()->retrieve(m_larOnlineID,"LArOnlineID") );
1686 ATH_CHECK( m_l1CaloTTIdTools.retrieve() );
1687 ATH_CHECK( m_cells2tt.retrieve() );
1688
1689 ATH_CHECK( detStore()->retrieve (m_caloMgr, "CaloIdManager") );
1690 ATH_CHECK( m_scidtool.retrieve() );
1691
1692 //Retrieve cabling & tt services
1693 ATH_CHECK( m_ttSvc.retrieve() );
1694
1695 ATH_CHECK( m_onlineScaleCorrKey.initialize() );
1696
1697 ATH_MSG_INFO("L1Calo L1CaloOfflineTriggerTowerTools initialize() success!");
1698 return StatusCode::SUCCESS;
1699 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const
SG::ReadCondHandleKey< ILArHVScaleCorr > m_onlineScaleCorrKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ iphi()

int LVL1::L1CaloOfflineTriggerTowerTools::iphi ( const double eta,
const double phi ) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1725 of file L1CaloOfflineTriggerTowerTools.cxx.

1725 {
1726 return m_l1CaloTTIdTools->phiIndex(eta,phi);
1727 }

◆ LArCaloQuality()

float LVL1::L1CaloOfflineTriggerTowerTools::LArCaloQuality ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 763 of file L1CaloOfflineTriggerTowerTools.cxx.

763 {
764 float nom(0.), denom(0.);
765 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
766 if((*i)->provenance() & 0x2000) {
767 nom += ((*i)->e() * (*i)->quality());
768 denom += (*i)->e();
769 }
770 }
771
772 if(denom != 0.) {
773 nom /= denom;
774 }
775 else{
776 nom = -1e6; // error value
777 }
778 return nom;
779 }
std::vector< constCaloCell * >::const_iterator Itr_vCaloCells

◆ LArHV()

void LVL1::L1CaloOfflineTriggerTowerTools::LArHV ( const SG::ReadCondHandleKey< ILArHVScaleCorr > & scaleCorrKey,
const SG::ReadCondHandleKey< LArOnOffIdMapping > & cablingKey )
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1705 of file L1CaloOfflineTriggerTowerTools.cxx.

1707 {
1708 m_scaleCorrKey = scaleCorrKey;
1709 m_cablingKey = cablingKey;
1710 m_isLArHVCorrToolSet = true;
1711 }

◆ LArHVScale() [1/2]

float LVL1::L1CaloOfflineTriggerTowerTools::LArHVScale ( const CaloCell * cell,
const ILArHVScaleCorr * scaleCorr,
const ILArHVScaleCorr * onlineScaleCorr,
const LArOnOffIdMapping * cabling ) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 753 of file L1CaloOfflineTriggerTowerTools.cxx.

757 {
758 HWIdentifier hwid=cabling->createSignalChannelID(cell->ID());
759 return scaleCorr->HVScaleCorr( hwid ) * onlineScaleCorr->HVScaleCorr( hwid );
760 }
virtual const float & HVScaleCorr(const HWIdentifier &id) const =0

◆ LArHVScale() [2/2]

float LVL1::L1CaloOfflineTriggerTowerTools::LArHVScale ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 738 of file L1CaloOfflineTriggerTowerTools.cxx.

738 {
739 const EventContext& ctx = Gaudi::Hive::currentContext();
740 SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx);
741 SG::ReadCondHandle<ILArHVScaleCorr> scaleCorr (m_scaleCorrKey, ctx);
742 SG::ReadCondHandle<ILArHVScaleCorr> onlineScaleCorr (m_onlineScaleCorrKey, ctx);
743
744 float scale(0.0),count(0.0);
745 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
746 scale += this->LArHVScale( (*i), scaleCorr.cptr(), onlineScaleCorr.cptr(), cabling.cptr() );
747 count++;
748 }
749 if(count < 1.0){return 0.0;}
750 return scale / count;
751 }
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148

◆ LArNonNominalHV() [1/2]

float LVL1::L1CaloOfflineTriggerTowerTools::LArNonNominalHV ( const CaloCell * cell,
const ILArHVScaleCorr * scaleCorr,
const ILArHVScaleCorr * onlineScaleCorr,
const LArOnOffIdMapping * cabling ) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 725 of file L1CaloOfflineTriggerTowerTools.cxx.

728 {
729 float nonNominal(0.0);
730 HWIdentifier hwid=cabling->createSignalChannelID(cell->ID());
731 float corr = scaleCorr->HVScaleCorr( hwid ) * onlineScaleCorr->HVScaleCorr( hwid );
732 if(corr > m_LArHVNonNomPara){
733 nonNominal = 1.0;
734 }
735 return nonNominal;
736 }

◆ LArNonNominalHV() [2/2]

float LVL1::L1CaloOfflineTriggerTowerTools::LArNonNominalHV ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 713 of file L1CaloOfflineTriggerTowerTools.cxx.

713 {
714 const EventContext& ctx = Gaudi::Hive::currentContext();
715 SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx);
716 SG::ReadCondHandle<ILArHVScaleCorr> scaleCorr (m_scaleCorrKey, ctx);
717 SG::ReadCondHandle<ILArHVScaleCorr> onlineScaleCorr (m_onlineScaleCorrKey, ctx);
718 float nonNominal(0.0);
719 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
720 nonNominal += this->LArNonNominalHV( (*i), scaleCorr.cptr(), onlineScaleCorr.cptr(), cabling.cptr() );
721 }
722 return nonNominal;
723 }

◆ LutNoiseCut()

unsigned short LVL1::L1CaloOfflineTriggerTowerTools::LutNoiseCut ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1629 of file L1CaloOfflineTriggerTowerTools.cxx.

1629 {
1630 unsigned short value = 0;
1631 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1632 if((*attrList)[attrNum].specification().name() == "LutNoiseCut"){
1633 value = (unsigned short) (*attrList)[attrNum].data<unsigned short>();
1634 break;
1635 }
1636 }
1637 return value;
1638 }

◆ LutOffset()

unsigned short LVL1::L1CaloOfflineTriggerTowerTools::LutOffset ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1607 of file L1CaloOfflineTriggerTowerTools.cxx.

1607 {
1608 unsigned short value = 0;
1609 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1610 if((*attrList)[attrNum].specification().name() == "LutOffset"){
1611 value = (unsigned short) (*attrList)[attrNum].data<unsigned short>();
1612 break;
1613 }
1614 }
1615 return value;
1616 }

◆ LutSlope()

unsigned short LVL1::L1CaloOfflineTriggerTowerTools::LutSlope ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1618 of file L1CaloOfflineTriggerTowerTools.cxx.

1618 {
1619 unsigned short value = 0;
1620 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1621 if((*attrList)[attrNum].specification().name() == "LutSlope"){
1622 value = (unsigned short) (*attrList)[attrNum].data<unsigned short >();
1623 break;
1624 }
1625 }
1626 return value;
1627 }

◆ LutStrategy()

unsigned short LVL1::L1CaloOfflineTriggerTowerTools::LutStrategy ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1596 of file L1CaloOfflineTriggerTowerTools.cxx.

1596 {
1597 unsigned short value = 0;
1598 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1599 if((*attrList)[attrNum].specification().name() == "LutStrategy"){
1600 value = (unsigned short) (*attrList)[attrNum].data<unsigned short>();
1601 break;
1602 }
1603 }
1604 return value;
1605 }

◆ ModuleId()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::ModuleId ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1286 of file L1CaloOfflineTriggerTowerTools.cxx.

1286 {
1287 unsigned int value = 0;
1288 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1289 if((*attrList)[attrNum].specification().name() == "ModuleId"){
1290 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1291 break;
1292 }
1293 }
1294 return value;
1295 }

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ operator=()

L1CaloOfflineTriggerTowerTools & LVL1::L1CaloOfflineTriggerTowerTools::operator= ( const L1CaloOfflineTriggerTowerTools & rhs)
delete

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ PedMean()

double LVL1::L1CaloOfflineTriggerTowerTools::PedMean ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1407 of file L1CaloOfflineTriggerTowerTools.cxx.

1407 {
1408 double value = 0;
1409 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1410 if((*attrList)[attrNum].specification().name() == "PedMean"){
1411 value = (double) (*attrList)[attrNum].data<double>();
1412 break;
1413 }
1414 }
1415 return value;
1416 }

◆ PedValue()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::PedValue ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1418 of file L1CaloOfflineTriggerTowerTools.cxx.

1418 {
1419 unsigned int value = 0;
1420 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1421 if((*attrList)[attrNum].specification().name() == "PedValue"){
1422 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1423 break;
1424 }
1425 }
1426 return value;
1427 }

◆ pos_neg_z()

int LVL1::L1CaloOfflineTriggerTowerTools::pos_neg_z ( const double eta) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1713 of file L1CaloOfflineTriggerTowerTools.cxx.

1713 {
1714 return m_l1CaloTTIdTools->pos_neg_z(eta);
1715 }

◆ PprDacScanResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprDacScanResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1308 of file L1CaloOfflineTriggerTowerTools.cxx.

1308 {
1309 unsigned long long value = 0;
1310 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1311 if((*attrList)[attrNum].specification().name() == "PprDacScanResultsTimeStamp"){
1312 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1313 break;
1314 }
1315 }
1316 return value;
1317 }

◆ PprFirFilterResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprFirFilterResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1363 of file L1CaloOfflineTriggerTowerTools.cxx.

1363 {
1364 unsigned long long value = 0;
1365 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1366 if((*attrList)[attrNum].specification().name() == "PprFirFilterResultsTimeStamp"){
1367 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1368 break;
1369 }
1370 }
1371 return value;
1372 }

◆ PprLutValuesResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprLutValuesResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1374 of file L1CaloOfflineTriggerTowerTools.cxx.

1374 {
1375 unsigned long long value = 0;
1376 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1377 if((*attrList)[attrNum].specification().name() == "PprLutValuesResultsTimeStamp"){
1378 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1379 break;
1380 }
1381 }
1382 return value;
1383 }

◆ PprNoiseRunResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprNoiseRunResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1330 of file L1CaloOfflineTriggerTowerTools.cxx.

1330 {
1331 unsigned long long value = 0;
1332 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1333 if((*attrList)[attrNum].specification().name() == "PprNoiseRunResultsTimeStamp"){
1334 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1335 break;
1336 }
1337 }
1338 return value;
1339 }

◆ PprPedestalRunResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprPedestalRunResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1319 of file L1CaloOfflineTriggerTowerTools.cxx.

1319 {
1320 unsigned long long value = 0;
1321 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1322 if((*attrList)[attrNum].specification().name() == "PprPedestalRunResultsTimeStamp"){
1323 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1324 break;
1325 }
1326 }
1327 return value;
1328 }

◆ PprSatBcidResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprSatBcidResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1352 of file L1CaloOfflineTriggerTowerTools.cxx.

1352 {
1353 unsigned long long value = 0;
1354 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1355 if((*attrList)[attrNum].specification().name() == "PprSatBcidResultsTimeStamp"){
1356 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1357 break;
1358 }
1359 }
1360 return value;
1361 }

◆ PprTimingResultsTimeStamp()

unsigned long long LVL1::L1CaloOfflineTriggerTowerTools::PprTimingResultsTimeStamp ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1341 of file L1CaloOfflineTriggerTowerTools.cxx.

1341 {
1342 unsigned long long value = 0;
1343 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1344 if((*attrList)[attrNum].specification().name() == "PprTimingResultsTimeStamp"){
1345 value = (unsigned long long) (*attrList)[attrNum].data<unsigned long long>();
1346 break;
1347 }
1348 }
1349 return value;
1350 }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ region()

int LVL1::L1CaloOfflineTriggerTowerTools::region ( const double eta) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1717 of file L1CaloOfflineTriggerTowerTools.cxx.

1717 {
1718 return m_l1CaloTTIdTools->regionIndex(eta);
1719 }

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ RxGain()

float LVL1::L1CaloOfflineTriggerTowerTools::RxGain ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1263 of file L1CaloOfflineTriggerTowerTools.cxx.

1263 {
1264 float value = 0;
1265 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1266 if((*attrList)[attrNum].specification().name() == "gain"){
1267 value = (float) (*attrList)[attrNum].data<float>();
1268 break;
1269 }
1270 }
1271 return value;
1272 }

◆ RxStatus()

unsigned int LVL1::L1CaloOfflineTriggerTowerTools::RxStatus ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1274 of file L1CaloOfflineTriggerTowerTools.cxx.

1274 {
1275 unsigned int value = 0;
1276 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1277 if((*attrList)[attrNum].specification().name() == "status"){
1278 value = (unsigned int) (*attrList)[attrNum].data<unsigned int>();
1279 break;
1280 }
1281 }
1282 return value;
1283 }

◆ SatBcidLevel()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::SatBcidLevel ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1497 of file L1CaloOfflineTriggerTowerTools.cxx.

1497 {
1498 unsigned short int value = 0;
1499 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1500 if((*attrList)[attrNum].specification().name() == "SatBcidLevel"){
1501 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1502 break;
1503 }
1504 }
1505 return value;
1506 }

◆ SatBcidThreshHigh()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::SatBcidThreshHigh ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1486 of file L1CaloOfflineTriggerTowerTools.cxx.

1486 {
1487 unsigned short int value = 0;
1488 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1489 if((*attrList)[attrNum].specification().name() == "SatBcidThreshHigh"){
1490 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1491 break;
1492 }
1493 }
1494 return value;
1495 }

◆ SatBcidThreshLow()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::SatBcidThreshLow ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1475 of file L1CaloOfflineTriggerTowerTools.cxx.

1475 {
1476 unsigned short int value = 0;
1477 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1478 if((*attrList)[attrNum].specification().name() == "SatBcidThreshLow"){
1479 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1480 break;
1481 }
1482 }
1483 return value;
1484 }

◆ sortEMCrackCells()

std::vector< std::vector< const CaloCell * > > LVL1::L1CaloOfflineTriggerTowerTools::sortEMCrackCells ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 417 of file L1CaloOfflineTriggerTowerTools.cxx.

417 {
418 std::vector<std::vector<const CaloCell*> > output;
419 std::vector<const CaloCell*> emb;
420 std::vector<const CaloCell*> emec;
421
422 // End Cap first, Barrel second
423
424 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
425 int layer = m_cells2tt->layerNames(*i);
426
427 if( layer <= 3){
428 emb.push_back( (*i) );
429 }
430 if( layer >= 4){
431 emec.push_back( (*i) );
432 }
433 }
434
435 output.push_back(std::move(emec));
436 output.push_back(std::move(emb));
437 return output;
438 }
@ layer
Definition HitInfo.h:79

◆ sortFCAL23Cells() [1/2]

std::vector< std::vector< const CaloCell * > > LVL1::L1CaloOfflineTriggerTowerTools::sortFCAL23Cells ( const std::vector< const CaloCell * > & cells,
const double eta ) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 614 of file L1CaloOfflineTriggerTowerTools.cxx.

615 {
616 std::vector<std::vector<const CaloCell*> > output;
617
618 std::vector<const CaloCell*> fcal2A;
619 std::vector<const CaloCell*> fcal2B;
620 std::vector<const CaloCell*> fcal3A;
621 std::vector<const CaloCell*> fcal3B;
622 double absEta = fabs(eta);
623
624 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
625 int layer = m_cells2tt->layerNames(*i);
626 const CaloDetDescrElement* caloDDE = (*i)->caloDDE();
627 // _raw is ideal position
628 double cellEta = fabs(caloDDE->eta_raw());
629 double x = fabs(caloDDE->x_raw());
630 double y = fabs(caloDDE->y_raw());
631
632 // FCAL 2
633 if (layer == 22) {
634 // TTs split the eta range equally, hence the apparent inconsistencies in next line
635 bool lowEta = (absEta < 4.05 && cellEta < 3.3) || (absEta > 4.05 && cellEta < 3.97);
636 // Exceptions, based on radial map
637 if ((x > 100. && x < 160. && y > 340. && y < 380.) ||
638 (x > 320. && x < 360. && y > 170. && y < 210.) ||
639 (x > 30. && x < 60. && y > 170. && y < 210.)) lowEta = true;
640 if ((x > 160. && x < 190. && y > 340. && y < 380.) ||
641 (x > 230. && x < 260. && y > 300. && y < 340.) ||
642 (x > 130. && x < 160. && y > 140. && y < 170.) ||
643 (x > 160. && x < 200. && y > 90. && y < 140.)) lowEta = false;
644 if (lowEta) fcal2A.push_back(*i);
645 else fcal2B.push_back(*i);
646 }
647 // FCAL 3
648 if (layer == 23) {
649 bool lowEta = (absEta < 4.05 && cellEta < 3.43) || (absEta > 4.05 && cellEta < 3.9);
650 // Exceptions
651 double xs = caloDDE->x_raw();
652 double ys = caloDDE->y_raw();
653 if ((x > 120. && x < 160. && y > 140. && y < 200.) ||
654 (x > 160. && x < 220. && y > 100. && y < 140.) ||
655 (xs > 120. && xs < 160. && ys > -140. && ys < -100.) ||
656 (xs > -160. && xs < -100. && ys > 100. && ys < 140.)) lowEta = true;
657 if ((x > 0. && x < 60. && y > 380. && y < 420.) ||
658 (xs > 320. && xs < 370. && ys > 140. && ys < 190.) ||
659 (xs > -360. && xs < -320. && ys > -180. && ys < -140.)) lowEta = false;
660 if (lowEta) fcal3A.push_back(*i);
661 else fcal3B.push_back(*i);
662 }
663 }
664
665 unsigned int size2A = fcal2A.size();
666 unsigned int size2B = fcal2B.size();
667 unsigned int size3A = fcal3A.size();
668 unsigned int size3B = fcal3B.size();
669
670 // Always have lowEta first
671 if(size2A > 0 && size2B > 0 && size3A == 0 && size3B == 0){ // FCAL 2
672 output.push_back(std::move(fcal2A));
673 output.push_back(std::move(fcal2B));
674 }
675 if(size2A == 0 && size2B == 0 && size3A > 0 && size3B > 0){ // FCAL 3
676 output.push_back(std::move(fcal3A));
677 output.push_back(std::move(fcal3B));
678 }
679
680 return output;
681 }
#define y
#define x
bool absEta(const xAOD::TauJet &tau, float &out)

◆ sortFCAL23Cells() [2/2]

std::vector< std::vector< const CaloCell * > > LVL1::L1CaloOfflineTriggerTowerTools::sortFCAL23Cells ( const std::vector< const CaloCell * > & cells,
const std::vector< unsigned int > & rxId ) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 683 of file L1CaloOfflineTriggerTowerTools.cxx.

684 {
685
686 // vectors of calo cells for the different receivers
687 std::vector<const CaloCell*> cellsA;
688 std::vector<const CaloCell*> cellsB;
689 // output
690 std::vector<std::vector<const CaloCell*> > output;
691
692 // RxID of the different receivers
693 unsigned int rxidA = rxId.at(0);
694 unsigned int rxidB = rxId.at(1);
695
696 // Loop over calo cells and use mapping tool to assign cells to different receivers
697 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
698 unsigned int someRxId = m_rxMapTool->offlineCell2RxId( (*i)->ID().get_identifier32().get_compact() );
699 if(someRxId == rxidA){cellsA.push_back(*i);}
700 if(someRxId == rxidB){cellsB.push_back(*i);}
701 }
702 output.push_back(std::move(cellsA));
703 output.push_back(std::move(cellsB));
704 return output;
705 }

◆ SuperCellIdentifiers()

std::vector< int > LVL1::L1CaloOfflineTriggerTowerTools::SuperCellIdentifiers ( const std::vector< const CaloCell * > & cells) const
protected

Definition at line 1173 of file L1CaloOfflineTriggerTowerTools.cxx.

1173 {
1174 std::vector<int> output;
1175 std::map<int, std::vector<const CaloCell*> > sc_ids;
1176 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
1177 const CaloCell* cell = (*i);
1178 Identifier sCellID = m_scidtool->offlineToSuperCellID ( cell->ID() );
1179 sc_ids[sCellID.get_identifier32().get_compact()].push_back( cell );
1180 }
1181 for(std::map< int, std::vector<const CaloCell*> >::const_iterator i=sc_ids.begin();i!=sc_ids.end();++i){
1182 output.push_back( (*i).first );
1183 }
1184 return output;
1185 }
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.

◆ SyncDelayBcid()

unsigned short int LVL1::L1CaloOfflineTriggerTowerTools::SyncDelayBcid ( const coral::AttributeList * attrList) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 1440 of file L1CaloOfflineTriggerTowerTools.cxx.

1440 {
1441 unsigned short int value = 0;
1442 for(unsigned int attrNum=0;attrNum<attrList->size();attrNum++){
1443 if((*attrList)[attrNum].specification().name() == "SyncDelayBcid"){
1444 value = (unsigned short int) (*attrList)[attrNum].data<unsigned short int>();
1445 break;
1446 }
1447 }
1448 return value;
1449 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TileCaloQuality()

float LVL1::L1CaloOfflineTriggerTowerTools::TileCaloQuality ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 858 of file L1CaloOfflineTriggerTowerTools.cxx.

858 {
859 float nom(0.), denom(0.);
860 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
861 const TileCell *tileCell = dynamic_cast<const TileCell*>( (*i) );
862
863 if(tileCell && tileCell->provenance() & 0x8080) {
864 nom += tileCell->e() * std::max(tileCell->qual1(), tileCell->qual2());
865 denom += tileCell->e();
866 }
867 }
868
869 if(denom != 0.) {
870 nom /= denom;
871 }
872 else {
873 nom = -1e6; // error value
874 }
875 return nom;
876 }
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
uint16_t provenance() const
get provenance (data member)
Definition CaloCell.h:354
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200

◆ tileCellEnergy()

float LVL1::L1CaloOfflineTriggerTowerTools::tileCellEnergy ( const TriggerTower * tt,
IdTTL1CellMapType & map ) const
overridevirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 601 of file L1CaloOfflineTriggerTowerTools.cxx.

601 {
602 Identifier Id = this->hadID(tt->eta(),tt->phi());
603 if(m_lvl1Helper->is_tile(Id) == false){return 0.0;}
604 else{
605 IdTTL1CellMapType::const_iterator ttL1Cell(map.find(Id));
606 IdTTL1CellMapType::const_iterator ttL1Cell_E(map.end());
607 if(ttL1Cell != ttL1Cell_E){
608 return ((ttL1Cell->second)->eneTower()) * 1e-3;
609 }
610 return 0.0;
611 }
612 }

◆ TileNonNominal() [1/2]

float LVL1::L1CaloOfflineTriggerTowerTools::TileNonNominal ( const CaloCell * cell) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 791 of file L1CaloOfflineTriggerTowerTools.cxx.

791 {
792
793 // There are either 1 or 2 PMTs per Calo Cell
794 // A PMT may have Half Gain L1 or No Gain L1
795 //
796 // Assign a score as follows.
797 //
798 // Case (a) : 2 PMTs in the Cell
799 // Half gain counts as 0.25
800 // No gain counts as 0.5
801 // So if a cells has no gain in PMT1 and half gain in PMT2 it's score is 0.75
802 //
803 // Case (b) : 1 PMT in the Cell
804 // Half gain counts as 0.5
805 // No Gain counts as 1.0
806
807 const EventContext& ctx = Gaudi::Hive::currentContext();
808
809 // Cast the CaloCell as a TileCell
810 const TileCell *tileCell = dynamic_cast<const TileCell*>(cell);
811 if (!tileCell) return 0.0;
812
813 // Get IdentifierHash for both PMTs
814 const CaloDetDescrElement * caloDDE = tileCell->caloDDE();
815 IdentifierHash hash1 = caloDDE->onl1();
816 IdentifierHash hash2 = caloDDE->onl2();
817
818 // Values for PMT 1 and 2
819 int gain1(-9),gain2(-9);
820 float score(0.0),multiplier(1.0);
821 bool adc1_noGainL1(false),adc1_halfGainL1(false);
822 bool pmt2Valid(false),adc2_noGainL1(false),adc2_halfGainL1(false);
823
824 // PMT 1
825 gain1 = tileCell->gain1();
826 HWIdentifier adc_id1 = m_tileHWID->adc_id(hash1,(gain1<0)?1:gain1);
827 const TileBchStatus badChan1 = m_tileBadChanTool->getAdcStatus(adc_id1, ctx);
828 adc1_noGainL1 = badChan1.isNoGainL1();
829 adc1_halfGainL1 = badChan1.isHalfGainL1();
830
831 // gap/crack scintillators only have one PMT per cell
832 // PMT 2, if valid
833 if(hash2 != TileHWID::NOT_VALID_HASH){
834 pmt2Valid = true;
835 gain2 = tileCell->gain2();
836 HWIdentifier adc_id2 = m_tileHWID->adc_id(hash2,(gain2<0)?1:gain2);
837 const TileBchStatus badChan2 = m_tileBadChanTool->getAdcStatus(adc_id2, ctx);
838 adc2_noGainL1 = badChan2.isNoGainL1();
839 adc2_halfGainL1 = badChan2.isHalfGainL1();
840 }
841
842 // Calculate the TileCell score
843
844 // Check that a PMT can't contribute more than 0.5
845 // Should not be the case, but assumptions cause bugs.....
846 if(adc1_noGainL1 == true && adc1_halfGainL1 == true){adc1_halfGainL1 = false;}
847 if(adc2_noGainL1 == true && adc2_halfGainL1 == true){adc2_halfGainL1 = false;}
848
849 if(pmt2Valid == false){multiplier = 2.0;}
850 if(adc1_halfGainL1 == true){score += 0.25;}
851 if(adc1_noGainL1 == true){score += 0.5;}
852 if(adc2_halfGainL1 == true){score += 0.25;}
853 if(adc2_noGainL1 == true){score += 0.5;}
854
855 return score * multiplier;
856 }
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
bool isNoGainL1() const
bool isHalfGainL1() const
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
@ NOT_VALID_HASH
Definition TileHWID.h:314

◆ TileNonNominal() [2/2]

float LVL1::L1CaloOfflineTriggerTowerTools::TileNonNominal ( const std::vector< const CaloCell * > & cells) const
overrideprotectedvirtual

Implements LVL1::IL1CaloOfflineTriggerTowerTools.

Definition at line 783 of file L1CaloOfflineTriggerTowerTools.cxx.

783 {
784 float nonNominal(0.0);
785 for(Itr_vCaloCells i=cells.begin();i!=cells.end();++i){
786 nonNominal += this->TileNonNominal( (*i) );
787 }
788 return nonNominal;
789 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LVL1::L1CaloOfflineTriggerTowerTools::m_cablingKey
private

Definition at line 268 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_caloMgr

const CaloIdManager* LVL1::L1CaloOfflineTriggerTowerTools::m_caloMgr
private

Definition at line 257 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_cells2tt

ToolHandle<LVL1::IL1CaloCells2TriggerTowers> LVL1::L1CaloOfflineTriggerTowerTools::m_cells2tt
private

Definition at line 256 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_isLArHVCorrToolSet

bool LVL1::L1CaloOfflineTriggerTowerTools::m_isLArHVCorrToolSet
private

Definition at line 265 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_l1CaloTTIdTools

ToolHandle<LVL1::IL1CaloTTIdTools> LVL1::L1CaloOfflineTriggerTowerTools::m_l1CaloTTIdTools
private

Definition at line 255 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_LArHVNonNomPara

double LVL1::L1CaloOfflineTriggerTowerTools::m_LArHVNonNomPara
private

Definition at line 266 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_larOnlineID

const LArOnlineID* LVL1::L1CaloOfflineTriggerTowerTools::m_larOnlineID
private

Definition at line 261 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_lvl1Helper

const CaloLVL1_ID* LVL1::L1CaloOfflineTriggerTowerTools::m_lvl1Helper
private

Definition at line 260 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_onlineScaleCorrKey

SG::ReadCondHandleKey<ILArHVScaleCorr> LVL1::L1CaloOfflineTriggerTowerTools::m_onlineScaleCorrKey { this, "OnlineLArHVScaleCorr", "LArHVScaleCorr", "" }
private

Definition at line 277 of file L1CaloOfflineTriggerTowerTools.h.

278{ this, "OnlineLArHVScaleCorr", "LArHVScaleCorr", "" };

◆ m_rxMapTool

ToolHandle<LVL1::IL1CaloFcal23Cells2RxMappingTool> LVL1::L1CaloOfflineTriggerTowerTools::m_rxMapTool
private

Definition at line 275 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_scaleCorrKey

SG::ReadCondHandleKey<ILArHVScaleCorr> LVL1::L1CaloOfflineTriggerTowerTools::m_scaleCorrKey
private

Definition at line 267 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_scidtool

ToolHandle<ICaloSuperCellIDTool> LVL1::L1CaloOfflineTriggerTowerTools::m_scidtool
private

Definition at line 262 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> LVL1::L1CaloOfflineTriggerTowerTools::m_tileBadChanTool
private

Definition at line 272 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_tileHWID

const TileHWID* LVL1::L1CaloOfflineTriggerTowerTools::m_tileHWID
private

Definition at line 271 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_ttOnlineIdHelper

const TTOnlineID* LVL1::L1CaloOfflineTriggerTowerTools::m_ttOnlineIdHelper
private

Definition at line 259 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_ttSvc

ToolHandle<CaloTriggerTowerService> LVL1::L1CaloOfflineTriggerTowerTools::m_ttSvc
private

Definition at line 258 of file L1CaloOfflineTriggerTowerTools.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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