|
ATLAS Offline Software
|
#include <MuonLayerHoughTool.h>
|
| MuonLayerHoughTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Default constructor. More...
|
|
virtual | ~MuonLayerHoughTool ()=default |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
|
virtual std::pair< std::unique_ptr< MuonPatternCombinationCollection >, std::unique_ptr< HoughDataPerSectorVec > > | find (const MdtPrepDataContainer *mdtCont, const CscPrepDataContainer *cscCols, const TgcPrepDataContainer *tgcCont, const RpcPrepDataContainer *rpcCont, const sTgcPrepDataContainer *stgcCont, const MMPrepDataContainer *mmCont, const EventContext &ctx) const override |
|
virtual std::pair< std::unique_ptr< MuonPatternCombinationCollection >, std::unique_ptr< HoughDataPerSectorVec > > | find (const std::vector< const MdtPrepDataCollection * > &mdtCols, const std::vector< const CscPrepDataCollection * > &cscCols, const std::vector< const TgcPrepDataCollection * > &tgcCols, const std::vector< const RpcPrepDataCollection * > &rpcCols, const MuonSegmentCombinationCollection *, const EventContext &ctx) const override |
| find patterns for a give set of MuonPrepData collections + optionally CSC segment combinations More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | getSectors (const Amg::Vector3D &pos, std::vector< int > §ors) const |
|
void | getSectors (const TgcClusterObj3D &tgc, std::vector< int > §ors) const |
|
double | rCor (const Amg::Vector3D &pos, const Identifier &id) const |
|
double | rCor (const MuonCluster &rpc) const |
|
double | rCor (const MdtPrepData &mdt) const |
|
double | rCor (const TgcClusterObj3D &tgc, const TgcEdge val, int sector) const |
|
int | sublay (const Identifier &id, float z=0) const |
|
std::pair< std::unique_ptr< MuonPatternCombinationCollection >, std::unique_ptr< HoughDataPerSectorVec > > | analyse (State &state) const |
|
void | fillHitsPerSector (const EventContext &ctx, State &state, const int sector, const CollectionsPerSector &hashes, const MdtPrepDataContainer *mdtCont, const CscPrepDataContainer *cscCont, const TgcPrepDataContainer *tgcCont, const RpcPrepDataContainer *rpcCont, const sTgcPrepDataContainer *stgcCont, const MMPrepDataContainer *mmCont) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, const MdtPrepDataCollection &mdts, HitVec &hits) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, std::vector< std::unique_ptr< TgcHitClusteringObj >> &tgcClusteringObjs, const TgcPrepDataCollection &tgcs, HitVec &hits, PhiHitVec &phiHits, int sector) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, const RpcPrepDataCollection &rpcs, HitVec &hits, PhiHitVec &phiHits) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, const MMPrepDataCollection &mdts, HitVec &hits) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, const sTgcPrepDataCollection &stgcs, HitVec &hits, PhiHitVec &phiHits, int sector) const |
|
void | fill (const EventContext &ctx, std::set< Identifier > &truthHits, const CscPrepDataCollection &cscs, HitVec &hits, PhiHitVec &phiHits) const |
|
bool | findMaxima (MaximumVec &seedMaxima, MuonHough::MuonLayerHough &hough, HitVec &hits, MaximumVec &maxima) const |
|
bool | findMaxima (MuonHough::MuonPhiLayerHough &hough, PhiHitVec &hits, PhiMaximumVec &maxima, int sector) const |
|
void | associateMaximaToPhiMaxima (MuonStationIndex::DetectorRegionIndex region, HoughDataPerSector &houghData, std::map< MuonHough::MuonPhiLayerHough::Maximum *, MaximumVec > &phiEtaAssociations, std::vector< MaximumVec > &unassEtaMaxima) const |
|
void | associateMaximaInNeighbouringSectors (HoughDataPerSector &houghData, std::vector< HoughDataPerSector > &houghDataPerSectorVec) const |
|
void | extendSeed (MuonHough::MuonDetectorHough &detectorHoughTransforms, Road &road, HoughDataPerSector §orData) const |
|
void | associatePhiMaxima (Road &road, PhiMaximumVec &phiMaxima) const |
|
double | combinedPeakheight (double ph, double ph1, double ph2, double phn, double rot, int layer, int) const |
|
void | createPatternCombinations (std::vector< MaximumVec > &maxima, MuonPatternCombinationCollection &patternCombis) const |
|
void | createPatternCombinations (std::map< MuonHough::MuonPhiLayerHough::Maximum *, MaximumVec > &phiEtaAssociations, MuonPatternCombinationCollection &patternCombis) const |
|
void | insertHash (const IdentifierHash &hash, const Identifier &id) const |
|
void | insertHash (int sector, const IdentifierHash &hash, const Identifier &id) const |
|
void | matchTruth (std::set< Identifier > &truthHits, const PRD_MultiTruthCollection &truthCol, const Identifier &id, MuonHough::HitDebugInfo &debug) const |
|
void | initializeSectorMapping (const EventContext &ctx) const |
|
void | printTruthSummary (std::set< Identifier > &truth, std::set< Identifier > &found) const |
|
void | buildRoads (MaximumVec &seedMaxima, MuonHough::MuonDetectorHough &detectorHoughTransforms, std::unique_ptr< HoughDataPerSectorVec > &houghDataPerSectorVec, std::vector< Road > &roads) const |
|
void | mergePhiMaxima (Road &road) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
Gaudi::Property< bool > | m_useSeeds {this, "UseSeeds", true} |
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_muonManagerKey {this, "MuonManagerKey", "MuonDetectorManager", "MuonManager ReadKey for IOV Range intersection"} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
PublicToolHandle< MuonEDMPrinterTool > | m_printer {this, "printerTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
std::vector< MuonHough::MuonLayerHoughSelector > | m_selectors |
|
std::vector< MuonHough::MuonLayerHoughSelector > | m_selectorsLoose |
|
SG::ReadHandleKeyArray< PRD_MultiTruthCollection > | m_truthNames {this, "TruthNames", {}} |
|
Gaudi::Property< bool > | m_useRpcTimeVeto {this, "RpcTimeVeto", false} |
|
Gaudi::Property< bool > | m_requireTriggerConfirmationNSW {this, "TriggerConfirmationNSW", false} |
|
Gaudi::Property< bool > | m_onlyUseCurrentBunch {this, "OnlyUseCurrentBunch", false} |
|
Gaudi::Property< bool > | m_debugHough {this, "DebugHough", false} |
|
Gaudi::Property< bool > | m_doParabolicExtrapolation |
|
Gaudi::Property< float > | m_extrapolationDistance {this, "ExtrapolationDistance", 1500.} |
|
Gaudi::Property< bool > | m_addSectors {this, "AddSectors", false} |
|
unsigned int | m_ntechnologies {UINT_MAX} |
|
std::map< unsigned int, unsigned int > | m_techToTruthNameIdx {} |
|
MuonSectorMapping | m_sectorMapping |
|
std::mutex m_mutex | ATLAS_THREAD_SAFE |
|
CollectionsPerSectorVec m_collectionsPerSector | ATLAS_THREAD_SAFE |
|
bool m_sectorSetup | ATLAS_THREAD_SAFE {false} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 47 of file MuonLayerHoughTool.h.
◆ CollectionsPerSectorVec
◆ HashVec
◆ HitVec
◆ HoughDataPerSector
◆ HoughDataPerSectorVec
◆ MaximumAssociationMap
◆ MaximumVec
◆ PhiHitVec
◆ PhiMaximumVec
◆ RegionHashVec
◆ RegionHitVec
◆ RegionMaximumVec
◆ RegionPhiHitVec
◆ RegionPhiMaximumVec
◆ StoreGateSvc_t
◆ TechnologyRegionHashVec
◆ TgcEdge
◆ MuonLayerHoughTool()
Muon::MuonLayerHoughTool::MuonLayerHoughTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonLayerHoughTool()
virtual Muon::MuonLayerHoughTool::~MuonLayerHoughTool |
( |
| ) |
|
|
virtualdefault |
◆ analyse()
Definition at line 203 of file MuonLayerHoughTool.cxx.
205 auto patternCombis = std::make_unique<MuonPatternCombinationCollection>();
208 for (
auto& houghData : state.houghDataPerSectorVec->vec) {
209 ATH_MSG_DEBUG(
"analyse: Filling Hough sector " << houghData.sector);
215 if (
hits.empty())
continue;
225 state.houghDataPerSectorVec->detectorHoughTransforms.hough(houghData.sector, region,
layer);
233 houghData.maxVec[layerHash].empty())
236 ++houghData.nlayersWithMaxima[region];
237 houghData.nmaxHitsInRegion[region] += houghData.maxVec[layerHash].front()->max;
242 <<
" hash: " << layerHash <<
" nMaxima: " << houghData.maxVec[layerHash].size());
247 std::vector<Road> roads;
248 buildRoads(state.seedMaxima, state.houghDataPerSectorVec->detectorHoughTransforms,
249 state.houghDataPerSectorVec, roads);
252 ATH_MSG_DEBUG(
"analyse: Building pattern combinations using roads " << roads.size());
253 for (
auto& road : roads) {
254 std::map<MuonHough::MuonPhiLayerHough::Maximum*, MuonLayerHoughTool::MaximumVec> phiEtaAssMap;
257 int sector = road.seed->hough->m_descriptor.sector;
262 << road.maxima.size() <<
" phi " << road.phiMaxima.size() <<
" seed : sector " << sector <<
" "
264 <<
" maximum " << road.seed->max <<
" position " << road.seed->pos <<
" angle " << road.seed->theta);
266 if (road.phiMaxima.empty())
267 unassociatedEtaMaxima.push_back(road.maxima);
269 for (
auto&
max : road.mergedPhiMaxima) { phiEtaAssMap[&
max] = road.maxima; }
277 std::vector<HoughDataPerSector*> sectorData(state.houghDataPerSectorVec->vec.size());
278 for (
unsigned int i = 0;
i < state.houghDataPerSectorVec->vec.size(); ++
i) sectorData[
i] = &state.houghDataPerSectorVec->vec[
i];
279 std::stable_sort(sectorData.begin(), sectorData.end(), SortHoughDataPerSector());
283 for (; spit != spit_end; ++spit) {
292 if (houghData.nlayersWithMaxima[region] == 0)
continue;
295 <<
" layers with eta maxima " << houghData.nlayersWithMaxima[region] <<
" hits "
296 << houghData.nmaxHitsInRegion[region] <<
" layers with phi maxima "
297 << houghData.nphilayersWithMaxima[region] <<
" hits " << houghData.nphimaxHitsInRegion[region]);
307 std::map<MuonHough::MuonPhiLayerHough::Maximum*, MaximumVec> phiEtaAssociations;
319 ATH_MSG_DEBUG(
"Found " << patternCombis->size() <<
" pattern combinations " << std::endl <<
m_printer->print(*patternCombis));
328 return {std::move(patternCombis), std::move(state.houghDataPerSectorVec)};
◆ associateMaximaInNeighbouringSectors()
Definition at line 810 of file MuonLayerHoughTool.cxx.
816 for (
unsigned int regLay = 0; regLay < houghData.maxVec.size(); ++regLay) {
817 MaximumVec& maxima = houghData.maxVec[regLay];
818 int sector = houghData.sector;
821 for (
int i = 0;
i < 2; ++
i) {
823 int sectorN = (
i == 0) ? sector - 1 : sector + 1;
824 if (
i == 0 && sector == 1) sectorN = 16;
825 if (
i == 1 && sector == 16) sectorN = 1;
829 MaximumVec& maximaN = houghDataN.maxVec[regLay];
832 for (
const auto& maximum : maxima) {
835 if (!maximum->hough) {
841 for (
const auto& maximumN : maximaN) {
843 if (!maximumN->hough) {
849 double rcor = maximumN->hough->m_descriptor.referencePosition *
851 maximum->hough->m_descriptor.referencePosition;
852 double dist = rcor - maximumN->pos;
853 ATH_MSG_DEBUG(
" maximumN->hough " << maximumN->hough->m_descriptor.referencePosition <<
" maximum->hough "
854 << maximum->hough->m_descriptor.referencePosition <<
" maximumN->pos "
855 << maximumN->pos <<
" maximum->pos " << maximum->pos << rcor <<
" distance "
857 if (std::abs(dist) > 100)
continue;
858 houghData.maxAssociationMap[maximum.get()].push_back(maximumN);
859 houghDataN.associatedToOtherSector.insert(maximumN.get());
861 ATH_MSG_DEBUG(
" Found maximum in neighbouring sector: max " << maximum->max <<
" pos " << rcor <<
" maxN "
862 << maximumN->max <<
" pos " << maximumN->pos
863 <<
" distance " << dist);
866 for (
int nn = 0; nn < 2; ++nn) {
868 const auto& maxi = nn == 0 ? maximum : maximumN;
869 const auto& maxi2 = nn == 0 ? maximumN : maximum;
871 for (
auto& hit : maxi->hits) {
872 if (hit->debugInfo()) {
873 hit->debugInfo()->phn = maxi2->max;
874 Identifier id = hit->tgc ? hit->tgc->etaCluster.front()->identify() : hit->prd->identify();
◆ associateMaximaToPhiMaxima()
Definition at line 885 of file MuonLayerHoughTool.cxx.
889 std::set<std::shared_ptr<MuonHough::MuonLayerHough::Maximum>> associatedMaxima;
893 ATH_MSG_DEBUG(
"associateMaximaToPhiMaxima in sector " << houghData.sector <<
": phi maxima " << phiMaxima.size());
895 for (
const auto& phiMaximum : phiMaxima) {
898 ATH_MSG_DEBUG(
" Considering phi maximum " << phiMaximum->max <<
" hits " << phiMaximum->hits.size());
905 std::set<Identifier> triggerLayers;
906 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>> tgcClusters;
909 for (
const auto& phiHit : phiMaximum->hits) {
911 if (phiHit->tgc->phiCluster.empty())
914 tgcClusters[
m_idHelperSvc->stationIndex(phiHit->tgc->phiCluster.front()->identify())].insert(phiHit->tgc);
915 }
else if (phiHit->prd) {
918 triggerLayers.insert(layId);
922 ATH_MSG_DEBUG(
"Trigger layers " << triggerLayers.size() <<
" tgc layers " << tgcClusters.size());
925 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>>::const_iterator stit = tgcClusters.begin();
926 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>>::const_iterator stit_end = tgcClusters.end();
927 for (; stit != stit_end; ++stit) {
928 std::set<const TgcClusterObj3D*>::const_iterator ttit = stit->second.begin();
929 std::set<const TgcClusterObj3D*>::const_iterator ttit_end = stit->second.end();
930 for (; ttit != ttit_end; ++ttit) {
932 << (*ttit)->phiCluster.size());
943 MaximumVec& maxima = houghData.maxVec[layerHash];
944 if (maxima.empty())
continue;
948 for (
const auto& maximum : maxima) {
950 if (houghData.associatedToOtherSector.count(maximum.get()))
continue;
954 int ntrigconfirm = 0;
956 if (
pos != houghData.maxAssociationMap.end()) {
957 for (
const auto& max_itr :
pos->second) {
958 totmax =
std::max(max_itr->max, totmax);
959 ntrigconfirm += max_itr->triggerConfirmed;
962 totmax += maximum->max;
963 ntrigconfirm += maximum->triggerConfirmed;
966 <<
" neightbour confirmed value " << totmax <<
" trigger confirmations "
970 int nmmHits{0}, ntgcOverlaps{0}, nrpcOverlaps{0}, nstgcOverlaps{0}, nstgcNoOverlaps{0};
973 for (
const auto& etaHit : maximum->hits) {
975 if (tgcClusters[stIndex].
count(etaHit->tgc))
978 }
else if (etaHit->prd) {
982 if (triggerLayers.count(layId)) {
995 if (nmmHits + nstgcNoOverlaps + nstgcOverlaps > 0) {
997 if (maximum->pos < 1200.) {
999 ATH_MSG_DEBUG(
" maximum failed cut " << totmax <<
" cut 8, position " << maximum->pos);
1002 }
else if (maximum->pos > 4300.) {
1004 ATH_MSG_DEBUG(
" maximum failed cut " << totmax <<
" cut 8, position " << maximum->pos);
1009 ATH_MSG_DEBUG(
" maximum failed cut " << totmax <<
" cut 12, position " << maximum->pos);
1015 ATH_MSG_DEBUG(
" Overlap with Phi maximum: tgc " << ntgcOverlaps <<
" stgc " << nstgcOverlaps <<
" rpc " << nrpcOverlaps
1016 <<
" nphiTgc " << tgcClusters[stIndex].
size() <<
" trigLay "
1017 << triggerLayers.size());
1020 << ntgcOverlaps <<
" on phi maximum "
1021 << tgcClusters[stIndex].
size());
1026 << ntgcOverlaps <<
" on phi maximum "
1027 << tgcClusters[stIndex].
size());
1032 <<
" stgcs without overlaps " << nstgcNoOverlaps);
1038 associatedMaxima.insert(maximum);
1039 associatedMaximaVec.push_back(maximum);
1042 if (
pos != houghData.maxAssociationMap.end()) {
1043 associatedMaxima.insert(
pos->second.begin(),
pos->second.end());
1044 associatedMaximaVec.insert(associatedMaximaVec.end(),
pos->second.begin(),
pos->second.end());
1049 if (associatedMaximaVec.empty())
continue;
1050 ATH_MSG_DEBUG(
" processed phi maximum, associated eta maxima " << associatedMaximaVec.size());
1051 phiEtaAssociations[phiMaximum.get()] = std::move(associatedMaximaVec);
1060 if (
layer >= (
int)unassEtaMaxima.size()) {
1061 ATH_MSG_WARNING(
" size of unassEtaMaxima too small for region " << unassEtaMaxima.size() <<
" region "
1065 MaximumVec& maxima = houghData.maxVec[layerHash];
1068 for (
const auto& mit : maxima) {
1069 if (associatedMaxima.count(mit))
continue;
1070 unassEtaMaxima[
layer].push_back(mit);
◆ associatePhiMaxima()
Definition at line 682 of file MuonLayerHoughTool.cxx.
683 ATH_MSG_DEBUG(
"associateMaximaToPhiMaxima: phi maxima " << phiMaxima.size());
684 if (!road.seed)
return;
687 for (
const auto& pmaximum : phiMaxima) {
690 ATH_MSG_DEBUG(
" new phi maximum " << pmaximum->max <<
" hits " << pmaximum->hits.size());
693 std::map<Identifier, std::pair<float, float>> triggerLayersPhiMinMax;
694 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>> tgcClusters;
697 for (
const auto& phiHit : pmaximum->hits) {
702 if (phiHit->tgc->phiCluster.empty())
705 tgcClusters[
m_idHelperSvc->stationIndex(phiHit->tgc->phiCluster.front()->identify())].insert(phiHit->tgc);
706 }
else if (phiHit->prd) {
708 auto mit = triggerLayersPhiMinMax.find(gpId);
709 if (mit == triggerLayersPhiMinMax.end())
710 triggerLayersPhiMinMax[gpId] = std::make_pair(phiHit->phimin, phiHit->phimax);
712 mit->second.first =
std::min(phiHit->phimin, mit->second.first);
713 mit->second.second =
std::max(phiHit->phimax, mit->second.second);
719 ATH_MSG_DEBUG(
"Trigger layers " << triggerLayersPhiMinMax.size() <<
" tgc layers " << tgcClusters.size());
720 for (
auto tgcit = triggerLayersPhiMinMax.begin(); tgcit != triggerLayersPhiMinMax.end(); ++tgcit) {
725 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>>::const_iterator stit = tgcClusters.begin();
726 std::map<MuonStationIndex::StIndex, std::set<const TgcClusterObj3D*>>::const_iterator stit_end = tgcClusters.end();
727 for (; stit != stit_end; ++stit) {
728 std::set<const TgcClusterObj3D*>::const_iterator ttit = stit->second.begin();
729 std::set<const TgcClusterObj3D*>::const_iterator ttit_end = stit->second.end();
730 for (; ttit != ttit_end; ++ttit) {
732 << (*ttit)->phiCluster.size());
741 float phimin{10}, phimax{-10};
744 for (
const auto& road_max : road.maxima) {
749 for (
const auto& etaHit : road_max->hits) {
751 if (etaHit->tgc->etaCluster.empty())
754 if (tgcClusters[stIndex].
count(etaHit->tgc)) {
756 for (
const auto& phiHit : pmaximum->hits) {
757 if (phiHit->tgc == etaHit->tgc) {
758 phimin =
std::min(phiHit->phimin, phimin);
759 phimax =
std::max(phiHit->phimax, phimax);
768 }
else if (etaHit->prd) {
771 auto mit = triggerLayersPhiMinMax.find(gpId);
772 if (mit == triggerLayersPhiMinMax.end())
775 phimin =
std::min(mit->second.first, phimin);
776 phimax =
std::max(mit->second.second, phimax);
787 std::vector<int> sectors;
789 if (sectors.size() > 1) {
790 for (
const int& sec : sectors) {
791 if (sec != road.seed->hough->m_descriptor.sector) road.neighbouringSector = sec;
794 std::vector<int> sectors;
796 if (sectors.size() > 1) {
797 for (
const int& sec : sectors) {
798 if (sec != road.seed->hough->m_descriptor.sector) road.neighbouringSector = sec;
803 ATH_MSG_DEBUG(
" Overlap with Phi maximum: overlap " << noverlaps <<
" no overlap " << nNoOverlaps <<
" phimin " << phimin
804 <<
" phimax " << phimax <<
" neighbouring sector "
805 << road.neighbouringSector);
◆ buildRoads()
In the NSW setup it can happen that the hits in the collection are only made up of TGCHits which are clustered beforehand and hence have no associated prd. In order to prevent later a crash in bool isNSW = ... let's first find a hit with associated PRD
Definition at line 331 of file MuonLayerHoughTool.cxx.
336 [](
const std::shared_ptr<MuonHough::MuonLayerHough::Maximum>&
m1,
337 const std::shared_ptr<MuonHough::MuonLayerHough::Maximum>&
m2) { return m1->max > m2->max; });
339 std::set<std::shared_ptr<MuonHough::MuonLayerHough::Maximum>> associatedMaxima;
340 for (
const auto& seed : seedMaxima) {
342 if (associatedMaxima.count(seed))
continue;
347 int sector =
seed->hough->m_descriptor.sector;
356 <<
" position " <<
seed->pos <<
" angle " <<
seed->theta <<
" ptr " <<
seed.get());
361 MuonHough::HitVec::const_iterator ref_itr = std::find_if(
362 seed->hits.begin(),
seed->hits.end(), [](
const std::shared_ptr<MuonHough::Hit>& hit) ->
bool { return hit->prd; });
364 const bool isNSW = ref_itr !=
seed->hits.end() &&
369 extendSeed(detectorHoughTransforms, road, houghDataPerSectorVec->
vec[sector - 1]);
372 int sectorN = sector - 1;
373 if (sectorN < 1) sectorN = 16;
374 int sectorP = sector + 1;
375 if (sectorP > 16) sectorP = 1;
381 extendSeed(detectorHoughTransforms, road, houghDataPerSectorVec->
vec[sectorN - 1]);
383 extendSeed(detectorHoughTransforms, road, houghDataPerSectorVec->
vec[sectorP - 1]);
391 if (road.neighbouringSector != -1) {
392 ATH_MSG_DEBUG(
" Adding neighbouring sector " << road.neighbouringSector);
394 houghDataPerSectorVec->
vec[road.neighbouringSector - 1]);
400 associatePhiMaxima(road, houghDataPerSectorVec->
vec[road.neighbouringSector - 1].phiMaxVec[road.neighbouringRegion]);
407 associatedMaxima.insert(road.maxima.begin(), road.maxima.end());
411 for (
const auto&
max : road.maxima) {
417 <<
max->pos <<
" angle " <<
max->theta <<
" ptr " <<
max);
421 for (
auto& oldRoad : roads) {
422 std::vector<std::shared_ptr<MuonHough::MuonLayerHough::Maximum>>
intersection;
423 std::set_intersection(oldRoad.maximumSet.begin(), oldRoad.maximumSet.end(), road.maximumSet.begin(), road.maximumSet.end(),
426 unsigned int oldRoadSize = oldRoad.maximumSet.size();
427 unsigned int roadSize = road.maximumSet.size();
428 ATH_MSG_VERBOSE(
" Overlap check " << intersectionSize <<
" old " << oldRoadSize <<
" new " << roadSize <<
" old ptr "
430 if (intersectionSize == 0)
continue;
431 if (intersectionSize == roadSize) {
434 }
else if (intersectionSize == oldRoadSize) {
442 if (insert) roads.push_back(road);
◆ combinedPeakheight()
double Muon::MuonLayerHoughTool::combinedPeakheight |
( |
double |
ph, |
|
|
double |
ph1, |
|
|
double |
ph2, |
|
|
double |
phn, |
|
|
double |
rot, |
|
|
int |
layer, |
|
|
int |
|
|
) |
| const |
|
inlineprivate |
Definition at line 295 of file MuonLayerHoughTool.h.
297 if (
layer == 0 && ph < 3.)
return ph;
298 if (
layer == 1 && ph < 4.)
return ph;
299 if (
layer == 2 && ph < 3.)
return ph;
301 if (phn > 7) ph += phn;
304 if (ph1 > 6.9) ph += 2;
305 if (ph1 > 8.9) ph += 2;
306 if (ph2 > 5.9) ph += 2;
307 if (ph2 > 7.9) ph += 2;
310 if (ph1 > 6.9) ph += 2;
311 if (ph2 > 5.9) ph += 2;
312 if (ph2 > 7.9) ph += 2;
313 if (ph2 > 11.9) ph += 2;
316 if (ph1 > 6.9) ph += 2;
317 if (ph2 > 6.9) ph += 2;
318 if (ph2 > 8.9) ph += 2;
◆ createPatternCombinations() [1/2]
Definition at line 1138 of file MuonLayerHoughTool.cxx.
1141 ATH_MSG_DEBUG(
"Creating pattern combinations from eta/phi combinations " << phiEtaAssociations.size());
1144 std::map<MuonHough::MuonPhiLayerHough::Maximum*, MaximumVec>::const_iterator pit = phiEtaAssociations.begin();
1145 std::map<MuonHough::MuonPhiLayerHough::Maximum*, MaximumVec>::const_iterator pit_end = phiEtaAssociations.end();
1146 for (; pit != pit_end; ++pit) {
1147 if (pit->second.empty())
continue;
1150 std::map<Identifier, std::set<const Trk::PrepRawData*>> phiHitsPerChamber;
1153 for (
const auto& hit : pit->first->hits) {
1156 phiHitsPerChamber[chId].insert(hit->tgc->phiCluster.begin(), hit->tgc->phiCluster.end());
1157 }
else if (hit->prd) {
1159 phiHitsPerChamber[chId].insert(hit->prd);
1164 std::vector<MuonPatternChamberIntersect> chamberData;
1165 std::set<Identifier> addedPhiHits;
1168 std::map<Identifier, std::set<const Trk::PrepRawData*>> prdsPerChamber;
1171 std::map<MuonStationIndex::ChIndex, std::pair<Amg::Vector3D, Amg::Vector3D>> directionsPerChamberLayer;
1174 for (
const auto&
max : pit->second) {
1180 if (
max->hits.empty()) {
1187 for (
const auto& hit :
max->hits) {
1190 chId =
m_idHelperSvc->chamberId(hit->tgc->etaCluster.front()->identify());
1191 prdsPerChamber[chId].insert(hit->tgc->etaCluster.begin(), hit->tgc->etaCluster.end());
1192 }
else if (hit->prd) {
1194 prdsPerChamber[chId].insert(hit->prd);
1201 if (!directionsPerChamberLayer.count(chIndex)) {
1203 double maxpos =
max->pos;
1204 double refPlane = 0.;
1207 refPlane =
max->hough->m_descriptor.referencePosition;
1211 refPlane = hit->prd->detectorElement()->surface(hit->prd->identify()).center().perp();
1213 refPlane = hit->prd->detectorElement()->surface(hit->prd->identify()).center().z();
1215 double r =
isBarrel ? refPlane : maxpos;
1216 double z =
isBarrel ? maxpos : refPlane;
1227 double phi = pit->first->pos;
1230 double sinphi = scphi.sn;
1231 double cosphi = scphi.cs;
1234 double sintheta = sctheta.sn;
1235 double costheta = sctheta.cs;
1237 std::pair<Amg::Vector3D, Amg::Vector3D>& posDir = directionsPerChamberLayer[chIndex];
1241 <<
" setting position: perp " << posDir.first.perp() <<
" z " << posDir.first.z() <<
" phi pos "
1242 << posDir.first.phi() <<
" direction phi " << posDir.second.phi() <<
" theta pos "
1243 << posDir.first.theta() <<
" direction theta " << posDir.second.theta() <<
" ref perp " <<
r <<
" z "
1244 <<
z <<
" phi " << phi <<
" theta " << theta);
1245 if (posDir.first.dot(posDir.second) < 0.) {
1246 ATH_MSG_WARNING(
" direction not pointing to IP " << posDir.first.unit().dot(posDir.second));
1250 std::map<Identifier, std::set<const Trk::PrepRawData*>>
::iterator pos = phiHitsPerChamber.find(chId);
1251 if (
pos != phiHitsPerChamber.end()) {
1253 if (ipos.second) { prdsPerChamber[chId].insert(
pos->second.begin(),
pos->second.end()); }
1259 return prd1->
identify() < prd2->identify();
1261 std::map<Identifier, std::set<const Trk::PrepRawData*>>
::iterator chit = prdsPerChamber.begin();
1262 std::map<Identifier, std::set<const Trk::PrepRawData*>>
::iterator chit_end = prdsPerChamber.end();
1263 for (; chit != chit_end; ++chit) {
1265 std::vector<const Trk::PrepRawData*> prds;
1266 prds.insert(prds.end(), chit->second.begin(), chit->second.end());
1271 std::map<MuonStationIndex::ChIndex, std::pair<Amg::Vector3D, Amg::Vector3D>>::const_iterator
pos =
1272 directionsPerChamberLayer.find(chIndex);
1275 if (
pos != directionsPerChamberLayer.end()) {
1276 gpos =
pos->second.first;
1277 gdir =
pos->second.second;
1279 ATH_MSG_WARNING(
"No global position and direction found, calculating from surface");
1281 gdir = -1 * gpos.unit();
1285 <<
" z " << gpos.z() <<
" phi pos " << gpos.phi() <<
" direction phi " << gdir.phi()
1286 <<
" theta pos " << gpos.theta() <<
" theta " << gdir.theta() <<
" hits "
1290 MuonPatternChamberIntersect
intersect(gpos, gdir, prds);
1294 if (chamberData.empty())
continue;
1295 if (addedPhiHits.empty()) {
1299 MuonPatternCombination* combi =
new MuonPatternCombination(
nullptr, chamberData);
1300 ATH_MSG_DEBUG(
"adding pattern combination with chambers " << chamberData.size() <<
" phi layers " << addedPhiHits.size()
◆ createPatternCombinations() [2/2]
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extendSeed()
Definition at line 530 of file MuonLayerHoughTool.cxx.
533 if (!road.seed)
return;
545 if (
layer == seedLayer &&
seed.hough->m_descriptor.sector == sectorData.sector)
continue;
555 if (maxima.empty())
continue;
558 <<
" size " << maxima.size());
560 for (
const auto& candMaximum : maxima) {
565 ATH_MSG_VERBOSE(
" Adding maximum position " << candMaximum->pos <<
" intersect diff" << yloc_diff);
566 road.add(candMaximum);
569 << candMaximum->pos <<
" x " << candMaximum->hough->m_descriptor.referencePosition <<
" seed y "
570 <<
seed.hough->m_descriptor.referencePosition <<
" x " <<
seed.pos <<
" intersect diff " << yloc_diff);
578 ATH_MSG_DEBUG(
"Checking Barrel/Endcap overlaps: min dist edge "
579 <<
seed.pos -
seed.hough->m_descriptor.yMinRange <<
" max dist edge " <<
seed.pos -
seed.hough->m_descriptor.yMaxRange
580 <<
" pos " <<
seed.pos <<
" range " <<
seed.hough->m_descriptor.yMinRange <<
" "
581 <<
seed.hough->m_descriptor.yMaxRange);
583 if (std::abs(
seed.pos -
seed.hough->m_descriptor.yMinRange) < 4000. ||
584 std::abs(
seed.pos -
seed.hough->m_descriptor.yMaxRange) < 4000.) {
601 double distanceCut = 1000.;
606 if (maxima.empty())
continue;
609 <<
" size " << maxima.size());
612 for (
const auto& candMaximum : maxima) {
616 << candMaximum->pos <<
" x " << candMaximum->hough->m_descriptor.referencePosition <<
" seed y "
617 <<
seed.hough->m_descriptor.referencePosition <<
" x " <<
seed.pos <<
" intersect diff " << yloc_diff);
619 if (std::abs(yloc_diff) < distanceCut) {
620 road.add(candMaximum);
621 road.neighbouringRegion = neighbourRegion;
628 std::set<const TgcClusterObj3D*> tgcClusters;
629 std::set<Identifier> triggerLayers;
631 for (
const auto& maximum : maxima) {
632 if (maximum->hough->m_descriptor.sector != sectorData.sector)
636 for (
auto ehit = maximum->hits.begin(); ehit != maximum->hits.end(); ++ehit) {
640 }
else if (etaHit.
prd) {
647 detectorHoughTransforms.
phiHough(region);
651 PhiHitVec& phiHits = sectorData.phiHitVec[region];
652 for (
const auto& phiHit : phiHits) {
654 if (tgcClusters.find(phiHit->tgc) != tgcClusters.end()) phiHitsInMaximum.push_back(phiHit);
655 }
else if (phiHit->prd) {
656 if (triggerLayers.find(
m_idHelperSvc->gasGapId(phiHit->prd->identify())) != triggerLayers.end())
657 phiHitsInMaximum.push_back(phiHit);
663 << phiHitsInMaximum.size() <<
" phi hits: " << phiHits.size());
665 if (!
findMaxima(phiHough, phiHitsInMaximum, sectorData.phiMaxVec[region], sectorData.sector) ||
666 sectorData.phiMaxVec[region].empty()) {
671 ++sectorData.nphilayersWithMaxima[region];
672 sectorData.nphimaxHitsInRegion[region] += sectorData.phiMaxVec[region].front()->max;
675 << sectorData.nphilayersWithMaxima[region]
676 <<
" -> nPhiMaxima: " << sectorData.phiMaxVec[region].size()
677 <<
" max sum: " << sectorData.nphimaxHitsInRegion[region]);
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fill() [1/6]
CSCs were not part of the pattern finding yet..
Definition at line 1550 of file MuonLayerHoughTool.cxx.
1556 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1560 unsigned int neta{0}, nphi{0};
1561 for (
const CscPrepData* prd : cscs) {
1562 const bool meas_phi =
m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify());
1568 <<
" -> eta hits " << neta <<
" phi hits " << nphi);
1569 for (
const CscPrepData* prd : cscs) {
1571 int sublayer =
sublay(
id);
1573 debug->isEtaPhi = (neta && nphi);
1574 debug->trigConfirm = 1;
1575 debug->time = prd->time();
1578 float weight = (neta && nphi) ? 2 : 1;
1580 const float r =
rCor(*prd);
1581 const float phi = prd->globalPosition().phi();
1582 const double phi1 =
phi;
1585 phiHits.emplace_back(hit);
1587 const float x =
rCor(*prd);
1588 const float y = prd->globalPosition().z();
1589 const float stripCor = 0.5 * prd->detectorElement()->StripWidth(
false);
1590 const float ymin =
y - stripCor;
1591 const float ymax =
y + stripCor;
1592 debug->r = stripCor;
1594 hits.emplace_back(hit);
◆ fill() [2/6]
Definition at line 1510 of file MuonLayerHoughTool.cxx.
1512 if (mdts.empty())
return;
1518 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1520 unsigned int nmdts(mdts.size()), nmdtsBad{0};
1521 for (
const MdtPrepData* prd : mdts) {
1527 float r =
rCor(*prd);
1528 float x = barrelLike ?
r : prd->globalPosition().z();
1529 float y = barrelLike ? prd->globalPosition().z() :
r;
1530 int sublayer =
sublay(
id);
1535 debug->time = prd->tdc();
1541 hits.emplace_back(hit);
1546 <<
" -> hits: " << nmdts <<
" bad " << nmdtsBad <<
" isSmallChamber "
◆ fill() [3/6]
Definition at line 1648 of file MuonLayerHoughTool.cxx.
1650 if (mms.empty())
return;
1656 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1661 std::array<double,8> multiplicity{};
1662 for (
const MMPrepData* prd : mms) {
1664 int sublayer =
sublay(
id) % 10;
1665 multiplicity[sublayer]++;
1669 for (
int i = 0;
i<8 ;
i++)
if(multiplicity[
i]>0)
ATH_MSG_DEBUG(
" sublayer " <<
i <<
" hits " << multiplicity[
i]);
1672 for (
const MMPrepData* prd : mms) {
1674 float x = prd->globalPosition().z();
1675 float y =
rCor(*prd);
1676 int sublayer =
sublay(
id) % 10;
1677 float stripCor = prd->detectorElement()->getDesign(
id)->inputPitch;
1678 float ymin =
y - stripCor;
1679 float ymax =
y + stripCor;
1685 debug->r = stripCor;
1688 std::unique_ptr<MuonHough::Hit> hit = std::make_unique<MuonHough::Hit>(sublayer,
x,
ymin,
ymax,
weight,
debug, prd);
1689 hits.emplace_back(std::move(hit));
◆ fill() [4/6]
Definition at line 1598 of file MuonLayerHoughTool.cxx.
1600 if (rpcs.empty())
return;
1603 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1608 unsigned int neta{0}, nphi{0};
1609 for (
const RpcPrepData* prd : rpcs) {
1610 const bool meas_phi =
m_idHelperSvc->rpcIdHelper().measuresPhi(prd->identify());
1616 <<
" -> eta hits " << neta <<
" phi hits " << nphi);
1618 for (
const RpcPrepData* prd : rpcs) {
1620 int sublayer =
sublay(
id);
1622 debug->isEtaPhi = (neta && nphi);
1623 debug->trigConfirm = 1;
1624 debug->time = prd->time();
1627 float weight = (neta && nphi) ? 2 : 1;
1629 const float r =
rCor(*prd);
1630 const float phi = prd->globalPosition().phi();
1631 const double phi1 =
phi;
1634 phiHits.emplace_back(hit);
1636 const float x =
rCor(*prd);
1637 const float y = prd->globalPosition().z();
1638 const float stripCor = 0.5 * prd->detectorElement()->StripWidth(
false);
1639 const float ymin =
y - stripCor;
1640 const float ymax =
y + stripCor;
1641 debug->r = stripCor;
1643 hits.emplace_back(hit);
◆ fill() [5/6]
Pad channels – We should think about enums!
Definition at line 1693 of file MuonLayerHoughTool.cxx.
1695 if (stgcs.empty())
return;
1701 bool isNeighbouringSector = sector != selectedSector;
1702 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1705 <<
" -> hits: " << stgcs.size());
1707 for (
const sTgcPrepData* prd : stgcs) {
1709 int channelType =
m_idHelperSvc->stgcIdHelper().channelType(
id);
1712 if (isNeighbouringSector && channelType == 1)
continue;
1713 int sublayer =
sublay(
id);
1715 std::unique_ptr<MuonHough::HitDebugInfo>
debug =
1716 std::make_unique<MuonHough::HitDebugInfo>(technology, sector, region,
layer, sublayer);
1717 debug->isEtaPhi = 1;
1718 debug->trigConfirm =
true;
1724 float x = prd->globalPosition().z();
1725 float y =
rCor(*prd);
1726 float stripCor = 1.5;
1732 stripCor = 0.5 * stripWidth;
1734 debug->r = stripCor;
1735 float ymin =
y - stripCor;
1736 float ymax =
y + stripCor;
1738 hits.emplace_back(hit);
1749 chWidth = 0.5 * design->
channelWidth(prd->localPosition(),
true);
1750 ATH_MSG_DEBUG(
" Pad chWidth " << chWidth <<
" phi global " << prd->globalPosition().phi());
1751 }
else if (
m_idHelperSvc->stgcIdHelper().channelType(
id) == 2) {
1758 ATH_MSG_DEBUG(
" Wire Gang chWidth " << chWidth <<
" phi global " << prd->globalPosition().phi());
1761 Amg::Vector2D lp1(prd->localPosition().x() + chWidth, prd->localPosition().y());
1763 prd->detectorElement()->surface(
id).localToGlobal(lp1, gp1, gp1);
1765 lp1[0] = prd->localPosition().x() - chWidth;
1767 prd->detectorElement()->surface(
id).localToGlobal(lp1, gp2, gp2);
1769 double phi1 = gp1.phi();
1770 double phi2 = gp2.phi();
1771 double phi1c = phi1;
1772 double phi2c = phi2;
1774 if (phi_check > 0.3) {
1775 ATH_MSG_WARNING(
"bad local phi: in " << phi1 <<
", " << phi2 <<
" sector phi "
1779 if (isNeighbouringSector &&
1783 <<
" global phi: in " << phi1 <<
", " << phi2 <<
" sector phi "
1787 float r =
rCor(*prd);
1788 float phiMin =
std::min(phi1c, phi2c);
1789 float phiMax =
std::max(phi1c, phi2c);
1791 << phiMax <<
" bc " <<
debug->barcode <<
" chw " << chWidth <<
" trigC "
1792 <<
debug->trigConfirm <<
" g phi " << phi1 <<
" " << phi2);
1795 phiHits.emplace_back(phiHit);
◆ fill() [6/6]
Definition at line 1800 of file MuonLayerHoughTool.cxx.
1803 if (tgcs.empty())
return;
1804 tgcClusteringObjs.push_back(std::make_unique<TgcHitClusteringObj>(&
m_idHelperSvc->tgcIdHelper()));
1805 TgcHitClusteringObj& clustering = *tgcClusteringObjs.back();
1806 std::vector<const TgcPrepData*> prds;
1807 prds.insert(prds.begin(), tgcs.begin(), tgcs.end());
1808 clustering.cluster(prds);
1809 clustering.buildClusters3D();
1815 if (clustering.clusters3D.empty()) {
1822 if (clustering.bestEtaCluster().empty()) {
1823 ATH_MSG_DEBUG(
"TgcHitClusteringObj, no eta cluster selected! ");
1830 std::vector<int> sectors;
1831 getSectors(clustering.clusters3D.front(), sectors);
1832 unsigned int technology =
m_idHelperSvc->technologyIndex(chid);
1833 for (
unsigned int si = 0; si < sectors.size(); ++si) {
1834 if (sectors[si] != sector)
continue;
1836 for (
const TgcClusterObj3D&
cl : clustering.clusters3D) {
1837 const Identifier id =
cl.etaCluster.front()->identify();
1852 double phi1 = phimin;
1853 double phi2 = phimax;
1856 <<
", y12: "<<y12<<
", y21: "<<y21<<
", y22: "<<y22<<
", phi11: "<<phi11<<
", "
1857 <<
"phi12: "<<phi12<<
", phi21: "<<phi21<<
", phi22: "<<phi22<<
" ymin: "<<
ymin<<
", ymax: "<<
ymax
1858 <<
", phimin: "<<phimin<<
", phimax: "<<phimax);
1861 debug->clusterSize =
cl.etaCluster.size();
1862 debug->clusterLayers = 2;
1863 debug->isEtaPhi =
true;
1864 debug->time =
cl.etaCluster.front()->getBcBitMap();
1873 std::unique_ptr<MuonHough::Hit> hit = std::make_unique<MuonHough::Hit>(sublayer,
x,
ymin,
ymax, 2,
debug,
nullptr, &
cl);
1874 std::unique_ptr<MuonHough::PhiHit> phiHit =
1875 std::make_unique<MuonHough::PhiHit>(sublayer, y11, phi1, phi2, 2, phiDebug,
nullptr, &
cl);
1876 hits.emplace_back(std::move(hit));
1877 phiHits.emplace_back(std::move(phiHit));
1882 <<
" -> etaHits: " <<
hits.size() <<
" phiHits: " << phiHits.size()
1883 <<
" sectors: " << sectors.size());
◆ fillHitsPerSector()
Definition at line 1450 of file MuonLayerHoughTool.cxx.
1456 houghData.
sector = sector;
1460 const HashVec&
hashes = collectionsPerSector.technologyRegionHashVecs[tech][layerHash];
1461 if (
hashes.empty())
continue;
1468 if (
pos)
fill(ctx, state.truthHits, *
pos, houghData.hitVec[layerHash]);
1471 if (
pos)
fill(ctx, state.truthHits, *
pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first]);
1475 fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *
pos, houghData.hitVec[layerHash],
1476 houghData.phiHitVec[regionLayer.first], collectionsPerSector.sector);
1480 fill(ctx, state.truthHits, *
pos, houghData.hitVec[layerHash], houghData.phiHitVec[regionLayer.first],
1481 collectionsPerSector.sector);
1484 if (
pos)
fill(ctx, state.truthHits, *
pos, houghData.hitVec[layerHash]);
◆ find() [1/2]
◆ find() [2/2]
find patterns for a give set of MuonPrepData collections + optionally CSC segment combinations
Implements Muon::IMuonHoughPatternFinderTool.
Definition at line 102 of file MuonLayerHoughTool.cxx.
112 state.houghDataPerSectorVec->vec.resize(16);
113 for (
unsigned int i = 0;
i < state.houghDataPerSectorVec->vec.size(); ++
i) state.houghDataPerSectorVec->vec[
i].sector =
i + 1;
116 auto getHashes = [
this](
const Identifier&
id) {
120 return std::make_pair(regionIndex, sectorLayerHash);
127 auto hashes = getHashes(
id);
128 fill(ctx, state.truthHits, *
col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[
hashes.second]);
135 auto hashes = getHashes(
id);
136 fill(ctx, state.truthHits, *
col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[
hashes.second],
137 state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[
hashes.first]);
143 auto hashes = getHashes(
id);
144 fill(ctx, state.truthHits, *
col, state.houghDataPerSectorVec->vec[sector - 1].hitVec[
hashes.second],
145 state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[
hashes.first]);
147 auto hashInSector = [
this](
IdentifierHash hash,
int sector,
unsigned int sectorLayerHash) {
148 const std::vector<IdentifierHash>&
hashes =
157 auto hashes = getHashes(
id);
159 fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *
col,
160 state.houghDataPerSectorVec->vec[sector - 1].hitVec[
hashes.second],
161 state.houghDataPerSectorVec->vec[sector - 1].phiHitVec[
hashes.first], sector);
164 int neighbourSectorDown = sector == 1 ? 16 : sector - 1;
165 if (hashInSector(
col->identifyHash(), neighbourSectorDown,
hashes.second))
166 fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *
col,
167 state.houghDataPerSectorVec->vec[neighbourSectorDown - 1].hitVec[
hashes.second],
168 state.houghDataPerSectorVec->vec[neighbourSectorDown - 1].phiHitVec[
hashes.first], neighbourSectorDown);
170 int neighbourSectorUp = sector == 16 ? 1 : sector + 1;
171 if (hashInSector(
col->identifyHash(), neighbourSectorUp,
hashes.second))
172 fill(ctx, state.truthHits, state.houghDataPerSectorVec->tgcClusteringObjs, *
col,
173 state.houghDataPerSectorVec->vec[neighbourSectorUp - 1].hitVec[
hashes.second],
174 state.houghDataPerSectorVec->vec[neighbourSectorUp - 1].phiHitVec[
hashes.first], neighbourSectorUp);
◆ findMaxima() [1/2]
Definition at line 1307 of file MuonLayerHoughTool.cxx.
1310 if (
hits.empty())
return false;
1313 Identifier id =
hits.front()->tgc ?
hits.front()->tgc->etaCluster.front()->identify() :
hits.front()->prd->identify();
1323 Identifier id_hit =
hits.front()->tgc ?
hits.front()->tgc->etaCluster.front()->identify() :
hits.front()->prd->identify();
1336 unsigned int nmaxima = 0;
1337 while (nmaxima < 5) {
1339 if (
hough.findMaximum(maximum, selectorLoose)) {
1340 hough.associateHitsToMaximum(maximum,
hits);
1342 << nmaxima <<
" " << maximum.
max <<
" trigConfirmed " << maximum.
triggerConfirmed <<
" pos " << maximum.
pos
1343 <<
" theta " << maximum.
theta <<
" binPos " << maximum.
binpos <<
" binRange " << maximum.
binposmin <<
" -- "
1350 const unsigned int nHitsInMaximum = maximum.
hits.size();
1351 for (
unsigned int i = 0;
i < nHitsInMaximum; ++
i) {
1364 if (nmdt > 0 || (nmm + nstgc) > 0) {
1365 maxima.emplace_back(std::make_unique<MuonHough::MuonLayerHough::Maximum>(maximum));
1367 if (maximum.
max >
selector.getCutValue(maximum.
pos)) seedMaxima.push_back(maxima.back());
1372 if (nmaxima > 0) {
ATH_MSG_VERBOSE(
"findMaxima: No more maxima found " << nmaxima); }
◆ findMaxima() [2/2]
Definition at line 1380 of file MuonLayerHoughTool.cxx.
1382 if (
hits.empty())
return false;
1388 unsigned int nmaxima = 0;
1389 while (nmaxima < 5) {
1391 if (
hough.findMaximum(maximum, 1.9)) {
1392 hough.associateHitsToMaximum(maximum,
hits);
1394 ATH_MSG_DEBUG(
"findMaxima(Phi): Found Phi maximum " << nmaxima <<
" height " << maximum.
max <<
" pos " << maximum.
pos
1396 <<
" -- " << maximum.
binposmax <<
" nHits " << maximum.
hits.size());
1398 const unsigned int nHitsInMaximum = maximum.
hits.size();
1399 for (
unsigned int i = 0;
i < nHitsInMaximum; ++
i) {
1410 bool maximum_matched =
false;
1411 for (
auto pit = maxima.begin(); pit != maxima.end(); ++pit) {
1417 ATH_MSG_DEBUG(
"extendSeed: sector has already been added! Skip. ");
1418 bool maximum_hitmatched =
true;
1419 for (
unsigned int k = 0;
k < maximum.
hits.size(); ++
k) {
1421 maximum_hitmatched =
false;
1425 if (maximum_hitmatched) {
1426 maximum_matched =
true;
1433 if (maximum_matched) {
1437 maxima.push_back(std::make_shared<MuonHough::MuonPhiLayerHough::Maximum>(maximum));
1441 if (nmaxima > 0) {
ATH_MSG_VERBOSE(
"findMaxima(Phi): No more maxima found " << nmaxima); }
◆ getSectors() [1/2]
void Muon::MuonLayerHoughTool::getSectors |
( |
const Amg::Vector3D & |
pos, |
|
|
std::vector< int > & |
sectors |
|
) |
| const |
|
inlineprivate |
◆ getSectors() [2/2]
void Muon::MuonLayerHoughTool::getSectors |
( |
const TgcClusterObj3D & |
tgc, |
|
|
std::vector< int > & |
sectors |
|
) |
| const |
|
inlineprivate |
◆ initialize()
StatusCode Muon::MuonLayerHoughTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ initializeSectorMapping()
void Muon::MuonLayerHoughTool::initializeSectorMapping |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 1897 of file MuonLayerHoughTool.cxx.
1898 if (m_sectorSetup)
return;
1899 std::lock_guard kuchen(m_mutex);
1900 if (m_sectorSetup)
return;
1905 for (
unsigned int i = 0;
i < m_collectionsPerSector.size(); ++
i) {
1906 m_collectionsPerSector[
i].sector =
i + 1;
1907 m_collectionsPerSector[
i].technologyRegionHashVecs.resize(
m_ntechnologies);
1908 for (
auto it = m_collectionsPerSector[
i].technologyRegionHashVecs.begin();
1909 it != m_collectionsPerSector[
i].technologyRegionHashVecs.end(); ++
it) {
1910 it->resize(nsectorHashMax);
1918 auto loadHashes = [
this] (
const MuonIdHelper& idHelper){
1919 auto it = idHelper.module_begin();
1920 const auto it_end = idHelper.module_end();
1921 for (;
it != it_end; ++
it) {
1923 idHelper.get_module_hash(*
it,
hash);
1940 const auto it_end =
m_idHelperSvc->mmIdHelper().detectorElement_end();
1941 for (;
it != it_end; ++
it) {
1950 const auto it_end =
m_idHelperSvc->stgcIdHelper().detectorElement_end();
1951 for (;
it != it_end; ++
it) {
1956 int sectorU = sector != 1 ? sector - 1 : 16;
1957 int sectorD = sector != 16 ? sector + 1 : 1;
1966 const auto it_end =
m_idHelperSvc->tgcIdHelper().module_end();
1967 for (;
it != it_end; ++
it) {
1971 int nstrips = detEl->
nStrips(1);
1974 std::vector<int> sectors1{}, sectors2{};
1977 std::unordered_set<int> added{};
1978 for (
const int sector : sectors1) {
1980 added.insert(sector);
1982 for (
const int sector: sectors2) {
1983 if (added.insert(sector).second){
1992 for (
int sector = 1; sector <= 16; ++sector) {
1996 for (
unsigned int hash = 0;
hash < nsectorHashMax; ++
hash) {
1997 std::pair<MuonStationIndex::DetectorRegionIndex, MuonStationIndex::LayerIndex> regionLayer =
2002 currentRegion = regionLayer.first;
2013 <<
" " << std::setw(4) <<
vec[tech][
hash].
size());
2019 m_sectorSetup =
true;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ insertHash() [1/2]
◆ insertHash() [2/2]
Definition at line 1890 of file MuonLayerHoughTool.cxx.
1893 m_collectionsPerSector[sector - 1].technologyRegionHashVecs[techIndex][sectorLayerHash].push_back(
hash);
◆ interfaceID()
static const InterfaceID& Muon::IMuonHoughPatternFinderTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
access to tool interface
Definition at line 29 of file IMuonHoughPatternFinderTool.h.
30 static const InterfaceID IID_IMuonHoughPatternFinderTool(
"Muon::IMuonHoughPatternFinderTool", 1, 0);
31 return IID_IMuonHoughPatternFinderTool;
◆ matchTruth()
Definition at line 1491 of file MuonLayerHoughTool.cxx.
1493 typedef PRD_MultiTruthCollection::const_iterator iprdt;
1494 std::pair<iprdt, iprdt>
range = truthCol.equal_range(
id);
1497 if (!
i->second.isValid()) {
1498 ATH_MSG_WARNING(
"Unexpected invalid HepMcParticleLink in PRD_MultiTruthCollection");
1501 if (link.
cptr() && abs(link.
cptr()->pdg_id()) == 13) {
1504 truthHits.insert(
id);
◆ mergePhiMaxima()
Definition at line 446 of file MuonLayerHoughTool.cxx.
450 auto maximaSortingLambda = [road](
const std::shared_ptr<MuonHough::MuonPhiLayerHough::Maximum>&
m1,
451 const std::shared_ptr<MuonHough::MuonPhiLayerHough::Maximum>&
m2) {
452 if (
m1->max !=
m2->max)
return m1->max >
m2->max;
454 if (
m1->sector !=
m2->sector)
return m1->sector == road.seed->hough->m_descriptor.sector;
456 if (
m1->hits.size() !=
m2->hits.size())
return m1->hits.size() <
m2->hits.size();
458 if (
m1->pos !=
m2->pos)
return m1->pos <
m2->pos;
460 if (std::abs(
m1->binposmax -
m1->binposmin) == std::abs(
m2->binposmax -
m2->binposmin)) {
461 return (
m1->binposmin) < (
m2->binposmin);
463 return std::abs(
m1->binposmax -
m1->binposmin) < std::abs(
m2->binposmax -
m2->binposmin);
466 std::stable_sort(road.phiMaxima.begin(), road.phiMaxima.end(), maximaSortingLambda);
469 std::set<MuonHough::MuonPhiLayerHough::Maximum*> associatedPhiMaxima;
470 for (
auto pit = road.phiMaxima.begin(); pit != road.phiMaxima.end(); ++pit) {
471 if (associatedPhiMaxima.count((*pit).get()))
continue;
472 associatedPhiMaxima.insert((*pit).get());
476 bool wasExtended =
false;
477 for (
auto pit1 = pit + 1; pit1 != road.phiMaxima.end(); ++pit1) {
478 if ((*pit1)->binposmax >= phiMaximum.
binposmin && (*pit1)->binposmin <= phiMaximum.
binposmax) {
479 ATH_MSG_VERBOSE(
" merging maxima " << phiMaximum.
pos <<
" val " << phiMaximum.
max <<
" " << (*pit1)->pos <<
" val "
481 phiMaximum.
hits.insert(phiMaximum.
hits.end(), (*pit1)->hits.begin(), (*pit1)->hits.end());
482 associatedPhiMaxima.insert((*pit1).get());
498 [](
const std::shared_ptr<MuonHough::PhiHit>&
h1,
const std::shared_ptr<MuonHough::PhiHit>& h2) {
499 if (h1->layer != h2->layer) return h1->layer < h2->layer;
500 if (h1->w != h2->w) return h1->w > h2->w;
501 if (h1->r != h2->r) return h1->r < h2->r;
503 const double dPhi1 = std::abs(h1->phimax - h1->phimin);
504 const double dPhi2 = std::abs(h2->phimax - h2->phimin);
505 if (dPhi1 != dPhi2) return dPhi1 < dPhi2;
506 if (h1->phimin == h2->phimin) return h1->phimax < h2->phimax;
507 return h1->phimin < h2->phimin;
511 <<
" number of hits " <<
hits.size());
513 localHough.fillLayer2(
hits);
514 localHough.findMaximum(phiMaximum, 0.9);
515 localHough.associateHitsToMaximum(phiMaximum,
hits);
517 <<
" number of hits " << phiMaximum.
hits.size());
518 phiMaximum.
hough = (*pit)->hough;
520 road.mergedPhiMaxima.push_back(phiMaximum);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ printTruthSummary()
void Muon::MuonLayerHoughTool::printTruthSummary |
( |
std::set< Identifier > & |
truth, |
|
|
std::set< Identifier > & |
found |
|
) |
| const |
|
private |
◆ rCor() [1/4]
◆ rCor() [2/4]
◆ rCor() [3/4]
◆ rCor() [4/4]
◆ renounce()
◆ renounceArray()
◆ sublay()
int Muon::MuonLayerHoughTool::sublay |
( |
const Identifier & |
id, |
|
|
float |
z = 0 |
|
) |
| const |
|
inlineprivate |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ ATLAS_THREAD_SAFE [1/3]
std::mutex m_mutex Muon::MuonLayerHoughTool::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/3]
◆ ATLAS_THREAD_SAFE [3/3]
bool m_sectorSetup Muon::MuonLayerHoughTool::ATLAS_THREAD_SAFE {false} |
|
mutableprivate |
◆ m_addSectors
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_addSectors {this, "AddSectors", false} |
|
private |
◆ m_debugHough
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_debugHough {this, "DebugHough", false} |
|
private |
◆ m_detStore
◆ m_doParabolicExtrapolation
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_doParabolicExtrapolation |
|
private |
◆ m_evtStore
◆ m_extrapolationDistance
Gaudi::Property<float> Muon::MuonLayerHoughTool::m_extrapolationDistance {this, "ExtrapolationDistance", 1500.} |
|
private |
◆ m_idHelperSvc
◆ m_muonManagerKey
◆ m_ntechnologies
unsigned int Muon::MuonLayerHoughTool::m_ntechnologies {UINT_MAX} |
|
private |
◆ m_onlyUseCurrentBunch
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_onlyUseCurrentBunch {this, "OnlyUseCurrentBunch", false} |
|
private |
◆ m_printer
◆ m_requireTriggerConfirmationNSW
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_requireTriggerConfirmationNSW {this, "TriggerConfirmationNSW", false} |
|
private |
◆ m_sectorMapping
◆ m_selectors
◆ m_selectorsLoose
◆ m_techToTruthNameIdx
std::map<unsigned int, unsigned int> Muon::MuonLayerHoughTool::m_techToTruthNameIdx {} |
|
private |
◆ m_truthNames
◆ m_useRpcTimeVeto
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_useRpcTimeVeto {this, "RpcTimeVeto", false} |
|
private |
◆ m_useSeeds
Gaudi::Property<bool> Muon::MuonLayerHoughTool::m_useSeeds {this, "UseSeeds", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
static const std::string & chName(ChIndex index)
convert ChIndex into a string
Parameters defining the design of the readout sTGC pads.
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
std::vector< std::shared_ptr< MuonHough::PhiHit > > PhiHitVec
double transformRToSector(double r, double phi, int sector, bool toSector=true) const
expresses a radial position from and to the sector coordinate frame, the phi position should always b...
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void getSectors(double phi, std::vector< int > §ors) const
returns the main sector plus neighboring if the phi position is in an overlap region
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
const MuonPhiLayerHough * hough
struct containing additional debug information on the hits that is not needed for the actual alg but ...
static unsigned int sectorLayerHashMax()
maximum create a hash out of region and layer
LayerIndex
enum to classify the different layers in the muon spectrometer
static unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
int clusterLayers
cluster size
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
std::vector< size_t > vec
int clusterSize
index of reconstructed muon
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & center() const
Returns the center position of the Surface.
struct containing all hit information needed for the Hough transform
MuonPhiLayerHough & phiHough(Muon::MuonStationIndex::DetectorRegionIndex region)
access phi transform
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
PhiIndex
enum to classify the different phi layers in the muon spectrometer
@ MdtStatusDriftTime
The tube produced a vaild measurement.
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
virtual void setOwner(IDataHandleHolder *o)=0
bool insideSector(int sector, double phi) const
checks whether the phi position is consistent with sector
static unsigned int numberOfSectors()
return total number of sectors
HepMC::ConstGenParticlePtr cptr() const
Dereference.
a link optimized in size for a GenParticle in a McEventCollection
struct representing the maximum in the hough space
static std::pair< DetectorRegionIndex, LayerIndex > decomposeSectorLayerHash(unsigned int hash)
decompose the hash into Region and Layer
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
const Muon::TgcClusterObj3D * tgc
CalibratedSpacePoint::State State
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
virtual const Surface & surface() const =0
Return surface associated with this detector element.
double sectorPhi(int sector) const
returns the centeral phi position of a sector in radians
bool isEtaPhi
number of layers in the cluster
static const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
std::vector< HoughDataPerSec > vec
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
double channelWidth(const Amg::Vector2D &pos, bool measPhi, bool preciseMeas=false) const
calculate local channel width
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Identifier identify() const
return the identifier
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
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
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
MuonPrepDataCollection< MMPrepData > MMPrepDataCollection
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
const Muon::TgcClusterObj3D * tgc
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
#define ATH_MSG_WARNING(x)
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection
Helper to simultaneously calculate sin and cos of the same angle.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ChIndex
enum to classify the different chamber layers in the muon spectrometer
const Trk::PrepRawData * prd
access to assiciated hit, either the prd or the tgc pointer is set in athena
static const std::string & stName(StIndex index)
convert StIndex into a string
float extrapolate(const MuonLayerHough::Maximum &ref, const MuonLayerHough::Maximum &ex, bool doparabolic=false)
StIndex
enum to classify the different station layers in the muon spectrometer
double transformRToNeighboringSector(double r, int sectorHit, int sectorTarget) const
transform a radial position from one sector frame into another
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
double channelWidth() const
calculate local channel width
TechnologyIndex
enum to classify the different layers in the muon spectrometer
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
struct containing all hit information needed for the Hough transform
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
static const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string