ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloxAODOfflineTriggerTowerTools.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4// ***************************************************************************
5// * Author: John Morris (john.morris@cern.ch) *
6// * Queen Mary University of London *
7// * *
8
9
10#ifndef _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOXAODOFFLINETRIGERTOWERTOOLS_H_
11#define _TRIGGER_TRIGT1_TRIGT1CALOCALIBTOOLS_L1CALOXAODOFFLINETRIGERTOWERTOOLS_H_
12
13// Framework include(s):
14#include "AsgTools/AsgTool.h"
16#include "GaudiKernel/ToolHandle.h"
17
18// STL include(s):
19#include <vector>
20
21// xAOD include(s):
24
25// Calo include(s):
27#include "CaloEvent/CaloCell.h"
28#include "TileEvent/TileCell.h"
32
33// ID include(s):
34#include "Identifier/Identifier.h"
37
38// Database includes
39#include "CoralBase/Attribute.h"
40#include "CoralBase/Blob.h"
41#include "CoralBase/AttributeListSpecification.h"
44
45// Tool include(s):
49
50// Local include(s):
52
53namespace LVL1{
54
56 public asg::AsgTool
57 {
60
61 public:
63 L1CaloxAODOfflineTriggerTowerTools( const std::string& name );
71
72 StatusCode initialize();
73 StatusCode finalize();
74
76 StatusCode initCaloCells();
77
78 std::vector<L1CaloRxCoolChannelId> receivers( const xAOD::TriggerTower& tt ) const;
79 std::vector<unsigned int> receiversId( const xAOD::TriggerTower& tt ) const;
80 unsigned int isTile( const xAOD::TriggerTower& tt ) const;
81
82 std::vector<const CaloCell*> getCaloCells( const xAOD::TriggerTower& tt ) const;
83 unsigned int nCaloCells( const xAOD::TriggerTower& tt ) const;
84 std::vector<unsigned int> nCaloCellsByLayer( const xAOD::TriggerTower& tt ) const;
85// std::vector<unsigned int> nCaloCellsByReceiver( const xAOD::TriggerTower& tt ) const;
86// std::vector<unsigned int> nCaloCellsByReceiverByLayer( const xAOD::TriggerTower& tt ) const;
87
88 std::vector<std::vector<const CaloCell*>> caloCellsByReceiver( const xAOD::TriggerTower& tt ) const;
89 std::vector<std::vector<std::vector<const CaloCell*>>> caloCellsByLayerByReceiver( const xAOD::TriggerTower& tt ) const;
90
91 float caloCellsEnergy( const xAOD::TriggerTower& tt ) const;
92 float caloCellsET( const xAOD::TriggerTower& tt ) const;
93 std::vector<float> caloCellsEnergyByLayer( const xAOD::TriggerTower& tt ) const;
94 std::vector<float> caloCellsETByLayer( const xAOD::TriggerTower& tt ) const;
95 std::vector<float> caloCellsEnergyByReceiver( const xAOD::TriggerTower& tt ) const;
96 std::vector<float> caloCellsETByReceiver( const xAOD::TriggerTower& tt ) const;
97 std::vector<std::vector<float>> caloCellsEnergyByLayerByReceiver( const xAOD::TriggerTower& tt ) const;
98 std::vector<std::vector<float>> caloCellsETByLayerByReceiver( const xAOD::TriggerTower& tt ) const;
99
100// unsigned int badCaloCells( const xAOD::TriggerTower& tt ) const;
101 float caloCellsQuality( const xAOD::TriggerTower& tt ) const;
102// float nCaloCellsNonNominal( const xAOD::TriggerTower& tt ) const;
103// std::vector<float> nCaloCellsNonNominalByLayer( const xAOD::TriggerTower& tt ) const;
104// std::vector<std::vector<float>> nCaloCellsNonNominalByReceiverByLayer( const xAOD::TriggerTower& tt ) const;
105// float nonNominalMeanScale( const xAOD::TriggerTower& tt ) const;
106// std::vector<float> nonNominalMeanScaleByLayer( const xAOD::TriggerTower& tt ) const;
107// std::vector<float> nonNominalMeanScaleByReceiver( const xAOD::TriggerTower& tt ) const;
108// std::vector<std::vector<float>> nonNominalMeanScaleByReceiverByLayer( const xAOD::TriggerTower& tt ) const;
109
110 // Database access
111 unsigned int ModuleId( const xAOD::TriggerTower& tt ) const;
112 unsigned int ErrorCode( const xAOD::TriggerTower& tt ) const;
113 unsigned long long PprDacScanResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
114 unsigned long long PprPedestalRunResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
115 unsigned long long PprNoiseRunResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
116 unsigned long long PprTimingResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
117 unsigned long long PprSatBcidResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
118 unsigned long long PprFirFilterResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
119 unsigned long long PprLutValuesResultsTimeStamp( const xAOD::TriggerTower& tt ) const;
120 double DacOffset( const xAOD::TriggerTower& tt ) const;
121 double DacSlope( const xAOD::TriggerTower& tt ) const;
122 double PedMean( const xAOD::TriggerTower& tt ) const;
123 unsigned int PedValue( const xAOD::TriggerTower& tt ) const;
124 unsigned int FullDelayData( const xAOD::TriggerTower& tt ) const;
125 unsigned short int SyncDelayBcid( const xAOD::TriggerTower& tt ) const;
126 unsigned short int InBcidNegedge( const xAOD::TriggerTower& tt ) const;
127 unsigned short int ExtBcidThreshold( const xAOD::TriggerTower& tt ) const;
128 unsigned short int SatBcidThreshLow( const xAOD::TriggerTower& tt ) const;
129 unsigned short int SatBcidThreshHigh( const xAOD::TriggerTower& tt ) const;
130 unsigned short int SatBcidLevel( const xAOD::TriggerTower& tt ) const;
131 unsigned short int BcidEnergyRangeLow( const xAOD::TriggerTower& tt ) const;
132 unsigned short int BcidEnergyRangeHigh( const xAOD::TriggerTower& tt ) const;
133 unsigned short int FirStartBit( const xAOD::TriggerTower& tt ) const;
134 short FirCoeff1( const xAOD::TriggerTower& tt ) const;
135 short FirCoeff2( const xAOD::TriggerTower& tt ) const;
136 short FirCoeff3( const xAOD::TriggerTower& tt ) const;
137 short FirCoeff4( const xAOD::TriggerTower& tt ) const;
138 short FirCoeff5( const xAOD::TriggerTower& tt ) const;
139 unsigned short LutStrategy( const xAOD::TriggerTower& tt ) const;
140 unsigned short LutOffset( const xAOD::TriggerTower& tt ) const;
141 unsigned short LutNoiseCut( const xAOD::TriggerTower& tt ) const;
142 unsigned short LutSlope( const xAOD::TriggerTower& tt ) const;
143
144 unsigned int DeadChannel( const xAOD::TriggerTower& tt ) const;
145 unsigned int DisabledTower( const xAOD::TriggerTower& tt ) const;
146
147 float RxGain( const xAOD::TriggerTower& tt ) const;
148 unsigned int RxStatus( const xAOD::TriggerTower& tt ) const;
149
150 private:
151 Identifier towerID( const xAOD::TriggerTower& tt ) const;
152 int pos_neg_z( const xAOD::TriggerTower& tt ) const;
153 int region( const xAOD::TriggerTower& tt ) const;
154 int ieta( const xAOD::TriggerTower& tt ) const;
155 int iphi( const xAOD::TriggerTower& tt ) const;
156
157 // Database Attributes
158 const coral::AttributeList* DbAttributes( const xAOD::TriggerTower& tt , const CondAttrListCollection* dbAttrList ) const;
159 std::vector<const coral::AttributeList*> DbRxGainsAttributes( const xAOD::TriggerTower& tt , const CondAttrListCollection* dbAttrList ) const;
160
161 // Sort Calo Cells
162 std::vector<std::vector<const CaloCell*>> sortEMCrackCells(const std::vector<const CaloCell*> &cells) const;
163 std::vector<std::vector<const CaloCell*>> sortFCAL23Cells(const std::vector<const CaloCell*> &cells,const std::vector<L1CaloRxCoolChannelId>& rx) const;
164
165 // Cell quality
166 float LArCaloQuality(const std::vector<const CaloCell*> &cells) const;
167 float TileCaloQuality(const std::vector<const CaloCell*> &cells) const;
168
170 ToolHandle<LVL1::IL1CaloCells2TriggerTowers> m_cells2tt{this, "L1CaloCells2TriggerTowers", "LVL1::L1CaloCells2TriggerTowers/L1CaloCells2TriggerTowers"};
172 ToolHandle<LVL1::IL1CaloTTIdTools> m_l1CaloTTIdTools;
173 // FCAL 23 Mapping
174 ToolHandle<LVL1::IL1CaloFcal23Cells2RxMappingTool> m_rxMapTool;
178 ToolHandle<CaloTriggerTowerService> m_ttSvc;
179
182 { this, "CaloCellContainerKey", "AllCalo" };
183
186
187 };
188}
189#endif
190
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Property holding a SG store/key/clid from which a ReadHandle is made.
This class initializes the Calo (LAr and Tile) offline identifiers.
Helper class for offline TT identifiers.
Definition CaloLVL1_ID.h:66
This class is a collection of AttributeLists where each one is associated with a channel number.
unsigned short LutOffset(const xAOD::TriggerTower &tt) const
unsigned long long PprSatBcidResultsTimeStamp(const xAOD::TriggerTower &tt) const
StatusCode initialize()
Dummy implementation of the initialisation function.
unsigned short int SyncDelayBcid(const xAOD::TriggerTower &tt) const
const CaloIdManager * m_caloMgr
Helper class for offline TT identifiers.
float caloCellsET(const xAOD::TriggerTower &tt) const
unsigned short int InBcidNegedge(const xAOD::TriggerTower &tt) const
unsigned int DisabledTower(const xAOD::TriggerTower &tt) const
double DacSlope(const xAOD::TriggerTower &tt) const
Identifier towerID(const xAOD::TriggerTower &tt) const
ToolHandle< LVL1::IL1CaloFcal23Cells2RxMappingTool > m_rxMapTool
unsigned short int BcidEnergyRangeLow(const xAOD::TriggerTower &tt) const
std::vector< std::vector< const CaloCell * > > caloCellsByReceiver(const xAOD::TriggerTower &tt) const
float caloCellsEnergy(const xAOD::TriggerTower &tt) const
unsigned short int ExtBcidThreshold(const xAOD::TriggerTower &tt) const
unsigned short LutStrategy(const xAOD::TriggerTower &tt) const
unsigned int PedValue(const xAOD::TriggerTower &tt) const
std::vector< float > caloCellsETByLayer(const xAOD::TriggerTower &tt) const
std::vector< L1CaloRxCoolChannelId > receivers(const xAOD::TriggerTower &tt) const
unsigned short LutSlope(const xAOD::TriggerTower &tt) const
L1CaloxAODOfflineTriggerTowerTools(L1CaloxAODOfflineTriggerTowerTools &&rhs)=delete
double PedMean(const xAOD::TriggerTower &tt) const
ToolHandle< LVL1::IL1CaloCells2TriggerTowers > m_cells2tt
Tool to do the Calo cell summing.
std::vector< std::vector< float > > caloCellsEnergyByLayerByReceiver(const xAOD::TriggerTower &tt) const
SG::ReadHandleKey< CaloCellContainer > m_caloCellContainerKey
StoreGate keys for the Calo Cells.
std::vector< unsigned int > receiversId(const xAOD::TriggerTower &tt) const
L1CaloxAODOfflineTriggerTowerTools & operator=(const L1CaloxAODOfflineTriggerTowerTools &rhs)=delete
L1CaloxAODOfflineTriggerTowerTools(const L1CaloxAODOfflineTriggerTowerTools &rhs)=delete
double DacOffset(const xAOD::TriggerTower &tt) const
float TileCaloQuality(const std::vector< const CaloCell * > &cells) const
unsigned short int FirStartBit(const xAOD::TriggerTower &tt) const
unsigned short int SatBcidLevel(const xAOD::TriggerTower &tt) const
std::vector< float > caloCellsETByReceiver(const xAOD::TriggerTower &tt) const
unsigned long long PprLutValuesResultsTimeStamp(const xAOD::TriggerTower &tt) const
StatusCode initCaloCells()
Calo Cells into maps for L1Calo use.
std::vector< std::vector< std::vector< const CaloCell * > > > caloCellsByLayerByReceiver(const xAOD::TriggerTower &tt) const
short FirCoeff5(const xAOD::TriggerTower &tt) const
std::vector< float > caloCellsEnergyByLayer(const xAOD::TriggerTower &tt) const
unsigned long long PprTimingResultsTimeStamp(const xAOD::TriggerTower &tt) const
std::vector< const coral::AttributeList * > DbRxGainsAttributes(const xAOD::TriggerTower &tt, const CondAttrListCollection *dbAttrList) const
const coral::AttributeList * DbAttributes(const xAOD::TriggerTower &tt, const CondAttrListCollection *dbAttrList) const
short FirCoeff3(const xAOD::TriggerTower &tt) const
short FirCoeff1(const xAOD::TriggerTower &tt) const
unsigned long long PprPedestalRunResultsTimeStamp(const xAOD::TriggerTower &tt) const
std::vector< std::vector< const CaloCell * > > sortFCAL23Cells(const std::vector< const CaloCell * > &cells, const std::vector< L1CaloRxCoolChannelId > &rx) const
std::vector< std::vector< const CaloCell * > > sortEMCrackCells(const std::vector< const CaloCell * > &cells) const
L1CaloxAODOfflineTriggerTowerTools()=delete
delete the big 4
unsigned short int SatBcidThreshHigh(const xAOD::TriggerTower &tt) const
float LArCaloQuality(const std::vector< const CaloCell * > &cells) const
unsigned int RxStatus(const xAOD::TriggerTower &tt) const
unsigned short LutNoiseCut(const xAOD::TriggerTower &tt) const
unsigned int nCaloCells(const xAOD::TriggerTower &tt) const
std::vector< std::vector< float > > caloCellsETByLayerByReceiver(const xAOD::TriggerTower &tt) const
L1CaloxAODOfflineTriggerTowerTools(const std::string &name)
Create a proper constructor for Athena.
std::vector< float > caloCellsEnergyByReceiver(const xAOD::TriggerTower &tt) const
std::vector< unsigned int > nCaloCellsByLayer(const xAOD::TriggerTower &tt) const
const CondAttrListCollection * m_dbPpmChanCalib
Database.
unsigned int isTile(const xAOD::TriggerTower &tt) const
unsigned int DeadChannel(const xAOD::TriggerTower &tt) const
unsigned short int SatBcidThreshLow(const xAOD::TriggerTower &tt) const
float caloCellsQuality(const xAOD::TriggerTower &tt) const
short FirCoeff2(const xAOD::TriggerTower &tt) const
unsigned int FullDelayData(const xAOD::TriggerTower &tt) const
unsigned int ModuleId(const xAOD::TriggerTower &tt) const
std::vector< const CaloCell * > getCaloCells(const xAOD::TriggerTower &tt) const
unsigned long long PprFirFilterResultsTimeStamp(const xAOD::TriggerTower &tt) const
unsigned long long PprNoiseRunResultsTimeStamp(const xAOD::TriggerTower &tt) const
unsigned short int BcidEnergyRangeHigh(const xAOD::TriggerTower &tt) const
ToolHandle< LVL1::IL1CaloTTIdTools > m_l1CaloTTIdTools
Tool to get the Identifier of a TriggerTower.
unsigned long long PprDacScanResultsTimeStamp(const xAOD::TriggerTower &tt) const
unsigned int ErrorCode(const xAOD::TriggerTower &tt) const
short FirCoeff4(const xAOD::TriggerTower &tt) const
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.