5#ifndef MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOLMT_H
6#define MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOLMT_H
14#include "GaudiKernel/ServiceHandle.h"
39typedef SG::HandleKeyArray<SG::UpdateHandle<TgcPrepDataCollection_Cache>,
40 SG::UpdateHandleKey<TgcPrepDataCollection_Cache>,
41 Gaudi::DataHandle::Reader>
45 Gaudi::DataHandle::Reader>
58 :
public extends<AthAlgTool, IMuonRdoToPrepDataTool> {
61 using base_class::base_class;
69 virtual StatusCode
finalize()
override;
81 const EventContext& ctx,
82 const std::vector<IdentifierHash>& idVect)
const override;
85 const EventContext& ctx)
const override;
99 std::array<TgcPrepDataContainer*, NBC_HIT + 1>
103 std::vector<std::unique_ptr<TgcPrepDataCollection>>;
109 std::vector<std::unique_ptr<TgcCoinDataCollection>>;
119 template <
class ContType,
class CollType>
122 std::vector<std::unique_ptr<CollType>>&& coll)
const;
124 StatusCode
setupState(
const EventContext& ctx, State& state)
const;
234 const TgcRdo* rdoColl)
const;
248 const TgcRdo* rdoColl)
const;
262 const std::vector<const TgcRdo*>& decodedRdoCollVec,
263 const std::vector<const TgcRdo*>& rdoCollVec,
const TgcRdo* rdoColl);
267 const std::vector<IdentifierHash>& requestedIdHashVect,
277 int& tmp_subMatrix,
int& tmp_position)
const;
286 std::array<int, 2>& bitpos_o);
289 std::array<int, 4>& bitpos_i,
290 std::array<int, 4>& slbchannel_i,
291 std::array<int, 4>& slbId_in,
292 std::array<int, 4>& sbLoc_in,
int& sswId_i,
293 const std::array<int, 2>& bitpos_o,
294 std::array<int, 2>& slbchannel_o,
295 const int slbId_o)
const;
298 std::array<int, 2>& bitpos_o);
301 std::array<int, 4>& bitpos_i,
302 std::array<int, 4>& slbchannel_i,
int& sbLoc_i,
303 int& sswId_i,
const std::array<int, 2>& bitpos_o,
304 std::array<int, 2>& slbchannel_o)
const;
307 int& subMatrix_w, std::array<int, 3>& bitpos_w)
const;
310 int& subMatrix_s, std::array<int, 3>& bitpos_s);
321 double& width_wire,
double& r_wire,
322 double& z_wire)
const;
325 const bool isBackWard,
const bool isAside,
326 double& width_strip,
double& theta_strip)
const;
329 const std::array<const MuonGM::TgcReadoutElement*, 2>& descriptor_o,
330 const std::array<Identifier, 2>& channelIdOut,
331 const std::array<int, 2>& gasGap_o,
const std::array<int, 2>& channel_o,
332 double& width_o,
double& hit_position_o,
Amg::Vector2D& tmp_hitPos_o,
336 const std::array<const MuonGM::TgcReadoutElement*, 2>& descriptor_o,
337 const std::array<Identifier, 2>& channelIdOut,
338 const std::array<int, 2>& gasGap_o,
const std::array<int, 2>& channel_o,
339 double& width_o,
double& hit_position_o,
Amg::Vector2D& tmp_hitPos_o,
340 Identifier& channelIdOut_tmp,
const bool isBackward,
341 const bool isAside)
const;
345 const std::array<const MuonGM::TgcReadoutElement*, 4>& descriptor_i,
346 const std::array<Identifier, 4>& channelIdIn,
347 const std::array<int, 4>& gasGap_i,
const std::array<int, 4>& channel_i,
348 double& width_i,
double& hit_position_i,
Amg::Vector2D& tmp_hitPos_i,
352 const std::array<const MuonGM::TgcReadoutElement*, 4>& descriptor_i,
353 const std::array<Identifier, 4>& channelIdIn,
354 const std::array<int, 4>& gasGap_i,
const std::array<int, 4>& channel_i,
355 double& width_i,
double& hit_position_i,
Amg::Vector2D& tmp_hitPos_i,
356 Identifier& channelIdIn_tmp,
const bool isBackward,
357 const bool isAside)
const;
361 int& sbLoc_o,
int& slbId_o)
const;
365 std::array<Identifier, 3>& channelId,
int&
index,
int& chip,
366 int& hitId,
int& sub,
int& sswId,
int& sbLoc,
int& subMatrix,
367 std::array<int, 3>& bitpos,
const bool isBoundary =
false,
368 const TgcRdo* rdoColl = 0,
const int index_w = -1,
369 const int chip_w = -1,
const int hitId_w = -1,
370 const int sub_w = -1)
const;
374 const TgcRdo* rdoColl,
const int index_w,
const int chip_w,
375 const int hitId_w,
const int sub_w)
const;
379 const TgcRdo* rdoColl,
const int index_w,
const int chip_w,
380 const int hitId_w,
const int sub_w)
const;
384 int& trackletIdStripFirst,
385 int& trackletIdStripSecond,
386 int& trackletIdStripThird);
391 const double eta,
const double phi);
394 this,
"DetectorManagerKey",
"MuonDetectorManager",
395 "Key of input MuonDetectorManager condition data"};
398 this,
"CablingKey",
"MuonTgc_CablingMap"};
401 this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
405 this,
"OutputCollection",
"TGC_Measurements"};
409 this,
"OutputCoinCollection",
"TrigT1CoinDataCollection"};
425 this,
"show_warning_level_invalid_A09_SSW6_hit",
false};
446 this,
"RDOContainer",
"TGCRDO",
"TgcRdoContainer to retrieve"};
451 this,
"outputCoinKey", {}};
455 this,
"prepDataKeys", {}};
459 "If empty, do not produce xAOD, otherwise this is the key of the "
460 "output xAOD MDT PRD container"};
470 this,
"PrdCacheString",
"",
471 "Prefix for names of PRD cache collections"};
475 this,
"CoinCacheString",
"",
476 "Prefix for names of Coin cache collections"};
479 StatusCode
decode(
const EventContext& ctx,
480 const std::vector<uint32_t>& robIds)
const override;
483 uint16_t& newsector)
const {
484 newrodId = rd->
rodId();
489 newrodId = rd->
sector() / 2 + 1 + (rd->
rodId() - 17) * 4;
490 newsector = (rd->
sector() + (rd->
rodId() - 17) * 8) % 2;
492 newrodId = rd->
sector() / 4 + 1 + (rd->
rodId() - 17) * 4;
493 newsector = (rd->
sector() + (rd->
rodId() - 17) * 16) % 4;
498 uint16_t& newsector)
const {
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Cached value with atomic update.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Handle class for modifying an existing object in StoreGate.
This is a "hash" representation of an Identifier.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An unit object of TGC ROD output.
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the Athena extensions are properly loaded.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
SG::HandleKeyArray< SG::UpdateHandle< TgcCoinDataCollection_Cache >, SG::UpdateHandleKey< TgcCoinDataCollection_Cache >, Gaudi::DataHandle::Reader > TgcCoinUpdateHandles
SG::HandleKeyArray< SG::UpdateHandle< TgcPrepDataCollection_Cache >, SG::UpdateHandleKey< TgcPrepDataCollection_Cache >, Gaudi::DataHandle::Reader > TgcPrdUpdateHandles
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray