|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef DCMATHSEGMENTMAKER_H
6 #define DCMATHSEGMENTMAKER_H
41 class MdtMultiChamberGeometry;
46 class MuonDetectorManager;
55 class MdtDriftCircleOnTrack;
83 bool operator()(
const std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>>& hit1,
84 const std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>>& hit2) {
85 return hit1.first < hit2.first;
99 using EtaPhiHitsPair = std::pair<std::vector<const MuonClusterOnTrack*>, std::vector<const MuonClusterOnTrack*> >;
101 using IdHitMap = std::map<Identifier, EtaPhiHitsPair>;
106 HitInXZ(
Identifier i,
bool isM,
bool measP,
double lx,
double lz,
double lxmin,
double lxmax,
double phmin,
double phmax) :
125 if (pcl)
phiHits.push_back(pcl);
129 const std::vector<const MuonClusterOnTrack*>& phs) :
141 std::vector<const MuonClusterOnTrack*>
phiHits;
213 void find(
const std::vector<const Trk::RIO_OnTrack*>& rios1,
const std::vector<const Trk::RIO_OnTrack*>& rios2)
const;
228 void find(
const std::vector<const MdtDriftCircleOnTrack*>& mdts,
const std::vector<const MuonClusterOnTrack*>&
clusters,
242 const std::vector<const MuonClusterOnTrack*>&
clusters,
bool hasPhiMeasurements =
false,
259 void find(
const Trk::TrackRoad& road,
const std::vector<std::vector<const MdtDriftCircleOnTrack*> >& mdts,
261 bool hasPhiMeasurements =
false,
double momentum = 1e9)
const;
271 std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
272 const std::vector<std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec)
const;
275 std::set<Identifier>& chamberSet,
double& phimin,
double& phimax,
285 const std::vector<const MuonClusterOnTrack*>& phiHits)
const;
292 std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
293 std::vector<std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec)
const;
296 double phimin,
double phimax, std::vector<std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec)
const;
299 std::vector<std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) ;
312 double phimin,
double phimax)
const;
315 bool checkBoundsInXZ(
double xline,
double zline,
double dXdZ,
const std::vector<HitInXZ>&
hits)
const;
322 static void updatePhiRanges(
double phiminNew,
double phimaxNew,
double& phiminRef,
double& phimaxRef) ;
329 bool isCurvedSegment)
const;
332 const Amg::Vector3D& roaddir2,
const std::vector<const MdtDriftCircleOnTrack*>& mdts,
340 "DetectorManagerKey",
341 "MuonDetectorManager",
342 "Key of input MuonDetectorManager condition data",
348 "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
353 "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
354 "Handle to the service providing the IMuonEDMHelperSvc interface",
360 "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
365 "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
369 "MuonClusterCreator",
370 "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
374 "MuonCompetingClustersCreator",
375 "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator",
380 "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
385 "Muon::MdtMathSegmentFinder/MdtMathSegmentFinder",
390 "Muon::MuonSegmentFittingTool/MuonSegmentFittingTool",
395 "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool",
416 Gaudi::Property<bool>
m_removeDeltas{
this,
"RemoveDeltasFromSegmentQuality",
true};
Encapsulates the information required by the find() method of the muon segment makers.
Gaudi::Property< bool > m_reject1DTgcSpacePoints
const Trk::Surface & surface() const
static std::pair< double, double > residualAndPullWithSegment(const TrkDriftCircleMath::Segment &segment, const Cluster2D &spacePoint, const Amg::Transform3D &gToStation)
double errorScaleFactor(const Identifier &id, double curvature, bool hasPhiMeasurements) const
calculate error scaling factor
Gaudi::Property< bool > m_addUnassociatedPhiHits
Gaudi::Property< bool > m_createCompetingROTsEta
std::vector< Cluster2D > ClusterVec
std::pair< std::pair< int, int >, bool > associateClustersToSegment(const TrkDriftCircleMath::Segment &segment, const Identifier &chid, const Amg::Transform3D &gToStation, ClusterVecPair &spVecs, double phimin, double phimax, std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
DCMathSegmentMaker(const std::string &, const std::string &, const IInterface *)
std::pair< ClusterVec, ClusterVec > ClusterVecPair
Ensure that the Athena extensions are properly loaded.
const MuonClusterOnTrack * phiHit
Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D &lp, double err, const MuonClusterOnTrack *ecl, const MuonClusterOnTrack *pcl)
constructor taking a single phi hit
ToolHandle< IMuonSegmentSelectionTool > m_segmentSelectionTool
ClusterVecPair create1DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
Eigen::Matrix< double, 2, 1 > Vector2D
void find(const std::vector< const Trk::RIO_OnTrack * > &rios, Trk::SegmentCollection *segColl=nullptr) const
find segments starting from a list of RIO_OnTrack objects, implementation of IMuonSegmentMaker interf...
Function object to sort pairs containing a double and a pointer to a MuonClusterOnTrack.
std::vector< Cluster > CLVec
Gaudi::Property< bool > m_removeDeltas
TrkDriftCircleMath::DCVec createDCVec(const std::vector< const MdtDriftCircleOnTrack * > &mdts, double errorScale, std::set< Identifier > &chamberSet, double &phimin, double &phimax, TrkDriftCircleMath::DCStatistics &dcStatistics, const Amg::Transform3D &gToStation, const Amg::Transform3D &amdbToGlobal) const
PublicToolHandle< MuonEDMPrinterTool > m_printer
Function object to check whether two Segments are sub/super sets or different.
ToolHandle< IMdtSegmentFinder > m_segmentFinder
std::map< Identifier, IdHitMap > ChIdHitMap
Identifier identify() const
bool updateSegmentPhi(const Amg::Vector3D &gpos, const Amg::Vector3D &gdir, Amg::Vector2D &segLocPos, Trk::LocalDirection &segLocDir, Trk::PlaneSurface &surf, const std::vector< const Trk::MeasurementBase * > &rots, double phimin, double phimax) const
std::vector< const MuonClusterOnTrack * > phiHits
Property holding a SG store/key/clid from which a ReadHandle is made.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
static void updatePhiRanges(double phiminNew, double phimaxNew, double &phiminRef, double &phimaxRef)
update phi ranges
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
pointers to IdHelpers
ClusterVecPair createSpacePoints(const ChIdHitMap &chIdHitMap) const
bool checkBoundsInXZ(double xline, double zline, double dXdZ, const std::vector< HitInXZ > &hits) const
check whether all hits are in bounds in the XZ plane
std::vector< DriftCircle > DCVec
Gaudi::Property< bool > m_curvedErrorScaling
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Amg::Transform3D globalTrans
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
static DataVector< const Trk::MeasurementBase > createROTVec(std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec)
const MuonClusterOnTrack * etaHit
TrkDriftCircleMath::CLVec createClusterVec(const Identifier &chid, ClusterVec &spVec, const Amg::Transform3D &gToStation) const
Gaudi::Property< bool > m_usePreciseError
void associateMDTsToSegment(const Amg::Vector3D &gdir, TrkDriftCircleMath::Segment &segment, const TrkDriftCircleMath::ChamberGeometry *multiGeo, const Amg::Transform3D &gToStation, const Amg::Transform3D &amdbToGlobal, std::set< Identifier > &deltaVec, std::set< Identifier > &outoftimeVec, std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
bool errorScalingRegion(const Identifier &id) const
apply error scaling for low mometum tracks
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D &lp, double err, const MuonClusterOnTrack *ecl, const std::vector< const MuonClusterOnTrack * > &phs)
constructor taking a vector of phi hits
::StatusCode StatusCode
StatusCode definition for legacy code.
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Function object to sort MuonClusterOnTrack pointers by Identier.
Eigen::Affine3d Transform3D
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
HitInXZ(Identifier i, bool isM, bool measP, double lx, double lz, double lxmin, double lxmax, double phmin, double phmax)
Cluster2D createSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
virtual ~DCMathSegmentMaker()=default
Gaudi::Property< bool > m_refitParameters
Gaudi::Property< bool > m_allMdtHoles
std::unique_ptr< MuonSegment > createSegment(const EventContext &ctx, TrkDriftCircleMath::Segment &segment, const Identifier &chid, const Amg::Vector3D &roadpos, const Amg::Vector3D &roaddir2, const std::vector< const MdtDriftCircleOnTrack * > &mdts, bool hasPhiMeasurements, segmentCreationInfo &sInfo) const
virtual StatusCode initialize()
Gaudi::Property< bool > m_createCompetingROTsPhi
Gaudi::Property< bool > m_recoverBadRpcCabling
represents the three-dimensional global direction with respect to a planar surface frame.
std::map< Identifier, EtaPhiHitsPair > IdHitMap
TubeEnds localTubeEnds(const MdtDriftCircleOnTrack &mdt, const Amg::Transform3D &gToSegment, const Amg::Transform3D &segmentToG) const
calculate positions of tube ends
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< Identifier > calculateHoles(const EventContext &ctx, Identifier chid, const Amg::Vector3D &gpos, const Amg::Vector3D &gdir, bool hasMeasuredCoordinate, std::set< Identifier > &deltaVec, std::set< Identifier > &outoftimeVec, const std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtKey
ClusterVecPair create2DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
const MdtDriftCircleOnTrack * findFirstRotInChamberWithMostHits(const std::vector< const MdtDriftCircleOnTrack * > &mdts) const
Class to represent measurements from the Monitored Drift Tubes.
Eigen::Matrix< double, 3, 1 > Vector3D
Gaudi::Property< bool > m_strictRoadDirectionConsistencyCheck
ToolHandle< IDCSLFitProvider > m_dcslFitProvider
Gaudi::Property< bool > m_doSpacePoints
bool operator()(const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit1, const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit2)
Cluster2D createTgcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
bool operator()(const MuonClusterOnTrack *cl1, const MuonClusterOnTrack *cl2)
Gaudi::Property< bool > m_doTimeOutChecks
Gaudi::Property< double > m_maxAssociateClusterDistance
Gaudi::Property< double > m_sinAngleCut
Gaudi::Property< bool > m_redo2DFit
Gaudi::Property< bool > m_doGeometry
const TrkDriftCircleMath::ChamberGeometry * geom
const MdtPrepData * findMdt(const EventContext &ctx, const Identifier &id) const
Gaudi::Property< bool > m_assumePointingPhi
Identifier identify() const
return the identifier -extends MeasurementBase
Gaudi::Property< bool > m_updatePhiUsingPhiHits
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
std::pair< std::vector< const MuonClusterOnTrack * >, std::vector< const MuonClusterOnTrack * > > EtaPhiHitsPair
static double distanceToSegment(const TrkDriftCircleMath::Segment &segment, const Amg::Vector3D &hitPos, const Amg::Transform3D &gToStation)
Cluster2D createRpcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const std::vector< const MuonClusterOnTrack * > &phiHits) const
Amg::Vector3D updateDirection(double linephi, const Trk::PlaneSurface &surf, const Amg::Vector3D &roaddir, bool isCurvedSegment) const
update the global direction, keeping the phi of the input road direction but using the local angle YZ
Amg::Transform3D amdbTrans
virtual const Surface & associatedSurface() const override=0
returns the surface for the local to global transformation
Gaudi::Property< bool > m_outputFittedT0
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreatorT0
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
TrkDriftCircleMath::MdtChamberGeometry createChamberGeometry(const Identifier &chid, const Amg::Transform3D &gToStation) const
bool checkPhiConsistency(double phi, double phimin, double phimax) const
check whether phi is consistent with segment phi
Gaudi::Property< double > m_preciseErrorScale
Base class for Muon cluster RIO_OnTracks.
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
segmentCreationInfo(ClusterVecPair &spVecs, const TrkDriftCircleMath::ChamberGeometry *multiGeo, Amg::Transform3D gToStation, Amg::Transform3D amdbToGlobal, double pmin, double pmax)
This class offers no functionality, but to define a standard device for the maker to transfer to the ...