13 #ifndef L1TRIGGERTOWERTOOL_H
14 #define L1TRIGGERTOWERTOOL_H
19 #include "GaudiKernel/IIncidentListener.h"
20 #include "GaudiKernel/ToolHandle.h"
21 #include "GaudiKernel/ServiceHandle.h"
44 class IL1CaloMappingTool;
45 class IL1CaloTTIdTools;
46 class IL1DynamicPedestalProvider;
74 virtual void handle(
const Incident&);
79 virtual void process(
const std::vector<int> &digits,
80 double eta,
double phi,
int layer,
81 std::vector<int> &
et, std::vector<int> &bcidResults,
82 std::vector<int> &bcidDecisions,
bool useJepLut =
true);
85 std::vector<int> &
et, std::vector<int> &bcidResults,
86 std::vector<int> &bcidDecisions,
bool useJepLut =
true);
88 virtual void simulateChannel(
const xAOD::TriggerTower&
tt, std::vector<int>& outCpLut, std::vector<int>& outJepLut, std::vector<int>& bcidResults, std::vector<int>& bcidDecisions);
90 virtual void pedestalCorrection(std::vector<int>& firInOut,
int firPed,
int iElement,
int layer,
91 int bcid,
float mu, std::vector<int_least16_t>& correctionOut);
93 virtual void fir(
const std::vector<int> &digits,
const std::vector<int> &firCoeffs, std::vector<int> &
output);
95 virtual void dropBits(
const std::vector<int> &fir,
unsigned int first, std::vector<int> &
output);
97 virtual void etRange(
const std::vector<int> &
et,
int energyLow,
int energyHigh, std::vector<int> &
output);
99 virtual void peakBcid(
const std::vector<int> &fir,
unsigned int strategy, std::vector<int> &
output);
101 virtual void satBcid(
const std::vector<int> &digits,
int satLow,
int satHigh,
int satLevel, std::vector<int> &
output);
103 virtual void bcid(
const std::vector<int> &fir,
const std::vector<int> &digits,
unsigned int strategy,
int satLow,
int satHigh,
int satLevel, std::vector<int> &
output);
104 virtual void bcid(
const std::vector<int> &fir,
const std::vector<int> &lutInput,
const std::vector<int> &digits,
int energyLow,
int energyHigh,
int decisionSource, std::vector<unsigned int> &decisionConditions,
105 unsigned int strategy,
int satLow,
int satHigh,
int satLevel, std::vector<int> &
result, std::vector<int> &decision);
108 virtual void bcidDecision(
const std::vector<int> &bcidResults,
const std::vector<int> &
range,
const std::vector<unsigned int> &
mask, std::vector<int> &
output);
113 virtual void nonLinearLut(
const std::vector<int> &fir,
int slope,
int offset,
int cut,
int scale,
short par1,
short par2,
short par3,
short par4,
bool disabled, std::vector<int> &
output);
116 virtual void bcidParams(
const L1CaloCoolChannelId&
channelId,
int &energyLow,
int &energyHigh,
int &decisionSource, std::vector<unsigned int> &decisionConditions,
117 unsigned int &peakFinderStrategy,
int &satLow,
int &satHigh,
int &satLevel);
130 virtual void setDebug(
bool debug);
138 template <
typename T>
139 void printVec(
const std::vector<T>&
vec);
144 bool m_debug =
false;
183 {
this,
"EventInfoKey",
"EventInfo",
"" };
188 static const int s_saturationValue = 255;
189 static const int s_maxTowers = 7168;
190 static const int m_nBcid = 350;