44#include "eformat/DetectorMask.h"
45#include "eformat/SourceIdentifier.h"
124 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
142 const EventContext& ctx = getContext();
146 if(
getCabling().isFailure())
return StatusCode::FAILURE;
161 if (doTileMu && !
m_tgcArgs.useRun3Config()) {
174 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>> tgcrdo;
179 if(!readTgcDigitContainer.
isValid()){
181 return StatusCode::FAILURE;
186 ATH_CHECK(wh_muctpiTgc.
record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInputPhase1>()));
190 StatusCode
sc = StatusCode::SUCCESS;
192 sc = StatusCode::SUCCESS;
213 if (
sc.isFailure()) {
226 }
else if(rdoContIn->size()>0) {
228 for(; itR!=rdoContIn->end(); ++itR){
229 const TgcRdo* rdoIn = (*itR);
231 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>
::iterator itRdo = tgcrdo.find(subDetectorRod);
232 if (itRdo!=tgcrdo.end()) {
236 itRdo->second->push_back(std::make_unique<TgcRawData>(*rd));
244 auto trgContainer=std::make_unique<TgcRdoContainer>();
245 for(
const auto& tgcRdoMap : tgcrdo){
246 for(
const auto rawData : *tgcRdoMap.second){
247 trgContainer->push_back(rawData);
257 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
261 std::map<Identifier, int> tgcDigitIDs;
262 std::map<Identifier, int>::iterator itCh;
281 for(
int j=0; j<
m_system->getNumberOfOctant(); j+=1){
282 for(
int k=0; k<
m_system->getNumberOfModule(); k+=1){
284 if((sector!=0)&&(sector->
hasHit())){
299 int sectoraddr_endcap = 0;
300 int sectoraddr_forward = 0;
301 for(
int j=0; j<
m_system->getNumberOfOctant(); j+=1){
302 for(
int k=0; k<
m_system->getNumberOfModule(); k+=1){
305 if(sector==0)
continue;
329 size_t tgcsystem=0,subsystem=0;
333 std::shared_ptr<TGCTrackSelectorOut> trackSelectorOut;
336 std::shared_ptr<LVL1TGC::TGCNSW> nsw =
m_system->getNSW();
345 sectorId = ((
module/3)*2+module%3) + sector->getOctantId()*6;
346 std::shared_ptr<const LVL1TGC::NSWTrigOut> pNSWOut = nsw->getOutput(sector->
getRegionType(),
351 for(
bool NSWmonitor : pNSWOut->getNSWmonitor() ){
359 muctpiinputPhase1->
setSectorLogicData(sldata,tgcsystem,subsystem,sectoraddr_endcap++,muctpiBcId);
361 LVL1MUONIF::Lvl1MuForwardSectorLogicDataPhase1 sldata;
362 tgcsystem = LVL1MUONIF::Lvl1MuCTPIInputPhase1::idForwardSystem();
363 if(trackSelectorOut != 0) FillSectorLogicData(&sldata,trackSelectorOut.get());
365 if ( m_tgcArgs.USE_NSW() ) {
366 sectorId = (module/3) + sector->getOctantId()*3;
367 std::shared_ptr<const LVL1TGC::NSWTrigOut> pNSWOut = nsw->getOutput(sector->getRegionType(),
372 for(bool NSWmonitor : pNSWOut->getNSWmonitor() ){
380 muctpiinputPhase1->
setSectorLogicData(sldata,tgcsystem,subsystem,sectoraddr_forward++,muctpiBcId);
383 trackSelectorOut.get()->reset();
392 return StatusCode::SUCCESS;
398 std::map<Identifier, int>& TgcDigitIDs)
410 ATH_MSG_DEBUG(
"This channel is masked! offlineID=" << channelId);
413 TgcDigitIDs.emplace(channelId, 1);
421 TgcDigitIDs.emplace(Id, 1);
434 for(
const auto& itCh : tgcDigitIDs) {
443 bool status =
m_cabling->getOnlineIDfromOfflineID(channelId,
453 ATH_MSG_INFO(
"Fail to getOnlineIDfromOfflineID for " << channelId);
456 int subDetectorID, srodID, sswID, sbLoc, channelID;
463 fstatus =
m_cabling->getReadoutIDfromOfflineID(channelId,
469 fstatus =
m_cabling->getSLBIDfromReadoutID(
phi, isAside, isEndcap,
472 srodID, sswID,sbLoc);
476 <<
" octant#=" << octantNumber
477 <<
" mod#=" << moduleNumber
478 <<
" layer#=" << layerNumber <<
" r#=" << rNumber
479 <<
" isStrip=" << wireOrStrip
480 <<
" ch#=" << channelNumber <<
endmsg
481 <<
" --> readoutID: sudetID=" << subDetectorID
482 <<
" srodID=" << srodID <<
" sswID=" << sswID
483 <<
" slbID=" << slbID <<
" chID=" << channelID);
488 event.NewASDOut(
index,
493 ATH_MSG_INFO(
"Fail to getSLBIDfromOfflineID for " << channelId);
499 <<
" vector size : " << event.GetNASDOut() );
500 for(
int iout=1; iout<=
event.GetNASDOut(); iout++){
501 TGCASDOut* asdout = (
event.GetASDOutVector()[iout-1]);
521 if(trackSelectorOut ==0)
return;
528 for(
int trackNumber=0;trackNumber!=trackSelectorOut->
getNCandidate();trackNumber++){
530 sldata->
roi(trackNumber,((trackSelectorOut->
getR(trackNumber))<<2)+(trackSelectorOut->
getPhi(trackNumber)));
531 sldata->
pt(trackNumber,trackSelectorOut->
getPtLevel(trackNumber));
532 if (trackSelectorOut->
getInnerVeto(trackNumber)) sldata->
ovl(trackNumber,1);
533 else sldata->
ovl(trackNumber,0);
547 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
551 int subDetectorId, rodId, sswId, sbLoc, secId, secIdEIFI;
553 bool isAside, isEndcap;
int phi, moduleType, id, phiEIFI;
554 isAside = (sector->
getSideId()==0 ? 1 : 0);
563 secId = (isEndcap ? (module/3)*2+module%3 :
module/3);
567 secIdEIFI = module%3;
569 phiEIFI = (secIdEIFI+23+sector->
getOctantId()*3)%24+1;
572 const int NumberOfSLBType = 6;
574 for(
int itype=0; itype<NumberOfSLBType; itype++) {
575 moduleType = getLPTTypeInRawData(itype);
578 for(unsigned int index=0; index<sector->getNumberOfSB(itype); index++) {
579 TGCSlaveBoard * slb = sector->getSB(itype, index);
580 if (0==slb) continue;
582 const TGCSlaveBoardOut * out = slb->getOutput();
583 if (0==out) continue;
585 bool isEIFI = (moduleType==TgcRawData::SLB_TYPE_INNER_WIRE ||
586 moduleType==TgcRawData::SLB_TYPE_INNER_STRIP);
590 m_cabling->getReadoutIDfromSLBID((isEIFI ? phiEIFI : phi),
593 subDetectorId, rodId,
596 ATH_MSG_DEBUG(
"TGCcablignSvc::getReadoutIDfromSLBID fails");
597 ATH_MSG_DEBUG(
"phi=" << phi
598 <<
" side=" << ((isAside) ?
"A":
"C")
599 <<
" region=" << ((isEndcap) ?
"Endcap" :
"Forward")
600 <<
" type=" << moduleType
602 <<
" subDetectorId=" << subDetectorId
603 <<
" rodId=" << rodId
604 <<
" sswId=" << sswId
605 <<
" sbLoc=" << sbLoc);
610 for(int iData=0; iData<out->getNumberOfData(); iData++) {
611 if (!out->getHit(iData)) continue;
614 TgcRawData::SlbType type = (TgcRawData::SlbType)moduleType;
615 int subMat = iData % 4;
617 if (type==TgcRawData::SLB_TYPE_TRIPLET_STRIP ) {
621 } else if ( (type==TgcRawData::SLB_TYPE_INNER_WIRE ) ||
622 (type==TgcRawData::SLB_TYPE_INNER_STRIP) ) {
625 std::unique_ptr<TgcRawData> rawdata(new TgcRawData(bcTag,
626 static_cast<uint16_t>(subDetectorId),
627 static_cast<uint16_t>(rodId),
628 static_cast<uint16_t>(sswId),
629 static_cast<uint16_t>(sbLoc),
631 type, out->getDev(iData), seg, subMat,
632 out->getPos(iData)));
633 addRawData(std::move(rawdata), tgcrdo);
637 bool setEIFITriggerBit =
638 m_innerTrackletSlotHolder.setTriggerBit(sector->getSideId(),
641 TGCInnerTrackletSlot::EI : TGCInnerTrackletSlot::FI),
642 (type==TgcRawData::SLB_TYPE_INNER_WIRE ?
643 TGCInnerTrackletSlot::WIRE : TGCInnerTrackletSlot::STRIP),
644 static_cast<unsigned int>(subMat),
647 if(!setEIFITriggerBit) {
648 ATH_MSG_INFO(
"Fail to set Inner trigger bit of"
649 <<
" sideId= " << sector->getSideId()
650 <<
" slotId= " << phiEIFI
651 <<
" region= " << (isEndcap ?
"EI" :
"FI")
652 <<
" readout= " << (type==TgcRawData::SLB_TYPE_INNER_WIRE ?
"WIRE" :
"STRIP")
653 <<
" subMat(iBit)= " << static_cast<unsigned int>(subMat) );
657 ATH_MSG_DEBUG(
" recordRdoSLB : reg=" << (isEndcap ?
"EC" :
"FWD")
658 <<
" srod=" << rodId <<
" sswId=" << sswId
659 <<
" SBLoc=" << sbLoc <<
" type=" << itype
660 <<
" iData(subMat:seg)=" << iData <<
" pos="
661 << out->getPos(iData) <<
" dev=" << out->getDev(iData) );
671 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
673 if(sector->
hasHit() ==
false)
return;
676 int subDetectorId, rodId, sswId, sbLoc, secId;
679 int startEndcapSector, coverageOfEndcapSector;
680 int startForwardSector, coverageOfForwardSector;
684 coverageOfEndcapSector,
686 coverageOfForwardSector
692 bool isAside, isEndcap, isStrip;
int phi;
699 sectorId = ((
module/3)*2+module%3) + sector->getOctantId()*6;
701 sectorId = (
module/3) + sector->getOctantId()*3;
707 secId = sectorId % coverageOfEndcapSector;
709 secId = sectorId % coverageOfForwardSector;
712 phi = (isEndcap ? (sectorId+46)%48+1 : (sectorId+23)%24+1);
714 for(
int itype=0; itype<2; itype++) {
715 isStrip = (itype==0 ? 0 : 1);
716 for(
unsigned int ihpb=0; ihpb<sector->
getNumberOfHPB(itype); ihpb++) {
718 if (0==hpb)
continue;
720 if (0==out)
continue;
723 bool status =
m_cabling->getReadoutIDfromHPTID(
phi, isAside, isEndcap, isStrip, hpb->
getId(),
724 subDetectorId, rodId, sswId, sbLoc);
733 if (!out->getSel(ichip, icand))
continue;
736 int hitId = out->getHitID(ichip, icand);
737 m_cabling->getRDOHighPtIDfromSimHighPtID(!isEndcap, isStrip,
739 bool isHPT = out->getPt(ichip,icand)==
PtHigh ? 1 : 0;
741 static_cast<uint16_t
>(subDetectorId),
742 static_cast<uint16_t
>(rodId),
745 isStrip, (!isEndcap), secId, chip, icand,
747 out->getPos(ichip, icand),
748 out->getDev(ichip, icand),
754 <<
" side=" << ( (isAside)?
"A" :
"C")
755 << (isEndcap ?
"EC" :
"FWD")
756 <<
" w/s=" << ( (isStrip)?
"s" :
"w")
757 <<
" id=" << hpb->
getId()
761 <<
" block=" << out->getHitID(ichip, icand)
762 <<
" subMatrix=" << out->getPos(ichip, icand)
763 <<
" dev=" << out->getDev(ichip, icand)
764 <<
" srod=" << rodId <<
" sswId=" << sswId <<
" SBLoc=" << sbLoc );
768 isEndcap && isStrip &&
771 if (hitId == 1) oredId = 5;
772 else if (hitId == 2) oredId = 6;
773 else if (hitId == 5) oredId = 1;
774 else if (hitId == 6) oredId = 2;
776 std::unique_ptr<TgcRawData> rawdata2(
778 static_cast<uint16_t
>(subDetectorId),
779 static_cast<uint16_t
>(rodId),
782 isStrip, (!isEndcap), secId, chip, icand,
784 out->getPos(ichip, icand),
785 out->getDev(ichip, icand),
804 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
808 if (!isEndcap)
return;
813 int sectorId = ((
module/3)*2+module%3) + octant*6;
814 int phi = (sectorId+46)%48+1;
817 int subDetectorId=0, rodId=0, sswId=0, sbLoc=0;
819 bool status =
m_cabling->getSReadoutIDfromSLID(
phi, isAside, isEndcap,
820 subDetectorId, rodId, sswId, sbLoc);
822 ATH_MSG_WARNING(
"TGCcablingSvc::ReadoutIDfromSLID fails in recordRdoInner()" );
829 int startEndcapSector, coverageOfEndcapSector;
830 int startForwardSector, coverageOfForwardSector;
831 if (!
m_cabling->getCoveragefromSRodID(rodId,
833 coverageOfEndcapSector,
835 coverageOfForwardSector
838 ATH_MSG_WARNING(
"LVL1TGCTrigger::recordRdoInner --- bad rodId " << rodId );
844 secId = sectorId % coverageOfEndcapSector;
846 secId = sectorId % coverageOfForwardSector;
856 octant, module, innerTrackletSlots);
858 std::array<int, n_slots>inner_eifi;
861 for (
int i_slot = 0; i_slot < n_slots; i_slot++) {
862 if (inner_eifi[i_slot] > 0) {
864 static_cast<uint16_t
>(subDetectorId),
865 static_cast<uint16_t
>(rodId),
870 static_cast<uint16_t
>(inner_eifi[i_slot]),
872 static_cast<uint16_t
>(i_slot) ));
878 int inner_tile =
m_system->getTMDB()->getInnerTileBits(sector->
getSideId(), sectorId);
880 if (inner_tile > 0) {
884 static_cast<uint16_t
>(subDetectorId),
885 static_cast<uint16_t
>(rodId),
898 std::shared_ptr<const LVL1TGC::NSWTrigOut> nsw_trigout =
m_system->getNSW()->getOutput(region, !isAside, sectorId);
899 for (
int icand=0; icand<(int)nsw_trigout->getNSWeta().size(); icand++ ){
901 static_cast<uint16_t
>(subDetectorId),
902 static_cast<uint16_t
>(rodId),
906 static_cast<uint16_t
>(secId),
907 static_cast<uint16_t
>(nsw_trigout->getNSWeta().at(icand)),
908 static_cast<uint16_t
>(nsw_trigout->getNSWphi().at(icand)),
909 static_cast<uint16_t
>(icand),
910 static_cast<uint16_t
>(nsw_trigout->getNSWDtheta().at(icand)),
913 static_cast<uint16_t
>(nsw_trigout->getNSWTriggerProcessor().at(icand))));
920 std::shared_ptr<const LVL1TGC::BIS78TrigOut> bis78_trigout =
m_system->getBIS78()->getOutput(sectorId);
921 for (
int icand=0; icand<(int)bis78_trigout->getBIS78eta().size(); icand++ ){
923 static_cast<uint16_t
>(subDetectorId),
924 static_cast<uint16_t
>(rodId),
928 static_cast<uint16_t
>(secId),
929 static_cast<uint16_t
>(bis78_trigout->getBIS78eta().at(icand)),
930 static_cast<uint16_t
>(bis78_trigout->getBIS78phi().at(icand)),
931 static_cast<uint16_t
>(icand),
932 static_cast<uint16_t
>(bis78_trigout->getBIS78Deta().at(icand)),
933 static_cast<uint16_t
>(bis78_trigout->getBIS78Dphi().at(icand))));
941 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
944 std::shared_ptr<TGCTrackSelectorOut> selectorOut;
947 if (selectorOut ==
nullptr)
return;
948 if (selectorOut->getNCandidate() == 0)
return;
956 int Zdir= (isAside) ? 1 : -1;
962 sectorId = ((
module/3)*2+module%3) + sector->getOctantId()*6;
964 sectorId = (
module/3) + sector->getOctantId()*3;
970 int startEndcapSector, coverageOfEndcapSector;
971 int startForwardSector, coverageOfForwardSector;
975 coverageOfEndcapSector,
977 coverageOfForwardSector
981 secId = sectorId % coverageOfEndcapSector;
983 secId = sectorId % coverageOfForwardSector;
987 phi = (isEndcap ? (sectorId+46)%48+1 : (sectorId+23)%24+1);
990 int subDetectorId = 0, sswId = 0, sbLoc = 0;
991 bool status =
m_cabling->getSReadoutIDfromSLID(
phi, isAside, isEndcap,
992 subDetectorId, rodId, sswId, sbLoc);
995 << (isEndcap ?
" Endcap-" :
" Forward-")
996 << (isAside ?
"A " :
"C ")
1002 int inner=0, coinFlag=0;
1004 for (
unsigned int icand=0; icand < (
unsigned int)selectorOut->getNCandidate(); ++icand) {
1006 bool muplus =
getCharge(selectorOut->getDR(icand), Zdir)==1 ? 1 : 0;
1007 threshold = selectorOut->getPtLevel(icand);
1008 roi = ((selectorOut->getR(icand))<<2)+(selectorOut->getPhi(icand));
1009 if (selectorOut->getInnerVeto(icand))
veto = 1;
1012 inner = selectorOut->getInnerCoincidenceFlag(icand);
1013 coinFlag = selectorOut->getCoincidenceType(icand);
1017 static_cast<uint16_t
>(subDetectorId),
1018 static_cast<uint16_t
>(rodId),
1028 <<
" side=" << (isAside ?
"A " :
"C ")
1029 <<
" reg=" << (isEndcap ?
"EC" :
"FWD")
1031 <<
" cand=" <<
index
1032 <<
" charge=" << (muplus ?
"mu+" :
"mu-")
1036 <<
" srod=" << rodId <<
" sswId=" << sswId <<
" SBLoc=" << sbLoc
1037 <<
" inner=" << inner <<
" coinFlag=" << coinFlag );
1046 if (fname.empty())
return StatusCode::SUCCESS;
1049 if( fullName.empty())
1052 std::ifstream fin(fullName.c_str());
1054 ATH_MSG_FATAL(
"Cannot open file " << (fullName.empty() ? fname : fullName));
1055 return StatusCode::FAILURE;
1060 std::vector<std::string> mask;
1062 while(getline(fin,aLine)) {
1063 if (aLine.compare(0,3,
"///")!=0)
break;
1065 int id_type = atoi(aLine.c_str());
1066 while(getline(fin,aLine)) {
1067 if (!aLine.empty()) mask.push_back(aLine);
1072 std::vector<int> ids;
1074 int nmasked=0, nfired=0;
1075 for(
int ich=0; ich<(int)mask.size(); ich++) {
1076 std::string ch = mask[ich];
1080 if (id_type==1 && ids.size()==8) {
1081 int sysno1 = (ids[1]==-99 ? -1 : ids[1]);
int sysno2=(ids[1]==-99 ? 1 : ids[1]);
1082 int octno1 = (ids[2]==-99 ? 0 : ids[2]);
int octno2=(ids[2]==-99 ? 7 : ids[2]);
1083 for(
int sysno=sysno1; sysno<=sysno2; sysno+=2) {
1084 for(
int octno=octno1; octno<=octno2; octno++) {
1085 bool status =
m_cabling->getOfflineIDfromOnlineID(
ID,sysno,octno,
1086 ids[3],ids[4],ids[5],ids[6],ids[7]);
1088 <<
" sys=" << sysno <<
" oct=" << octno <<
" modno=" << ids[3]
1089 <<
" layerno=" << ids[4] <<
" rNumber=" << ids[5]
1090 <<
" strip=" << ids[6] <<
" chno=" << ids[7] );
1093 ATH_MSG_WARNING(
"This onlineID is not valid and cannot be converted to offline ID." );
1094 ATH_MSG_WARNING(
"sys=" << sysno <<
" oct=" << octno <<
" modno=" << ids[3]
1095 <<
" layerno=" << ids[4] <<
" rNumber=" << ids[5]
1096 <<
" strip=" << ids[6] <<
" chno=" << ids[7] );
1099 if (OnOff==0) nmasked+=1;
1100 else if (OnOff==1) nfired+=1;
1105 }
else if (id_type==2 && ids.size()==6) {
1106 int sysno1 = (ids[1]==-99 ? 103 : ids[1]);
int sysno2=(ids[1]==-99 ? 104 : ids[1]);
1107 int octno1 = (ids[2]==-99 ? 0 : ids[2]);
int octno2=(ids[2]==-99 ? 7 : ids[2]);
1108 for(
int sysno=sysno1; sysno<=sysno2; sysno+=1) {
1109 for(
int octno=octno1; octno<=octno2; octno++) {
1110 bool status =
m_cabling->getOfflineIDfromReadoutID(
ID, sysno,octno,ids[3],ids[4],ids[5]);
1112 <<
" subdetectorID=" << sysno <<
" rodId=" << octno <<
" sswID=" << ids[3]
1113 <<
" SBLoc=" << ids[4] <<
" channelId=" << ids[5] );
1115 ATH_MSG_WARNING(
"This readoutID is not valid and cannot be converted to offline ID " );
1116 ATH_MSG_WARNING(
"subdetectorID=" << sysno <<
" rodId=" << octno <<
" sswID=" << ids[3]
1117 <<
" SBLoc=" << ids[4] <<
" channelId=" << ids[5] );
1120 if (OnOff==0) nmasked+=1;
1121 else if (OnOff==1) nfired+=1;
1126 }
else if (id_type==3 && ids.size()==2) {
1130 if (OnOff==0) nmasked+=1;
1131 else if (OnOff==1) nfired+=1;
1134 ATH_MSG_INFO(
"Invalid input. Idtype or number of parameters are invalid: idtype=" << id_type
1135 <<
" number of elements = " << ids.size() );
1136 return StatusCode::FAILURE;
1140 ATH_MSG_INFO(
"Total number of masked channels ... " << nmasked);
1141 ATH_MSG_INFO(
"Total number of fired channels ... " << nfired);
1143 return StatusCode::SUCCESS;
1150 ATH_MSG_DEBUG(
"Retrieving Detector Mask from ByteStream metadata container");
1152 if (bsmdc.isValid() && !bsmdc->empty()) {
1154 uint64_t detMaskLeast = metadata->getDetectorMask();
1155 uint64_t detMaskMost = metadata->getDetectorMask2();
1157 std::vector<eformat::SubDetector> subDetOff;
1158 eformat::helper::DetectorMask(~detMaskLeast, ~detMaskMost).sub_detectors(subDetOff);
1159 auto sideA = std::find_if(subDetOff.begin(), subDetOff.end(), [](
const eformat::SubDetector &s) {
1160 return (s == eformat::MUON_MMEGA_ENDCAP_A_SIDE || s == eformat::MUON_STGC_ENDCAP_A_SIDE); });
1161 auto sideC = std::find_if(subDetOff.begin(), subDetOff.end(), [](
const eformat::SubDetector &s) {
1162 return (s == eformat::MUON_MMEGA_ENDCAP_C_SIDE || s == eformat::MUON_STGC_ENDCAP_C_SIDE); });
1164 if (sideA != std::end(subDetOff))
tgcArgs()->set_NSWSideInfo(
m_NSWSideInfo.value().erase(0,1));
1165 else if (sideC != std::end(subDetOff))
tgcArgs()->set_NSWSideInfo(
m_NSWSideInfo.value().erase(1,1));
1166 else if (sideA != std::end(subDetOff) && sideC != std::end(subDetOff))
tgcArgs()->set_NSWSideInfo(
"");
1168 return StatusCode::SUCCESS;
1174 if (
str.empty())
return;
1175 std::string line=
str;
1177 if (line.empty())
break;
1178 int i = line.find(
' ');
1179 if (i==(
int)std::string::npos && !line.empty()) {
1180 v.push_back(atoi(line.c_str()));
1183 std::string temp = line;
1184 temp.erase(i,line.size());
1185 v.push_back(atoi(temp.c_str()));
1195 return (dR >=0 ? 1 : -1 );
1222 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo)
1225 std::pair<int, int> subDetectorRod(rawdata->subDetectorId(), rawdata->rodId());
1226 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>
::iterator itRdo = tgcrdo.find(subDetectorRod);
1228 if (itRdo==tgcrdo.end()) {
1231 std::unique_ptr<TgcRdo> thisRdo(
new TgcRdo(rawdata->subDetectorId(), rawdata->rodId(), rawdata->bcId(), rawdata->l1Id()));
1232 thisRdo->push_back(std::move(rawdata));
1233 tgcrdo.insert(std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>
::value_type(subDetectorRod, std::move(thisRdo)));
1235 itRdo->second->push_back(std::move(rawdata));
1248 int maxRodId, maxSRodId, maxSswId, maxSbloc,minChannelId, maxChannelId;
1249 m_cabling->getReadoutIDRanges( maxRodId, maxSRodId, maxSswId, maxSbloc,minChannelId, maxChannelId);
1250 if (maxRodId ==12) {
1253 ATH_MSG_FATAL(
"Old TGCcablingSvc(octant segmentation) can not be used !");
1254 return StatusCode::FAILURE;
1259 return StatusCode::SUCCESS;
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::vector< Identifier > ID
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current TgcRawData
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old TgcRdo
uint16_t bcId(uint32_t data)
unsigned bcTag(unsigned bcBitMap)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Header file for AthHistogramAlgorithm.
Class representing data from an endcap SL board.
Base class for the data coming from one SL board.
int goodmf(size_t id) const
int bw2or3(size_t id) const
int charge(size_t id) const
int innercoin(size_t id) const
void clear2candidatesInSector()
void clear2candidates(size_t id)
void set2candidates(size_t id)
BooleanProperty m_useRun3Config
std::map< Identifier, int > m_MaskedChannel
mask channel map
StatusCode processOneBunch(const TgcDigitContainer *, LVL1MUONIF::Lvl1MuCTPIInputPhase1 *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
BooleanProperty m_USE_CONDDB
StringProperty m_NSWSideInfo
TGCInnerTrackletSlotHolder m_innerTrackletSlotHolder
void recordRdoHPT(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
BooleanProperty m_INNERVETO
int getLPTTypeInRawData(int type)
SG::ReadHandleKey< Muon::NSW_TrigRawDataContainer > m_keyNSWTrigOut
virtual StatusCode execute() override
uint16_t m_bctagInProcess
virtual StatusCode start() override
virtual ~LVL1TGCTrigger()
SG::ReadHandleKey< Muon::RpcBis78_TrigRawDataContainer > m_keyBIS78TrigOut
SG::ReadHandleKey< TgcDigitContainer > m_keyTgcDigit
TGCDatabaseManager * m_db
SG::ReadCondHandleKey< TGCTriggerLUTs > m_readLUTs_CondKey
StatusCode getMaskedChannel()
void recordRdoInner(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
BooleanProperty m_FORCENSWCOIN
void recordRdoSL(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
int getCharge(int dR, int Zdir)
SG::ReadHandleKey< TgcRdoContainer > m_keyTgcRdoIn
SG::ReadHandleKey< TileMuonReceiverContainer > m_keyTileMu
ShortProperty m_CurrentBunchTag
property, see LVL1TGCTrigger::LVL1TGCTrigger
virtual StatusCode finalize() override
virtual StatusCode initialize() override
SG::ReadCondHandleKey< TGCTriggerData > m_readCondKey
void extractFromString(const std::string &, std::vector< int > &)
SG::WriteHandleKey< TgcRdoContainer > m_keyTgcRdo
LVL1TGCTrigger(const std::string &name, ISvcLocator *pSvcLocator)
standard constructor and destructor for algorithms
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1Key
ServiceHandle< MuonTGC_CablingSvc > m_cabling
BooleanProperty m_USEINNER
void fillTGCEvent(const std::map< Identifier, int > &, TGCEvent &)
BooleanProperty m_USEBIS78
BooleanProperty m_ProcessAllBunches
SG::ReadHandleKey< ByteStreamMetadataContainer > m_bsMetaDataContRHKey
void recordRdoSLB(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
bool addRawData(std::unique_ptr< TgcRawData > rawdata, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &tgcrdo)
std::unique_ptr< TGCElectronicsSystem > m_system
StringProperty m_MaskFileName12
property, see LVL1TGCTrigger::LVL1TGCTrigger
BooleanProperty m_OutputTgcRDO
property, see LVL1TGCTrigger::LVL1TGCTrigger
BooleanProperty m_SHPTORED
void FillSectorLogicData(LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 *sldata, const TGCTrackSelectorOut *trackSelectorOut)
void doMaskOperation(const TgcDigitContainer *, std::map< Identifier, int > &)
std::unique_ptr< TGCTimingManager > m_TimingManager
const TGCReadoutIndex & GetTGCReadoutIndex() const
TGCSignalType GetSignalType() const
TGCHighPtChipOut * getOutput()
static constexpr int s_NHitInTrackSelector
@ NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR
int GetLayerNumber() const
int GetOctantNumber() const
TGCZDirection GetZDirection() const
int GetModuleNumber() const
void setInnerTrackletSlots(const TGCInnerTrackletSlot *innerTrackletSlots[])
void getTrackSelectorOutput(std::shared_ptr< TGCTrackSelectorOut > &trackSelectorOut) const
TGCHighPtBoard * getHPB(int type, int index) const
TGCRegionType getRegionType() const
unsigned int getNumberOfHPB(int type) const
LVL1TGC::TGCSide getSideId() const
int getPtLevel(int order) const
int getPhi(int order) const
int getNCandidate() const
int getCoincidenceType(int order) const
int getCharge(int order) const
@ NCandidateInTrackSelector
int getInnerCoincidenceFlag(int order) const
bool getInnerVeto(int order) const
int getR(int order) const
int getGoodMFFlag(int order) const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
bool isActive(int cwtype) const
Use IdentifiableContainer with TgcDigitCollection.
An unit object of TGC ROD output.
uint16_t subDetectorId() const
std::vector< std::string > veto
these patterns are anded
TGCSide
The sides of TGC (A- or C-side)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())