5#ifndef MUONHOUGHPATTERNTOOLS_MUONLAYERHOUGHTOOL_H
6#define MUONHOUGHPATTERNTOOLS_MUONLAYERHOUGHTOOL_H
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
48 using HashVec = std::vector<IdentifierHash>;
72 Road(std::shared_ptr<MuonHough::MuonLayerHough::Maximum> seed_) :
78 std::shared_ptr<MuonHough::MuonLayerHough::Maximum>
seed{
nullptr};
79 void add(std::shared_ptr<MuonHough::MuonLayerHough::Maximum>
max) {
83 void add(std::shared_ptr<MuonHough::MuonPhiLayerHough::Maximum>
max) {
phiMaxima.emplace_back(
max); }
87 std::set<std::shared_ptr<MuonHough::MuonLayerHough::Maximum>>
maximumSet{};
93 using base_class::base_class;
99 virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>>
find(
102 const EventContext& ctx)
const override;
105 virtual std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>>
find(
106 const std::vector<const MdtPrepDataCollection*>& mdtCols,
const std::vector<const CscPrepDataCollection*>& cscCols,
107 const std::vector<const TgcPrepDataCollection*>& tgcCols,
const std::vector<const RpcPrepDataCollection*>& rpcCols,
131 std::pair<std::unique_ptr<MuonPatternCombinationCollection>, std::unique_ptr<HoughDataPerSectorVec>>
analyse(
State& state)
const;
139 void fill(
const EventContext& ctx, std::set<Identifier>& truthHits,
157 std::map<MuonHough::MuonPhiLayerHough::Maximum*, MaximumVec>& phiEtaAssociations,
158 std::vector<MaximumVec>& unassEtaMaxima)
const;
161 std::vector<HoughDataPerSector>& houghDataPerSectorVec)
const;
167 double combinedPeakheight(
double ph,
double ph1,
double ph2,
double phn,
double rot,
int layer,
int )
const;
180 void printTruthSummary(std::set<Identifier>& truth, std::set<Identifier>& found)
const;
183 std::unique_ptr<HoughDataPerSectorVec>& houghDataPerSectorVec,
184 std::vector<Road>& roads)
const;
193 PublicToolHandle<MuonEDMPrinterTool>
m_printer{
this,
"printerTool",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
220 return s2->maxEtaHits() < s1->maxEtaHits();
242 return m_sectorMapping.transformRToSector(pos.perp(), pos.phi(), sector);
249 if (
m_idHelperSvc->mdtIdHelper().multilayer(
id) == 2) sublayer += 4;
252 if (
m_idHelperSvc->mmIdHelper().multilayer(
id) == 2) sublayer += 4;
256 if (
m_idHelperSvc->stgcIdHelper().multilayer(
id) == 2) sublayer += 4;
260 if (
m_idHelperSvc->rpcIdHelper().doubletR(
id) == 2) sublayer += 2;
266 if (stIndex == StIndex::EM) {
270 if (phiIndex == PhiIndex::T2)
272 else if (phiIndex == PhiIndex::T3)
296 if (layer == 0 && ph < 3.)
return ph;
297 if (layer == 1 && ph < 4.)
return ph;
298 if (layer == 2 && ph < 3.)
return ph;
300 if (phn > 7) ph += phn;
303 if (ph1 > 6.9) ph += 2;
304 if (ph1 > 8.9) ph += 2;
305 if (ph2 > 5.9) ph += 2;
306 if (ph2 > 7.9) ph += 2;
309 if (ph1 > 6.9) ph += 2;
310 if (ph2 > 5.9) ph += 2;
311 if (ph2 > 7.9) ph += 2;
312 if (ph2 > 11.9) ph += 2;
315 if (ph1 > 6.9) ph += 2;
316 if (ph2 > 6.9) ph += 2;
317 if (ph2 > 8.9) ph += 2;
DataVector< Muon::MuonPatternCombination > MuonPatternCombinationCollection
This typedef represents a collection of MuonPatternCombination objects.
DataVector< Muon::MuonSegmentCombination > MuonSegmentCombinationCollection
This typedef represents a collection of MuonSegmentCombination objects.
This is a "hash" representation of an Identifier.
struct containing additional debug information on the hits that is not needed for the actual alg but ...
class managing all Hough transforms in the detector
Class to represent measurements from the Monitored Drift Tubes.
Class representing clusters in the muon system.
Edge
Representation of the four edge points.
Amg::Vector3D & getEdge(const Edge e)
A PRD is mapped onto all contributing particles.
Eigen::Matrix< double, 3, 1 > Vector3D
StIndex
enum to classify the different station layers in the muon spectrometer
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
PhiIndex
enum to classify the different phi layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
MuonPrepDataContainerT< RpcPrepData > RpcPrepDataContainer
MuonPrepDataCollection< MMPrepData > MMPrepDataCollection
MuonPrepDataContainerT< TgcPrepData > TgcPrepDataContainer
MuonPrepDataContainerT< MdtPrepData > MdtPrepDataContainer
MuonPrepDataContainerT< sTgcPrepData > sTgcPrepDataContainer
MuonPrepDataContainerT< MMPrepData > MMPrepDataContainer
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Ensure that the ATLAS eigen extensions are properly loaded.
std::map< MuonHough::MuonLayerHough::Maximum *, MaximumVec > MaximumAssociationMap
std::vector< std::shared_ptr< MuonHough::MuonPhiLayerHough::Maximum > > PhiMaximumVec
std::vector< std::shared_ptr< MuonHough::MuonLayerHough::Maximum > > MaximumVec
std::vector< HitVec > RegionHitVec
std::vector< PhiMaximumVec > RegionPhiMaximumVec
MuonHough::PhiHitVec PhiHitVec
std::vector< PhiHitVec > RegionPhiHitVec
std::vector< MaximumVec > RegionMaximumVec
bool operator()(const MuonLayerHoughTool::HoughDataPerSector *s1, const MuonLayerHoughTool::HoughDataPerSector *s2) const