|
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()
Muon::TgcRdoToPrepDataToolMT::TgcRdoToPrepDataToolMT |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~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.)
Definition at line 210 of file TgcRdoToPrepDataToolMT.cxx.
219 ATH_CHECK(xAODHandle.record(std::make_unique<xAOD::TgcStripContainer>(),
220 std::make_unique<xAOD::TgcStripAuxContainer>()));
223 int sizeVectorRequested = requestedIdHashVect.size();
224 ATH_MSG_DEBUG(
"decode for " << sizeVectorRequested <<
" offline collections called");
228 return StatusCode::FAILURE;
232 std::set<const TgcRdo*> decodedRdoCollVec{}, rdoCollVec{};
233 std::vector<bool> decodedOnlineId (cinfo->m_MAX_N_ROD,
false);
237 ATH_MSG_DEBUG(
"Stored empty container. Decoding TGC RDO into TGC PrepRawData is switched off");
238 return StatusCode::SUCCESS;
248 if(rdoContainer->empty()) {
250 ATH_MSG_DEBUG(
"Empty rdo container - no tgc rdo in this event");
251 return StatusCode::SUCCESS;
254 ATH_MSG_DEBUG(
"Not empty rdo container in this event, the container size is " << rdoContainer->size());
257 if(sizeVectorRequested!=0) {
258 unsigned int nRdo = 0;
259 for (IdentifierHash offlineCollHash : requestedIdHashVect) {
260 uint16_t onlineId = cinfo->m_hashToOnlineId.at(
static_cast<unsigned int>(offlineCollHash));
262 if(decodedOnlineId.at(onlineId)) {
263 ATH_MSG_DEBUG(
"The ROB with onlineId " << onlineId <<
" which contains hash "
264 <<
static_cast<unsigned int>(offlineCollHash)
265 <<
" is already decoded and skipped");
269 decodedOnlineId.at(onlineId) =
true;
271 for(
const TgcRdo* rdoColl : *rdoContainer) {
272 if(rdoColl->identify()==onlineId) {
273 if(!decodedRdoCollVec.count(rdoColl)) {
274 rdoCollVec.insert(rdoColl);
285 if(sizeVectorRequested!=0) {
289 for (
const TgcRdo* rdo : rdoCollVec) {
294 if(!cinfo->m_tgcCabling->getElementIDfromReadoutID(offlineId, rd->subDetectorId(),
295 rd->rodId(), rd->sswId(), rd->slbId(),
299 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(offlineId);
300 if (
std::find(requestedIdHashVect.begin(), requestedIdHashVect.end(), tgcHashId) == requestedIdHashVect.end()){
305 decodedRdoCollVec.insert(rdo);
309 for(
const TgcRdo* rdoColl : *rdoContainer) {
310 if (rdoColl->empty() || decodedRdoCollVec.count(rdoColl) || rdoCollVec.count(rdoColl)) {
313 ATH_MSG_DEBUG(
" Number of RawData in this rdo " << rdoColl->size());
317 decodedRdoCollVec.insert(rdoColl);
321 std::set<IdentifierHash> hashesInAnyBC;
322 for(
unsigned int ibc = 0; ibc <
NBC_HIT; ++ibc) {
329 for (std::unique_ptr<TgcPrepDataCollection>& bcColl : state.tgcPrepDataCollections[ibc]) {
330 if (!bcColl)
continue;
331 std::unique_ptr<TgcPrepDataCollection>& allBcColl = state.tgcPrepDataCollections[
NBC_HIT][bcColl->identifyHash()];
333 allBcColl = std::make_unique<TgcPrepDataCollection>(bcColl->identifyHash());
334 allBcColl->setIdentifier(bcColl->identify());
336 hashesInAnyBC.insert(bcColl->identifyHash());
337 for (
const TgcPrepData* prdToUpdate : *bcColl) {
338 auto search_itr = std::find_if(allBcColl->begin(), allBcColl->end(),
339 [prdToUpdate](
const TgcPrepData* prd){
340 return prd->identify() == prdToUpdate->identify();
342 if (search_itr == allBcColl->end()) {
343 auto allBcPrd = std::make_unique<TgcPrepData>(*prdToUpdate);
344 allBcPrd->setHashAndIndex(allBcColl->identifyHash(), allBcColl->size());
345 allBcPrd->setBcBitMap(bcBitMap);
346 allBcColl->push_back(std::move(allBcPrd));
349 const uint16_t bcBitMap_current = allBcPrd->getBcBitMap();
351 <<
" adding " << bcBitMap <<
" to get " << (bcBitMap_current | bcBitMap));
352 allBcPrd->setBcBitMap((bcBitMap_current | bcBitMap));
359 for (std::unique_ptr<TgcPrepDataCollection>& allBcColl : state.tgcPrepDataCollections[
NBC_HIT]) {
360 if (!allBcColl)
continue;
361 for (
const TgcPrepData* allBcPrd : *allBcColl) {
362 xAOD::TgcStrip* tgcStrip = xAODHandle->push_back(std::make_unique<xAOD::TgcStrip>());
364 tgcStrip->
setGasGap(idHelper.gasGap(allBcPrd->identify()));
375 for (
unsigned int k = 0 ;
k < state.tgcPrepDataContainer.size(); ++
k){
378 for (
unsigned int k = 0 ;
k < state.tgcCoinDataContainer.size(); ++
k) {
381 ATH_MSG_DEBUG(
"Found " << hashesInAnyBC.size() <<
" hashes that must be added to AllBC container");
383 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 894 of file TgcRdoToPrepDataToolMT.cxx.
902 const TgcRawData rd(rd0.bcTag(), rd0.subDetectorId(), tmprodId,
903 rd0.l1Id(), rd0.bcId(), rd0.isStrip(),
904 rd0.isForward(), tmpsector, rd0.chip(),
905 rd0.index(), rd0.isHipt(), rd0.hitId(),
906 rd0.hsub(), rd0.delta(), rd0.inner());
910 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeHiPt::Unknown subDetectorId!!");
911 return StatusCode::SUCCESS;
916 ATH_MSG_DEBUG(
"Invalid hitId_rdo_hipt, hitId == 0!! skip to convert this RDO to PRD");
917 return StatusCode::SUCCESS;
919 int slbsubMatrix = 0;
926 std::array<Identifier, 2> channelIdOut{};
927 std::array<int, 2> bitpos_o{}, slbchannel_o{};
928 int sswId_o{0}, sbLoc_o{0}, slbId_o{0};
931 std::array<Identifier, 4> channelIdIn{};
932 std::array<int, 4> bitpos_i{}, slbchannel_i{};
933 int sswId_i{0}, sbLoc_i{0};
935 std::array<int, 4> slbId_in {}, sbLoc_in{};
937 std::array<int, 4> gasGap_i{}, channel_i{};
938 double width_i{0.},hit_position_i{0};
941 std::array<int, 2> gasGap_o{}, channel_o{};
942 double width_o{0.}, hit_position_o{0.};
952 return StatusCode::SUCCESS;
961 for(
int i=0;
i<2;
i++) {
963 sswId_o, sbLoc_o, bitpos_o[
i]);
965 ATH_MSG_DEBUG(
"Failed to get OfflineID from ReadoutID for Pivot " << (rd.
isStrip() ?
"Strip" :
"Wire") <<
".");
966 return StatusCode::SUCCESS;
976 getBitPosInWire(rd, deltaBeforeConvert, bitpos_i, slbchannel_i, slbId_in, sbLoc_in, sswId_i, bitpos_o,
977 slbchannel_o, slbId_o);
979 getBitPosInStrip(rd, deltaBeforeConvert, bitpos_i, slbchannel_i, sbLoc_i, sswId_i, bitpos_o, slbchannel_o);
981 for(
int i=0;
i<4;
i++) {
983 rd.
isStrip() ? sbLoc_i : sbLoc_in[
i],
986 ATH_MSG_DEBUG(
"Failed to get OfflineID from ReadoutID for Pivot "
987 << (rd.
isStrip() ?
"Strip" :
"Wire") <<
".");
988 return StatusCode::SUCCESS;
996 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdOut[1]);
1000 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1001 if (!coincollection) {
1002 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1008 std::array<const MuonGM::TgcReadoutElement*, 2> descriptor_o{state.muDetMgr->getTgcReadoutElement(channelIdOut[0]),
1009 state.muDetMgr->getTgcReadoutElement(channelIdOut[1])};
1010 for(
int i=0;
i<2;
i++) {
1012 return StatusCode::SUCCESS;
1017 for(
int i=0;
i<2;
i++) {
1018 gasGap_o[
i] = idHelper.gasGap(channelIdOut[
i]);
1019 channel_o[
i] = idHelper.channel(channelIdOut[
i]);
1024 gasGap_o, channel_o,
1025 width_o, hit_position_o, tmp_hitPos_o,
1029 gasGap_o, channel_o,
1030 width_o, hit_position_o, tmp_hitPos_o,
1035 return StatusCode::SUCCESS;
1038 return StatusCode::SUCCESS;
1041 descriptor_oo = state.muDetMgr->getTgcReadoutElement(channelIdOut_tmp);
1043 return StatusCode::SUCCESS;
1050 std::array<const MuonGM::TgcReadoutElement*, 4> descriptor_i{state.muDetMgr->getTgcReadoutElement(channelIdIn[0]),
1051 state.muDetMgr->getTgcReadoutElement(channelIdIn[1]),
1052 state.muDetMgr->getTgcReadoutElement(channelIdIn[2]),
1053 state.muDetMgr->getTgcReadoutElement(channelIdIn[3])};
1054 for(
int i=0;
i<4;
i++) {
1056 return StatusCode::SUCCESS;
1059 for(
int i=0;
i<4;
i++) {
1060 gasGap_i[
i] = idHelper.gasGap(channelIdIn[
i]);
1061 channel_i[
i] = idHelper.channel(channelIdIn[
i]);
1066 gasGap_i, channel_i,
1067 width_i, hit_position_i, tmp_hitPos_i,
1071 gasGap_i, channel_i,
1072 width_i, hit_position_i, tmp_hitPos_i,
1077 return StatusCode::SUCCESS;
1080 return StatusCode::SUCCESS;
1083 descriptor_ii = state.muDetMgr->getTgcReadoutElement(channelIdIn_tmp);
1085 return StatusCode::SUCCESS;
1090 int trackletId = 2*sbLoc_o + slbsubMatrix;
1091 int delta =
static_cast<int>(rd.
delta());
1092 int hsub =
static_cast<int>(rd.
hsub());
1093 int inner =
static_cast<int>(rd.
inner());
1096 for (
const TgcCoinData* tgcCoinData : *coincollection) {
1098 (channelIdOut_tmp==tgcCoinData->identify()) &&
1099 (channelIdIn_tmp==tgcCoinData->channelIdIn()) &&
1100 (trackletId==tgcCoinData->trackletId()) &&
1101 (delta==tgcCoinData->delta()) &&
1102 (hsub==tgcCoinData->sub()) &&
1103 (inner==tgcCoinData->inner())) {
1104 if(38<=trackletId && trackletId<=41) {
1109 return StatusCode::SUCCESS;
1113 auto hitPos_o = std::make_unique<Amg::Vector2D>(tmp_hitPos_o);
1114 auto hitPos_i = std::make_unique<Amg::Vector2D>(tmp_hitPos_i);
1116 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn_tmp,
1123 idHelper.stationPhi(channelIdOut_tmp),
1136 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
1137 coincollection->push_back(newCoinData);
1143 return StatusCode::SUCCESS;
◆ decodeHits()
Decode RDO's of Hit.
Definition at line 428 of file TgcRdoToPrepDataToolMT.cxx.
433 bool isConverted{
false}, isDuplicated{
false}, isInvalid{
false};
436 <<
" rod=" << rd.
rodId() <<
" ssw=" << rd.
sswId()
437 <<
" slb=" << rd.
slbId() <<
" bitpos=" << rd.
bitpos());
448 for(
int iOr=0; iOr<2; iOr++) {
455 if(o_found) orFlag =
true;
461 bool e_found = cinfo->m_tgcCabling->getElementIDfromReadoutID(elementId,
467 bool show_warning_level =
true;
483 if (msgLvl(show_warning_level ? MSG::WARNING :
MSG::DEBUG)){
484 msg(show_warning_level ? MSG::WARNING :
MSG::DEBUG) <<
"ElementID not found for "
486 <<
" slb=" << rd.
slbId() <<
" bitpos=" << rd.
bitpos() <<
" orFlag=" << orFlag <<
endmsg;
491 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(elementId);
494 bool c_found = cinfo->m_tgcCabling->getOfflineIDfromReadoutID(
channelId,
502 <<
" ssw=" << rd.
sswId()<<
" slb=" << rd.
slbId()
503 <<
" bitpos=" << rd.
bitpos()<<
" orFlag=" << orFlag);
509 std::unique_ptr<TgcPrepDataCollection>& collection = state.tgcPrepDataCollections[locId][tgcHashId];
511 collection = std::make_unique<TgcPrepDataCollection>(tgcHashId);
512 collection->setIdentifier(elementId);
514 const bool duplicate = std::find_if(collection->begin(), collection->end(),
516 return prd->identify() == channelId;
517 }) != collection->end();
530 std::vector<Identifier> identifierList{
channelId};
537 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeHits Amg::Vector2D* hitPos is null.");
548 ATH_MSG_WARNING(
"decodeHits: width= " <<
width <<
" is smaller than s_cutDropPrdsWithZeroWidth= "
552 double errPos =
width/std::sqrt(12.);
556 mat *= errPos*errPos;
566 newPrepData->setHashAndIndex(collection->identifyHash(), collection->size());
567 collection->push_back(newPrepData);
572 else if(isDuplicated || isInvalid)
m_nHitRDOs--;
574 return StatusCode::SUCCESS;
◆ decodeInner()
Decode RDO's of Inner.
Definition at line 1146 of file TgcRdoToPrepDataToolMT.cxx.
1151 return StatusCode::FAILURE;
1156 if(subDetectorId!=
ASIDE && subDetectorId!=
CSIDE) {
1157 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeHiPt::Unknown subDetectorId!!");
1158 return StatusCode::SUCCESS;
1161 bool isInner = ((rd.
sector() & 4) != 0 );
1167 int sbLoc_o = rd.
sector() & 3;
1168 int inner = rd.
inner();
1171 int phi = 0;
bool isAside =
false;
bool isEndcap =
false;
1172 if(rd.
rodId() < 13){
1173 cinfo->m_tgcCabling->getSLIDfromReadoutID(phi, isAside, isEndcap, subDetectorId,
1174 rd.
rodId(), sswId_o, sbLoc_o);
1177 cinfo->m_tgcCabling->getSLIDfromSReadoutID(phi, isAside, subDetectorId, rd.
rodId(), sbLoc_o, rd.
isForward());
1180 isInner =
true;
isStrip =
false;
1190 isInner =
true;
isStrip =
true;
1198 isInner =
false;
isStrip =
false;
1203 isInner =
false;
isStrip =
true;
1222 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(elementId);
1224 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1225 if (!coincollection) {
1226 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1230 ATH_MSG_DEBUG(
"Inner Data Word, phi: " << phi <<
" isAside: " << isAside <<
" isEndcap: " << isEndcap
1231 <<
" subDetectorId: " << subDetectorId <<
" isStrip: " << rd.
isStrip()
1232 <<
" rodId: " << rd.
rodId() <<
" slbId: " << sbLoc_o <<
" inner:"<< rd.
inner());
1234 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
1254 newCoinData->setHashAndIndex(coincollection->
identifyHash(), coincollection->
size());
1257 ATH_MSG_DEBUG(
"coincollection->push_back done (for Inner)");
1261 return StatusCode::SUCCESS;
◆ decodeSL()
Decode RDO's of SectorLogic.
Definition at line 1264 of file TgcRdoToPrepDataToolMT.cxx.
1270 const TgcRawData rd(rd0.bcTag(), rd0.subDetectorId(), tmprodId, rd0.l1Id(),rd0.bcId(),
1271 rd0.isForward(), tmpsector, rd0.innerflag(), rd0.coinflag(),
1272 rd0.isMuplus(), rd0.threshold(), rd0.roi());
1276 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::decodeSL::Unknown subDetectorId!!");
1277 return StatusCode::SUCCESS;
1282 std::array<Identifier, 3> channelId_wire{};
1283 int index_w{0}, chip_w{0}, hitId_w{0}, sub_w{0}, sswId_w{0}, sbLoc_w{0}, subMatrix_w{0};
1284 std::array<int, 3> bitpos_w{};
1287 found =
getSLIds(
false, rd, channelId_wire, index_w, chip_w, hitId_w, sub_w, sswId_w, sbLoc_w,
1288 subMatrix_w, bitpos_w);
1290 return StatusCode::SUCCESS;
1293 std::array<Identifier, 3> channelId_strip{};
1294 int index_s{0}, chip_s{0}, hitId_s{0}, sub_s{0}, sswId_s{0}, sbLoc_s{0}, subMatrix_s{0};
1295 std::array<int, 3> bitpos_s{};
1298 found =
getSLIds(
true, rd, channelId_strip, index_s, chip_s, hitId_s, sub_s, sswId_s, sbLoc_s, subMatrix_s,
1301 return StatusCode::SUCCESS;
1306 const IdentifierHash tgcHashId=
m_idHelperSvc->moduleHash(channelId_wire[1]);
1311 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
1312 if (!coincollection) {
1313 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
1318 int trackletId = 2*sbLoc_w + subMatrix_w;
1319 int trackletIdStrip = 2*sbLoc_s + subMatrix_s;
1320 int roi =
static_cast<int>(rd.
roi());
1323 pt += (
static_cast<int>( rd.
coinflag() ) << 4 );
1327 bool isPositiveDeltaR = rd.
isMuplus();
1330 for (
const TgcCoinData* tgcCoinData : *coincollection) {
1332 trackletId==tgcCoinData->trackletId() && trackletIdStrip==tgcCoinData->trackletIdStrip() &&
1333 roi==tgcCoinData->roi() &&
pt==tgcCoinData->pt() &&
veto==tgcCoinData->veto() &&
1334 isPositiveDeltaR==tgcCoinData->isPositiveDeltaR()) {
1337 return StatusCode::SUCCESS;
1342 double width_w{0.}, tmp_r{0.}, tmp_wire_z{0.};
1345 return StatusCode::SUCCESS;
1348 return StatusCode::SUCCESS;
1351 double tmp_eta = 0.;
1352 bool isGoodEta =
getEtafromRZ(tmp_r, tmp_wire_z, tmp_eta);
1354 ATH_MSG_WARNING(
"Conversion from r and z to eta by Muon::TgcRdoToPrepDataToolMT::getEtafromRZ failed.");
1355 return StatusCode::SUCCESS;
1357 if(tmp_wire_z<0.) tmp_eta *= -1.;
1361 double width_s{0.}, tmp_phi{0.};
1364 return StatusCode::SUCCESS;
1367 return StatusCode::SUCCESS;
1372 return StatusCode::SUCCESS;
1377 bool onSurface = descriptor_w2->
surface(channelId_wire[2]).
globalToLocal(tmp_gp,tmp_gp,tmp_hitPos);
1393 TgcCoinData* newCoinData =
new TgcCoinData(channelId_wire[2],
1410 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
1411 coincollection->push_back(newCoinData);
1415 return StatusCode::SUCCESS;
◆ decodeTracklet()
StatusCode Muon::TgcRdoToPrepDataToolMT::decodeTracklet |
( |
State & |
state, |
|
|
const TgcRawData & |
rd |
|
) |
| const |
|
private |
Decode RDO's of Tracklet.
Definition at line 577 of file TgcRdoToPrepDataToolMT.cxx.
586 found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(channelIdOut,
592 return StatusCode::SUCCESS;
597 int tmp_slbId{0}, tmp_subMatrix{0}, tmp_position{0};
600 return StatusCode::SUCCESS;
603 found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(channelIdIn,
605 rd.
sswId(), tmp_slbId,
606 tmp_subMatrix, tmp_position,
true);
609 return StatusCode::SUCCESS;
613 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdOut);
618 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
619 if (!coincollection) {
620 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
624 int subMatrix =
static_cast<int>(rd.
subMatrix());
625 int trackletId =
static_cast<int>(2*rd.
slbId()+subMatrix);
626 int delta =
static_cast<int>(rd.
delta());
629 for (
const TgcCoinData* tgcCoinData : *coincollection) {
631 channelIdOut==tgcCoinData->identify() &&
632 channelIdIn==tgcCoinData->channelIdIn() &&
633 trackletId==tgcCoinData->trackletId() &&
634 delta==tgcCoinData->delta() &&
635 subMatrix==tgcCoinData->sub()) {
638 return StatusCode::SUCCESS;
647 return StatusCode::SUCCESS;
651 int gasGap_o = idHelper.gasGap(channelIdOut);
652 int channel_o = idHelper.channel(channelIdOut);
653 double width_o = !idHelper.isStrip(channelIdOut) ? descriptor_o->
gangRadialLength(gasGap_o, channel_o)
654 : descriptor_o->
stripWidth(gasGap_o, channel_o);
657 return StatusCode::SUCCESS;
662 bool onSurface_o = descriptor_o->
surface(channelIdOut).
globalToLocal(position_o,position_o,hitPos_o);
665 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTracklet Amg::Vector2D* hitPos_o is null.");
666 return StatusCode::SUCCESS;
673 return StatusCode::SUCCESS;
676 int gasGap_i = idHelper.gasGap(channelIdIn);
677 int channel_i = idHelper.channel(channelIdIn);
678 double width_i = !idHelper.isStrip(channelIdIn) ? descriptor_i->
gangRadialLength(gasGap_i, channel_i)
679 : descriptor_i->
stripWidth(gasGap_i, channel_i);
682 return StatusCode::SUCCESS;
687 bool onSurface_i = descriptor_i->
surface(channelIdIn).
globalToLocal(position_i,position_i,hitPos_i);
690 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTracklet Amg::Vector2D* hitPos_i is null.");
691 return StatusCode::SUCCESS;
697 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
704 idHelper.stationPhi(channelIdOut),
707 idHelper.isStrip(channelIdOut),
716 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
717 coincollection->push_back(newCoinData);
723 return StatusCode::SUCCESS;
◆ decodeTrackletEIFI()
StatusCode Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI |
( |
State & |
state, |
|
|
const TgcRawData & |
rd |
|
) |
| const |
|
private |
Decode RDO's of Tracklet EIFI.
Definition at line 726 of file TgcRdoToPrepDataToolMT.cxx.
739 bool isForward = (rd.
slbId()%2==0);
748 int slot = ((rd.
slbId()/2) + (rd.
rodId()-2)*2 + 23)%24 + 1;
750 bool isBackward =
false;
754 isBackward = !isAside;
755 }
else if(slot==16) {
756 isBackward = isAside;
760 if(isAside) isBackward = (slot%3==2);
761 else isBackward = (slot%3!=2);
764 isBackward = isAside;
774 int tmpsubMatrix =
static_cast<int>(rd.
subMatrix());
776 if(tmpsubMatrix==3) {
777 if(slot== 1 || slot== 3 || slot== 4 || slot== 5 || slot== 6 || slot== 7 || slot== 8 ||
778 slot==10 || slot==11 || slot==13 || slot==18 || slot==19 || slot==20) {
782 }
else if(tmpsubMatrix==2) {
783 if(slot== 2 || slot==12 || slot==14 || slot==15 || slot==16 || slot==22 || slot==23 || slot==24) {
803 bool o_found = cinfo->m_tgcCabling->getOfflineIDfromReadoutID(channelIdIn,
808 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI OfflineID not found for "
810 <<
" sswId=" << rd.
sswId()<<
" slbId=" << rd.
slbId() <<
" slbType=" << rd.
slbType()
811 <<
" subMatrix=" << rd.
subMatrix() <<
" bitpos=" << bitpos <<
" isStrip=" <<
isStrip
812 <<
" isAside=" << isAside<<
" isForward=" << isForward<<
" slot=" << slot
813 <<
" isBackward=" << isBackward);
814 return StatusCode::SUCCESS;
819 const IdentifierHash tgcHashId =
m_idHelperSvc->moduleHash(channelIdIn);
823 std::unique_ptr<Muon::TgcCoinDataCollection>& coincollection = state.tgcCoinDataCollections[locId][tgcHashId];
824 if (!coincollection) {
825 coincollection = std::make_unique<Muon::TgcCoinDataCollection>(tgcHashId);
830 for (
const TgcCoinData* tgcCoinData : *coincollection) {
832 channelIdIn==tgcCoinData->channelIdIn() &&
833 static_cast<int>(rd.
subMatrix())==tgcCoinData->sub()) {
835 return StatusCode::SUCCESS;
841 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI descriptor doesn't contain "
843 return StatusCode::SUCCESS;
852 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::decodeTrackletEIFI Amg::Vector2D* hitPos is null.");
853 return StatusCode::SUCCESS;
857 int gasGap = idHelper.gasGap(channelIdIn);
858 int channel = idHelper.channel(channelIdIn);
861 double localZ = (descriptor->
transform(channelIdIn).inverse()*descriptor->
channelPos(channelIdIn)).
z();
864 width = std::abs(stripMaxX - stripMinX);
866 int positiveOffset = +4;
867 if(isForward && (slot%3==2) &&
channel==28) positiveOffset = +2;
870 width = std::abs(gangMaxZ - gangMinZ);
875 TgcCoinData* newCoinData =
new TgcCoinData(channelIdIn,
886 newCoinData->setHashAndIndex(coincollection->identifyHash(), coincollection->size());
887 coincollection->push_back(newCoinData);
891 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 1769 of file TgcRdoToPrepDataToolMT.cxx.
1781 int rdochIn_min = 0;
1786 }
else if(rd.
chip()==1) {
1792 }
else if(rd.
chip()==1) {
1797 for(
int i=0;
i<2;
i++) {
1799 slbchannel_i[
i] = slbchannel_o[
i] + deltaBeforeConvert;
1800 if(slbchannel_i[
i]>rdochIn_max) {
1801 slbchannel_i[
i] = rdochIn_max;
1802 }
else if(slbchannel_i[
i]<rdochIn_min) {
1803 slbchannel_i[
i] = rdochIn_min;
1807 slbchannel_i[
i+2] = slbchannel_i[
i] + 1;
1809 slbchannel_i[
i+2] = slbchannel_i[
i] - 1;
1812 if(slbchannel_i[
i+2] > rdochIn_max) {
1813 slbchannel_i[
i+2] = rdochIn_max;
1814 }
else if(slbchannel_i[
i+2] < rdochIn_min) {
1815 slbchannel_i[
i+2] = rdochIn_min;
1823 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 1656 of file TgcRdoToPrepDataToolMT.cxx.
1666 const int NUM_SLBID_SBLOC_OFFSET_WT = 8;
1670 int rdochIn_max = 0;
1671 int rdochIn_min = 0;
1683 int tmp_rdochannel_i = 0;
1684 int tmp_rdochannel_i2 = 0;
1685 for(
int i=0;
i<2;
i++) {
1687 tmp_rdochannel_i =
WD_MAP_SIZE*slbId_o + slbchannel_o[
i] + deltaBeforeConvert + offset_dt;
1688 if(tmp_rdochannel_i>rdochIn_max) {
1689 tmp_rdochannel_i = rdochIn_max;
1690 }
else if(tmp_rdochannel_i<rdochIn_min) {
1691 tmp_rdochannel_i = rdochIn_min;
1707 tmp_rdochannel_i2 = (tmp_rdochannel_i/3)*3 + 2;
1709 tmp_rdochannel_i2 = ((tmp_rdochannel_i + 1)/3)*3 - 1;
1712 if(tmp_rdochannel_i2>rdochIn_max) {
1713 tmp_rdochannel_i2 = rdochIn_max;
1714 }
else if(tmp_rdochannel_i2<rdochIn_min) {
1715 tmp_rdochannel_i2 = rdochIn_min + 2;
1721 sbLoc_in[
i] = slbId_in[
i];
1722 sbLoc_in[
i+2] = slbId_in[
i+2];
1726 sbLoc_in[
i] += NUM_SLBID_SBLOC_OFFSET_WT;
1727 sbLoc_in[
i+2] += NUM_SLBID_SBLOC_OFFSET_WT;
1738 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 1893 of file TgcRdoToPrepDataToolMT.cxx.
1903 if((hitId_s%2)==0) {
1909 }
else if(sub_s==1) {
1914 }
else if((hitId_s%2)==1) {
1920 }
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 1829 of file TgcRdoToPrepDataToolMT.cxx.
1846 if(RoiRow==0 && !isForward) {
1851 }
else if(RoiRow==36 && !isForward) {
1856 }
else if(RoiRow==0 && isForward) {
1861 }
else if(RoiRow==15 && isForward) {
1867 if((hitId_w%2)==0) {
1873 }
else if(sub_w==1) {
1884 }
else if(sub_w==1) {
◆ getCabling()
Definition at line 2909 of file TgcRdoToPrepDataToolMT.cxx.
2917 cinfo.m_tgcCabling = service(
"MuonTGC_CablingSvc");
2918 if (!cinfo.m_tgcCabling) {
2926 unsigned int hashId_max =
m_idHelperSvc->tgcIdHelper().module_hash_max();
2927 cinfo.m_hashToOnlineId.reserve(hashId_max);
2930 int subDetectorId = 0;
2933 for(
unsigned int hashId=0; hashId<hashId_max; hashId++) {
2934 IdentifierHash
hash(hashId);
2936 cinfo.m_tgcCabling->getReadoutIDfromElementID(elementId, subDetectorId, rodId);
2939 cinfo.m_hashToOnlineId.push_back(onlineId);
2943 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 1928 of file TgcRdoToPrepDataToolMT.cxx.
1930 int deltaBeforeConvert = 0;
1933 switch(rd.
delta()) {
1934 case 5: deltaBeforeConvert = 6;
break;
1935 case 6: deltaBeforeConvert = 8;
break;
1936 case 7: deltaBeforeConvert = 10;
break;
1937 case -4: deltaBeforeConvert = -5;
break;
1938 case -5: deltaBeforeConvert = -7;
break;
1939 case -6: deltaBeforeConvert = -9;
break;
1940 case -7: deltaBeforeConvert = -12;
break;
1941 default: deltaBeforeConvert = rd.
delta();
break;
1944 switch (rd.
delta()) {
1945 case 11: deltaBeforeConvert = 12;
break;
1946 case 12: deltaBeforeConvert = 14;
break;
1947 case 13: deltaBeforeConvert = 16;
break;
1948 case 14: deltaBeforeConvert = 18;
break;
1949 case 15: deltaBeforeConvert = 20;
break;
1950 case -12: deltaBeforeConvert = -13;
break;
1951 case -13: deltaBeforeConvert = -15;
break;
1952 case -14: deltaBeforeConvert = -17;
break;
1953 case -15: deltaBeforeConvert = -19;
break;
1954 default: deltaBeforeConvert = rd.
delta();
break;
1958 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 2844 of file TgcRdoToPrepDataToolMT.cxx.
2847 constexpr
int T9SscMax = 2;
2848 constexpr
int T8SscMax = 4;
2849 constexpr
int T7SscMax = 6;
2850 constexpr
int T6SscMax = 12;
2851 constexpr
int T5SscMax = 18;
2853 constexpr
int T9Offset = 32 + 0;
2854 constexpr
int T8Offset = 32 + 2;
2855 constexpr
int T7Offset = 32 + 4;
2856 constexpr
int T6Offset = 32 + 6;
2857 constexpr
int T5Offset = 32 + 8;
2862 int ssc = (roi+4)/8;
2863 int halfSsc = (roi%4)/2;
2865 if( ssc< T9SscMax) {
2866 trackletIdStripFirst = T9Offset + halfSsc;
2867 trackletIdStripSecond = -1;
2868 trackletIdStripThird = -1;
2869 }
else if(ssc==T9SscMax) {
2870 trackletIdStripFirst = T8Offset + halfSsc;
2871 trackletIdStripSecond = T9Offset + halfSsc;
2872 trackletIdStripThird = -1;
2873 }
else if(ssc< T8SscMax) {
2874 trackletIdStripFirst = T8Offset + halfSsc;
2875 trackletIdStripSecond = -1;
2876 trackletIdStripThird = -1;
2877 }
else if(ssc==T8SscMax) {
2878 trackletIdStripFirst = T7Offset + halfSsc;
2879 trackletIdStripSecond = T8Offset + halfSsc;
2880 trackletIdStripThird = -1;
2881 }
else if(ssc< T7SscMax) {
2882 trackletIdStripFirst = T7Offset + halfSsc;
2883 trackletIdStripSecond = -1;
2884 trackletIdStripThird = -1;
2885 }
else if(ssc==T7SscMax) {
2886 trackletIdStripFirst = T6Offset + halfSsc;
2887 trackletIdStripSecond = T7Offset + halfSsc;
2888 trackletIdStripThird = T5Offset + halfSsc;
2889 }
else if(ssc< T6SscMax) {
2890 trackletIdStripFirst = T6Offset + halfSsc;
2891 trackletIdStripSecond = T5Offset + halfSsc;
2892 trackletIdStripThird = -1;
2893 }
else if(ssc==T6SscMax) {
2894 trackletIdStripFirst = T6Offset + halfSsc;
2895 trackletIdStripSecond = T5Offset + halfSsc;
2896 trackletIdStripThird = -1;
2897 }
else if(ssc<=T5SscMax) {
2898 trackletIdStripFirst = T5Offset + halfSsc;
2899 trackletIdStripSecond = T6Offset + halfSsc;
2900 trackletIdStripThird = -1;
2902 trackletIdStripFirst = -1;
2903 trackletIdStripSecond = -1;
2904 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 1485 of file TgcRdoToPrepDataToolMT.cxx.
1487 double r_tmp = std::abs(
r);
1488 double z_tmp = std::abs(
z);
1490 if((r_tmp<std::numeric_limits<double>::epsilon()) && (z_tmp<std::numeric_limits<double>::epsilon()))
return false;
1492 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 2437 of file TgcRdoToPrepDataToolMT.cxx.
2445 int chip =
static_cast<int>(rd.
chip());
2446 int hitId =
static_cast<int>(rd.
hitId());
2451 ATH_MSG_DEBUG(
"Failed to get SimHighPtID from RDOHighPtID for Pivot "
2452 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2462 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(dummyId,
2465 chip, hitId, rd.
hsub());
2467 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(dummyId,
2470 chip, hitId, rd.
hsub());
2474 ATH_MSG_DEBUG(
"Failed to get offlineID from HighPtID for Pivot "
2475 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2479 std::array<int, 3> dummy_i{};
2480 found = cinfo->m_tgcCabling->getReadoutIDfromOfflineID(dummyId, dummy_i[0], dummy_i[1], sswId_o, sbLoc_o, dummy_i[2]);
2482 ATH_MSG_DEBUG(
"Failed to get ReadoutID from OfflineID for Pivot "
2483 << (rd.
isStrip() ?
"Strip" :
"Wire"));
2487 std::array<int, 2> i_o{};
2488 std::array<bool, 2> b_o{
false,
false};
2490 found = cinfo->m_tgcCabling->getSLBIDfromReadoutID(i_o[0], b_o[0], b_o[1], i_o[1], slbId_o,
2493 found = cinfo->m_tgcCabling->getSLBIDfromReadoutID(i_o[0], b_o[0], b_o[1], i_o[1], slbId_o,
2497 ATH_MSG_DEBUG(
"Failed to get SLBID from ReadoutID for Pivot "
2498 << (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 2348 of file TgcRdoToPrepDataToolMT.cxx.
2361 for(
int i=0;
i<4;
i++) {
2362 if(gasGap_i[
i]==3) {
2367 if(flag_isL3<0 || flag_isL3>=4) {
2368 ATH_MSG_DEBUG(
"getPosAndIdStripIn: Any bitpos is not at Layer3!");
2372 channelIdIn_tmp = channelIdIn[flag_isL3];
2380 std::array<double, 3> tmp_r_i{}, tmp_phi_i{}, tmp_eta_i{};
2381 std::array<Amg::Vector3D, 3> position_is{make_array<Amg::Vector3D, 3>(
Amg::Vector3D::Zero())};
2382 for(
int i=0;
i<3;
i++) {
2384 position_is[
i] = descriptor_i[
i]->channelPos(channelIdIn[
i]);
2386 position_is[
i] = descriptor_is->
channelPos(channelIdIn_tmp);
2388 tmp_r_i[
i] = position_is[
i].perp();
2389 tmp_phi_i[
i] = position_is[
i].phi();
2390 tmp_eta_i[
i] = position_is[
i].eta();
2393 std::array<int, 2>
index{};
2394 bool flag_reverse =
false;
2397 index[0] = 1;
index[1] = 0; flag_reverse =
true;
2399 index[0] = 0;
index[1] = 1; flag_reverse =
false;
2403 index[0] = 0;
index[1] = 1; flag_reverse =
true;
2405 index[0] = 1;
index[1] = 0; flag_reverse =
false;
2409 std::array<Amg::Vector3D,2 > localpos_i{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2410 for(
int i=0;
i<2;
i++) {
2411 localpos_i[
i] = descriptor_i[
i]->transform(channelIdIn[
i]).inverse()*descriptor_i[
i]->channelPos(channelIdIn[
i]);
2413 double stripMaxX = descriptor_i[
index[0]]->stripHighEdgeLocX(gasGap_i[
index[0]], channel_i[
index[0]],
2414 localpos_i[
index[0]].
z());
2415 double stripMinX = descriptor_i[
index[1]]->stripLowEdgeLocX(gasGap_i[
index[1]], channel_i[
index[1]],
2416 localpos_i[
index[1]].
z());
2417 width_i = stripMaxX - stripMinX;
2419 hit_position_i = stripMinX + width_i/2.;
2420 if(flag_reverse) hit_position_i *= -1.;
2421 tmp_hitPos_i[
Trk::locX] = hit_position_i;
2426 bool onSurface_i = descriptor_i[1]->surface(channelIdIn[1]).globalToLocal(position_in,position_in,loc_hitPos_i);
2428 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 2183 of file TgcRdoToPrepDataToolMT.cxx.
2195 std::array<Amg::Vector3D, 2> localpos_o{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2196 for(
int i=0;
i<2;
i++) {
2197 localpos_o[
i] = descriptor_o[
i]->transform(channelIdOut[
i]).inverse()*descriptor_o[
i]->channelPos(channelIdOut[
i]);
2200 std::array<int, 3>
index{};
2201 bool flag_reverse =
false;
2205 index[0] = 1;
index[1] = 0; flag_reverse =
true;
2207 index[0] = 0;
index[1] = 1; flag_reverse =
false;
2212 index[0] = 0;
index[1] = 1; flag_reverse =
true;
2214 index[0] = 1;
index[1] = 0; flag_reverse =
false;
2218 double stripMax = descriptor_o[
index[0]]->stripHighEdgeLocX(gasGap_o[
index[0]], channel_o[
index[0]],
2219 localpos_o[
index[0]].
z());
2220 double stripMin = descriptor_o[
index[1]]->stripLowEdgeLocX(gasGap_o[
index[1]], channel_o[
index[1]],
2221 localpos_o[
index[1]].
z());
2222 width_o = stripMax - stripMin;
2224 hit_position_o = stripMin + width_o/2.;
2225 if(flag_reverse) hit_position_o *= -1.;
2226 tmp_hitPos_o[
Trk::locX] = hit_position_o;
2231 bool onSurface_o = descriptor_o[1]->surface(channelIdOut[1]).globalToLocal(position_out,position_out,loc_hitPos_o);
2233 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdStripOut Amg::Vector2D* loc_hitPos_o is null.");
2238 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 2243 of file TgcRdoToPrepDataToolMT.cxx.
2252 int flag_boundary_i = 0;
2253 if(descriptor_i[1]->chamberType()==descriptor_i[3]->chamberType()) {
2255 if(gasGap_i[1]==gasGap_i[3]) {
2256 flag_boundary_i = 1;
2258 flag_boundary_i = 3;
2260 }
else if(descriptor_i[0]->chamberType()==descriptor_i[2]->chamberType()) {
2262 if(gasGap_i[0]==gasGap_i[2]) {
2263 flag_boundary_i = 0;
2265 flag_boundary_i = 2;
2268 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::ROI has 3 readout elements!!");
2272 channelIdIn_tmp = channelIdIn[flag_boundary_i];
2280 std::array<double, 3> tmp_r_i{}, tmp_phi_i{}, tmp_eta_i{};
2282 std::array<Amg::Vector3D, 3> position_i {descriptor_i[0]->channelPos(channelIdIn[0]),
2283 descriptor_i[1]->channelPos(channelIdIn[1]),
2286 for(
int i=0;
i<3;
i++) {
2287 tmp_r_i[
i] =position_i[
i].perp();
2288 tmp_phi_i[
i] = position_i[
i].phi();
2289 tmp_eta_i[
i] = position_i[
i].eta();
2293 double half_width = descriptor_i[
i]->gangRadialLength(gasGap_i[
i], channel_i[
i])/2.;
2297 if(
i==0) tmp_r_i[0] += half_width;
2298 else tmp_r_i[1] -= half_width;
2300 bool flag_geteta_i =
getEtafromRZ(tmp_r_i[
i], position_i[
i].
z(), tmp_eta_i[
i]);
2301 bool flag_getr_i =
getRfromEtaZ(tmp_eta_i[
i], position_i[2].
z(), tmp_r_i[
i]);
2303 if(!flag_geteta_i || !flag_getr_i) {
2304 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::failed to getRIn" <<
i <<
" on L3!!");
2310 width_i = tmp_r_i[0] - tmp_r_i[1];
2312 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireIn::minus value width_i = " << width_i);
2316 int gasGap_tmp =
m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn_tmp);
2317 int channel_tmp =
m_idHelperSvc->tgcIdHelper().channel(channelIdIn_tmp);
2318 double half_width = descriptor_iw->
gangRadialLength(gasGap_tmp, channel_tmp)/2.;
2322 if((flag_boundary_i%2)==1) {
2323 tmp_r_i[2] -= half_width;
2324 hit_position_i = descriptor_iw->
gangShortWidth(gasGap_tmp, channel_tmp)
2325 - (tmp_r_i[2] - tmp_r_i[1]) + width_i/2.;
2327 tmp_r_i[2] += half_width;
2328 hit_position_i = descriptor_iw->
gangLongWidth(gasGap_tmp, channel_tmp)
2329 + (tmp_r_i[0] - tmp_r_i[2]) - width_i/2.;
2333 tmp_hitPos_i[
Trk::locX] = hit_position_i;
2334 Amg::Vector3D position_in = descriptor_i[1]->channelPos(channelIdIn[1]);
2337 bool onSurface_i = descriptor_i[1]->surface(channelIdIn[1]).globalToLocal(position_in,position_in,loc_hitPos_i);
2339 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 2129 of file TgcRdoToPrepDataToolMT.cxx.
2139 std::array<Amg::Vector3D, 2> position_o{make_array<Amg::Vector3D, 2>(
Amg::Vector3D::Zero())};
2140 std::array<double, 2> tmp_phi_o{}, tmp_eta_o{}, tmp_r_o {};
2142 for(
int i=0;
i<2;
i++) {
2143 position_o[
i] = descriptor_o[
i]->channelPos(channelIdOut[
i]);
2144 tmp_r_o[
i] = position_o[
i].perp();
2145 tmp_phi_o[
i] = position_o[
i].phi();
2146 tmp_eta_o[
i] = position_o[
i].phi();
2148 double half_width = descriptor_o[
i]->gangRadialLength(gasGap_o[
i], channel_o[
i])/2.;
2152 if(
i==0) tmp_r_o[0] += half_width;
2153 else tmp_r_o[1] -= half_width;
2156 bool flag_geteta_o =
getEtafromRZ(tmp_r_o[0], position_o[0].
z(), tmp_eta_o[0]);
2157 bool flag_getr_o =
getRfromEtaZ(tmp_eta_o[0], position_o[1].
z(), tmp_r_o[0]);
2158 if(!flag_geteta_o || !flag_getr_o) {
2159 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getPosAndIdWireOut::failed to getR on L7!!");
2163 width_o = tmp_r_o[0] - tmp_r_o[1];
2165 hit_position_o = descriptor_o[1]->gangShortWidth(gasGap_o[1], channel_o[1]) + width_o/2;
2166 tmp_hitPos_o[
Trk::locX] = (hit_position_o);
2171 bool onSurface_o = descriptor_o[1]->surface(channelIdOut[1]).globalToLocal(position_out,position_out,loc_hitPos_o);
2173 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getPosAndIdWireOut Amg::Vector2D* loc_hitPos_o is null.");
2178 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 2623 of file TgcRdoToPrepDataToolMT.cxx.
2632 bool exist_hipt_s =
false;
2635 int trackletIdStripFirst{-1}, trackletIdStripSecond{-1}, trackletIdStripThird{-1};
2637 trackletIdStripSecond, trackletIdStripThird);
2645 const TgcRawData rdH(rdH0->bcTag(), rdH0->subDetectorId(), tmprodId,
2646 rdH0->l1Id(), rdH0->bcId(), rdH0->isStrip(),
2647 rdH0->isForward(), tmpsector, rdH0->chip(),
2648 rdH0->index(),rdH0->isHipt(), rdH0->hitId(),
2649 rdH0->hsub(), rdH0->delta(), rdH0->inner());
2654 (!rdH.isForward()) &&
2655 (rdH.bcTag()==rd.
bcTag()) &&
2657 (rdH.rodId()==rd.
rodId()) &&
2658 (rdH.sector()==rd.
sector())
2662 int sswId_o{0}, sbLoc_o{0}, slbId_o{0};
2669 int slbsubMatrix = 0;
2670 std::array<int, 2> bitpos_o{};
2674 int trackletIdStrip = 2*sbLoc_o + slbsubMatrix;
2677 if(trackletIdStrip!=trackletIdStripFirst && trackletIdStrip!=trackletIdStripSecond &&
2678 trackletIdStrip!=trackletIdStripThird)
continue;
2681 if(exist_hipt_s && trackletIdStrip==trackletIdStripThird)
continue;
2684 int index_w_tmp = index_w;
2685 int chip_w_tmp = chip_w;
2686 int hitId_w_tmp = hitId_w;
2688 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(
false,
2694 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Wire");
2699 int chip_s =
static_cast<int>(rdH.chip());
2700 int hitId_s =
static_cast<int>(rdH.hitId());
2701 int hsub_s =
static_cast<int>(rdH.hsub());
2704 found = cinfo->m_tgcCabling->getROINumberfromHighPtID(roi,
2714 ATH_MSG_DEBUG(
"Failed to get ROINumber from HighPtID for Strip");
2720 exist_hipt_s =
true;
2721 if(trackletIdStrip==trackletIdStripFirst)
break;
2726 return exist_hipt_s;
◆ getSbLocOfEndcapStripBoundaryFromTracklet()
Get strip sbLoc of Endcap chamber boundary from Tracklet Strip.
Definition at line 2729 of file TgcRdoToPrepDataToolMT.cxx.
2736 bool exist_tracklet_s =
false;
2739 int trackletIdStripFirst{-1}, trackletIdStripSecond{-1}, trackletIdStripThird{-1};
2741 trackletIdStripSecond, trackletIdStripThird);
2747 uint16_t tmprodId{0}, tmpsector{0};
2749 const TgcRawData rdS(rdS0->bcTag(), rdS0->subDetectorId(), tmprodId,
2750 rdS0->sswId(), rdS0->slbId(), rdS0->l1Id(),
2751 rdS0->bcId(), rdS0->slbType(), rdS0->delta(),
2752 rdS0->segment(), rdS0->subMatrix(), rdS0->position());
2754 bool isForward_s = (rdS.sswId()==7);
2755 if(isForward_s)
continue;
2759 (rdS.bcTag()==rd.
bcTag()) &&
2761 (rdS.rodId()==rd.
rodId()) &&
2762 (rdS.sswId()-3==rd.
sector())
2766 int trackletIdStrip =
static_cast<int>(2*rdS.slbId()+rdS.subMatrix());
2767 if(trackletIdStrip!=trackletIdStripFirst &&
2768 trackletIdStrip!=trackletIdStripSecond &&
2769 trackletIdStrip!=trackletIdStripThird)
continue;
2772 if(exist_tracklet_s && trackletIdStrip==trackletIdStripThird)
continue;
2775 bool found = cinfo->m_tgcCabling->getOfflineIDfromLowPtCoincidenceID(offlineId, rdS.subDetectorId(), rdS.rodId(),
2776 rdS.sswId(), rdS.slbId(), rdS.subMatrix(),
2777 rdS.position(),
false);
2779 ATH_MSG_DEBUG(
"Failed to get OfflineID from LowPtCoincidenceID for Strip");
2783 std::array<int, 7>
i{};
2784 std::array<bool, 2>
b{};
2785 found = cinfo->m_tgcCabling->getHighPtIDfromOfflineID(offlineId,
i[0],
i[1],
i[2],
b[0],
b[1],
i[3],
i[4],
i[5],
i[6]);
2790 ATH_MSG_DEBUG(
"Failed to get HighPtID from OfflineID for Strip");
2795 int index_w_tmp = index_w;
2796 int chip_w_tmp = chip_w;
2797 int hitId_w_tmp = hitId_w;
2798 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(rd.
isForward(),
2804 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Wire");
2808 found = cinfo->m_tgcCabling->getRDOHighPtIDfromSimHighPtID(rd.
isForward(),
2814 ATH_MSG_DEBUG(
"Failed to get RDOHighPtID from SimHighPtID for Strip");
2819 found = cinfo->m_tgcCabling->getROINumberfromHighPtID(roi,
2829 ATH_MSG_DEBUG(
"Failed to get ROINumber from HighPtID for Strip");
2834 sbLoc = rdS.slbId();
2835 exist_tracklet_s =
true;
2836 if(trackletIdStrip==trackletIdStripFirst)
break;
2841 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 2504 of file TgcRdoToPrepDataToolMT.cxx.
2519 bool found = cinfo->m_tgcCabling->getHighPtIDfromROINumber(rd.
roi(),
2528 << (!
isStrip ?
"Wire" :
"Strip"));
2532 found = cinfo->m_tgcCabling->getSimHighPtIDfromRDOHighPtID(rd.
isForward(),
2538 ATH_MSG_DEBUG(
"Failed to get SimHighPtID from RDOHighPtID for "
2539 << (!
isStrip ?
"Wire" :
"Strip"));
2544 found = cinfo->m_tgcCabling->getOfflineIDfromHighPtID(offlineId,
2556 << (!
isStrip ?
"Wire" :
"Strip"));
2562 std::array<int, 3> dummy_i{};
2563 found = cinfo->m_tgcCabling->getReadoutIDfromOfflineID(
channelId[1],
2571 << (!
isStrip ?
"Wire" :
"Strip"));
2582 if(!exist_tracklet_s) {
2583 ATH_MSG_DEBUG(
"Failed to find correspond Tracklet_strip for SL!!");
2595 for(
int i=0;
i<3;
i++) {
2596 if(
i==1 && (!
isStrip || !isBoundary))
continue;
2606 << (!
isStrip ?
"Wire" :
"Strip"));
2609 <<
", rodId = " << rd.
rodId()
2610 <<
", sswId = " << sswId
2611 <<
", slbId = " << sbLoc
2612 <<
", bitpos_" << (!
isStrip ?
"w" :
"s")
2613 <<
"[" <<
i <<
"] = " << bitpos[
i]);
◆ getSLLocalPosition()
Get SL local position.
Definition at line 2949 of file TgcRdoToPrepDataToolMT.cxx.
2953 if(!readout)
return nullptr;
2956 constexpr
double length = 100.;
2957 constexpr
unsigned int nRep = 10;
2958 constexpr
double dRAccuracy = 1.0E-20;
2959 constexpr
double maxLocR = 10000.;
2963 for(
unsigned int iRep=0; iRep<nRep; iRep++) {
2969 double glob_eta_c = glob_hitPos_c.eta();
2970 double glob_phi_c = glob_hitPos_c.phi();
2974 double dR = std::hypot(vector[0], vector[1]);
2989 matrix(0,0) = glob_hitPos_w.eta() - glob_eta_c;
2991 matrix(0,1) = glob_hitPos_s.eta() - glob_eta_c;
2994 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 2054 of file TgcRdoToPrepDataToolMT.cxx.
2060 std::array<const MuonGM::TgcReadoutElement*, 3> descriptor_s{muDetMgr->
getTgcReadoutElement(channelId_strip[0]),
2063 for(
int i=0;
i<3;
i++) {
2071 bool onSurface_s = descriptor_s[1]->surface(channelId_strip[1]).globalToLocal(position_s,position_s,loc_hitPos_s);
2073 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getSLStripGeometry Amg::Vector2D* loc_hitPos_s is null.");
2078 std::array<int, 3> gasGap_s, channel_s{};
2079 for(
int i=0;
i<3;
i++) {
2080 gasGap_s[
i] =
m_idHelperSvc->tgcIdHelper().gasGap(channelId_strip[
i]);
2081 channel_s[
i] =
m_idHelperSvc->tgcIdHelper().channel(channelId_strip[
i]);
2085 for(
int i=0;
i<3;
i+=2) {
2086 localPos[
i] = descriptor_s[
i]->transform(channelId_strip[
i]).inverse()
2087 *descriptor_s[
i]->channelPos(channelId_strip[
i]);
2090 bool flag_reverse =
false;
2091 std::array<int, 2> index_strip{};
2095 index_strip[0] = 2; index_strip[1] = 0; flag_reverse =
true;
2097 index_strip[0] = 0; index_strip[1] = 2; flag_reverse =
false;
2101 index_strip[0] = 0; index_strip[1] = 2; flag_reverse =
true;
2103 index_strip[0] = 2; index_strip[1] = 0; flag_reverse =
false;
2107 double stripMaxX = descriptor_s[index_strip[0]]->stripHighEdgeLocX(gasGap_s[index_strip[0]], channel_s[index_strip[0]],
2108 localPos[index_strip[0]].
z());
2109 double stripMinX = descriptor_s[index_strip[1]]->stripLowEdgeLocX(gasGap_s[index_strip[1]], channel_s[index_strip[1]],
2110 localPos[index_strip[1]].
z());
2111 width_strip = stripMaxX - stripMinX;
2112 double strip = stripMinX + width_strip/2.;
2113 if(flag_reverse)
strip *= -1.;
2118 int index_strip_gp = 0;
2119 if(!isBackward) index_strip_gp = 0;
2120 else index_strip_gp = 2;
2122 descriptor_s[index_strip_gp]->surface(channelId_strip[index_strip_gp]).localToGlobal(tmp_hitPos_s,tmp_strip_gp,tmp_strip_gp);
2123 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 1985 of file TgcRdoToPrepDataToolMT.cxx.
1990 std::array<const MuonGM::TgcReadoutElement*, 3> descriptor_w{muDetMgr->
getTgcReadoutElement(channelId_wire[0]),
1993 for(
int i=0;
i<3;
i++) {
2001 bool onSurface_w = descriptor_w[2]->surface(channelId_wire[2]).globalToLocal(position_w,position_w,loc_hitPos_w);
2003 ATH_MSG_WARNING(
"Muon::TgcRdoToPrepDataToolMT::getSLWireGeometry Amg::Vector2D* loc_hitPos_w is null.");
2008 std::array<int, 3> gasGap_w{}, channel_w{};
2009 for(
int i=0;
i<3;
i++) {
2011 channel_w[
i] =
m_idHelperSvc->tgcIdHelper().channel(channelId_wire[
i]);
2014 std::array<double,3> tmp_r_w{}, tmp_phi_w{}, tmp_eta_w{};
2016 std::array<Amg::Vector3D,3> tmp_position_w{make_array<Amg::Vector3D, 3>(
Amg::Vector3D::Zero())};
2017 for(
int i=0;
i<3;
i+=2) {
2018 tmp_position_w[
i] = descriptor_w[
i]->channelPos(channelId_wire[
i]);
2019 tmp_r_w[
i] = tmp_position_w[
i].perp();
2020 tmp_phi_w[
i] = tmp_position_w[
i].phi();
2021 tmp_eta_w[
i] = tmp_position_w[
i].eta();
2023 double half_width = descriptor_w[
i]->gangRadialLength(gasGap_w[
i], channel_w[
i])/2.;
2029 tmp_r_w[0] += half_width;
2031 tmp_r_w[2] -= half_width;
2035 bool flag_geteta_w =
getEtafromRZ(tmp_r_w[0], tmp_position_w[0].
z(), tmp_eta_w[0]);
2036 bool flag_getr_w =
getRfromEtaZ(tmp_eta_w[0], tmp_position_w[2].
z(), tmp_r_w[0]);
2037 if(!flag_geteta_w || !flag_getr_w) {
2038 ATH_MSG_DEBUG(
"TgcRdoToPrepDataToolMT::getSLWireGeometry::failed to getR on L7!!");
2041 width_wire = tmp_r_w[0] - tmp_r_w[2];
2042 double gang = descriptor_w[2]->gangShortWidth(gasGap_w[2],channel_w[2]) + width_wire/2.;
2047 descriptor_w[2]->surface(channelId_wire[2]).localToGlobal(tmp_hitPos_w,tmp_wire_gp,tmp_wire_gp);
2048 z_wire = tmp_wire_gp.z();
2049 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 1508 of file TgcRdoToPrepDataToolMT.cxx.
1511 if(tmp_subMatrix!=0 && tmp_subMatrix!=1) {
1512 ATH_MSG_DEBUG(
"getTrackletInfo: subMatrix " << tmp_subMatrix <<
" is invalid.");
1516 int tmp_sswId = rd.
sswId();
1517 tmp_slbId = rd.
slbId();
1520 int tmp_position_delta = tmp_position + rd.
delta();
1521 int tmp_slbType = rd.
slbType();
1525 if(tmp_subMatrix==1) {
1528 ATH_MSG_DEBUG(
"Expected TGC2 Strip position (" << tmp_position_delta <<
1529 ") does not exist and is changed to the edge position " << tmp_position);
1532 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId+1 <<
" doesn't exist for FWD!! (upper edge SLB of FWD:sbLoc3,11)");
1536 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId+1 <<
" doesn't exist for EWD!! (upper edge SLB of EWD:sbLoc9)");
1546 }
else if(tmp_position_delta<0) {
1548 if(tmp_subMatrix==0) {
1551 ATH_MSG_DEBUG(
"Expected TGC2 Strip position (" << tmp_position_delta <<
1552 ") does not exist and is changed to the edge position " << tmp_position);
1555 if(tmp_position_delta==-1) {
1558 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId-1 <<
" doesn't exist for FWD!! (bottom edge SLB of FWD:sbLoc0,8)");
1563 if(tmp_position_delta==-1) {
1566 ATH_MSG_DEBUG(
"sbLoc " << tmp_slbId-1 <<
" doesn't exist for EWD!! (bottom edge SLB of EWD:sbLoc0)");
1578 tmp_position = tmp_position_delta;
◆ initialize()
StatusCode Muon::TgcRdoToPrepDataToolMT::initialize |
( |
| ) |
|
|
overridevirtual |
Standard AthAlgTool initialize method.
Definition at line 29 of file TgcRdoToPrepDataToolMT.cxx.
34 for (
int ibc=0; ibc <
NBC_HIT+1; ibc++) {
36 std::ostringstream location;
46 for (
int ibc=0; ibc <
NBC_TRIG; ibc++) {
48 std::ostringstream location;
66 ATH_MSG_INFO(
"MuonTGC_CablingSvc not yet retrieved; postpone TGCcabling initialization at first event.");
72 for (
int ibc=0; ibc <
NBC_HIT+1; ibc++) {
74 std::ostringstream location;
87 for (
int ibc=0; ibc <
NBC_TRIG; ibc++) {
89 std::ostringstream location;
104 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 1961 of file TgcRdoToPrepDataToolMT.cxx.
1963 bool isBackward =
false;
◆ isIncludedInChamberBoundary()
bool Muon::TgcRdoToPrepDataToolMT::isIncludedInChamberBoundary |
( |
const TgcRawData & |
rd | ) |
const |
|
private |
Check SL RDO is at the chamber boundary.
Definition at line 1590 of file TgcRdoToPrepDataToolMT.cxx.
1595 (RoiRow== 3 || RoiRow== 4 ||
1596 RoiRow== 7 || RoiRow== 8 ||
1597 RoiRow==11 || RoiRow==12 ||
1598 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 150 of file TgcRdoToPrepDataToolMT.cxx.
152 const unsigned hashMax =
m_idHelperSvc->tgcIdHelper().module_hash_max();
154 for(
unsigned int ibc=0; ibc <
NBC_HIT+1; ibc++) {
160 if (!externalCachePRD) {
162 ATH_CHECK(handle.record(std::make_unique<TgcPrepDataContainer>(hashMax)));
166 state.tgcPrepDataContainer[ibc] = handle.ptr();
172 ATH_CHECK(handle.record(std::make_unique<Muon::TgcPrepDataContainer>(
update.ptr())));
174 state.tgcPrepDataContainer[ibc] = handle.ptr();
177 state.tgcPrepDataCollections[ibc].resize(hashMax);
181 for (
unsigned int ibc=0; ibc <
NBC_TRIG; ibc++) {
187 if(!externalCacheCoin) {
189 ATH_CHECK(handle.record(std::make_unique<TgcCoinDataContainer>(hashMax)));
194 ATH_CHECK(handle.record(std::make_unique<TgcCoinDataContainer>(
update.ptr())));
200 state.tgcCoinDataContainer[ibc] = handle.ptr();
201 state.tgcCoinDataCollections[ibc].resize(hashMax);
207 state.muDetMgr = detMgr.cptr();
208 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 127 of file TgcRdoToPrepDataToolMT.cxx.
129 for (std::unique_ptr<CollType>& toMove : coll) {
130 if (!toMove)
continue;
131 const IdentifierHash
hash = toMove->identifyHash();
132 auto lock = container.getWriteHandle(
hash);
133 if(!lock.alreadyPresent()) {
134 ATH_CHECK(lock.addOrDelete(std::move(toMove)));
137 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:
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 RPC_BCID_BIT
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)
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)
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.
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)
::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)
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
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.