ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPRDSelectionTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUON_MUONPRDSELECTIONTOOL_H
6#define MUON_MUONPRDSELECTIONTOOL_H
7
10#include "GaudiKernel/ServiceHandle.h"
11#include "GaudiKernel/ToolHandle.h"
12
21
22#include <vector>
23#include <string>
24
25namespace Muon {
26
28 public:
29
31 MuonPRDSelectionTool(const std::string& type, const std::string& name, const IInterface* parent);
32 virtual ~MuonPRDSelectionTool()=default;
33 StatusCode initialize();
34
36 bool calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MuonLayerPrepRawData& layerPrepRawData, MuonLayerROTs& layerROTs ) const;
37
39 bool calibrateAndSelectMdt( const MuonSystemExtension::Intersection& intersection, const MdtPrepDataCollection& prds, std::vector<const MdtDriftCircleOnTrack*>& rots ) const {
40 for( MdtPrepDataCollection::const_iterator it = prds.begin(); it != prds.end();++it ){
42 if( rot ) rots.push_back(rot);
43 }
44 return true;
45 }
46
48 template< class COL >
49 bool calibrateAndSelectCluster( const MuonSystemExtension::Intersection& intersection, const COL& prds, std::vector<const MuonClusterOnTrack*>& rots ) const {
50 for( typename COL::const_iterator it = prds.begin(); it != prds.end();++it ){
52 if( rot ) rots.push_back(rot);
53 }
54 return true;
55 }
56
59
61 const MuonClusterOnTrack* calibrateAndSelect( const Trk::TrackParameters& pars, const MuonCluster& clus ) const;
63
64
65 private:
67 Amg::Vector3D intersectMDT( const MdtPrepData& mdt, const Amg::Vector3D& position, const Amg::Vector3D& direction, bool usePlane ) const;
68
69
72 std::vector<const MdtDriftCircleOnTrack*> rots;
74 if( !rots.empty() ) layerROTs.addMdts(rots);
75 return true;
76 }
77
79 template< class COL >
81 std::vector<const MuonClusterOnTrack*> rots;
83 if( !rots.empty() ) layerROTs.addClusters(rots,m_idHelperSvc->technologyIndex(rots.front()->identify()));
84 return true;
85 }
86
87 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
88 ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreator{this,"MdtDriftCircleOnTrackCreator","Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"};
89 ToolHandle<IMuonClusterOnTrackCreator> m_clusterCreator{this,"MuonClusterOnTrackCreator","Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"};
90
94
95 };
96}
97
98
99
100#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
const_iterator begin() const noexcept
Interface for tools calculating hit count summaries for track.
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
Base class for Muon cluster RIO_OnTracks.
struct holding RIO_OnTracks for a given layer
void addMdts(const std::vector< const MdtDriftCircleOnTrack * > &mdts)
add MDTs, will merge them with existing MDT's.
void addClusters(const std::vector< const MuonClusterOnTrack * > &clusters, MuonStationIndex::TechnologyIndex tech)
add MuonClusters of a given technology, will merge them with existing clusters.
bool calibrateAndSelectCluster(const MuonSystemExtension::Intersection &intersection, const COL &prds, MuonLayerROTs &layerROTs) const
calibrate and select clusters in a collection
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
bool calibrateAndSelectCluster(const MuonSystemExtension::Intersection &intersection, const COL &prds, std::vector< const MuonClusterOnTrack * > &rots) const
calibrate and select clusters in a collection
MuonPRDSelectionTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
virtual ~MuonPRDSelectionTool()=default
bool calibrateAndSelectMdt(const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, std::vector< const MdtDriftCircleOnTrack * > &rots) const
calibrate and select MDTs in a collection
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
bool calibrateAndSelect(const MuonSystemExtension::Intersection &intersection, const MuonLayerPrepRawData &layerPrepRawData, MuonLayerROTs &layerROTs) const
IMuonPRDSelectionTool interface: calibrateAndSelect.
Amg::Vector3D intersectMDT(const MdtPrepData &mdt, const Amg::Vector3D &position, const Amg::Vector3D &direction, bool usePlane) const
intersect MDT surface or tube plane
bool calibrateAndSelectMdt(const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, MuonLayerROTs &layerROTs) const
calibrate and select MDTs in a collection
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
ParametersBase< TrackParametersDim, Charged > TrackParameters
Struct to hold all PrepRawData collections in a given layer.