ATLAS Offline Software
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 
25 namespace Muon {
26 
28  public:
29 
31  MuonPRDSelectionTool(const std::string& type, const std::string& name, const IInterface* parent);
32  virtual ~MuonPRDSelectionTool()=default;
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 
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 >
80  bool calibrateAndSelectCluster( const MuonSystemExtension::Intersection& intersection, const COL& prds, MuonLayerROTs& layerROTs ) const {
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
Muon::MuonPRDSelectionTool::calibrateAndSelectMdt
bool calibrateAndSelectMdt(const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, std::vector< const MdtDriftCircleOnTrack * > &rots) const
calibrate and select MDTs in a collection
Definition: MuonPRDSelectionTool.h:39
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonPRDSelectionTool::calibrateAndSelect
bool calibrateAndSelect(const MuonSystemExtension::Intersection &intersection, const MuonLayerPrepRawData &layerPrepRawData, MuonLayerROTs &layerROTs) const
IMuonPRDSelectionTool interface: calibrateAndSelect.
Definition: MuonPRDSelectionTool.cxx:27
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
IMuonPRDSelectionTool.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuonPRDSelectionTool::m_secondCoordinateCut
double m_secondCoordinateCut
Definition: MuonPRDSelectionTool.h:93
Muon::MuonLayerPrepRawData
Struct to hold all PrepRawData collections in a given layer.
Definition: MuonLayerPrepRawData.h:22
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
Muon::MuonPRDSelectionTool::~MuonPRDSelectionTool
virtual ~MuonPRDSelectionTool()=default
MdtPrepDataCollection.h
Muon::IMuonPRDSelectionTool
Interface for tools calculating hit count summaries for track.
Definition: IMuonPRDSelectionTool.h:25
Muon::MuonLayerROTs::addMdts
void addMdts(const std::vector< const MdtDriftCircleOnTrack * > &mdts)
add MDTs, will merge them with existing MDT's.
Definition: MuonLayerROTs.cxx:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Muon::MuonPRDSelectionTool::initialize
StatusCode initialize()
Definition: MuonPRDSelectionTool.cxx:19
IMuonClusterOnTrackCreator.h
AthAlgTool.h
Muon::MuonLayerROTs::addClusters
void addClusters(const std::vector< const MuonClusterOnTrack * > &clusters, MuonStationIndex::TechnologyIndex tech)
add MuonClusters of a given technology, will merge them with existing clusters.
Definition: MuonLayerROTs.cxx:26
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::MuonPRDSelectionTool::m_distanceToTubeCut
double m_distanceToTubeCut
cuts
Definition: MuonPRDSelectionTool.h:92
Muon::MuonPRDSelectionTool::calibrateAndSelectCluster
bool calibrateAndSelectCluster(const MuonSystemExtension::Intersection &intersection, const COL &prds, std::vector< const MuonClusterOnTrack * > &rots) const
calibrate and select clusters in a collection
Definition: MuonPRDSelectionTool.h:49
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
Muon::MuonLayerROTs
struct holding RIO_OnTracks for a given layer
Definition: MuonLayerROTs.h:18
MuonSystemExtension.h
Muon::MuonPRDSelectionTool::calibrateAndSelectCluster
bool calibrateAndSelectCluster(const MuonSystemExtension::Intersection &intersection, const COL &prds, MuonLayerROTs &layerROTs) const
calibrate and select clusters in a collection
Definition: MuonPRDSelectionTool.h:80
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IMdtDriftCircleOnTrackCreator.h
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonPRDSelectionTool::m_mdtCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: MuonPRDSelectionTool.h:88
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Muon::MuonPRDSelectionTool::MuonPRDSelectionTool
MuonPRDSelectionTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
Definition: MuonPRDSelectionTool.cxx:11
Muon::MuonPRDSelectionTool::intersectMDT
Amg::Vector3D intersectMDT(const MdtPrepData &mdt, const Amg::Vector3D &position, const Amg::Vector3D &direction, bool usePlane) const
intersect MDT surface or tube plane
Definition: MuonPRDSelectionTool.cxx:170
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonLayerROTs.h
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
Muon::MuonSystemExtension::Intersection
data per intersection
Definition: MuonSystemExtension.h:21
MuonLayerPrepRawData.h
MuonClusterOnTrack.h
Muon::MuonPRDSelectionTool::calibrateAndSelectMdt
bool calibrateAndSelectMdt(const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, MuonLayerROTs &layerROTs) const
calibrate and select MDTs in a collection
Definition: MuonPRDSelectionTool.h:71
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonPRDSelectionTool::m_clusterCreator
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
Definition: MuonPRDSelectionTool.h:89
Muon::MuonPRDSelectionTool
Definition: MuonPRDSelectionTool.h:27
Muon::MuonPRDSelectionTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonPRDSelectionTool.h:87
IMuonIdHelperSvc.h
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ServiceHandle< Muon::IMuonIdHelperSvc >