![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <RpcRdoToPrepDataToolMT.h>
|
StatusCode | transferAndRecordPrepData (const EventContext &ctx, State &state) const |
| Stores the PrepData container into store gate. More...
|
|
StatusCode | transferAndRecordCoinData (const EventContext &ctx, State &state) const |
| Stores the CoinData container into store gate. More...
|
|
StatusCode | loadProcessedChambers (const EventContext &ctx, State &state) const |
| Load the hashes of the processed chambers. More...
|
|
void | printMTPrepData (const Muon::RpcPrepDataContainer &prepData) const |
|
void | printMTCoinData (const Muon::RpcCoinDataContainer &prepData) const |
|
StatusCode | decodeImpl (const EventContext &ctx, State &state, const std::vector< IdentifierHash > &idVect, bool firstTimeInTheEvent) const |
|
StatusCode | decodeImpl (const EventContext &ctx, State &state, const std::vector< uint32_t > &robIds, bool firstTimeInTheEvent) const |
|
StatusCode | processPad (const EventContext &ctx, State &state, const RpcPad *rdoColl, bool &processingetaview, bool &processingphiview, int &nPrepRawData, const std::vector< IdentifierHash > &idVect, bool doingSecondLoopAmbigColls) const |
|
void | processTriggerHitHypothesis (RpcCoinMatrix::const_iterator itD, RpcCoinMatrix::const_iterator itD_end, bool highptpad, bool &triggerHit, unsigned short &threshold, unsigned short &overlap, bool &toSkip) const |
|
StatusCode | processNrpcRdo (const EventContext &ctx, State &state) const |
|
Definition at line 35 of file RpcRdoToPrepDataToolMT.h.
◆ RpcRdoToPrepDataToolMT()
Muon::RpcRdoToPrepDataToolMT::RpcRdoToPrepDataToolMT |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ decode() [1/2]
StatusCode Muon::RpcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< IdentifierHash > & |
idVect |
|
) |
| const |
|
overridevirtual |
This code is thread-safe as we will propagate local thread collection contents to a thread-safe one.
Definition at line 157 of file RpcRdoToPrepDataToolMT.cxx.
160 "Calling Core decode function from MT decode function (hash vector)");
166 ATH_MSG_DEBUG(
"Core decode processed in MT decode (hash vector)");
171 return StatusCode::SUCCESS;
◆ decode() [2/2]
StatusCode Muon::RpcRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< uint32_t > & |
robIds |
|
) |
| const |
|
overridevirtual |
This code is thread-safe as we will propagate local thread collection contents to a thread-safe one.
Definition at line 176 of file RpcRdoToPrepDataToolMT.cxx.
179 "Calling Core decode function from MT decode function (ROB vector)");
185 ATH_MSG_DEBUG(
"Core decode processed in MT decode (ROB vector)");
190 return StatusCode::SUCCESS;
◆ decodeImpl() [1/2]
StatusCode Muon::RpcRdoToPrepDataToolMT::decodeImpl |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const std::vector< IdentifierHash > & |
idVect, |
|
|
bool |
firstTimeInTheEvent |
|
) |
| const |
|
protected |
RPC context
here the RDO container is retrieved and filled -whatever input type we start with- => check the size
Definition at line 272 of file RpcRdoToPrepDataToolMT.cxx.
276 int sizeVectorRequested = idVect.size();
277 ATH_MSG_DEBUG(
"Decode method called for " << sizeVectorRequested
278 <<
" offline collections");
279 if (sizeVectorRequested == 0)
284 std::vector<IdentifierHash> idVectToBeDecoded;
285 idVectToBeDecoded.reserve(idVect.size());
287 if (firstTimeInTheEvent) {
288 state.m_fullEventDone = sizeVectorRequested == 0;
290 if (state.m_fullEventDone) {
291 ATH_MSG_DEBUG(
"Whole event has already been decoded; nothing to do.");
292 return StatusCode::SUCCESS;
294 if (sizeVectorRequested == 0)
295 state.m_fullEventDone =
true;
298 if (sizeVectorRequested != 0) {
302 for (
const IdentifierHash& itHashId : idVect) {
303 if (state.m_decodedOfflineHashIds.insert(itHashId).second)
304 idVectToBeDecoded.push_back(itHashId);
306 if (idVectToBeDecoded.empty()) {
308 "All requested offline collections have already been decoded; "
310 return StatusCode::SUCCESS;
313 <<
" offline collections have not yet been decoded and "
314 "will be decoded now.");
317 "The list of offline collection hash ids to be decoded:");
318 for (
const IdentifierHash& itHashId : idVectToBeDecoded)
327 "Stored empty container. Decoding RPC RDO into RPC PrepRawData is "
329 return StatusCode::SUCCESS;
339 std::vector<IdentifierHash> rdoHashVec;
340 if (sizeVectorRequested != 0) {
342 "Looking for pads IdHash to be decoded for the requested collection "
344 ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
351 ATH_MSG_DEBUG(
"Retrieving Rpc PAD container from the store");
353 if (!rdoContainerHandle.isValid()) {
355 return StatusCode::FAILURE;
360 if (rdoContainerHandle->numberOfCollections() == 0) {
362 ATH_MSG_DEBUG(
"Empty pad container - no rpc rdo in this event ");
363 return StatusCode::SUCCESS;
368 bool processingetaview{
true}, processingphiview{
false};
370 processingetaview =
false;
371 bool doingSecondLoopAmbigColls =
false;
373 int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
374 if (processingphiview)
375 state.m_ambiguousCollections.clear();
377 if (processingetaview)
383 if (sizeVectorRequested != 0) {
385 for (
const IdentifierHash& iPadHash : rdoHashVec) {
386 const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(iPadHash);
389 << iPadHash <<
" not found in the rdoContainerHandle.");
396 <<
", with " << rdoColl->
size()
399 processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
404 for (
const RpcPad* rdoColl : *rdoContainerHandle) {
406 if (rdoColl->
empty())
411 <<
", with " << rdoColl->
size()
415 processingphiview, nPrepRawData, idVectToBeDecoded, doingSecondLoopAmbigColls));
419 if (processingetaview) {
420 processingetaview =
false;
421 processingphiview =
true;
422 nEtaPrepRawData = nPrepRawData;
423 ATH_MSG_DEBUG(
"*** " << nEtaPrepRawData <<
" eta PrepRawData registered");
425 processingphiview =
false;
426 nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
427 ATH_MSG_DEBUG(
"*** " << nPhiPrepRawData <<
" phi PrepRawData registered");
428 if (!state.m_ambiguousCollections.empty()) {
430 doingSecondLoopAmbigColls =
true;
431 processingetaview =
true;
433 <<
" ambiguous collections were stored:");
434 idVectToBeDecoded.clear();
436 for (
const IdentifierHash& itAmbiColl : state.m_ambiguousCollections) {
438 idVectToBeDecoded.push_back(itAmbiColl);
439 state.m_decodedOfflineHashIds.insert(itAmbiColl);
441 ATH_CHECK(rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec));
445 ATH_MSG_DEBUG(
"*** " << nPrepRawData <<
" PrepRawData registered");
451 return StatusCode::SUCCESS;
◆ decodeImpl() [2/2]
StatusCode Muon::RpcRdoToPrepDataToolMT::decodeImpl |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const std::vector< uint32_t > & |
robIds, |
|
|
bool |
firstTimeInTheEvent |
|
) |
| const |
|
protected |
Definition at line 455 of file RpcRdoToPrepDataToolMT.cxx.
461 int sizeVectorRequested = robIds.size();
462 ATH_MSG_DEBUG(
"Decode method called for " << sizeVectorRequested <<
" ROBs");
464 std::vector<uint32_t> robIdsToBeDecoded;
465 robIdsToBeDecoded.reserve(robIds.size());
467 if (firstTimeInTheEvent) {
468 state.m_fullEventDone =
false;
470 if (state.m_fullEventDone) {
471 ATH_MSG_DEBUG(
"Whole event has already been decoded; nothing to do.");
472 return StatusCode::SUCCESS;
478 if (state.m_decodedRobIds.insert(robid).second)
479 robIdsToBeDecoded.push_back(robid);
482 if (robIdsToBeDecoded.empty()) {
484 "All requested ROBs have already been decoded; nothing to do.");
485 return StatusCode::SUCCESS;
488 <<
" ROBs have not yet been decoded and will be decoded now.");
491 for (
uint32_t robid : robIdsToBeDecoded)
500 if (state.m_decodedRobIds.size() == rpcCabling->giveFullListOfRobIds().size())
501 state.m_fullEventDone =
true;
506 "Stored empty container. Decoding RPC RDO into RPC PrepRawData is "
508 return StatusCode::SUCCESS;
514 ATH_MSG_DEBUG(
"Retrieving Rpc PAD container from the store");
516 if (!rdoContainerHandle.isValid()) {
518 return StatusCode::SUCCESS;
523 if (rdoContainerHandle->empty()) {
525 ATH_MSG_DEBUG(
"Empty pad container - no rpc rdo in this event ");
526 return StatusCode::SUCCESS;
531 std::vector<IdentifierHash> rdoHashVec;
533 13 * robIdsToBeDecoded.size());
534 ATH_CHECK(rpcCabling->giveRDO_fromROB(robIdsToBeDecoded, rdoHashVec));
537 bool processingetaview =
true;
538 bool processingphiview =
false;
540 processingetaview =
false;
542 int ipad{0}, nPrepRawData{0}, nPhiPrepRawData{0}, nEtaPrepRawData{0};
543 if (processingphiview)
544 state.m_ambiguousCollections.clear();
546 if (processingetaview)
554 for (
const IdentifierHash& padHashId : rdoHashVec) {
555 const RpcPad* rdoColl = rdoContainerHandle->indexFindPtr(padHashId);
558 << (
unsigned int)padHashId
559 <<
" not found in the rdoContainerHandle.");
564 << ipad <<
", online id " << (
int)(rdoColl->
identifyHash())
565 <<
", with " << rdoColl->
size() <<
" CM inside ");
567 processingphiview, nPrepRawData, rdoHashVec,
false));
570 if (processingetaview) {
571 processingetaview =
false;
572 processingphiview =
true;
573 nEtaPrepRawData = nPrepRawData;
574 ATH_MSG_DEBUG(
"*** " << nEtaPrepRawData <<
" eta PrepRawData registered");
576 processingphiview =
false;
577 nPhiPrepRawData = nPrepRawData - nEtaPrepRawData;
578 ATH_MSG_DEBUG(
"*** " << nPhiPrepRawData <<
" phi PrepRawData registered");
581 ATH_MSG_DEBUG(
"*** " << nPrepRawData <<
" PrepRawData registered");
588 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Muon::RpcRdoToPrepDataToolMT::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 76 of file RpcRdoToPrepDataToolMT.cxx.
87 "Inconsistent setting of properties (solvePhiAmbiguities entails "
88 "reduceCablingOverlap)");
113 return StatusCode::SUCCESS;
◆ loadProcessedChambers()
StatusCode Muon::RpcRdoToPrepDataToolMT::loadProcessedChambers |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Load the hashes of the processed chambers.
Definition at line 115 of file RpcRdoToPrepDataToolMT.cxx.
122 return StatusCode::FAILURE;
124 state.m_prepDataCont =
125 std::make_unique<Muon::RpcPrepDataContainer>(
update.ptr());
127 state.m_decodedOfflineHashIds.insert(coll->identifyHash());
130 state.m_prepDataCont = std::make_unique<Muon::RpcPrepDataContainer>(
135 state.m_coinDataCont = std::make_unique<Muon::RpcCoinDataContainer>(
144 return StatusCode::FAILURE;
146 state.m_coinDataCont =
147 std::make_unique<Muon::RpcCoinDataContainer>(
update.ptr());
149 state.m_decodedOfflineHashIds.insert(coll->identifyHash());
153 return StatusCode::SUCCESS;
◆ printMTCoinData()
◆ printMTPrepData()
◆ processNrpcRdo()
StatusCode Muon::RpcRdoToPrepDataToolMT::processNrpcRdo |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
No need to check for its validity. It's done at other places for sure
Convert from online to offline cabling
That needs to be parsed to the constructor of the PRD somehow...
Definition at line 1112 of file RpcRdoToPrepDataToolMT.cxx.
1116 return StatusCode::SUCCESS;
1119 ATH_MSG_DEBUG(
"Retrieving Nrpc RDO container from the store");
1122 if (!rdoNrpcContainerHandle.isPresent()) {
1124 <<
" container failed !");
1125 return StatusCode::FAILURE;
1128 if (rdoNrpcContainerHandle->empty()) {
1130 ATH_MSG_DEBUG(
"Empty NRPC RDO container - no nrpc rdo in this event ");
1131 return StatusCode::SUCCESS;
1133 ATH_MSG_DEBUG(
"Not empty NRPC RDO container in this event ");
1136 if (!readCdo.isValid()) {
1138 <<
" from the conditions store");
1139 return StatusCode::FAILURE;
1144 for (
const xAOD::NRPCRDO* nrpcrdo : *rdoNrpcContainerHandle) {
1151 Identifier chanId{};
1152 if (!readCdo->getOfflineId(
cabling_data, msgStream()) ||
1155 return StatusCode::FAILURE;
1157 const IdentifierHash rpcHashId =
m_idHelperSvc->moduleHash(chanId);
1159 state.getPrepCollection(rpcHashId, msgStream());
1162 muDetMgr->getRpcReadoutElement(chanId);
1165 std::vector<Identifier> identifierList{chanId};
1169 <<
" global position "
1176 const double stripWidth = descriptor->
StripWidth(
1179 const double errPos = stripWidth / std::sqrt(12.0);
1182 mat *= errPos * errPos;
1184 int ambiguityFlag = 0;
1186 const float time = nrpcrdo->time();
1188 const float timeoverthr = nrpcrdo->timeoverthr();
1191 new RpcPrepData(chanId, rpcHashId, pointLocPos, identifierList,
mat,
1192 descriptor,
time, timeoverthr, 0, ambiguityFlag);
1194 newPrepData->setHashAndIndex(collection->identifyHash(),
1195 collection->size());
1196 collection->push_back(newPrepData);
1198 return StatusCode::SUCCESS;
◆ processPad()
StatusCode Muon::RpcRdoToPrepDataToolMT::processPad |
( |
const EventContext & |
ctx, |
|
|
State & |
state, |
|
|
const RpcPad * |
rdoColl, |
|
|
bool & |
processingetaview, |
|
|
bool & |
processingphiview, |
|
|
int & |
nPrepRawData, |
|
|
const std::vector< IdentifierHash > & |
idVect, |
|
|
bool |
doingSecondLoopAmbigColls |
|
) |
| const |
|
protected |
Definition at line 592 of file RpcRdoToPrepDataToolMT.cxx.
600 std::set<IdentifierHash>& ambiguousCollections{state.m_ambiguousCollections};
601 ATH_MSG_DEBUG(
"***************** Start of processPad eta/phiview "
602 << processingetaview <<
"/" << processingphiview);
608 << padId <<
" m_logic sector ID " << sectorId);
611 Identifier oldId{0}, oldIdTrg{0};
615 IdentifierHash rpcHashId{0};
624 for (; itCM != itCM_e; ++itCM) {
626 bool etaview =
false;
629 bool highPtCm =
false;
631 uint16_t cmaId = (*itCM)->onlineId();
633 << icm <<
" CM online ID " << cmaId
634 <<
" with n. of hits = " << (*itCM)->size());
662 if (processingetaview && (!etaview))
664 if (processingphiview && etaview)
674 for (; itD != itD_e; ++itD) {
678 unsigned short overlap = 99;
688 << rpcChan->
time() <<
" ijk "
690 if (rpcChan->
ijk() < 7)
696 bool triggerHit =
false;
706 solvePhiAmb_thisHit =
false;
707 reduceCablOvl_thisHit =
false;
709 "RpcFiredChannel: it's a triggerHit or a lowPt coinc. in a high pt "
711 <<
" ijk = " << rpcChan->
ijk() <<
" isHighPtCM " << highPtCm
712 <<
" thr/ovl = " <<
threshold <<
"/" << overlap);
718 rpcChan, sectorId, padId, cmaId,
time, rpcCabling.cptr())};
721 int nMatchingEtaHits = 0;
722 int nDuplicatePhiHits = 0;
723 bool unsolvedAmbiguity =
false;
724 bool notFinished =
true;
733 while (notFinished) {
736 "size of the corresponding list of ID = " << digitVec.size());
737 if (digitVec.empty()) {
742 for (
const Identifier&
channelId : digitVec) {
751 if (!idVect.empty() &&
752 std::find(idVect.begin(), idVect.end(), rpcHashId) == idVect.end()) {
760 bool hasAMatchingEtaHit = 0;
763 if ((oldIdTrg !=
parentId) || !collectionTrg) {
768 <<
static_cast<unsigned int>(rpcHashId));
769 collectionTrg = state.getCoinCollection(rpcHashId, msgStream());
774 }
else if ((oldId !=
parentId) || !collection) {
779 <<
static_cast<unsigned int>(rpcHashId));
780 collection = state.getPrepCollection(rpcHashId, msgStream());
789 bool duplicate =
false;
790 if (reduceCablOvl_thisHit) {
791 if (collection->begin() != collection->end()) {
794 << collection->size());
795 int current_dbphi{0}, current_dbz{0}, current_gg{0};
796 if (processingphiview) {
802 "Check also for eta hits matching dbz, dbphi, gg "
803 << current_dbz <<
" " << current_dbphi <<
" "
807 for (RpcPrepData* rpc : *collection) {
811 hasAMatchingEtaHit =
false;
816 float previous_time = rpc->time();
818 if (
time < previous_time) {
821 "time of the prd previously stored is now updated with "
823 << previous_time <<
" -> " << rpc->time());
829 if (processingphiview) {
830 if (solvePhiAmb_thisHit) {
831 if (!unsolvedAmbiguity) {
833 rpc->identify()) == 0) {
845 if (fabs(
time - rpc->time()) <
847 hasAMatchingEtaHit =
true;
849 "There's a matching eta hit with id "
865 if (hasAMatchingEtaHit)
869 if (processingphiview && duplicate)
877 if (solvePhiAmb_thisHit && (!etaview))
879 <<
" hasAMatchingEtaHit = "
880 << hasAMatchingEtaHit);
885 " solvePhiAmb_thisHit, processingetaview, processingphiview, "
886 "hasAMatchingEtaHit, unsolvedAmbiguity "
887 << solvePhiAmb_thisHit <<
" " << processingetaview <<
" "
888 << processingphiview <<
" " << hasAMatchingEtaHit <<
" "
889 << unsolvedAmbiguity);
890 if ((!solvePhiAmb_thisHit) || processingetaview ||
891 (processingphiview &&
892 (hasAMatchingEtaHit || unsolvedAmbiguity))) {
893 if (unsolvedAmbiguity) {
894 if (idVect.empty()) {
900 "unsolvedAmbiguity is true, adding collection with hash "
902 << (
int)rpcHashId <<
" to ambiguous collections vector");
903 if (!state.m_decodedOfflineHashIds.empty() &&
904 state.m_decodedOfflineHashIds.find(rpcHashId) ==
905 state.m_decodedOfflineHashIds.end()) {
906 ambiguousCollections.insert(rpcHashId);
908 "collection not yet processed; added to ambiguous "
909 "collection vector; going to the next offline "
912 }
else if (!doingSecondLoopAmbigColls) {
913 ambiguousCollections.insert(rpcHashId);
915 "collection already processed and "
916 "doingSecondLoopAmbigColls=false; added to ambiguous "
917 "collection vector; going to the next offline channel "
922 "collection already processed and "
923 "doingSecondLoopAmbigColls=true; trying to store data "
925 "unsolvedAmbiguity");
935 hasAMatchingEtaHit =
false;
938 "Detector Element not found for Identifier from the "
941 <<
"> =>>ignore this hit");
944 hasAMatchingEtaHit =
false;
950 "Identifier from the cabling service <"
952 <<
"> inconsistent with the geometry of detector element "
955 <<
"> =>>ignore this hit /// there are unmasked "
959 "Identifier from the cabling service <"
961 <<
"> inconsistent with the geometry of detector element "
964 <<
"> =>>ignore this hit");
973 << tempGlobalPosition.x() <<
", "
974 << tempGlobalPosition.y() <<
", "
975 << tempGlobalPosition.z() <<
") ");
979 tempGlobalPosition, tempGlobalPosition, pointLocPos);
982 std::vector<Identifier> identifierList{
channelId};
989 double errPos = stripWidth / std::sqrt(12.0);
992 mat *= errPos * errPos;
995 int ambiguityFlag = 0;
996 if (solvePhiAmb_thisHit) {
997 if (processingetaview)
999 if (unsolvedAmbiguity)
1000 ambiguityFlag = digitVec.size();
1001 else if (hasAMatchingEtaHit)
1002 ambiguityFlag = nMatchingEtaHits;
1008 std::optional<double> StripTimeFromCool = readHandle->getStripTime(
channelId);
1009 if (StripTimeFromCool) {
1010 time -= (*StripTimeFromCool);
1017 RpcCoinData* newCoinData =
new RpcCoinData(
1018 channelId, rpcHashId, pointLocPos, identifierList,
1020 rpcChan->
ijk(),
threshold, overlap, cmaId, padId, sectorId,
1025 " Adding RpcCoinData @ "
1026 << newCoinData <<
" to collection "
1029 newCoinData->setHashAndIndex(collectionTrg->identifyHash(),
1030 collectionTrg->size());
1031 collectionTrg->push_back(newCoinData);
1035 <<
"ambiguityFlag = " << ambiguityFlag);
1038 channelId, rpcHashId, pointLocPos, identifierList,
1044 << newPrepData <<
" to collection "
1047 newPrepData->setHashAndIndex(collection->identifyHash(),
1048 collection->size());
1049 collection->push_back(newPrepData);
1056 auto xprd = state.m_xaodHandle->push_back(std::make_unique<xAOD::RpcStrip>());
1057 xprd->setIdentifier(
channelId.get_compact());
1066 xprd->setTime(
static_cast<float>(
time));
1067 xprd->setTriggerInfo(rpcChan->
ijk());
1068 xprd->setAmbiguityFlag(ambiguityFlag);
1080 "processingphiview, nMatchingEtaHits, nDuplicatePhiHits, "
1081 "unsolvedAmbiguity, solvePhiAmb_thisHit : "
1082 << processingphiview <<
", " << nMatchingEtaHits <<
", "
1083 << nDuplicatePhiHits <<
", " << unsolvedAmbiguity <<
", "
1084 << solvePhiAmb_thisHit);
1085 if ((processingphiview && (nMatchingEtaHits == 0)) &&
1086 (nDuplicatePhiHits == 0) && (!unsolvedAmbiguity) &&
1087 (solvePhiAmb_thisHit)) {
1088 unsolvedAmbiguity =
true;
1093 "No eta prepData matching any phi hit from this CM hit \n"
1094 <<
"loop once again and store all phi digits potentially "
1095 "generating this CM hit");
1096 }
else if (unsolvedAmbiguity)
1097 notFinished =
false;
1099 notFinished =
false;
1104 ATH_MSG_DEBUG(
"***************** Stop of processPad eta/phiview "
1105 << processingetaview <<
"/" << processingphiview
1106 <<
"***************** for Pad online Id " << padId
1107 <<
" m_logic sector ID " << sectorId);
1109 return StatusCode::SUCCESS;
◆ processTriggerHitHypothesis()
Definition at line 1201 of file RpcRdoToPrepDataToolMT.cxx.
1209 if ((highPtCm && rpcChan->
ijk() < 2) || (rpcChan->
ijk() > 5)) {
1219 if (rpcChan->
ijk() == 7) {
1224 if (rpcChan->
ijk() == 6) {
1228 cmtype =
" in low pT CM ";
1230 cmtype =
" in high pT CM ";
1232 <<
" bcid is " << rpcChan->
bcid()
1233 <<
" time is " << rpcChan->
time()
1234 <<
" ch " << rpcChan->
channel());
1237 while (itDnext != itD_end) {
1241 <<
" bcid is " << rpcChan->
bcid()
1243 << rpcChanNext->
time());
1244 if (rpcChanNext->
ijk() < 7)
1247 if (rpcChanNext->
ijk() == 7) {
1249 if (rpcChanNext->
bcid() == rpcChan->
bcid() &&
1250 rpcChanNext->
time() == rpcChan->
time()) {
1252 << rpcChanNext->
thr() <<
"/" << rpcChanNext->
ovl());
1254 overlap = rpcChanNext->
ovl();
1257 "ijk =7 after a ijk = 6 BUT bdid/tick don't match - will not "
1258 "assign threshold/overlap ");
1264 if (rpcChanNext->
ijk() == 6) {
1269 "RPC cm hit with ijk = 6 not followed by ijk = 6 or 7 - will "
1270 "not assign threshold / overlap");
1281 << rpcChan->
ijk() <<
" threshold / overlap = " <<
threshold
◆ provideEmptyContainer()
StatusCode Muon::RpcRdoToPrepDataToolMT::provideEmptyContainer |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ transferAndRecordCoinData()
StatusCode Muon::RpcRdoToPrepDataToolMT::transferAndRecordCoinData |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Stores the CoinData container into store gate.
Definition at line 233 of file RpcRdoToPrepDataToolMT.cxx.
236 return StatusCode::SUCCESS;
240 for (
auto& [
hash, collection] : state.m_rpcCoinDataCollections) {
241 if (!collection || collection->empty())
245 state.m_coinDataCont->getWriteHandle(
hash);
246 if (lock.alreadyPresent()) {
247 ATH_MSG_DEBUG(
"RpcCoinDataCollection already contained in IDC "
251 ATH_CHECK(lock.addOrDelete(std::move(collection)));
254 state.m_rpcCoinDataCollections.clear();
256 for (
const auto& [
hash, ptr] : state.m_coinDataCont->GetAllHashPtrPair()) {
262 ATH_CHECK(rpcCoinHandle.record(std::move(state.m_coinDataCont)));
268 return StatusCode::SUCCESS;
◆ transferAndRecordPrepData()
StatusCode Muon::RpcRdoToPrepDataToolMT::transferAndRecordPrepData |
( |
const EventContext & |
ctx, |
|
|
State & |
state |
|
) |
| const |
|
protected |
Stores the PrepData container into store gate.
Definition at line 201 of file RpcRdoToPrepDataToolMT.cxx.
204 for (
auto& [
hash, collection] : state.m_rpcPrepDataCollections) {
205 if (!collection || collection->empty())
209 state.m_prepDataCont->getWriteHandle(
hash);
210 if (lock.alreadyPresent()) {
211 ATH_MSG_DEBUG(
"RpcPrepDataCollection already contained in IDC "
215 ATH_CHECK(lock.addOrDelete(std::move(collection)));
218 state.m_rpcPrepDataCollections.clear();
221 for (
const auto& [
hash, ptr] : state.m_prepDataCont->GetAllHashPtrPair()) {
227 ATH_CHECK(rpcPRDHandle.record(std::move(state.m_prepDataCont)));
230 return StatusCode::SUCCESS;
◆ m_coindataContainerCacheKey
Initial value:{
this, "RpcCoinDataContainerCacheKey", "",
"Optional external cache for the RPC coin data container"}
Definition at line 191 of file RpcRdoToPrepDataToolMT.h.
◆ m_decodeData
Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_decodeData |
|
protected |
Initial value:{
this, "DecodeData",
true}
toggle on/off the decoding of RPC RDO into RpcPerpData
Definition at line 146 of file RpcRdoToPrepDataToolMT.h.
◆ m_etaphi_coincidenceTime
Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_etaphi_coincidenceTime |
|
protected |
Initial value:{
this, "etaphi_coincidenceTime", 20., "time for phi*eta coincidence"}
3 ns is the resolution of the RPC readout electronics
Definition at line 130 of file RpcRdoToPrepDataToolMT.h.
◆ m_eventInfo
◆ m_idHelperSvc
Initial value:{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 157 of file RpcRdoToPrepDataToolMT.h.
◆ m_muDetMgrKey
Initial value:{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 153 of file RpcRdoToPrepDataToolMT.h.
◆ m_nRpcCablingKey
Initial value:{
this, "NrpcCablingKey", "MuonNRPC_CablingMap",
"Key of MuonNRPC_CablingMap"}
Definition at line 183 of file RpcRdoToPrepDataToolMT.h.
◆ m_overlap_timeTolerance
Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_overlap_timeTolerance |
|
protected |
Initial value:{
this, "overlap_timeTolerance", 10.,
"tolerance of the timing calibration"}
Definition at line 133 of file RpcRdoToPrepDataToolMT.h.
◆ m_prdContainerCacheKey
Initial value:{
this, "RpcPrdContainerCacheKey", "",
"Optional external cache for the RPC PRD container"}
This is the key for the cache for the MDT PRD containers, can be empty.
Definition at line 188 of file RpcRdoToPrepDataToolMT.h.
◆ m_producePRDfromTriggerWords
Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_producePRDfromTriggerWords |
|
protected |
Initial value:{
this, "produceRpcCoinDatafromTriggerWords", true,
"tore as prd the trigger hits"}
Definition at line 136 of file RpcRdoToPrepDataToolMT.h.
◆ m_rdoContainerKey
◆ m_rdoNrpcContainerKey
◆ m_readKey
◆ m_reduceCablingOverlap
Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_reduceCablingOverlap |
|
protected |
Initial value:{
this, "reduceCablingOverlap", true, "toggle on/off the overlap removal"}
Definition at line 142 of file RpcRdoToPrepDataToolMT.h.
◆ m_rpcCoinDataContainerKey
◆ m_RPCInfoFromDb
Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_RPCInfoFromDb |
|
protected |
◆ m_rpcPrepDataContainerKey
◆ m_rpcRdoDecoderTool
◆ m_rpcReadKey
Initial value:{
this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
Definition at line 179 of file RpcRdoToPrepDataToolMT.h.
◆ m_solvePhiAmbiguities
Gaudi::Property<bool> Muon::RpcRdoToPrepDataToolMT::m_solvePhiAmbiguities |
|
protected |
Initial value:{
this, "solvePhiAmbiguities", true,
"toggle on/off the removal of phi ambiguities"}
Definition at line 139 of file RpcRdoToPrepDataToolMT.h.
◆ m_timeShift
Gaudi::Property<float> Muon::RpcRdoToPrepDataToolMT::m_timeShift |
|
protected |
◆ m_xAODKey
Initial value:{
this, "xAODKey", "",
"If empty, do not produce xAOD, otherwise this is the key of the output "
"xAOD MDT PRD container"}
Definition at line 195 of file RpcRdoToPrepDataToolMT.h.
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...
Identifier parentID(const Identifier &id) const
Const iterator class for DataVector/DataList.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
friend class IDC_WriteHandle
std::string find(const std::string &s)
return a remapped string
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Eigen::Matrix< double, 2, 1 > Vector2D
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
bool measuresPhi(const Identifier &id) const override
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
#define ATH_MSG_VERBOSE(x)
@ IS_SIMULATION
true: simulation, false: data
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
int gasGap(const Identifier &id) const override
get the hashes
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
MuonCoinDataCollection< RpcCoinData > RpcCoinDataCollection
Cabling information shipped around the Digi <-> Rdo conversions.
int strip(const Identifier &id) const
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
virtual bool containsId(const Identifier &id) const override
function to be used to check whether a given Identifier is contained in the readout element
Amg::Vector3D stripPos(const Identifier &id) const
StatusCode initialize(bool used=true)
IdentifierHash identifyHash() const
Returns the OFFLINE identifier hash for this collection.
Eigen::Matrix< double, 3, 1 > Vector3D
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Eigen::Matrix< float, N, N > MeasMatrix
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
int doubletPhi(const Identifier &id) const