 |
ATLAS Offline Software
|
#include <TgcRdoToPrepDataToolMT.h>
|
| enum | SUB_DETCTOR_ID { ASIDE = 103,
CSIDE = 104
} |
| | Sub detector IDs are 103 and 104 for TGC A side and C side, respectively. More...
|
| |
| enum | BIT_POS {
BIT_POS_ASD_SIZE = 16,
BIT_POS_NUM_ASD = 2,
BIT_POS_INPUT_SIZE = BIT_POS_ASD_SIZE*BIT_POS_NUM_ASD,
BIT_POS_OFFSET_LARGE_R = BIT_POS_ASD_SIZE,
BIT_POS_OFFSET_LARGE_PHIFOR_A_FWD_C_BWD = BIT_POS_OFFSET_LARGE_R,
BIT_POS_A_INPUT_ORIGIN = 73,
BIT_POS_B_INPUT_ORIGIN = 109,
BIT_POS_C_INPUT_ORIGIN = 149,
BIT_POS_D_INPUT_ORIGIN = 193,
BIT_POS_B_INPUT_LARGE_R_CH15 = BIT_POS_B_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 15,
BIT_POS_A_INPUT_LARGE_R_CH08 = BIT_POS_A_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 8,
BIT_POS_B_INPUT_LARGE_R_CH07 = BIT_POS_B_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 7,
BIT_POS_A_INPUT_LARGE_R_CH00 = BIT_POS_A_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R,
BIT_POS_B_INPUT_SMALL_R_CH15 = BIT_POS_B_INPUT_ORIGIN - 15,
BIT_POS_A_INPUT_SMALL_R_CH08 = BIT_POS_A_INPUT_ORIGIN - 8,
BIT_POS_B_INPUT_SMALL_R_CH07 = BIT_POS_B_INPUT_ORIGIN - 7,
BIT_POS_A_INPUT_SMALL_R_CH00 = BIT_POS_A_INPUT_ORIGIN,
BIT_POS_B_INPUT_SMALL_R_CH05 = BIT_POS_B_INPUT_ORIGIN - 5,
BIT_POS_A_INPUT_SMALL_R_CH03 = BIT_POS_A_INPUT_ORIGIN - 3,
BIT_POS_B_INPUT_LARGE_R_CH12 = BIT_POS_B_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 12,
BIT_POS_A_INPUT_SMALL_R_CH04 = BIT_POS_A_INPUT_ORIGIN - 4,
BIT_POS_A_INPUT_LARGE_R_CH12 = BIT_POS_A_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 12,
BIT_POS_A_INPUT_LARGE_R_CH04 = BIT_POS_A_INPUT_ORIGIN - BIT_POS_OFFSET_LARGE_R - 4,
BIT_POS_A_INPUT_SMALL_R_CH12 = BIT_POS_A_INPUT_ORIGIN - 12,
BIT_POS_B_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH15 = BIT_POS_B_INPUT_LARGE_R_CH15,
BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH08 = BIT_POS_A_INPUT_LARGE_R_CH08,
BIT_POS_B_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH07 = BIT_POS_B_INPUT_LARGE_R_CH07,
BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH00 = BIT_POS_A_INPUT_LARGE_R_CH00,
BIT_POS_B_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH15 = BIT_POS_B_INPUT_SMALL_R_CH15,
BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH08 = BIT_POS_A_INPUT_SMALL_R_CH08,
BIT_POS_B_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH07 = BIT_POS_B_INPUT_SMALL_R_CH07,
BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH00 = BIT_POS_A_INPUT_SMALL_R_CH00,
BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH12 = BIT_POS_A_INPUT_LARGE_R_CH12,
BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH04 = BIT_POS_A_INPUT_LARGE_R_CH04,
BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH12 = BIT_POS_A_INPUT_SMALL_R_CH12,
BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH04 = BIT_POS_A_INPUT_SMALL_R_CH04
} |
| | SLB bit position /code Large R <--> Small R Large phi <--> Small phi for A side forward chambers and C side backward chambers Small phi <--> Large phi for A side backward chambers and C side forward chambers A-input : 40 - 75, 42 - 73 are valid. More...
|
| |
| enum | MAP_SIZE { WT_MAP_SIZE = 3*BIT_POS_INPUT_SIZE,
ST_MAP_SIZE = 2*BIT_POS_INPUT_SIZE,
SD_MAP_SIZE = 2*BIT_POS_INPUT_SIZE,
WD_MAP_SIZE = 2*BIT_POS_INPUT_SIZE
} |
| | Bit map sizes. More...
|
| |
|
| template<class ContType , class CollType > |
| StatusCode | transferData (ContType &container, std::vector< std::unique_ptr< CollType >> &&coll) const |
| |
| StatusCode | setupState (const EventContext &ctx, State &state) const |
| |
| void | selectDecoder (State &state, const TgcRawData &rd, const TgcRdo *rdoColl) const |
| | Select decoder based on RDO type (Hit or Coincidence (Tracklet, HiPt and SL)) More...
|
| |
| StatusCode | decodeHits (State &state, const TgcRawData &rd) const |
| | Decode RDO's of Hit. More...
|
| |
| StatusCode | decodeTracklet (State &state, const TgcRawData &rd) const |
| | Decode RDO's of Tracklet. More...
|
| |
| StatusCode | decodeTrackletEIFI (State &state, const TgcRawData &rd) const |
| | Decode RDO's of Tracklet EIFI. More...
|
| |
| StatusCode | decodeHiPt (State &state, const TgcRawData &rd) const |
| | Decode RDO's of HiPt. More...
|
| |
| StatusCode | decodeInner (State &state, const TgcRawData &rd) const |
| | Decode RDO's of Inner. More...
|
| |
| StatusCode | decodeSL (State &state, const TgcRawData &rd, const TgcRdo *rdoColl) const |
| | Decode RDO's of SectorLogic. More...
|
| |
| bool | isOfflineIdOKForTgcReadoutElement (const MuonGM::TgcReadoutElement *descriptor, const Identifier channelId) const |
| | Check offline ID is OK for TgcReadoutElement. More...
|
| |
| bool | getTrackletInfo (const TgcRawData &rd, int &tmp_slbId, int &tmp_subMatrix, int &tmp_position) const |
| | Retrieve slbId, subMatrix and position from Tracklet RDO. More...
|
| |
| bool | isIncludedInChamberBoundary (const TgcRawData &rd) const |
| | Check SL RDO is at the chamber boundary. More...
|
| |
| void | getBitPosInWire (const TgcRawData &rd, const int DeltaBeforeConvert, std::array< int, 4 > &bitpos_i, std::array< int, 4 > &slbchannel_i, std::array< int, 4 > &slbId_in, std::array< int, 4 > &sbLoc_in, int &sswId_i, const std::array< int, 2 > &bitpos_o, std::array< int, 2 > &slbchannel_o, const int slbId_o) const |
| | Get bitPos etc of TGC1 wire for HiPt. More...
|
| |
| void | getBitPosInStrip (const TgcRawData &rd, const int DeltaBeforeConvert, std::array< int, 4 > &bitpos_i, std::array< int, 4 > &slbchannel_i, int &sbLoc_i, int &sswId_i, const std::array< int, 2 > &bitpos_o, std::array< int, 2 > &slbchannel_o) const |
| | Get bitPos etc of TGC1 strip for HiPt. More...
|
| |
| void | getBitPosWire (const TgcRawData &rd, const int hitId_w, const int sub_w, int &subMatrix_w, std::array< int, 3 > &bitpos_w) const |
| | Get bitPos etc of wire for SL. More...
|
| |
| bool | getSLWireGeometry (const std::array< Identifier, 3 > &channelId_wire, double &width_wire, double &r_wire, double &z_wire) const |
| | Get wire geometry (width, r, z) for SL. More...
|
| |
| bool | getSLStripGeometry (const std::array< Identifier, 3 > &channelId_strip, const bool isBackWard, const bool isAside, double &width_strip, double &theta_strip) const |
| | Get strip geometry (width, theta) for SL. More...
|
| |
| bool | getPosAndIdWireOut (const std::array< const MuonGM::TgcReadoutElement *, 2 > &descriptor_o, const std::array< Identifier, 2 > &channelIdOut, const std::array< int, 2 > &gasGap_o, const std::array< int, 2 > &channel_o, double &width_o, double &hit_position_o, Amg::Vector2D &tmp_hitPos_o, Identifier &channelIdOut_tmp) const |
| | Get position and offline ID of TGC3 wire for HiPt. More...
|
| |
| bool | getPosAndIdStripOut (const std::array< const MuonGM::TgcReadoutElement *, 2 > &descriptor_o, const std::array< Identifier, 2 > &channelIdOut, const std::array< int, 2 > &gasGap_o, const std::array< int, 2 > &channel_o, double &width_o, double &hit_position_o, Amg::Vector2D &tmp_hitPos_o, Identifier &channelIdOut_tmp, const bool isBackward, const bool isAside) const |
| | Get position and offline ID of TGC3 strip for HiPt. More...
|
| |
| bool | getPosAndIdWireIn (const std::array< const MuonGM::TgcReadoutElement *, 4 > &descriptor_i, const std::array< Identifier, 4 > &channelIdIn, const std::array< int, 4 > &gasGap_i, const std::array< int, 4 > &channel_i, double &width_i, double &hit_position_i, Amg::Vector2D &tmp_hitPos_i, Identifier &channelIdIn_tmp) const |
| | Get position and offline ID of TGC1 wire for HiPt. More...
|
| |
| bool | getPosAndIdStripIn (const std::array< const MuonGM::TgcReadoutElement *, 4 > &descriptor_i, const std::array< Identifier, 4 > &channelIdIn, const std::array< int, 4 > &gasGap_i, const std::array< int, 4 > &channel_i, double &width_i, double &hit_position_i, Amg::Vector2D &tmp_hitPos_i, Identifier &channelIdIn_tmp, const bool isBackward, const bool isAside) const |
| | Get position and offline ID of TGC1 strip for HiPt. More...
|
| |
| bool | getHiPtIds (const TgcRawData &rd, int &sswId_o, int &sbLoc_o, int &slbId_o) const |
| | Get ReadoutID of HiPt from RDOHighPtID. More...
|
| |
| bool | getSLIds (const bool isStrip, const TgcRawData &rd, std::array< Identifier, 3 > &channelId, int &index, int &chip, int &hitId, int &sub, int &sswId, int &sbLoc, int &subMatrix, std::array< int, 3 > &bitpos, const bool isBoundary=false, const TgcRdo *rdoColl=0, const int index_w=-1, const int chip_w=-1, const int hitId_w=-1, const int sub_w=-1) const |
| | Get ReadoutID of SL from RDO. More...
|
| |
| bool | getSbLocOfEndcapStripBoundaryFromHiPt (const TgcRawData &rd, int &sbLoc, const TgcRdo *rdoColl, const int index_w, const int chip_w, const int hitId_w, const int sub_w) const |
| | Get strip sbLoc of Endcap chamber boundary from HiPt Strip. More...
|
| |
| bool | getSbLocOfEndcapStripBoundaryFromTracklet (const TgcRawData &rd, int &sbLoc, const TgcRdo *rdoColl, const int index_w, const int chip_w, const int hitId_w, const int sub_w) const |
| | Get strip sbLoc of Endcap chamber boundary from Tracklet Strip. More...
|
| |
| const CablingInfo * | getCabling () const |
| |
| StatusCode | decode (const EventContext &ctx, const std::vector< uint32_t > &robIds) const override |
| | Avoid compiler warning. More...
|
| |
| void | convertToRun2 (const TgcRawData *rd, uint16_t &newrodId, uint16_t &newsector) const |
| |
| void | convertToRun2 (const TgcRawData &rd, uint16_t &newrodId, uint16_t &newsector) const |
| |
|
| static int | getbitpos (int channel, TgcRawData::SlbType slbType) |
| | Get bitpos from channel and SlbType. More...
|
| |
| static int | getchannel (int bitpos, TgcRawData::SlbType slbType) |
| | Get channel from bitpos and SlbType. More...
|
| |
| static bool | getRfromEtaZ (const double eta, const double z, double &r) |
| | Get r from eta and z. More...
|
| |
| static bool | getEtafromRZ (const double r, const double z, double &eta) |
| | Get eta from r and z. More...
|
| |
| static bool | isAlreadyConverted (const std::vector< const TgcRdo * > &decodedRdoCollVec, const std::vector< const TgcRdo * > &rdoCollVec, const TgcRdo *rdoColl) |
| | Check the rdo is already converted or not. More...
|
| |
| static bool | isRequested (const std::vector< IdentifierHash > &requestedIdHashVect, IdentifierHash tgcHashId) |
| | Check the IdHash is already requested or not. More...
|
| |
| static int | getRoiRow (const TgcRawData &rd) |
| | Get ROI row from RDO. More...
|
| |
| static void | getBitPosOutWire (const TgcRawData &rd, int &slbsubMatrix, std::array< int, 2 > &bitpos_o) |
| | Get bitPos etc of TGC3 wire for HiPt. More...
|
| |
| static void | getBitPosOutStrip (const TgcRawData &rd, int &slbsubMatrix, std::array< int, 2 > &bitpos_o) |
| | Get bitPos etc of TGC3 strip for HiPt. More...
|
| |
| static void | getBitPosStrip (const int hitId_s, const int sub_s, int &subMatrix_s, std::array< int, 3 > &bitpos_s) |
| | Get bitPos etc of strip for SL. More...
|
| |
| static int | getDeltaBeforeConvert (const TgcRawData &rd) |
| | Get delta (sagitta) before converion for HiPt. More...
|
| |
| static bool | isBackwardBW (const TgcRawData &rd) |
| | Check if a chamber in BigWheel is a backward chamber or a forward chamber. More...
|
| |
| static void | getEndcapStripCandidateTrackletIds (const int roi, int &trackletIdStripFirst, int &trackletIdStripSecond, int &trackletIdStripThird) |
| | Get trackletIds of three Tracklet Strip candidates in the Endcap boudary. More...
|
| |
| static const Amg::Vector2D * | getSLLocalPosition (const MuonGM::TgcReadoutElement *readout, const Identifier, const double eta, const double phi) |
| | Get SL local position. More...
|
| |
|
| CxxUtils::CachedValue< CablingInfo > | m_cablingInfo |
| |
| SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"} |
| |
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| |
| Gaudi::Property< std::string > | m_outputCollectionLocation {this, "OutputCollection", "TGC_Measurements"} |
| | TgcPrepRawData container key for current BC. More...
|
| |
| Gaudi::Property< std::string > | m_outputCoinCollectionLocation {this, "OutputCoinCollection", "TrigT1CoinDataCollection"} |
| | TgcCoinData container key for current BC. More...
|
| |
| Gaudi::Property< int > | m_tgcOffset {this, "TGCHashIdOffset", 26000} |
| | Identifier hash offset. More...
|
| |
| Gaudi::Property< bool > | m_decodeData {this, "DecodeData", true} |
| | Switch for the decoding of TGC RDO into TgcPrepData. More...
|
| |
| Gaudi::Property< bool > | m_fillCoinData {this, "FillCoinData", true} |
| | Switch for the coincince decoding. More...
|
| |
| Gaudi::Property< bool > | m_show_warning_level_invalid_A09_SSW6_hit {this, "show_warning_level_invalid_A09_SSW6_hit", false} |
| | Switch for error message disabling on one invalid channel in sector A09 seen in 2008 data, at least run 79772 - 91800. More...
|
| |
| Gaudi::Property< bool > | m_dropPrdsWithZeroWidth {this, "dropPrdsWithZeroWidth", true} |
| | Flag for dropping PRD's with zero widths. More...
|
| |
| std::atomic< long > | m_nHitRDOs {0} |
| | long to count the numbers of RDOs and PRDs More...
|
| |
| std::atomic< long > | m_nHitPRDs {0} |
| |
| std::atomic< long > | m_nTrackletRDOs {0} |
| |
| std::atomic< long > | m_nTrackletPRDs {0} |
| |
| std::atomic< long > | m_nTrackletEIFIRDOs {0} |
| |
| std::atomic< long > | m_nTrackletEIFIPRDs {0} |
| |
| std::atomic< long > | m_nHiPtRDOs {0} |
| |
| std::atomic< long > | m_nHiPtPRDs {0} |
| |
| std::atomic< long > | m_nSLRDOs {0} |
| |
| std::atomic< long > | m_nSLPRDs {0} |
| |
| SG::ReadHandleKey< TgcRdoContainer > | m_rdoContainerKey {this, "RDOContainer", "TGCRDO" ,"TgcRdoContainer to retrieve"} |
| |
| SG::WriteHandleKeyArray< Muon::TgcCoinDataContainer > | m_outputCoinKeys {this, "outputCoinKey", {}} |
| |
| SG::WriteHandleKeyArray< Muon::TgcPrepDataContainer > | m_outputprepdataKeys {this, "prepDataKeys", {}} |
| |
| SG::WriteHandleKey< xAOD::TgcStripContainer > | m_xAODKey {this, "xAODKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"} |
| |
| TgcPrdUpdateHandles | m_prdContainerCacheKeys {this, "UpdateKeysPrd", {}} |
| | Keys for the PRD cache containers, 4 needed for different BC. More...
|
| |
| TgcCoinUpdateHandles | m_coinContainerCacheKeys {this, "UpdateKeysCoin", {}} |
| | Keys for the Coin cache containers, 3 needed for different BC. More...
|
| |
| Gaudi::Property< std::string > | m_prdContainerCacheKeyStr {this, "PrdCacheString", "", "Prefix for names of PRD cache collections"} |
| |
| Gaudi::Property< std::string > | m_coinContainerCacheKeyStr {this, "CoinCacheString", "", "Prefix for names of Coin cache collections"} |
| |
This is the algorithm that convert TGCRdo To TGCPrepdata as a tool.
- Author
- Susumu Oda Susum.nosp@m.u.Od.nosp@m.a@cer.nosp@m.n.ch
-
Edward Moyse
This class was developed by Takashi Kubota.
Definition at line 53 of file TgcRdoToPrepDataToolMT.h.
◆ BIT_POS
SLB bit position /code Large R <--> Small R Large phi <--> Small phi for A side forward chambers and C side backward chambers Small phi <--> Large phi for A side backward chambers and C side forward chambers A-input : 40 - 75, 42 - 73 are valid.
B-input : 76 - 111, 78 - 109 are valid. C-input : 112 - 155, 118 - 149 are valid. D-input : 156 - 199, 162 - 193 are valid.
Channel in this code : Large R 15 14 13 12 11 ... 0 15 ... 3 2 1 0 Small R (it is better to be reverted to avoid confusion) ASD channel order : 15 ... ... 0 (there are shifts dependent on position) PS board channel : 0 1 2 3 4 ... 15 16 ... 28 29 30 31 A-Input : 40 41 42 43 44 45 46 ... 57 58 ... 70 71 72 73 74 75 B-Input : 76 77 78 79 80 81 82 ... 93 94 ... 106 107 108 109 110 111 C-Input : 112 113 114 115 116 117 118 119 120 121 122 ... 133 134 ... 146 147 148 149 150 151 152 153 154 155 D-Input : 156 157 158 159 160 161 162 163 164 165 166 ... 177 178 ... 190 191 192 193 194 195 196 197 198 199 /endcode
| Enumerator |
|---|
| BIT_POS_ASD_SIZE | |
| BIT_POS_NUM_ASD | |
| BIT_POS_INPUT_SIZE | |
| BIT_POS_OFFSET_LARGE_R | |
| BIT_POS_OFFSET_LARGE_PHIFOR_A_FWD_C_BWD | |
| BIT_POS_A_INPUT_ORIGIN | |
| BIT_POS_B_INPUT_ORIGIN | |
| BIT_POS_C_INPUT_ORIGIN | |
| BIT_POS_D_INPUT_ORIGIN | |
| BIT_POS_B_INPUT_LARGE_R_CH15 | |
| BIT_POS_A_INPUT_LARGE_R_CH08 | |
| BIT_POS_B_INPUT_LARGE_R_CH07 | |
| BIT_POS_A_INPUT_LARGE_R_CH00 | |
| BIT_POS_B_INPUT_SMALL_R_CH15 | |
| BIT_POS_A_INPUT_SMALL_R_CH08 | |
| BIT_POS_B_INPUT_SMALL_R_CH07 | |
| BIT_POS_A_INPUT_SMALL_R_CH00 | |
| BIT_POS_B_INPUT_SMALL_R_CH05 | |
| BIT_POS_A_INPUT_SMALL_R_CH03 | |
| BIT_POS_B_INPUT_LARGE_R_CH12 | |
| BIT_POS_A_INPUT_SMALL_R_CH04 | |
| BIT_POS_A_INPUT_LARGE_R_CH12 | |
| BIT_POS_A_INPUT_LARGE_R_CH04 | |
| BIT_POS_A_INPUT_SMALL_R_CH12 | |
| BIT_POS_B_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH15 | |
| BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH08 | |
| BIT_POS_B_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH07 | |
| BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH00 | |
| BIT_POS_B_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH15 | |
| BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH08 | |
| BIT_POS_B_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH07 | |
| BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH00 | |
| BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH12 | |
| BIT_POS_A_INPUT_LARGE_PHI_FOR_A_FWD_C_BWD_CH04 | |
| BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH12 | |
| BIT_POS_A_INPUT_SMALL_PHI_FOR_A_FWD_C_BWD_CH04 | |
Definition at line 143 of file TgcRdoToPrepDataToolMT.h.
◆ MAP_SIZE
◆ SUB_DETCTOR_ID
◆ ~TgcRdoToPrepDataToolMT()
| virtual Muon::TgcRdoToPrepDataToolMT::~TgcRdoToPrepDataToolMT |
( |
| ) |
|
|
virtualdefault |
◆ convertToRun2() [1/2]
| void Muon::TgcRdoToPrepDataToolMT::convertToRun2 |
( |
const TgcRawData & |
rd, |
|
|
uint16_t & |
newrodId, |
|
|
uint16_t & |
newsector |
|
) |
| const |
|
inlineprivate |
◆ convertToRun2() [2/2]
| void Muon::TgcRdoToPrepDataToolMT::convertToRun2 |
( |
const TgcRawData * |
rd, |
|
|
uint16_t & |
newrodId, |
|
|
uint16_t & |
newsector |
|
) |
| const |
|
inlineprivate |
◆ decode() [1/2]
| StatusCode Muon::TgcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< IdentifierHash > & |
idVect |
|
) |
| const |
|
overridevirtual |
Decode RDO to PRD
A vector of IdentifierHash are passed in, and the data corresponding to this list (i.e.
in a Region of Interest) are converted.
- Parameters
-
| requestedIdHashVect | Vector of hashes to convert i.e. the hashes of ROD collections in a 'Region of Interest'
|
- Returns
- selectedIdHashVect This is the subset of requestedIdVect which were actually found to contain data
(i.e. if you want you can use this vector of hashes to optimise the retrieval of data in subsequent steps.)
In the R4 layout both phi & eta measurements are expressed on the same surface. However, the
Definition at line 206 of file TgcRdoToPrepDataToolMT.cxx.
215 ATH_CHECK(xAODHandle.record(std::make_unique<xAOD::TgcStripContainer>(),
216 std::make_unique<xAOD::TgcStripAuxContainer>()));
219 int sizeVectorRequested = requestedIdHashVect.size();
220 ATH_MSG_DEBUG(
"decode for " << sizeVectorRequested <<
" offline collections called");
224 return StatusCode::FAILURE;
228 std::set<const TgcRdo*> decodedRdoCollVec{}, rdoCollVec{};
229 std::vector<bool> decodedOnlineId (cinfo->m_MAX_N_ROD,
false);
233 ATH_MSG_DEBUG(
"Stored empty container. Decoding TGC RDO into TGC PrepRawData is switched off");
234 return StatusCode::SUCCESS;
240 ATH_MSG_DEBUG(
"Retrieving TGC RDO container from the store");
244 if(rdoContainer->empty()) {
246 ATH_MSG_DEBUG(
"Empty rdo container - no tgc rdo in this event");
247 return StatusCode::SUCCESS;
250 ATH_MSG_DEBUG(
"Not empty rdo container in this event, the container size is " << rdoContainer->size());
253 if(sizeVectorRequested!=0) {
254 unsigned int nRdo = 0;
255 for (IdentifierHash offlineCollHash : requestedIdHashVect) {
256 uint16_t onlineId = cinfo->m_hashToOnlineId.at(
static_cast<unsigned int>(offlineCollHash));
258 if(decodedOnlineId.at(onlineId)) {
259 ATH_MSG_DEBUG(
"The ROB with onlineId " << onlineId <<
" which contains hash "
260 <<
static_cast<unsigned int>(offlineCollHash)
261 <<
" is already decoded and skipped");
265 decodedOnlineId.at(onlineId) =
true;
267 for(
const TgcRdo* rdoColl : *rdoContainer) {
268 if(rdoColl->identify()==onlineId) {
269 if(!decodedRdoCollVec.count(rdoColl)) {
270 rdoCollVec.insert(rdoColl);
281 if(sizeVectorRequested!=0) {
285 for (
const TgcRdo* rdo : rdoCollVec) {
290 if(!cinfo->m_tgcCabling->getElementIDfromReadoutID(offlineId, rd->subDetectorId(),
291 rd->rodId(), rd->sswId(), rd->slbId(),
295 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(offlineId);
296 if (
std::find(requestedIdHashVect.begin(), requestedIdHashVect.end(), tgcHashId) == requestedIdHashVect.end()){
301 decodedRdoCollVec.insert(rdo);
305 for(
const TgcRdo* rdoColl : *rdoContainer) {
306 if (rdoColl->empty() || decodedRdoCollVec.count(rdoColl) || rdoCollVec.count(rdoColl)) {
309 ATH_MSG_DEBUG(
" Number of RawData in this rdo " << rdoColl->size());
313 decodedRdoCollVec.insert(rdoColl);
317 std::set<IdentifierHash> hashesInAnyBC;
318 for(
unsigned int ibc = 0; ibc <
NBC_HIT; ++ibc) {
325 for (std::unique_ptr<TgcPrepDataCollection>& bcColl : state.tgcPrepDataCollections[ibc]) {
326 if (!bcColl)
continue;
327 std::unique_ptr<TgcPrepDataCollection>& allBcColl = state.tgcPrepDataCollections[
NBC_HIT][bcColl->identifyHash()];
329 allBcColl = std::make_unique<TgcPrepDataCollection>(bcColl->identifyHash());
330 allBcColl->setIdentifier(bcColl->identify());
332 hashesInAnyBC.insert(bcColl->identifyHash());
333 for (
const TgcPrepData* prdToUpdate : *bcColl) {
334 auto search_itr = std::find_if(allBcColl->begin(), allBcColl->end(),
335 [prdToUpdate](
const TgcPrepData* prd){
336 return prd->identify() == prdToUpdate->identify();
338 if (search_itr == allBcColl->end()) {
339 auto allBcPrd = std::make_unique<TgcPrepData>(*prdToUpdate);
340 allBcPrd->setHashAndIndex(allBcColl->identifyHash(), allBcColl->size());
341 allBcPrd->setBcBitMap(bcBitMap);
342 allBcColl->push_back(std::move(allBcPrd));
345 const uint16_t bcBitMap_current = allBcPrd->getBcBitMap();
347 <<
" adding " << bcBitMap <<
" to get " << (bcBitMap_current | bcBitMap));
348 allBcPrd->setBcBitMap((bcBitMap_current | bcBitMap));
355 for (std::unique_ptr<TgcPrepDataCollection>& allBcColl : state.tgcPrepDataCollections[
NBC_HIT]) {
356 if (!allBcColl)
continue;
357 for (
const TgcPrepData* allBcPrd : *allBcColl) {
358 xAOD::TgcStrip* tgcStrip = xAODHandle->push_back(std::make_unique<xAOD::TgcStrip>());
360 tgcStrip->
setGasGap(idHelper.gasGap(allBcPrd->identify()));
366 const double locPos = (tgcStrip->
measuresPhi() ? -1. : 1.) * allBcPrd->localPosition().x();
374 for (
unsigned int k = 0 ;
k < state.tgcPrepDataContainer.size(); ++
k){
377 for (
unsigned int k = 0 ;
k < state.tgcCoinDataContainer.size(); ++
k) {
380 ATH_MSG_DEBUG(
"Found " << hashesInAnyBC.size() <<
" hashes that must be added to AllBC container");
382 return StatusCode::SUCCESS;
◆ decode() [2/2]
| StatusCode Muon::TgcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< uint32_t > & |
robIds |
|
) |
| const |
|
overrideprivate |
◆ decodeHiPt()
Decode RDO's of HiPt.
Definition at line 893 of file TgcRdoToPrepDataToolMT.cxx.
901 const TgcRawData rd(rd0.bcTag(), rd0.subDetectorId(), tmprodId,
902 rd0.l1Id(), rd0.bcId(), rd0.isStrip(),
903 rd0.isForward(), tmpsector, rd0.chip(),
904 rd0.index(), rd0.isHipt(), rd0.hitId(),
905 rd0.hsub(), rd0.delta(), rd0.inner());
909 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeHiPt::Unknown subDetectorId!!");
910 return StatusCode::SUCCESS;
915 ATH_MSG_DEBUG(
"Invalid hitId_rdo_hipt, hitId == 0!! skip to convert this RDO to PRD");
916 return StatusCode::SUCCESS;
918 int slbsubMatrix = 0;
925 std::array<Identifier, 2> channelIdOut{};
926 std::array<int, 2> bitpos_o{}, slbchannel_o{};
927 int sswId_o{0}, sbLoc_o{0}, slbId_o{0};
930 std::array<Identifier, 4> channelIdIn{};
931 std::array<int, 4> bitpos_i{}, slbchannel_i{};
932 int sswId_i{0}, sbLoc_i{0};
934 std::array<int, 4> slbId_in {}, sbLoc_in{};
936 std::array<int, 4> gasGap_i{}, channel_i{};
937 double width_i{0.},hit_position_i{0};
940 std::array<int, 2> gasGap_o{}, channel_o{};
941 double width_o{0.}, hit_position_o{0.};
951 return StatusCode::SUCCESS;
960 for(
int i=0;
i<2;
i++) {
962 sswId_o, sbLoc_o, bitpos_o[
i]);
964 ATH_MSG_DEBUG(
"Failed to get OfflineID from ReadoutID for Pivot " << (rd.
isStrip() ?
"Strip" :
"Wire") <<
".");
965 return StatusCode::SUCCESS;
975 getBitPosInWire(rd, deltaBeforeConvert, bitpos_i, slbchannel_i, slbId_in, sbLoc_in, sswId_i, bitpos_o,
976 slbchannel_o, slbId_o);
978 getBitPosInStrip(rd, deltaBeforeConvert, bitpos_i, slbchannel_i, sbLoc_i, sswId_i, bitpos_o, slbchannel_o);
980 for(
int i=0;
i<4;
i++) {
982 rd.
isStrip() ? sbLoc_i : sbLoc_in[
i],
985 ATH_MSG_DEBUG(
"Failed to get OfflineID from ReadoutID for Pivot "
986 << (rd.
isStrip() ?
"Strip" :
"Wire") <<
".");
987 return StatusCode::SUCCESS;
995 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdOut[1]);
999 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1000 if (!coincollection) {
1001 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1007 std::array<const MuonGM::TgcReadoutElement*, 2> descriptor_o{state.muDetMgr->getTgcReadoutElement(channelIdOut[0]),
1008 state.muDetMgr->getTgcReadoutElement(channelIdOut[1])};
1009 for(
int i=0;
i<2;
i++) {
1011 return StatusCode::SUCCESS;
1016 for(
int i=0;
i<2;
i++) {
1017 gasGap_o[
i] = idHelper.gasGap(channelIdOut[
i]);
1018 channel_o[
i] = idHelper.channel(channelIdOut[
i]);
1023 gasGap_o, channel_o,
1024 width_o, hit_position_o, tmp_hitPos_o,
1028 gasGap_o, channel_o,
1029 width_o, hit_position_o, tmp_hitPos_o,
1034 return StatusCode::SUCCESS;
1037 return StatusCode::SUCCESS;
1040 descriptor_oo = state.muDetMgr->getTgcReadoutElement(channelIdOut_tmp);
1042 return StatusCode::SUCCESS;
1049 std::array<const MuonGM::TgcReadoutElement*, 4> descriptor_i{state.muDetMgr->getTgcReadoutElement(channelIdIn[0]),
1050 state.muDetMgr->getTgcReadoutElement(channelIdIn[1]),
1051 state.muDetMgr->getTgcReadoutElement(channelIdIn[2]),
1052 state.muDetMgr->getTgcReadoutElement(channelIdIn[3])};
1053 for(
int i=0;
i<4;
i++) {
1055 return StatusCode::SUCCESS;
1058 for(
int i=0;
i<4;
i++) {
1059 gasGap_i[
i] = idHelper.gasGap(channelIdIn[
i]);
1060 channel_i[
i] = idHelper.channel(channelIdIn[
i]);
1065 gasGap_i, channel_i,
1066 width_i, hit_position_i, tmp_hitPos_i,
1070 gasGap_i, channel_i,
1071 width_i, hit_position_i, tmp_hitPos_i,
1076 return StatusCode::SUCCESS;
1079 return StatusCode::SUCCESS;
1082 descriptor_ii = state.muDetMgr->getTgcReadoutElement(channelIdIn_tmp);
1084 return StatusCode::SUCCESS;
1089 int trackletId = 2*sbLoc_o + slbsubMatrix;
1090 int delta =
static_cast<int>(rd.
delta());
1091 int hsub =
static_cast<int>(rd.
hsub());
1092 int inner =
static_cast<int>(rd.
inner());
1095 for (
const TgcCoinData* tgcCoinData : *coincollection) {
1097 (channelIdOut_tmp==tgcCoinData->identify()) &&
1098 (channelIdIn_tmp==tgcCoinData->channelIdIn()) &&
1099 (trackletId==tgcCoinData->trackletId()) &&
1100 (delta==tgcCoinData->delta()) &&
1101 (hsub==tgcCoinData->sub()) &&
1102 (inner==tgcCoinData->inner())) {
1103 if(38<=trackletId && trackletId<=41) {
1108 return StatusCode::SUCCESS;
1112 auto hitPos_o = std::make_unique<Amg::Vector2D>(tmp_hitPos_o);
1113 auto hitPos_i = std::make_unique<Amg::Vector2D>(tmp_hitPos_i);
1115 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn_tmp,
1122 idHelper.stationPhi(channelIdOut_tmp),
1135 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
1136 coincollection->push_back(newCoinData);
1142 return StatusCode::SUCCESS;
◆ decodeHits()
Decode RDO's of Hit.
Definition at line 427 of file TgcRdoToPrepDataToolMT.cxx.
432 bool isConverted{
false}, isDuplicated{
false}, isInvalid{
false};
435 <<
" rod=" << rd.
rodId() <<
" ssw=" << rd.
sswId()
436 <<
" slb=" << rd.
slbId() <<
" bitpos=" << rd.
bitpos());
447 for(
int iOr=0; iOr<2; iOr++) {
454 if(o_found) orFlag =
true;
460 bool e_found = cinfo->m_tgcCabling->getElementIDfromReadoutID(elementId,
466 bool show_warning_level =
true;
482 if (msgLvl(show_warning_level ? MSG::WARNING :
MSG::DEBUG)){
483 msg(show_warning_level ? MSG::WARNING :
MSG::DEBUG) <<
"ElementID not found for "
485 <<
" slb=" << rd.
slbId() <<
" bitpos=" << rd.
bitpos() <<
" orFlag=" << orFlag <<
endmsg;
490 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(elementId);
493 bool c_found = cinfo->m_tgcCabling->getOfflineIDfromReadoutID(
channelId,
501 <<
" ssw=" << rd.
sswId()<<
" slb=" << rd.
slbId()
502 <<
" bitpos=" << rd.
bitpos()<<
" orFlag=" << orFlag);
508 std::unique_ptr<TgcPrepDataCollection>& collection = state.tgcPrepDataCollections[locId][tgcHashId];
510 collection = std::make_unique<TgcPrepDataCollection>(tgcHashId);
511 collection->setIdentifier(elementId);
513 const bool duplicate = std::find_if(collection->begin(), collection->end(),
515 return prd->identify() == channelId;
516 }) != collection->end();
529 std::vector<Identifier> identifierList{
channelId};
536 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeHits Amg::Vector2D* hitPos is null.");
547 ATH_MSG_WARNING(
"decodeHits: width= " <<
width <<
" is smaller than s_cutDropPrdsWithZeroWidth= "
551 double errPos =
width/std::sqrt(12.);
555 mat *= errPos*errPos;
565 newPrepData->setHashAndIndex(collection->identifyHash(), collection->size());
566 collection->push_back(newPrepData);
571 else if(isDuplicated || isInvalid)
m_nHitRDOs--;
573 return StatusCode::SUCCESS;
◆ decodeInner()
Decode RDO's of Inner.
Definition at line 1145 of file TgcRdoToPrepDataToolMT.cxx.
1150 return StatusCode::FAILURE;
1155 if(subDetectorId!=
ASIDE && subDetectorId!=
CSIDE) {
1156 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeHiPt::Unknown subDetectorId!!");
1157 return StatusCode::SUCCESS;
1160 bool isInner = ((rd.
sector() & 4) != 0 );
1166 int sbLoc_o = rd.
sector() & 3;
1167 int inner = rd.
inner();
1170 int phi = 0;
bool isAside =
false;
bool isEndcap =
false;
1171 if(rd.
rodId() < 13){
1172 cinfo->m_tgcCabling->getSLIDfromReadoutID(
phi, isAside, isEndcap, subDetectorId,
1173 rd.
rodId(), sswId_o, sbLoc_o);
1176 cinfo->m_tgcCabling->getSLIDfromSReadoutID(
phi, isAside, subDetectorId, rd.
rodId(), sbLoc_o, rd.
isForward());
1179 isInner =
true;
isStrip =
false;
1189 isInner =
true;
isStrip =
true;
1197 isInner =
false;
isStrip =
false;
1202 isInner =
false;
isStrip =
true;
1221 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(elementId);
1223 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1224 if (!coincollection) {
1225 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1229 ATH_MSG_DEBUG(
"Inner Data Word, phi: " <<
phi <<
" isAside: " << isAside <<
" isEndcap: " << isEndcap
1230 <<
" subDetectorId: " << subDetectorId <<
" isStrip: " << rd.
isStrip()
1231 <<
" rodId: " << rd.
rodId() <<
" slbId: " << sbLoc_o <<
" inner:"<< rd.
inner());
1233 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
1253 newCoinData->setHashAndIndex(coincollection->
identifyHash(), coincollection->
size());
1256 ATH_MSG_DEBUG(
"coincollection->push_back done (for Inner)");
1260 return StatusCode::SUCCESS;
◆ decodeSL()
Decode RDO's of SectorLogic.
Definition at line 1263 of file TgcRdoToPrepDataToolMT.cxx.
1269 const TgcRawData rd(rd0.bcTag(), rd0.subDetectorId(), tmprodId, rd0.l1Id(),rd0.bcId(),
1270 rd0.isForward(), tmpsector, rd0.innerflag(), rd0.coinflag(),
1271 rd0.isMuplus(), rd0.threshold(), rd0.roi());
1275 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeSL::Unknown subDetectorId!!");
1276 return StatusCode::SUCCESS;
1281 std::array<Identifier, 3> channelId_wire{};
1282 int index_w{0}, chip_w{0}, hitId_w{0}, sub_w{0}, sswId_w{0}, sbLoc_w{0}, subMatrix_w{0};
1283 std::array<int, 3> bitpos_w{};
1286 found =
getSLIds(
false, rd, channelId_wire, index_w, chip_w, hitId_w, sub_w, sswId_w, sbLoc_w,
1287 subMatrix_w, bitpos_w);
1289 return StatusCode::SUCCESS;
1292 std::array<Identifier, 3> channelId_strip{};
1293 int index_s{0}, chip_s{0}, hitId_s{0}, sub_s{0}, sswId_s{0}, sbLoc_s{0}, subMatrix_s{0};
1294 std::array<int, 3> bitpos_s{};
1297 found =
getSLIds(
true, rd, channelId_strip, index_s, chip_s, hitId_s, sub_s, sswId_s, sbLoc_s, subMatrix_s,
1300 return StatusCode::SUCCESS;
1305 const IdentifierHash tgcHashId=
m_idHelperSvc->moduleHash(channelId_wire[1]);
1310 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1311 if (!coincollection) {
1312 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1317 int trackletId = 2*sbLoc_w + subMatrix_w;
1318 int trackletIdStrip = 2*sbLoc_s + subMatrix_s;
1319 int roi =
static_cast<int>(rd.
roi());
1322 pt += (
static_cast<int>( rd.
coinflag() ) << 4 );
1326 bool isPositiveDeltaR = rd.
isMuplus();
1329 for (
const TgcCoinData* tgcCoinData : *coincollection) {
1331 trackletId==tgcCoinData->trackletId() && trackletIdStrip==tgcCoinData->trackletIdStrip() &&
1332 roi==tgcCoinData->roi() &&
pt==tgcCoinData->pt() &&
veto==tgcCoinData->veto() &&
1333 isPositiveDeltaR==tgcCoinData->isPositiveDeltaR()) {
1336 return StatusCode::SUCCESS;
1341 double width_w{0.}, tmp_r{0.}, tmp_wire_z{0.};
1344 return StatusCode::SUCCESS;
1347 return StatusCode::SUCCESS;
1350 double tmp_eta = 0.;
1351 bool isGoodEta =
getEtafromRZ(tmp_r, tmp_wire_z, tmp_eta);
1353 ATH_MSG_WARNING(
"Conversion from r and z to eta by Muon::TgcRdoToPrepDataToolMT::getEtafromRZ failed.");
1354 return StatusCode::SUCCESS;
1356 if(tmp_wire_z<0.) tmp_eta *= -1.;
1360 double width_s{0.}, tmp_phi{0.};
1363 return StatusCode::SUCCESS;
1366 return StatusCode::SUCCESS;
1371 return StatusCode::SUCCESS;
1376 bool onSurface = descriptor_w2->
surface(channelId_wire[2]).
globalToLocal(tmp_gp,tmp_gp,tmp_hitPos);
1392 TgcCoinData* newCoinData =
new TgcCoinData(channelId_wire[2],
1409 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
1410 coincollection->push_back(newCoinData);
1414 return StatusCode::SUCCESS;
◆ decodeTracklet()
| StatusCode Muon::TgcRdoToPrepDataToolMT::decodeTracklet |
( |
State & |
state, |
|
|
const TgcRawData & |
rd |
|
) |
| const |
|
private |
Decode RDO's of Tracklet.
Definition at line 576 of file TgcRdoToPrepDataToolMT.cxx.
585 found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(channelIdOut,
591 return StatusCode::SUCCESS;
596 int tmp_slbId{0}, tmp_subMatrix{0}, tmp_position{0};
599 return StatusCode::SUCCESS;
602 found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(channelIdIn,
604 rd.
sswId(), tmp_slbId,
605 tmp_subMatrix, tmp_position,
true);
608 return StatusCode::SUCCESS;
612 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdOut);
617 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
618 if (!coincollection) {
619 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
623 int subMatrix =
static_cast<int>(rd.
subMatrix());
624 int trackletId =
static_cast<int>(2*rd.
slbId()+subMatrix);
625 int delta =
static_cast<int>(rd.
delta());
628 for (
const TgcCoinData* tgcCoinData : *coincollection) {
630 channelIdOut==tgcCoinData->identify() &&
631 channelIdIn==tgcCoinData->channelIdIn() &&
632 trackletId==tgcCoinData->trackletId() &&
633 delta==tgcCoinData->delta() &&
634 subMatrix==tgcCoinData->sub()) {
637 return StatusCode::SUCCESS;
646 return StatusCode::SUCCESS;
650 int gasGap_o = idHelper.gasGap(channelIdOut);
651 int channel_o = idHelper.channel(channelIdOut);
652 double width_o = !idHelper.isStrip(channelIdOut) ? descriptor_o->
gangRadialLength(gasGap_o, channel_o)
653 : descriptor_o->
stripWidth(gasGap_o, channel_o);
656 return StatusCode::SUCCESS;
661 bool onSurface_o = descriptor_o->
surface(channelIdOut).
globalToLocal(position_o,position_o,hitPos_o);
664 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTracklet Amg::Vector2D* hitPos_o is null.");
665 return StatusCode::SUCCESS;
672 return StatusCode::SUCCESS;
675 int gasGap_i = idHelper.gasGap(channelIdIn);
676 int channel_i = idHelper.channel(channelIdIn);
677 double width_i = !idHelper.isStrip(channelIdIn) ? descriptor_i->
gangRadialLength(gasGap_i, channel_i)
678 : descriptor_i->
stripWidth(gasGap_i, channel_i);
681 return StatusCode::SUCCESS;
686 bool onSurface_i = descriptor_i->
surface(channelIdIn).
globalToLocal(position_i,position_i,hitPos_i);
689 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTracklet Amg::Vector2D* hitPos_i is null.");
690 return StatusCode::SUCCESS;
696 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
703 idHelper.stationPhi(channelIdOut),
706 idHelper.isStrip(channelIdOut),
715 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
716 coincollection->push_back(newCoinData);
722 return StatusCode::SUCCESS;
◆ decodeTrackletEIFI()
| StatusCode Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI |
( |
State & |
state, |
|
|
const TgcRawData & |
rd |
|
) |
| const |
|
private |
Decode RDO's of Tracklet EIFI.
Definition at line 725 of file TgcRdoToPrepDataToolMT.cxx.
738 bool isForward = (rd.
slbId()%2==0);
747 int slot = ((rd.
slbId()/2) + (rd.
rodId()-2)*2 + 23)%24 + 1;
749 bool isBackward =
false;
753 isBackward = !isAside;
754 }
else if(slot==16) {
755 isBackward = isAside;
759 if(isAside) isBackward = (slot%3==2);
760 else isBackward = (slot%3!=2);
763 isBackward = isAside;
773 int tmpsubMatrix =
static_cast<int>(rd.
subMatrix());
775 if(tmpsubMatrix==3) {
776 if(slot== 1 || slot== 3 || slot== 4 || slot== 5 || slot== 6 || slot== 7 || slot== 8 ||
777 slot==10 || slot==11 || slot==13 || slot==18 || slot==19 || slot==20) {
781 }
else if(tmpsubMatrix==2) {
782 if(slot== 2 || slot==12 || slot==14 || slot==15 || slot==16 || slot==22 || slot==23 || slot==24) {
802 bool o_found = cinfo->m_tgcCabling->getOfflineIDfromReadoutID(channelIdIn,
807 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI OfflineID not found for "
809 <<
" sswId=" << rd.
sswId()<<
" slbId=" << rd.
slbId() <<
" slbType=" << rd.
slbType()
810 <<
" subMatrix=" << rd.
subMatrix() <<
" bitpos=" << bitpos <<
" isStrip=" <<
isStrip
811 <<
" isAside=" << isAside<<
" isForward=" << isForward<<
" slot=" << slot
812 <<
" isBackward=" << isBackward);
813 return StatusCode::SUCCESS;
818 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdIn);
822 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
823 if (!coincollection) {
824 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
829 for (
const TgcCoinData* tgcCoinData : *coincollection) {
831 channelIdIn==tgcCoinData->channelIdIn() &&
832 static_cast<int>(rd.
subMatrix())==tgcCoinData->sub()) {
834 return StatusCode::SUCCESS;
840 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI descriptor doesn't contain "
842 return StatusCode::SUCCESS;
851 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI Amg::Vector2D* hitPos is null.");
852 return StatusCode::SUCCESS;
856 int gasGap = idHelper.gasGap(channelIdIn);
857 int channel = idHelper.channel(channelIdIn);
860 double localZ = (descriptor->
transform(channelIdIn).inverse()*descriptor->
channelPos(channelIdIn)).
z();
863 width = std::abs(stripMaxX - stripMinX);
865 int positiveOffset = +4;
866 if(isForward && (slot%3==2) &&
channel==28) positiveOffset = +2;
869 width = std::abs(gangMaxZ - gangMinZ);
874 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
885 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
886 coincollection->push_back(newCoinData);
890 return StatusCode::SUCCESS;
◆ finalize()
| StatusCode Muon::TgcRdoToPrepDataToolMT::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getbitpos()
◆ getBitPosInStrip()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosInStrip |
( |
const TgcRawData & |
rd, |
|
|
const int |
DeltaBeforeConvert, |
|
|
std::array< int, 4 > & |
bitpos_i, |
|
|
std::array< int, 4 > & |
slbchannel_i, |
|
|
int & |
sbLoc_i, |
|
|
int & |
sswId_i, |
|
|
const std::array< int, 2 > & |
bitpos_o, |
|
|
std::array< int, 2 > & |
slbchannel_o |
|
) |
| const |
|
private |
Get bitPos etc of TGC1 strip for HiPt.
Definition at line 1768 of file TgcRdoToPrepDataToolMT.cxx.
1780 int rdochIn_min = 0;
1785 }
else if(rd.
chip()==1) {
1791 }
else if(rd.
chip()==1) {
1796 for(
int i=0;
i<2;
i++) {
1798 slbchannel_i[
i] = slbchannel_o[
i] + deltaBeforeConvert;
1799 if(slbchannel_i[
i]>rdochIn_max) {
1800 slbchannel_i[
i] = rdochIn_max;
1801 }
else if(slbchannel_i[
i]<rdochIn_min) {
1802 slbchannel_i[
i] = rdochIn_min;
1806 slbchannel_i[
i+2] = slbchannel_i[
i] + 1;
1808 slbchannel_i[
i+2] = slbchannel_i[
i] - 1;
1811 if(slbchannel_i[
i+2] > rdochIn_max) {
1812 slbchannel_i[
i+2] = rdochIn_max;
1813 }
else if(slbchannel_i[
i+2] < rdochIn_min) {
1814 slbchannel_i[
i+2] = rdochIn_min;
1822 sswId_i =
static_cast<int>(rd.
sector()/2);
◆ getBitPosInWire()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosInWire |
( |
const TgcRawData & |
rd, |
|
|
const int |
DeltaBeforeConvert, |
|
|
std::array< int, 4 > & |
bitpos_i, |
|
|
std::array< int, 4 > & |
slbchannel_i, |
|
|
std::array< int, 4 > & |
slbId_in, |
|
|
std::array< int, 4 > & |
sbLoc_in, |
|
|
int & |
sswId_i, |
|
|
const std::array< int, 2 > & |
bitpos_o, |
|
|
std::array< int, 2 > & |
slbchannel_o, |
|
|
const int |
slbId_o |
|
) |
| const |
|
private |
Get bitPos etc of TGC1 wire for HiPt.
Definition at line 1655 of file TgcRdoToPrepDataToolMT.cxx.
1665 const int NUM_SLBID_SBLOC_OFFSET_WT = 8;
1669 int rdochIn_max = 0;
1670 int rdochIn_min = 0;
1682 int tmp_rdochannel_i = 0;
1683 int tmp_rdochannel_i2 = 0;
1684 for(
int i=0;
i<2;
i++) {
1686 tmp_rdochannel_i =
WD_MAP_SIZE*slbId_o + slbchannel_o[
i] + deltaBeforeConvert + offset_dt;
1687 if(tmp_rdochannel_i>rdochIn_max) {
1688 tmp_rdochannel_i = rdochIn_max;
1689 }
else if(tmp_rdochannel_i<rdochIn_min) {
1690 tmp_rdochannel_i = rdochIn_min;
1706 tmp_rdochannel_i2 = (tmp_rdochannel_i/3)*3 + 2;
1708 tmp_rdochannel_i2 = ((tmp_rdochannel_i + 1)/3)*3 - 1;
1711 if(tmp_rdochannel_i2>rdochIn_max) {
1712 tmp_rdochannel_i2 = rdochIn_max;
1713 }
else if(tmp_rdochannel_i2<rdochIn_min) {
1714 tmp_rdochannel_i2 = rdochIn_min + 2;
1720 sbLoc_in[
i] = slbId_in[
i];
1721 sbLoc_in[
i+2] = slbId_in[
i+2];
1725 sbLoc_in[
i] += NUM_SLBID_SBLOC_OFFSET_WT;
1726 sbLoc_in[
i+2] += NUM_SLBID_SBLOC_OFFSET_WT;
1737 sswId_i =
static_cast<int>(rd.
sector()/2);
◆ getBitPosOutStrip()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosOutStrip |
( |
const TgcRawData & |
rd, |
|
|
int & |
slbsubMatrix, |
|
|
std::array< int, 2 > & |
bitpos_o |
|
) |
| |
|
staticprivate |
◆ getBitPosOutWire()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosOutWire |
( |
const TgcRawData & |
rd, |
|
|
int & |
slbsubMatrix, |
|
|
std::array< int, 2 > & |
bitpos_o |
|
) |
| |
|
staticprivate |
◆ getBitPosStrip()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosStrip |
( |
const int |
hitId_s, |
|
|
const int |
sub_s, |
|
|
int & |
subMatrix_s, |
|
|
std::array< int, 3 > & |
bitpos_s |
|
) |
| |
|
staticprivate |
Get bitPos etc of strip for SL.
Definition at line 1892 of file TgcRdoToPrepDataToolMT.cxx.
1902 if((hitId_s%2)==0) {
1908 }
else if(sub_s==1) {
1913 }
else if((hitId_s%2)==1) {
1919 }
else if(sub_s==1) {
◆ getBitPosWire()
| void Muon::TgcRdoToPrepDataToolMT::getBitPosWire |
( |
const TgcRawData & |
rd, |
|
|
const int |
hitId_w, |
|
|
const int |
sub_w, |
|
|
int & |
subMatrix_w, |
|
|
std::array< int, 3 > & |
bitpos_w |
|
) |
| const |
|
private |
Get bitPos etc of wire for SL.
Definition at line 1828 of file TgcRdoToPrepDataToolMT.cxx.
1845 if(RoiRow==0 && !isForward) {
1850 }
else if(RoiRow==36 && !isForward) {
1855 }
else if(RoiRow==0 && isForward) {
1860 }
else if(RoiRow==15 && isForward) {
1866 if((hitId_w%2)==0) {
1872 }
else if(sub_w==1) {
1883 }
else if(sub_w==1) {
◆ getCabling()
Definition at line 2908 of file TgcRdoToPrepDataToolMT.cxx.
2916 if (cinfo.m_tgcCabling.retrieve().isFailure()) {
2924 unsigned int hashId_max =
m_idHelperSvc->tgcIdHelper().module_hash_max();
2925 cinfo.m_hashToOnlineId.reserve(hashId_max);
2928 int subDetectorId = 0;
2931 for(
unsigned int hashId=0; hashId<hashId_max; hashId++) {
2932 IdentifierHash
hash(hashId);
2934 cinfo.m_tgcCabling->getReadoutIDfromElementID(elementId, subDetectorId, rodId);
2937 cinfo.m_hashToOnlineId.push_back(onlineId);
2941 cinfo.m_MAX_N_ROD = 2*12;
◆ getchannel()
◆ getDeltaBeforeConvert()
| int Muon::TgcRdoToPrepDataToolMT::getDeltaBeforeConvert |
( |
const TgcRawData & |
rd | ) |
|
|
staticprivate |
Get delta (sagitta) before converion for HiPt.
Definition at line 1927 of file TgcRdoToPrepDataToolMT.cxx.
1929 int deltaBeforeConvert = 0;
1932 switch(rd.
delta()) {
1933 case 5: deltaBeforeConvert = 6;
break;
1934 case 6: deltaBeforeConvert = 8;
break;
1935 case 7: deltaBeforeConvert = 10;
break;
1936 case -4: deltaBeforeConvert = -5;
break;
1937 case -5: deltaBeforeConvert = -7;
break;
1938 case -6: deltaBeforeConvert = -9;
break;
1939 case -7: deltaBeforeConvert = -12;
break;
1940 default: deltaBeforeConvert = rd.
delta();
break;
1943 switch (rd.
delta()) {
1944 case 11: deltaBeforeConvert = 12;
break;
1945 case 12: deltaBeforeConvert = 14;
break;
1946 case 13: deltaBeforeConvert = 16;
break;
1947 case 14: deltaBeforeConvert = 18;
break;
1948 case 15: deltaBeforeConvert = 20;
break;
1949 case -12: deltaBeforeConvert = -13;
break;
1950 case -13: deltaBeforeConvert = -15;
break;
1951 case -14: deltaBeforeConvert = -17;
break;
1952 case -15: deltaBeforeConvert = -19;
break;
1953 default: deltaBeforeConvert = rd.
delta();
break;
1957 return deltaBeforeConvert;
◆ getEndcapStripCandidateTrackletIds()
| void Muon::TgcRdoToPrepDataToolMT::getEndcapStripCandidateTrackletIds |
( |
const int |
roi, |
|
|
int & |
trackletIdStripFirst, |
|
|
int & |
trackletIdStripSecond, |
|
|
int & |
trackletIdStripThird |
|
) |
| |
|
staticprivate |
Get trackletIds of three Tracklet Strip candidates in the Endcap boudary.
Definition at line 2843 of file TgcRdoToPrepDataToolMT.cxx.
2846 constexpr
int T9SscMax = 2;
2847 constexpr
int T8SscMax = 4;
2848 constexpr
int T7SscMax = 6;
2849 constexpr
int T6SscMax = 12;
2850 constexpr
int T5SscMax = 18;
2852 constexpr
int T9Offset = 32 + 0;
2853 constexpr
int T8Offset = 32 + 2;
2854 constexpr
int T7Offset = 32 + 4;
2855 constexpr
int T6Offset = 32 + 6;
2856 constexpr
int T5Offset = 32 + 8;
2861 int ssc = (roi+4)/8;
2862 int halfSsc = (roi%4)/2;
2864 if( ssc< T9SscMax) {
2865 trackletIdStripFirst = T9Offset + halfSsc;
2866 trackletIdStripSecond = -1;
2867 trackletIdStripThird = -1;
2868 }
else if(ssc==T9SscMax) {
2869 trackletIdStripFirst = T8Offset + halfSsc;
2870 trackletIdStripSecond = T9Offset + halfSsc;
2871 trackletIdStripThird = -1;
2872 }
else if(ssc< T8SscMax) {
2873 trackletIdStripFirst = T8Offset + halfSsc;
2874 trackletIdStripSecond = -1;
2875 trackletIdStripThird = -1;
2876 }
else if(ssc==T8SscMax) {
2877 trackletIdStripFirst = T7Offset + halfSsc;
2878 trackletIdStripSecond = T8Offset + halfSsc;
2879 trackletIdStripThird = -1;
2880 }
else if(ssc< T7SscMax) {
2881 trackletIdStripFirst = T7Offset + halfSsc;
2882 trackletIdStripSecond = -1;
2883 trackletIdStripThird = -1;
2884 }
else if(ssc==T7SscMax) {
2885 trackletIdStripFirst = T6Offset + halfSsc;
2886 trackletIdStripSecond = T7Offset + halfSsc;
2887 trackletIdStripThird = T5Offset + halfSsc;
2888 }
else if(ssc< T6SscMax) {
2889 trackletIdStripFirst = T6Offset + halfSsc;
2890 trackletIdStripSecond = T5Offset + halfSsc;
2891 trackletIdStripThird = -1;
2892 }
else if(ssc==T6SscMax) {
2893 trackletIdStripFirst = T6Offset + halfSsc;
2894 trackletIdStripSecond = T5Offset + halfSsc;
2895 trackletIdStripThird = -1;
2896 }
else if(ssc<=T5SscMax) {
2897 trackletIdStripFirst = T5Offset + halfSsc;
2898 trackletIdStripSecond = T6Offset + halfSsc;
2899 trackletIdStripThird = -1;
2901 trackletIdStripFirst = -1;
2902 trackletIdStripSecond = -1;
2903 trackletIdStripThird = -1;
◆ getEtafromRZ()
| bool Muon::TgcRdoToPrepDataToolMT::getEtafromRZ |
( |
const double |
r, |
|
|
const double |
z, |
|
|
double & |
eta |
|
) |
| |
|
staticprivate |
Get eta from r and z.
Definition at line 1484 of file TgcRdoToPrepDataToolMT.cxx.
1486 double r_tmp = std::abs(
r);
1487 double z_tmp = std::abs(
z);
1491 eta = std::abs(atan2(r_tmp,z_tmp));
◆ getHiPtIds()
| bool Muon::TgcRdoToPrepDataToolMT::getHiPtIds |
( |
const TgcRawData & |
rd, |
|
|
int & |
sswId_o, |
|
|
int & |
sbLoc_o, |
|
|
int & |
slbId_o |
|
) |
| const |
|
private |
Get ReadoutID of HiPt from RDOHighPtID.
Definition at line 2436 of file TgcRdoToPrepDataToolMT.cxx.
2444 int chip =
static_cast<int>(rd.
chip());
2445 int hitId =
static_cast<int>(rd.
hitId());
2450 ATH_MSG_DEBUG(
"Failed to get SimHighPtID from RDOHighPtID for Pivot "
2451 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2461 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(dummyId,
2464 chip, hitId, rd.
hsub());
2466 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(dummyId,
2469 chip, hitId, rd.
hsub());
2473 ATH_MSG_DEBUG(
"Failed to get offlineID from HighPtID for Pivot "
2474 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2478 std::array<int, 3> dummy_i{};
2479 found = cinfo->m_tgcCabling->getReadoutIDfromOfflineID(dummyId, dummy_i[0], dummy_i[1], sswId_o, sbLoc_o, dummy_i[2]);
2481 ATH_MSG_DEBUG(
"Failed to get ReadoutID from OfflineID for Pivot "
2482 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2486 std::array<int, 2> i_o{};
2487 std::array<bool, 2> b_o{
false,
false};
2489 found = cinfo->m_tgcCabling->getSLBIDfromReadoutID(i_o[0], b_o[0], b_o[1], i_o[1], slbId_o,
2492 found = cinfo->m_tgcCabling->getSLBIDfromReadoutID(i_o[0], b_o[0], b_o[1], i_o[1], slbId_o,
2496 ATH_MSG_DEBUG(
"Failed to get SLBID from ReadoutID for Pivot "
2497 << (rd.
isStrip() ?
"Strip" :
"Wire"));
◆ getPosAndIdStripIn()
| bool Muon::TgcRdoToPrepDataToolMT::getPosAndIdStripIn |
( |
const std::array< const MuonGM::TgcReadoutElement *, 4 > & |
descriptor_i, |
|
|
const std::array< Identifier, 4 > & |
channelIdIn, |
|
|
const std::array< int, 4 > & |
gasGap_i, |
|
|
const std::array< int, 4 > & |
channel_i, |
|
|
double & |
width_i, |
|
|
double & |
hit_position_i, |
|
|
Amg::Vector2D & |
tmp_hitPos_i, |
|
|
Identifier & |
channelIdIn_tmp, |
|
|
const bool |
isBackward, |
|
|
const bool |
isAside |
|
) |
| const |
|
private |
Get position and offline ID of TGC1 strip for HiPt.
Definition at line 2347 of file TgcRdoToPrepDataToolMT.cxx.
2360 for(
int i=0;
i<4;
i++) {
2361 if(gasGap_i[
i]==3) {
2366 if(flag_isL3<0 || flag_isL3>=4) {
2367 ATH_MSG_DEBUG(
"getPosAndIdStripIn: Any bitpos is not at Layer3!");
2371 channelIdIn_tmp = channelIdIn[flag_isL3];
2379 std::array<double, 3> tmp_r_i{}, tmp_phi_i{}, tmp_eta_i{};
2380 std::array<Amg::Vector3D, 3> position_is{make_array<Amg::Vector3D, 3>(
Amg::Vector3D::Zero())};
2381 for(
int i=0;
i<3;
i++) {
2383 position_is[
i] = descriptor_i[
i]->channelPos(channelIdIn[
i]);
2385 position_is[
i] = descriptor_is->
channelPos(channelIdIn_tmp);
2387 tmp_r_i[
i] = position_is[
i].perp();
2388 tmp_phi_i[
i] = position_is[
i].phi();
2389 tmp_eta_i[
i] = position_is[
i].eta();
2392 std::array<int, 2>
index{};
2393 bool flag_reverse =
false;
2396 index[0] = 1;
index[1] = 0; flag_reverse =
true;
2398 index[0] = 0;
index[1] = 1; flag_reverse =
false;
2402 index[0] = 0;
index[1] = 1; flag_reverse =
true;
2404 index[0] = 1;
index[1] = 0; flag_reverse =
false;
2408 std::array<Amg::Vector3D,2 > localpos_i{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2409 for(
int i=0;
i<2;
i++) {
2410 localpos_i[
i] = descriptor_i[
i]->transform(channelIdIn[
i]).inverse()*descriptor_i[
i]->channelPos(channelIdIn[
i]);
2412 double stripMaxX = descriptor_i[
index[0]]->stripHighEdgeLocX(gasGap_i[
index[0]], channel_i[
index[0]],
2413 localpos_i[
index[0]].
z());
2414 double stripMinX = descriptor_i[
index[1]]->stripLowEdgeLocX(gasGap_i[
index[1]], channel_i[
index[1]],
2415 localpos_i[
index[1]].
z());
2416 width_i = stripMaxX - stripMinX;
2418 hit_position_i = stripMinX + width_i/2.;
2419 if(flag_reverse) hit_position_i *= -1.;
2420 tmp_hitPos_i[
Trk::locX] = hit_position_i;
2425 bool onSurface_i = descriptor_i[1]->surface(channelIdIn[1]).globalToLocal(position_in,position_in,loc_hitPos_i);
2427 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdStripIn Amg::Vector2D* loc_hitPos_i is null.");
◆ getPosAndIdStripOut()
| bool Muon::TgcRdoToPrepDataToolMT::getPosAndIdStripOut |
( |
const std::array< const MuonGM::TgcReadoutElement *, 2 > & |
descriptor_o, |
|
|
const std::array< Identifier, 2 > & |
channelIdOut, |
|
|
const std::array< int, 2 > & |
gasGap_o, |
|
|
const std::array< int, 2 > & |
channel_o, |
|
|
double & |
width_o, |
|
|
double & |
hit_position_o, |
|
|
Amg::Vector2D & |
tmp_hitPos_o, |
|
|
Identifier & |
channelIdOut_tmp, |
|
|
const bool |
isBackward, |
|
|
const bool |
isAside |
|
) |
| const |
|
private |
Get position and offline ID of TGC3 strip for HiPt.
Definition at line 2182 of file TgcRdoToPrepDataToolMT.cxx.
2194 std::array<Amg::Vector3D, 2> localpos_o{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2195 for(
int i=0;
i<2;
i++) {
2196 localpos_o[
i] = descriptor_o[
i]->transform(channelIdOut[
i]).inverse()*descriptor_o[
i]->channelPos(channelIdOut[
i]);
2199 std::array<int, 3>
index{};
2200 bool flag_reverse =
false;
2204 index[0] = 1;
index[1] = 0; flag_reverse =
true;
2206 index[0] = 0;
index[1] = 1; flag_reverse =
false;
2211 index[0] = 0;
index[1] = 1; flag_reverse =
true;
2213 index[0] = 1;
index[1] = 0; flag_reverse =
false;
2217 double stripMax = descriptor_o[
index[0]]->stripHighEdgeLocX(gasGap_o[
index[0]], channel_o[
index[0]],
2218 localpos_o[
index[0]].
z());
2219 double stripMin = descriptor_o[
index[1]]->stripLowEdgeLocX(gasGap_o[
index[1]], channel_o[
index[1]],
2220 localpos_o[
index[1]].
z());
2221 width_o = stripMax - stripMin;
2223 hit_position_o = stripMin + width_o/2.;
2224 if(flag_reverse) hit_position_o *= -1.;
2225 tmp_hitPos_o[
Trk::locX] = hit_position_o;
2230 bool onSurface_o = descriptor_o[1]->surface(channelIdOut[1]).globalToLocal(position_out,position_out,loc_hitPos_o);
2232 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdStripOut Amg::Vector2D* loc_hitPos_o is null.");
2237 channelIdOut_tmp = channelIdOut[
index[2]];
◆ getPosAndIdWireIn()
| bool Muon::TgcRdoToPrepDataToolMT::getPosAndIdWireIn |
( |
const std::array< const MuonGM::TgcReadoutElement *, 4 > & |
descriptor_i, |
|
|
const std::array< Identifier, 4 > & |
channelIdIn, |
|
|
const std::array< int, 4 > & |
gasGap_i, |
|
|
const std::array< int, 4 > & |
channel_i, |
|
|
double & |
width_i, |
|
|
double & |
hit_position_i, |
|
|
Amg::Vector2D & |
tmp_hitPos_i, |
|
|
Identifier & |
channelIdIn_tmp |
|
) |
| const |
|
private |
Get position and offline ID of TGC1 wire for HiPt.
Definition at line 2242 of file TgcRdoToPrepDataToolMT.cxx.
2251 int flag_boundary_i = 0;
2252 if(descriptor_i[1]->chamberType()==descriptor_i[3]->chamberType()) {
2254 if(gasGap_i[1]==gasGap_i[3]) {
2255 flag_boundary_i = 1;
2257 flag_boundary_i = 3;
2259 }
else if(descriptor_i[0]->chamberType()==descriptor_i[2]->chamberType()) {
2261 if(gasGap_i[0]==gasGap_i[2]) {
2262 flag_boundary_i = 0;
2264 flag_boundary_i = 2;
2267 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::ROI has 3 readout elements!!");
2271 channelIdIn_tmp = channelIdIn[flag_boundary_i];
2279 std::array<double, 3> tmp_r_i{}, tmp_phi_i{}, tmp_eta_i{};
2281 std::array<Amg::Vector3D, 3> position_i {descriptor_i[0]->channelPos(channelIdIn[0]),
2282 descriptor_i[1]->channelPos(channelIdIn[1]),
2285 for(
int i=0;
i<3;
i++) {
2286 tmp_r_i[
i] =position_i[
i].perp();
2287 tmp_phi_i[
i] = position_i[
i].phi();
2288 tmp_eta_i[
i] = position_i[
i].eta();
2292 double half_width = descriptor_i[
i]->gangRadialLength(gasGap_i[
i], channel_i[
i])/2.;
2296 if(
i==0) tmp_r_i[0] += half_width;
2297 else tmp_r_i[1] -= half_width;
2299 bool flag_geteta_i =
getEtafromRZ(tmp_r_i[
i], position_i[
i].
z(), tmp_eta_i[
i]);
2300 bool flag_getr_i =
getRfromEtaZ(tmp_eta_i[
i], position_i[2].
z(), tmp_r_i[
i]);
2302 if(!flag_geteta_i || !flag_getr_i) {
2303 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::failed to getRIn" <<
i <<
" on L3!!");
2309 width_i = tmp_r_i[0] - tmp_r_i[1];
2311 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::minus value width_i = " << width_i);
2315 int gasGap_tmp =
m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn_tmp);
2316 int channel_tmp =
m_idHelperSvc->tgcIdHelper().channel(channelIdIn_tmp);
2317 double half_width = descriptor_iw->
gangRadialLength(gasGap_tmp, channel_tmp)/2.;
2321 if((flag_boundary_i%2)==1) {
2322 tmp_r_i[2] -= half_width;
2323 hit_position_i = descriptor_iw->
gangShortWidth(gasGap_tmp, channel_tmp)
2324 - (tmp_r_i[2] - tmp_r_i[1]) + width_i/2.;
2326 tmp_r_i[2] += half_width;
2327 hit_position_i = descriptor_iw->
gangLongWidth(gasGap_tmp, channel_tmp)
2328 + (tmp_r_i[0] - tmp_r_i[2]) - width_i/2.;
2332 tmp_hitPos_i[
Trk::locX] = hit_position_i;
2333 Amg::Vector3D position_in = descriptor_i[1]->channelPos(channelIdIn[1]);
2336 bool onSurface_i = descriptor_i[1]->surface(channelIdIn[1]).globalToLocal(position_in,position_in,loc_hitPos_i);
2338 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdWireIn Amg::Vector2D* loc_hitPos_i is null.");
◆ getPosAndIdWireOut()
| bool Muon::TgcRdoToPrepDataToolMT::getPosAndIdWireOut |
( |
const std::array< const MuonGM::TgcReadoutElement *, 2 > & |
descriptor_o, |
|
|
const std::array< Identifier, 2 > & |
channelIdOut, |
|
|
const std::array< int, 2 > & |
gasGap_o, |
|
|
const std::array< int, 2 > & |
channel_o, |
|
|
double & |
width_o, |
|
|
double & |
hit_position_o, |
|
|
Amg::Vector2D & |
tmp_hitPos_o, |
|
|
Identifier & |
channelIdOut_tmp |
|
) |
| const |
|
private |
Get position and offline ID of TGC3 wire for HiPt.
Definition at line 2128 of file TgcRdoToPrepDataToolMT.cxx.
2138 std::array<Amg::Vector3D, 2> position_o{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2139 std::array<double, 2> tmp_phi_o{}, tmp_eta_o{}, tmp_r_o {};
2141 for(
int i=0;
i<2;
i++) {
2142 position_o[
i] = descriptor_o[
i]->channelPos(channelIdOut[
i]);
2143 tmp_r_o[
i] = position_o[
i].perp();
2144 tmp_phi_o[
i] = position_o[
i].phi();
2145 tmp_eta_o[
i] = position_o[
i].phi();
2147 double half_width = descriptor_o[
i]->gangRadialLength(gasGap_o[
i], channel_o[
i])/2.;
2151 if(
i==0) tmp_r_o[0] += half_width;
2152 else tmp_r_o[1] -= half_width;
2155 bool flag_geteta_o =
getEtafromRZ(tmp_r_o[0], position_o[0].
z(), tmp_eta_o[0]);
2156 bool flag_getr_o =
getRfromEtaZ(tmp_eta_o[0], position_o[1].
z(), tmp_r_o[0]);
2157 if(!flag_geteta_o || !flag_getr_o) {
2158 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireOut::failed to getR on L7!!");
2162 width_o = tmp_r_o[0] - tmp_r_o[1];
2164 hit_position_o = descriptor_o[1]->gangShortWidth(gasGap_o[1], channel_o[1]) + width_o/2;
2165 tmp_hitPos_o[
Trk::locX] = (hit_position_o);
2170 bool onSurface_o = descriptor_o[1]->surface(channelIdOut[1]).globalToLocal(position_out,position_out,loc_hitPos_o);
2172 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdWireOut Amg::Vector2D* loc_hitPos_o is null.");
2177 channelIdOut_tmp = channelIdOut[1];
◆ getRfromEtaZ()
| bool Muon::TgcRdoToPrepDataToolMT::getRfromEtaZ |
( |
const double |
eta, |
|
|
const double |
z, |
|
|
double & |
r |
|
) |
| |
|
staticprivate |
◆ getRoiRow()
◆ getSbLocOfEndcapStripBoundaryFromHiPt()
Get strip sbLoc of Endcap chamber boundary from HiPt Strip.
Definition at line 2622 of file TgcRdoToPrepDataToolMT.cxx.
2631 bool exist_hipt_s =
false;
2634 int trackletIdStripFirst{-1}, trackletIdStripSecond{-1}, trackletIdStripThird{-1};
2636 trackletIdStripSecond, trackletIdStripThird);
2644 const TgcRawData rdH(rdH0->bcTag(), rdH0->subDetectorId(), tmprodId,
2645 rdH0->l1Id(), rdH0->bcId(), rdH0->isStrip(),
2646 rdH0->isForward(), tmpsector, rdH0->chip(),
2647 rdH0->index(),rdH0->isHipt(), rdH0->hitId(),
2648 rdH0->hsub(), rdH0->delta(), rdH0->inner());
2653 (!rdH.isForward()) &&
2654 (rdH.bcTag()==rd.
bcTag()) &&
2656 (rdH.rodId()==rd.
rodId()) &&
2657 (rdH.sector()==rd.
sector())
2661 int sswId_o{0}, sbLoc_o{0}, slbId_o{0};
2668 int slbsubMatrix = 0;
2669 std::array<int, 2> bitpos_o{};
2673 int trackletIdStrip = 2*sbLoc_o + slbsubMatrix;
2676 if(trackletIdStrip!=trackletIdStripFirst && trackletIdStrip!=trackletIdStripSecond &&
2677 trackletIdStrip!=trackletIdStripThird)
continue;
2680 if(exist_hipt_s && trackletIdStrip==trackletIdStripThird)
continue;
2683 int index_w_tmp = index_w;
2684 int chip_w_tmp = chip_w;
2685 int hitId_w_tmp = hitId_w;
2687 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(
false,
2693 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Wire");
2698 int chip_s =
static_cast<int>(rdH.chip());
2699 int hitId_s =
static_cast<int>(rdH.hitId());
2700 int hsub_s =
static_cast<int>(rdH.hsub());
2703 found = cinfo->m_tgcCabling->getROINumberfromHighPtID(roi,
2713 ATH_MSG_DEBUG(
"Failed to get ROINumber from HighPtID for Strip");
2719 exist_hipt_s =
true;
2720 if(trackletIdStrip==trackletIdStripFirst)
break;
2725 return exist_hipt_s;
◆ getSbLocOfEndcapStripBoundaryFromTracklet()
Get strip sbLoc of Endcap chamber boundary from Tracklet Strip.
Definition at line 2728 of file TgcRdoToPrepDataToolMT.cxx.
2735 bool exist_tracklet_s =
false;
2738 int trackletIdStripFirst{-1}, trackletIdStripSecond{-1}, trackletIdStripThird{-1};
2740 trackletIdStripSecond, trackletIdStripThird);
2746 uint16_t tmprodId{0}, tmpsector{0};
2748 const TgcRawData rdS(rdS0->bcTag(), rdS0->subDetectorId(), tmprodId,
2749 rdS0->sswId(), rdS0->slbId(), rdS0->l1Id(),
2750 rdS0->bcId(), rdS0->slbType(), rdS0->delta(),
2751 rdS0->segment(), rdS0->subMatrix(), rdS0->position());
2753 bool isForward_s = (rdS.sswId()==7);
2754 if(isForward_s)
continue;
2758 (rdS.bcTag()==rd.
bcTag()) &&
2760 (rdS.rodId()==rd.
rodId()) &&
2761 (rdS.sswId()-3==rd.
sector())
2765 int trackletIdStrip =
static_cast<int>(2*rdS.slbId()+rdS.subMatrix());
2766 if(trackletIdStrip!=trackletIdStripFirst &&
2767 trackletIdStrip!=trackletIdStripSecond &&
2768 trackletIdStrip!=trackletIdStripThird)
continue;
2771 if(exist_tracklet_s && trackletIdStrip==trackletIdStripThird)
continue;
2774 bool found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(offlineId, rdS.subDetectorId(), rdS.rodId(),
2775 rdS.sswId(), rdS.slbId(), rdS.subMatrix(),
2776 rdS.position(),
false);
2778 ATH_MSG_DEBUG(
"Failed to get OfflineID from LowPtCoincidenceID for Strip");
2782 std::array<int, 7>
i{};
2783 std::array<bool, 2>
b{};
2784 found = cinfo->m_tgcCabling->getHighPtIDfromOfflineID(offlineId,
i[0],
i[1],
i[2],
b[0],
b[1],
i[3],
i[4],
i[5],
i[6]);
2789 ATH_MSG_DEBUG(
"Failed to get HighPtID from OfflineID for Strip");
2794 int index_w_tmp = index_w;
2795 int chip_w_tmp = chip_w;
2796 int hitId_w_tmp = hitId_w;
2797 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(rd.
isForward(),
2803 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Wire");
2807 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(rd.
isForward(),
2813 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Strip");
2818 found = cinfo->m_tgcCabling->getROINumberfromHighPtID(roi,
2828 ATH_MSG_DEBUG(
"Failed to get ROINumber from HighPtID for Strip");
2833 sbLoc = rdS.slbId();
2834 exist_tracklet_s =
true;
2835 if(trackletIdStrip==trackletIdStripFirst)
break;
2840 return exist_tracklet_s;
◆ getSLIds()
| bool Muon::TgcRdoToPrepDataToolMT::getSLIds |
( |
const bool |
isStrip, |
|
|
const TgcRawData & |
rd, |
|
|
std::array< Identifier, 3 > & |
channelId, |
|
|
int & |
index, |
|
|
int & |
chip, |
|
|
int & |
hitId, |
|
|
int & |
sub, |
|
|
int & |
sswId, |
|
|
int & |
sbLoc, |
|
|
int & |
subMatrix, |
|
|
std::array< int, 3 > & |
bitpos, |
|
|
const bool |
isBoundary = false, |
|
|
const TgcRdo * |
rdoColl = 0, |
|
|
const int |
index_w = -1, |
|
|
const int |
chip_w = -1, |
|
|
const int |
hitId_w = -1, |
|
|
const int |
sub_w = -1 |
|
) |
| const |
|
private |
Get ReadoutID of SL from RDO.
Definition at line 2503 of file TgcRdoToPrepDataToolMT.cxx.
2518 bool found = cinfo->m_tgcCabling->getHighPtIDfromROINumber(rd.
roi(),
2527 << (!
isStrip ?
"Wire" :
"Strip"));
2531 found = cinfo->m_tgcCabling->getSimHighPtIDfromRDOHighPtID(rd.
isForward(),
2537 ATH_MSG_DEBUG(
"Failed to get SimHighPtID from RDOHighPtID for "
2538 << (!
isStrip ?
"Wire" :
"Strip"));
2543 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(offlineId,
2555 << (!
isStrip ?
"Wire" :
"Strip"));
2561 std::array<int, 3> dummy_i{};
2562 found = cinfo->m_tgcCabling->getReadoutIDfromOfflineID(
channelId[1],
2570 << (!
isStrip ?
"Wire" :
"Strip"));
2581 if(!exist_tracklet_s) {
2582 ATH_MSG_DEBUG(
"Failed to find correspond Tracklet_strip for SL!!");
2594 for(
int i=0;
i<3;
i++) {
2595 if(
i==1 && (!
isStrip || !isBoundary))
continue;
2605 << (!
isStrip ?
"Wire" :
"Strip"));
2608 <<
", rodId = " << rd.
rodId()
2609 <<
", sswId = " << sswId
2610 <<
", slbId = " << sbLoc
2611 <<
", bitpos_" << (!
isStrip ?
"w" :
"s")
2612 <<
"[" <<
i <<
"] = " << bitpos[
i]);
◆ getSLLocalPosition()
Get SL local position.
Definition at line 2947 of file TgcRdoToPrepDataToolMT.cxx.
2951 if(!readout)
return nullptr;
2954 constexpr
double length = 100.;
2955 constexpr
unsigned int nRep = 10;
2956 constexpr
double dRAccuracy = 1.0E-20;
2957 constexpr
double maxLocR = 10000.;
2961 for(
unsigned int iRep=0; iRep<nRep; iRep++) {
2967 double glob_eta_c = glob_hitPos_c.eta();
2968 double glob_phi_c = glob_hitPos_c.phi();
2972 double dR = std::hypot(vector[0], vector[1]);
2987 matrix(0,0) = glob_hitPos_w.eta() - glob_eta_c;
2989 matrix(0,1) = glob_hitPos_s.eta() - glob_eta_c;
2992 bool invertible =
matrix.determinant();
◆ getSLStripGeometry()
| bool Muon::TgcRdoToPrepDataToolMT::getSLStripGeometry |
( |
const std::array< Identifier, 3 > & |
channelId_strip, |
|
|
const bool |
isBackWard, |
|
|
const bool |
isAside, |
|
|
double & |
width_strip, |
|
|
double & |
theta_strip |
|
) |
| const |
|
private |
Get strip geometry (width, theta) for SL.
Definition at line 2053 of file TgcRdoToPrepDataToolMT.cxx.
2059 std::array<const MuonGM::TgcReadoutElement*, 3> descriptor_s{muDetMgr->
getTgcReadoutElement(channelId_strip[0]),
2062 for(
int i=0;
i<3;
i++) {
2070 bool onSurface_s = descriptor_s[1]->surface(channelId_strip[1]).globalToLocal(position_s,position_s,loc_hitPos_s);
2072 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getSLStripGeometry Amg::Vector2D* loc_hitPos_s is null.");
2077 std::array<int, 3> gasGap_s, channel_s{};
2078 for(
int i=0;
i<3;
i++) {
2079 gasGap_s[
i] =
m_idHelperSvc->tgcIdHelper().gasGap(channelId_strip[
i]);
2080 channel_s[
i] =
m_idHelperSvc->tgcIdHelper().channel(channelId_strip[
i]);
2084 for(
int i=0;
i<3;
i+=2) {
2085 localPos[
i] = descriptor_s[
i]->transform(channelId_strip[
i]).inverse()
2086 *descriptor_s[
i]->channelPos(channelId_strip[
i]);
2089 bool flag_reverse =
false;
2090 std::array<int, 2> index_strip{};
2094 index_strip[0] = 2; index_strip[1] = 0; flag_reverse =
true;
2096 index_strip[0] = 0; index_strip[1] = 2; flag_reverse =
false;
2100 index_strip[0] = 0; index_strip[1] = 2; flag_reverse =
true;
2102 index_strip[0] = 2; index_strip[1] = 0; flag_reverse =
false;
2106 double stripMaxX = descriptor_s[index_strip[0]]->stripHighEdgeLocX(gasGap_s[index_strip[0]], channel_s[index_strip[0]],
2107 localPos[index_strip[0]].
z());
2108 double stripMinX = descriptor_s[index_strip[1]]->stripLowEdgeLocX(gasGap_s[index_strip[1]], channel_s[index_strip[1]],
2109 localPos[index_strip[1]].
z());
2110 width_strip = stripMaxX - stripMinX;
2111 double strip = stripMinX + width_strip/2.;
2112 if(flag_reverse)
strip *= -1.;
2117 int index_strip_gp = 0;
2118 if(!isBackward) index_strip_gp = 0;
2119 else index_strip_gp = 2;
2121 descriptor_s[index_strip_gp]->surface(channelId_strip[index_strip_gp]).localToGlobal(tmp_hitPos_s,tmp_strip_gp,tmp_strip_gp);
2122 theta_strip = atan2(tmp_strip_gp.y(), tmp_strip_gp.x());
◆ getSLWireGeometry()
| bool Muon::TgcRdoToPrepDataToolMT::getSLWireGeometry |
( |
const std::array< Identifier, 3 > & |
channelId_wire, |
|
|
double & |
width_wire, |
|
|
double & |
r_wire, |
|
|
double & |
z_wire |
|
) |
| const |
|
private |
Get wire geometry (width, r, z) for SL.
Definition at line 1984 of file TgcRdoToPrepDataToolMT.cxx.
1989 std::array<const MuonGM::TgcReadoutElement*, 3> descriptor_w{muDetMgr->
getTgcReadoutElement(channelId_wire[0]),
1992 for(
int i=0;
i<3;
i++) {
2000 bool onSurface_w = descriptor_w[2]->surface(channelId_wire[2]).globalToLocal(position_w,position_w,loc_hitPos_w);
2002 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getSLWireGeometry Amg::Vector2D* loc_hitPos_w is null.");
2007 std::array<int, 3> gasGap_w{}, channel_w{};
2008 for(
int i=0;
i<3;
i++) {
2010 channel_w[
i] =
m_idHelperSvc->tgcIdHelper().channel(channelId_wire[
i]);
2013 std::array<double,3> tmp_r_w{}, tmp_phi_w{}, tmp_eta_w{};
2015 std::array<Amg::Vector3D,3> tmp_position_w{make_array<Amg::Vector3D, 3>(
Amg::Vector3D::Zero())};
2016 for(
int i=0;
i<3;
i+=2) {
2017 tmp_position_w[
i] = descriptor_w[
i]->channelPos(channelId_wire[
i]);
2018 tmp_r_w[
i] = tmp_position_w[
i].perp();
2019 tmp_phi_w[
i] = tmp_position_w[
i].phi();
2020 tmp_eta_w[
i] = tmp_position_w[
i].eta();
2022 double half_width = descriptor_w[
i]->gangRadialLength(gasGap_w[
i], channel_w[
i])/2.;
2028 tmp_r_w[0] += half_width;
2030 tmp_r_w[2] -= half_width;
2034 bool flag_geteta_w =
getEtafromRZ(tmp_r_w[0], tmp_position_w[0].
z(), tmp_eta_w[0]);
2035 bool flag_getr_w =
getRfromEtaZ(tmp_eta_w[0], tmp_position_w[2].
z(), tmp_r_w[0]);
2036 if(!flag_geteta_w || !flag_getr_w) {
2037 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getSLWireGeometry::failed to getR on L7!!");
2040 width_wire = tmp_r_w[0] - tmp_r_w[2];
2041 double gang = descriptor_w[2]->gangShortWidth(gasGap_w[2],channel_w[2]) + width_wire/2.;
2046 descriptor_w[2]->surface(channelId_wire[2]).localToGlobal(tmp_hitPos_w,tmp_wire_gp,tmp_wire_gp);
2047 z_wire = tmp_wire_gp.z();
2048 r_wire = tmp_r_w[2] + width_wire/2.;
◆ getTrackletInfo()
| bool Muon::TgcRdoToPrepDataToolMT::getTrackletInfo |
( |
const TgcRawData & |
rd, |
|
|
int & |
tmp_slbId, |
|
|
int & |
tmp_subMatrix, |
|
|
int & |
tmp_position |
|
) |
| const |
|
private |
Retrieve slbId, subMatrix and position from Tracklet RDO.
Definition at line 1507 of file TgcRdoToPrepDataToolMT.cxx.
1510 if(tmp_subMatrix!=0 && tmp_subMatrix!=1) {
1511 ATH_MSG_DEBUG(
"getTrackletInfo: subMatrix " << tmp_subMatrix <<
" is invalid.");
1515 int tmp_sswId = rd.
sswId();
1516 tmp_slbId = rd.
slbId();
1519 int tmp_position_delta = tmp_position + rd.
delta();
1520 int tmp_slbType = rd.
slbType();
1524 if(tmp_subMatrix==1) {
1527 ATH_MSG_DEBUG(
"Expected TGC2 Strip position (" << tmp_position_delta <<
1528 ") does not exist and is changed to the edge position " << tmp_position);
1531 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId+1 <<
" doesn't exist for FWD!! (upper edge SLB of FWD:sbLoc3,11)");
1535 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId+1 <<
" doesn't exist for EWD!! (upper edge SLB of EWD:sbLoc9)");
1545 }
else if(tmp_position_delta<0) {
1547 if(tmp_subMatrix==0) {
1550 ATH_MSG_DEBUG(
"Expected TGC2 Strip position (" << tmp_position_delta <<
1551 ") does not exist and is changed to the edge position " << tmp_position);
1554 if(tmp_position_delta==-1) {
1557 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId-1 <<
" doesn't exist for FWD!! (bottom edge SLB of FWD:sbLoc0,8)");
1562 if(tmp_position_delta==-1) {
1565 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId-1 <<
" doesn't exist for EWD!! (bottom edge SLB of EWD:sbLoc0)");
1577 tmp_position = tmp_position_delta;
◆ initialize()
| StatusCode Muon::TgcRdoToPrepDataToolMT::initialize |
( |
| ) |
|
|
overridevirtual |
Standard AthAlgTool initialize method.
Definition at line 25 of file TgcRdoToPrepDataToolMT.cxx.
30 for (
int ibc=0; ibc <
NBC_HIT+1; ibc++) {
32 std::ostringstream location;
42 for (
int ibc=0; ibc <
NBC_TRIG; ibc++) {
44 std::ostringstream location;
62 ATH_MSG_INFO(
"MuonTGC_CablingSvc not yet retrieved; postpone TGCcabling initialization at first event.");
68 for (
int ibc=0; ibc <
NBC_HIT+1; ibc++) {
70 std::ostringstream location;
83 for (
int ibc=0; ibc <
NBC_TRIG; ibc++) {
85 std::ostringstream location;
100 return StatusCode::SUCCESS;
◆ isAlreadyConverted()
Check the rdo is already converted or not.
◆ isBackwardBW()
Check if a chamber in BigWheel is a backward chamber or a forward chamber.
Definition at line 1960 of file TgcRdoToPrepDataToolMT.cxx.
1962 bool isBackward =
false;
◆ isIncludedInChamberBoundary()
| bool Muon::TgcRdoToPrepDataToolMT::isIncludedInChamberBoundary |
( |
const TgcRawData & |
rd | ) |
const |
|
private |
Check SL RDO is at the chamber boundary.
Definition at line 1589 of file TgcRdoToPrepDataToolMT.cxx.
1594 (RoiRow== 3 || RoiRow== 4 ||
1595 RoiRow== 7 || RoiRow== 8 ||
1596 RoiRow==11 || RoiRow==12 ||
1597 RoiRow==23 || RoiRow==24
◆ isOfflineIdOKForTgcReadoutElement()
◆ isRequested()
Check the IdHash is already requested or not.
◆ provideEmptyContainer()
| StatusCode Muon::TgcRdoToPrepDataToolMT::provideEmptyContainer |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ selectDecoder()
◆ setupState()
| StatusCode Muon::TgcRdoToPrepDataToolMT::setupState |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
private |
clean up containers for Hits
clean up containers for Coincidence
Definition at line 146 of file TgcRdoToPrepDataToolMT.cxx.
148 const unsigned hashMax =
m_idHelperSvc->tgcIdHelper().module_hash_max();
150 for(
unsigned int ibc=0; ibc <
NBC_HIT+1; ibc++) {
156 if (!externalCachePRD) {
158 ATH_CHECK(handle.record(std::make_unique<TgcPrepDataContainer>(hashMax)));
162 state.tgcPrepDataContainer[ibc] = handle.ptr();
168 ATH_CHECK(handle.record(std::make_unique<Muon::TgcPrepDataContainer>(
update.ptr())));
170 state.tgcPrepDataContainer[ibc] = handle.ptr();
173 state.tgcPrepDataCollections[ibc].resize(hashMax);
177 for (
unsigned int ibc=0; ibc <
NBC_TRIG; ibc++) {
183 if(!externalCacheCoin) {
185 ATH_CHECK(handle.record(std::make_unique<TgcCoinDataContainer>(hashMax)));
190 ATH_CHECK(handle.record(std::make_unique<TgcCoinDataContainer>(
update.ptr())));
196 state.tgcCoinDataContainer[ibc] = handle.ptr();
197 state.tgcCoinDataCollections[ibc].resize(hashMax);
203 state.muDetMgr = detMgr.cptr();
204 return StatusCode::SUCCESS;
◆ transferData()
template<class ContType , class CollType >
| StatusCode Muon::TgcRdoToPrepDataToolMT::transferData |
( |
ContType & |
container, |
|
|
std::vector< std::unique_ptr< CollType >> && |
coll |
|
) |
| const |
|
private |
Definition at line 123 of file TgcRdoToPrepDataToolMT.cxx.
125 for (std::unique_ptr<CollType>& toMove : coll) {
126 if (!toMove)
continue;
127 const IdentifierHash
hash = toMove->identifyHash();
128 auto lock = container.getWriteHandle(
hash);
129 if(!
lock.alreadyPresent()) {
133 return StatusCode::SUCCESS;
◆ m_cablingInfo
◆ m_coinContainerCacheKeys
| TgcCoinUpdateHandles Muon::TgcRdoToPrepDataToolMT::m_coinContainerCacheKeys {this, "UpdateKeysCoin", {}} |
|
private |
◆ m_coinContainerCacheKeyStr
| Gaudi::Property<std::string> Muon::TgcRdoToPrepDataToolMT::m_coinContainerCacheKeyStr {this, "CoinCacheString", "", "Prefix for names of Coin cache collections"} |
|
private |
◆ m_decodeData
| Gaudi::Property<bool> Muon::TgcRdoToPrepDataToolMT::m_decodeData {this, "DecodeData", true} |
|
private |
◆ m_dropPrdsWithZeroWidth
| Gaudi::Property<bool> Muon::TgcRdoToPrepDataToolMT::m_dropPrdsWithZeroWidth {this, "dropPrdsWithZeroWidth", true} |
|
private |
◆ m_fillCoinData
| Gaudi::Property<bool> Muon::TgcRdoToPrepDataToolMT::m_fillCoinData {this, "FillCoinData", true} |
|
private |
◆ m_idHelperSvc
◆ m_muDetMgrKey
◆ m_nHiPtPRDs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nHiPtPRDs {0} |
|
mutableprivate |
◆ m_nHiPtRDOs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nHiPtRDOs {0} |
|
mutableprivate |
◆ m_nHitPRDs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nHitPRDs {0} |
|
mutableprivate |
◆ m_nHitRDOs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nHitRDOs {0} |
|
mutableprivate |
◆ m_nSLPRDs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nSLPRDs {0} |
|
mutableprivate |
◆ m_nSLRDOs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nSLRDOs {0} |
|
mutableprivate |
◆ m_nTrackletEIFIPRDs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nTrackletEIFIPRDs {0} |
|
mutableprivate |
◆ m_nTrackletEIFIRDOs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nTrackletEIFIRDOs {0} |
|
mutableprivate |
◆ m_nTrackletPRDs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nTrackletPRDs {0} |
|
mutableprivate |
◆ m_nTrackletRDOs
| std::atomic<long> Muon::TgcRdoToPrepDataToolMT::m_nTrackletRDOs {0} |
|
mutableprivate |
◆ m_outputCoinCollectionLocation
| Gaudi::Property<std::string> Muon::TgcRdoToPrepDataToolMT::m_outputCoinCollectionLocation {this, "OutputCoinCollection", "TrigT1CoinDataCollection"} |
|
private |
◆ m_outputCoinKeys
◆ m_outputCollectionLocation
| Gaudi::Property<std::string> Muon::TgcRdoToPrepDataToolMT::m_outputCollectionLocation {this, "OutputCollection", "TGC_Measurements"} |
|
private |
◆ m_outputprepdataKeys
◆ m_prdContainerCacheKeys
| TgcPrdUpdateHandles Muon::TgcRdoToPrepDataToolMT::m_prdContainerCacheKeys {this, "UpdateKeysPrd", {}} |
|
private |
◆ m_prdContainerCacheKeyStr
| Gaudi::Property<std::string> Muon::TgcRdoToPrepDataToolMT::m_prdContainerCacheKeyStr {this, "PrdCacheString", "", "Prefix for names of PRD cache collections"} |
|
private |
◆ m_rdoContainerKey
◆ m_show_warning_level_invalid_A09_SSW6_hit
| Gaudi::Property<bool> Muon::TgcRdoToPrepDataToolMT::m_show_warning_level_invalid_A09_SSW6_hit {this, "show_warning_level_invalid_A09_SSW6_hit", false} |
|
private |
Switch for error message disabling on one invalid channel in sector A09 seen in 2008 data, at least run 79772 - 91800.
bug #48828: TgcRdoToTgcDigit WARNING ElementID not found for sub=103 rod=9 ssw=6 slb=20 bitpos=151 +offset=0 orFlag=0
Definition at line 391 of file TgcRdoToPrepDataToolMT.h.
◆ m_tgcOffset
| Gaudi::Property<int> Muon::TgcRdoToPrepDataToolMT::m_tgcOffset {this, "TGCHashIdOffset", 26000} |
|
private |
◆ m_xAODKey
◆ NBC_HIT
| constexpr int Muon::TgcRdoToPrepDataToolMT::NBC_HIT = 3 |
|
staticconstexprprivate |
The number of recorded Bunch Crossings (BCs) FOR HITS is 3 (Previous, Current, and Next BCs)
Definition at line 78 of file TgcRdoToPrepDataToolMT.h.
◆ NBC_TRIG
| constexpr int Muon::TgcRdoToPrepDataToolMT::NBC_TRIG = 4 |
|
staticconstexprprivate |
◆ s_cutDropPrdsWithZeroWidth
| const double Muon::TgcRdoToPrepDataToolMT::s_cutDropPrdsWithZeroWidth = 0.1 |
|
staticprivate |
The documentation for this class was generated from the following files:
static constexpr uint32_t RPC_BCID_BIT
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
static constexpr uint32_t INNER_RPC_DPHI_BITSHIFT
constexpr uint8_t stationPhi
station Phi 1 to 8
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
static constexpr uint32_t NSW_INPUT_BITSHIFT
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
uint16_t innerflag() const
void setChannelNumber(uint16_t chan)
Set the strip or wire group number of the measurement.
static constexpr uint32_t INNER_TILE_BCID_BITSHIFT
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
void setGasGap(uint8_t gapNum)
Set the gas gap number of the measurement [1-N].
Scalar phi() const
phi method
bool isCoincidence() const
std::string find(const std::string &s)
return a remapped string
static uint16_t calculateOnlineId(uint16_t subDetectorId, uint16_t rodId)
double stripHighEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the right edge of the strip at a given local radial position.
Scalar eta() const
pseudorapidity method
Eigen::Matrix< double, 2, 1 > Vector2D
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
static constexpr uint32_t NSW_BCID_BITSHIFT
static constexpr uint32_t INNER_RPC_PHI_BITSHIFT
@ loc2
generic first and second local coordinate
static constexpr uint32_t INNER_NSW_BCID_BITSHIFT
uint16_t subDetectorId() const
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
static constexpr uint32_t INNER_RPC_DETA_BITSHIFT
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
double stripLowEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the left edge of the strip at a given local radial position.
#define AmgSymMatrix(dim)
static constexpr uint32_t NSW_INPUT_BIT
static constexpr uint32_t INNER_NSW_INPUT_BITSHIFT
static constexpr uint32_t INNER_NSW_ID_BITSHIFT
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
uint16_t subMatrix() const
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
static constexpr uint32_t INNER_NSW_PHIRES_BITSHIFT
double gangLongWidth(int gasGap, int gang) const
Returns the length of the most top wire in the gang.
virtual bool containsId(const Identifier &id) const override
double stripWidth(int gasGap, int strip) const
Returns the width of a given strip in the gasGap i.
void setBcBitMap(uint16_t)
Set the bunch crossing-id map.
::StatusCode StatusCode
StatusCode definition for legacy code.
double gangShortWidth(int gasGap, int gang) const
Returns the length of the most bottom wire in the gang.
static constexpr uint32_t RPC_FLAG_BITSHIFT
CalibratedSpacePoint::State State
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
static constexpr uint32_t INNER_RPC_ETA_BITSHIFT
Bit info in int inner for the RPC inner-coincidence.
static constexpr uint32_t INNER_TILE_MODULE_BITSHIFT
Bit info in int inner for the Tile inner-coincidence.
static constexpr uint32_t INNER_NSW_DTHETA_BITSHIFT
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
void setMeasuresPhi(uint8_t measPhi)
Set the measures phi flag of the measurement to true /false.
uint16_t nswlowres() const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static constexpr uint32_t INNER_RPC_BCID_BITSHIFT
uint16_t position() const
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
uint16_t threshold() const
StatusCode initialize(bool used=true)
forward the initialization to the member VarHandleKeys
static constexpr uint32_t INNER_NSW_R_BITSHIFT
Bit info in int inner for the NSW inner-coincidence.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
static constexpr uint32_t INNER_RPC_FLAG_BITSHIFT
IdentifierHash identifyHash() const
uint16_t coinflag() const
uint16_t nswdtheta() const
uint16_t tmdbbcid() const
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
static constexpr uint32_t RPC_FLAG_BIT
An unit object of TGC ROD output.
unsigned bcTag(unsigned bcBitMap)
static constexpr uint32_t INNER_EIFI_FI_BITSHIFT
static constexpr uint32_t NSW_BCID_BIT
void setIdentifier(Identifier id)
uint16_t nswphires() const
static constexpr uint32_t INNER_NSW_PHI_BITSHIFT
Eigen::Matrix< float, N, N > MeasMatrix
std::vector< std::string > veto
these patterns are anded
uint8_t measuresPhi() const
Does the object belong to an eta or a phi measurement (si /no)
constexpr uint8_t stationEta
1 to 3
static constexpr uint32_t RPC_BCID_BITSHIFT
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
static constexpr uint32_t INNER_EIFI_CID_BITSHIFT
size_type size() const noexcept
Returns the number of elements in the collection.
static constexpr uint32_t INNER_NSW_LOWRES_BITSHIFT
static constexpr uint32_t INNER_EIFI_EI_BITSHIFT
Bit info in int inner for the EI/FI inner-coincidence.