ATLAS Offline Software
Loading...
Searching...
No Matches
TileL2Builder.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//****************************************************************************
6// Filename : TileL2Builder.h
7// Author : Aranzazu Ruiz
8// Created : February 2009
9//
10// DESCRIPTION
11// TileL2 from TileRawChannel.
12//
13// BUGS:
14//
15// History:
16//
17//****************************************************************************
18
19#ifndef TILEL2ALGS_TILEL2BUILDER_H
20#define TILEL2ALGS_TILEL2BUILDER_H
21
22// Tile includes
28
29// Athena includes
33
34// Gaudi includes
35#include "GaudiKernel/ToolHandle.h"
36
37// C++ STL includes
38#include <string>
39#include <vector>
40
41// forward declarations
42class TileHWID;
43
45
46 public:
47
48 TileL2Builder(const std::string& type
49 , const std::string& name
50 , const IInterface* parent);
51
52 virtual ~TileL2Builder() override;
53
54 virtual StatusCode initialize() override;
55
56 virtual StatusCode finalize() override;
57
58 virtual StatusCode process(int fragmin, int fragmax, TileL2Container *l2Container) const;
59 virtual StatusCode process(int fragmin, int fragmax, TileL2Container *l2Container, const EventContext& ctx) const;
60
62 inline int indexToId(int i) const {
63 return m_hashFunc.identifier(i);
64 }
65
66 inline int idToIndex(int id) const {
67 return m_hashFunc(id);
68 }
69
70 // AlgTool InterfaceID
71 static const InterfaceID& interfaceID();
72
82 void MaskBad(int partition, float* E, int* gain, bool* bad) const;
83
94 void MTagLB(int partition
95 , int drawer
96 , float* EMeV
97 , std::vector<float> &EtaMuons
98 , std::vector<float> &EMuons0
99 , std::vector<float> &EMuons1
100 , std::vector<float> &EMuons2
101 , std::vector<unsigned int> &qf
102 , std::vector<unsigned int> &extraWord) const;
103
104 inline void MTagLB(int partition
105 , int drawer
106 , float* EMeV
107 , int* gain
108 , bool* bad
109 , std::vector<float> &EtaMuons
110 , std::vector<float> &EMuons0
111 , std::vector<float> &EMuons1
112 , std::vector<float> &EMuons2
113 , std::vector<unsigned int> &qf
114 , std::vector<unsigned int> &extraWord) const {
115 MaskBad(partition, EMeV, gain, bad);
116 MTagLB(partition, drawer, EMeV, EtaMuons, EMuons0, EMuons1, EMuons2, qf, extraWord);
117 }
118
129 void MTagEB(int partition
130 , int drawer
131 , float* EMeV
132 , std::vector<float> &EtaMuons
133 , std::vector<float> &EMuons0
134 , std::vector<float> &EMuons1
135 , std::vector<float> &EMuons2
136 , std::vector<unsigned int> &qf
137 , std::vector<unsigned int> &extraWord) const;
138
139 inline void MTagEB(int partition
140 , int drawer
141 , float* EMeV
142 , int* gain
143 , bool* bad
144 , std::vector<float> &EtaMuons
145 , std::vector<float> &EMuons0
146 , std::vector<float> &EMuons1
147 , std::vector<float> &EMuons2
148 , std::vector<unsigned int> &qf
149 , std::vector<unsigned int> &extraWord) const {
150 MaskBad(partition, EMeV, gain, bad);
151 MTagEB(partition, drawer, EMeV, EtaMuons, EMuons0, EMuons1, EMuons2, qf, extraWord);
152 }
153
164 void SumE(int partition, int drawer, float * E, std::vector<float> &sumE) const;
165 void SumE(int partition, int drawer, int unit, float* E, int* gain, std::vector<float> &sumE) const;
166 inline void SumE(int partition
167 , int drawer
168 , int unit
169 , float* E
170 , int* gain
171 , bool* bad
172 , std::vector<float> &sumE) const {
173 MaskBad(partition, E, gain, bad);
174 SumE(partition, drawer, unit, E, gain, sumE);
175 }
176
177 protected:
178
179 // properties
182 "TileRawChannelCnt",
183 "Input Tile raw channel container key"};
184
185
188
191
196 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};
197
202 "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};
203
204
206
207 float m_sinTh[4][48]{};
208 float m_sinThRound[4][48]{};
209 float m_cosTh[4][48]{};
210 float m_cosThRound[4][48]{};
211 bool m_connected[4][48]{};
212 int m_channelPairs[4][48]{};
213};
214
215#endif // TILEL2ALGS_TILEL2BUILDER_H
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Property holding a SG store/key/clid from which a ReadHandle is made.
TileContainer< TileL2 > TileL2Container
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Property holding a SG store/key/clid from which a ReadHandle is made.
Hash table for Tile fragments (==drawers ==collections in StoreGate)
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
float m_sinThRound[4][48]
void MaskBad(int partition, float *E, int *gain, bool *bad) const
function which does bad channel masking: if one channel of a cell is bad, energy from second channel ...
int indexToId(int i) const
Return collection ID for a given index.
void SumE(int partition, int drawer, int unit, float *E, int *gain, bool *bad, std::vector< float > &sumE) const
void MTagLB(int partition, int drawer, float *EMeV, int *gain, bool *bad, std::vector< float > &EtaMuons, std::vector< float > &EMuons0, std::vector< float > &EMuons1, std::vector< float > &EMuons2, std::vector< unsigned int > &qf, std::vector< unsigned int > &extraWord) const
TileL2Builder(const std::string &type, const std::string &name, const IInterface *parent)
int idToIndex(int id) const
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
TileRawChannelContainer in event store.
virtual ~TileL2Builder() override
void MTagLB(int partition, int drawer, float *EMeV, std::vector< float > &EtaMuons, std::vector< float > &EMuons0, std::vector< float > &EMuons1, std::vector< float > &EMuons2, std::vector< unsigned int > &qf, std::vector< unsigned int > &extraWord) const
Muon tagging function for LB superdrawers as processed at the ROD DSPs.
float m_cosThRound[4][48]
virtual StatusCode finalize() override
float m_cosTh[4][48]
static const InterfaceID & interfaceID()
TileFragHash m_hashFunc
void MTagEB(int partition, int drawer, float *EMeV, std::vector< float > &EtaMuons, std::vector< float > &EMuons0, std::vector< float > &EMuons1, std::vector< float > &EMuons2, std::vector< unsigned int > &qf, std::vector< unsigned int > &extraWord) const
Muon tagging function for EB superdrawers as processed at the ROD DSPs.
void SumE(int partition, int drawer, float *E, std::vector< float > &sumE) const
SumE function for one superdrawer as processed at the ROD DSPs.
const TileHWID * m_tileHWID
Pointer to TileHWID.
void MTagEB(int partition, int drawer, float *EMeV, int *gain, bool *bad, std::vector< float > &EtaMuons, std::vector< float > &EMuons0, std::vector< float > &EMuons1, std::vector< float > &EMuons2, std::vector< unsigned int > &qf, std::vector< unsigned int > &extraWord) const
virtual StatusCode initialize() override
float m_sinTh[4][48]
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
bool m_connected[4][48]
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
int m_channelPairs[4][48]
const std::string process