![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <DCMathSegmentMaker.h>
|
| DCMathSegmentMaker (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~DCMathSegmentMaker ()=default |
|
virtual StatusCode | initialize () |
|
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 interface routine. More...
|
|
void | find (const std::vector< const Trk::RIO_OnTrack * > &rios1, const std::vector< const Trk::RIO_OnTrack * > &rios2) const |
| find segments starting from a list of RIO_OnTrack objects in multiple chambers, implementation of IMuonSegmentMaker interface routine Will call: More...
|
|
void | find (const std::vector< const MdtDriftCircleOnTrack * > &mdts, const std::vector< const MuonClusterOnTrack * > &clusters, Trk::SegmentCollection *segColl=nullptr) const |
| find segments starting from: More...
|
|
void | find (const Amg::Vector3D &gpos, const Amg::Vector3D &gdir, const std::vector< const MdtDriftCircleOnTrack * > &mdts, const std::vector< const MuonClusterOnTrack * > &clusters, bool hasPhiMeasurements=false, Trk::SegmentCollection *segColl=nullptr, double momentum=1e9, double sinAngleCut=0) const |
| find segments starting from: More...
|
|
void | find (const Trk::TrackRoad &road, const std::vector< std::vector< const MdtDriftCircleOnTrack * > > &mdts, const std::vector< std::vector< const MuonClusterOnTrack * > > &clusters, Trk::SegmentCollection *segColl, bool hasPhiMeasurements=false, double momentum=1e9) const |
| find segments starting from: 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 |
|
|
bool | errorScalingRegion (const Identifier &id) const |
| apply error scaling for low mometum tracks More...
|
|
double | errorScaleFactor (const Identifier &id, double curvature, bool hasPhiMeasurements) const |
| calculate error scaling factor More...
|
|
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 |
|
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 |
|
ClusterVecPair | create1DClusters (const std::vector< const MuonClusterOnTrack * > &clusters) const |
|
ClusterVecPair | create2DClusters (const std::vector< const MuonClusterOnTrack * > &clusters) const |
|
ClusterVecPair | createSpacePoints (const ChIdHitMap &chIdHitMap) const |
|
ClusterVecPair | createSpacePoints (const IdHitMap &gasGapHitMap) const |
|
Cluster2D | createSpacePoint (const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const |
|
Cluster2D | createRpcSpacePoint (const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const std::vector< const MuonClusterOnTrack * > &phiHits) const |
|
Cluster2D | createTgcSpacePoint (const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const |
|
TrkDriftCircleMath::CLVec | createClusterVec (const Identifier &chid, ClusterVec &spVec, const Amg::Transform3D &gToStation) const |
|
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 |
|
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 |
|
TrkDriftCircleMath::MdtChamberGeometry | createChamberGeometry (const Identifier &chid, const Amg::Transform3D &gToStation) const |
|
const MdtDriftCircleOnTrack * | findFirstRotInChamberWithMostHits (const std::vector< const MdtDriftCircleOnTrack * > &mdts) 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 |
|
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 More...
|
|
TubeEnds | localTubeEnds (const MdtDriftCircleOnTrack &mdt, const Amg::Transform3D &gToSegment, const Amg::Transform3D &segmentToG) const |
| calculate positions of tube ends More...
|
|
bool | checkPhiConsistency (double phi, double phimin, double phimax) const |
| check whether phi is consistent with segment phi More...
|
|
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 More...
|
|
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 |
|
const MdtPrepData * | findMdt (const EventContext &ctx, const Identifier &id) 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...
|
|
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
| pointers to IdHelpers More...
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc |
|
ServiceHandle< IMuonEDMHelperSvc > | m_edmHelperSvc |
|
ToolHandle< IMdtDriftCircleOnTrackCreator > | m_mdtCreator |
|
ToolHandle< IMdtDriftCircleOnTrackCreator > | m_mdtCreatorT0 |
|
ToolHandle< IMuonClusterOnTrackCreator > | m_clusterCreator |
|
ToolHandle< IMuonCompetingClustersOnTrackCreator > | m_compClusterCreator |
|
PublicToolHandle< MuonEDMPrinterTool > | m_printer |
|
ToolHandle< IMdtSegmentFinder > | m_segmentFinder |
|
ToolHandle< IMuonSegmentFittingTool > | m_segmentFitter |
|
ToolHandle< IMuonSegmentSelectionTool > | m_segmentSelectionTool |
|
ToolHandle< IDCSLFitProvider > | m_dcslFitProvider |
|
Gaudi::Property< double > | m_sinAngleCut {this, "SinAngleCut", 0.2} |
|
Gaudi::Property< bool > | m_doGeometry {this, "DoGeometry", true} |
|
Gaudi::Property< bool > | m_curvedErrorScaling {this, "CurvedErrorScaling", true} |
|
Gaudi::Property< bool > | m_doSpacePoints {this, "UseTriggerSpacePoints", true} |
|
Gaudi::Property< bool > | m_createCompetingROTsEta {this, "CreateCompetingROTsEta", true} |
|
Gaudi::Property< bool > | m_createCompetingROTsPhi {this, "CreateCompetingROTsPhi", true} |
|
Gaudi::Property< bool > | m_refitParameters {this, "RefitSegment", false} |
|
Gaudi::Property< bool > | m_addUnassociatedPhiHits {this, "AddUnassociatedPhiHits", false} |
|
Gaudi::Property< bool > | m_strictRoadDirectionConsistencyCheck {this, "StrictRoadDirectionConsistencyCheck", true} |
|
Gaudi::Property< double > | m_maxAssociateClusterDistance {this, "MaxAssociateClusterDistance", 3000.} |
|
Gaudi::Property< bool > | m_allMdtHoles {this, "AllMdtHoles", false} |
|
Gaudi::Property< bool > | m_removeDeltas {this, "RemoveDeltasFromSegmentQuality", true} |
|
Gaudi::Property< bool > | m_reject1DTgcSpacePoints {this,"Reject1DTgcSpacePoints", true } |
|
Gaudi::Property< bool > | m_usePreciseError {this, "UsePreciseError", false} |
|
Gaudi::Property< bool > | m_outputFittedT0 {this, "OutputFittedT0", false} |
|
Gaudi::Property< double > | m_preciseErrorScale {this, "PreciseErrorScale", 2.} |
|
Gaudi::Property< bool > | m_doTimeOutChecks {this, "UseTimeOutGard", false} |
|
Gaudi::Property< bool > | m_recoverBadRpcCabling {this, "RecoverBadRpcCabling", false} |
|
Gaudi::Property< bool > | m_updatePhiUsingPhiHits {this, "UpdatePhiUsingPhiHits", false} |
|
Gaudi::Property< bool > | m_assumePointingPhi {this, "AssumePointingPhi", false } |
|
Gaudi::Property< bool > | m_redo2DFit {this, "Redo2DFit", true} |
|
SG::ReadHandleKey< Muon::RpcPrepDataContainer > | m_rpcKey {this, "RpcPrepDataContainer", "RPC_Measurements"} |
|
SG::ReadHandleKey< Muon::TgcPrepDataContainer > | m_tgcKey {this, "TgcPrepDataContainer", "TGC_Measurements"} |
|
SG::ReadHandleKey< Muon::MdtPrepDataContainer > | m_mdtKey {this, "MdtPrepDataContainer", "MDT_DriftCircles"} |
|
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > | m_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"} |
|
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 |
|
Implementation of a IMuonSegmentMaker.
For more details look at the mainpage of this package.
Definition at line 102 of file DCMathSegmentMaker.h.
◆ ChIdHitMap
◆ ClusterVec
◆ ClusterVecPair
◆ EtaPhiHitsPair
◆ IdHitMap
◆ StoreGateSvc_t
◆ DCMathSegmentMaker()
Muon::DCMathSegmentMaker::DCMathSegmentMaker |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~DCMathSegmentMaker()
virtual Muon::DCMathSegmentMaker::~DCMathSegmentMaker |
( |
| ) |
|
|
virtualdefault |
◆ associateClustersToSegment()
calculate distance to segment
Definition at line 1292 of file DCMathSegmentMaker.cxx.
1295 typedef IdDataVec<std::pair<double, Cluster2D> >
GasGapData;
1296 typedef IdDataVec<GasGapData> ChamberData;
1297 typedef std::vector<ChamberData> ChamberDataVec;
1298 ChamberDataVec chamberDataVec;
1303 std::pair<std::pair<int, int>,
bool> netaPhiHits(std::make_pair(0, 0),
false);
1304 if (
segment.clusters().empty())
return netaPhiHits;
1306 std::vector<const Trk::MeasurementBase*> phiHits;
1312 std::set<Identifier> detElOnSegments;
1313 std::set<MuonStationIndex::PhiIndex> phiIndices;
1315 ATH_MSG_DEBUG(
" Associating clusters: " <<
segment.clusters().size() <<
" number of space points " << spVecs.first.size());
1320 const Cluster2D& spacePoint = spVecs.first[clust.index()];
1323 if (spacePoint.corrupt()) {
1324 ATH_MSG_DEBUG(
" Found corrupt space point: index " << clust.index());
1333 ATH_MSG_DEBUG(
" Inconsistent phi angle, dropping space point: phi " << spacePoint.globalPos.phi() <<
" range " << phimin
1341 if (chamberDataVec.empty() || chamberDataVec.back().id != spacePoint.detElId) {
1342 detElOnSegments.insert(spacePoint.detElId);
1343 chamberDataVec.emplace_back(spacePoint.detElId);
1349 ChamberData&
chamber = chamberDataVec.back();
1352 if (spacePoint.detElId ==
chamber.id) {
1354 if (
chamber.data.empty() ||
chamber.data.back().id != spacePoint.gasGapId) {
1355 chamber.data.emplace_back(spacePoint.gasGapId);
1361 gasGap.data.emplace_back(resPull.second, spacePoint);
1365 double posFirstPhiStation{FLT_MAX}, posLastPhiStation{0.};
1368 for (ChamberData& chamb : chamberDataVec) {
1370 std::list<const Trk::PrepRawData*> etaClusterVec{}, phiClusterVec{};
1371 std::set<Identifier> etaIds;
1378 double bestPull = std::abs(
gasGap.data.front().first);
1381 unsigned int nassociatedSp = 0;
1382 GasGapData::EntryVec::const_iterator cl_it =
gasGap.data.begin();
1383 while (cl_it !=
gasGap.data.end() && std::abs(cl_it->first) - bestPull < 1.) {
1384 const Cluster2D& sp = cl_it->second;
1388 << std::abs(cl_it->first) <<
" distance to segment " << dist <<
" phi "
1389 << sp.globalPos.phi());
1393 if (!etaIds.count(sp.etaHit->identify())) {
1394 etaIds.insert(sp.etaHit->identify());
1397 etaClusterVec.push_back(sp.etaHit->prepRawData());
1399 rioDistVec.emplace_back(dist, sp.etaHit->uniqueClone());
1400 ++netaPhiHits.first.first;
1404 if (!sp.phiHits.empty()) {
1407 std::transform(sp.phiHits.begin(), sp.phiHits.end(), std::back_inserter(phiClusterVec),
1409 return clus->prepRawData();
1413 for (
const MuonClusterOnTrack* phi_hit : sp.phiHits) {
1414 rioDistVec.emplace_back(dist, phi_hit->uniqueClone());
1415 ++netaPhiHits.first.second;
1416 phiHits.push_back(phi_hit);
1419 double phiPos = isEndcap ? std::abs(phi_hit->globalPosition().z()) : phi_hit->globalPosition().
perp();
1420 posFirstPhiStation =
std::min(phiPos, posFirstPhiStation);
1421 posLastPhiStation =
std::max(phiPos, posLastPhiStation);
1423 if (sp.phiHits.size() > 1) refit =
false;
1435 if (!etaClusterVec.empty()) {
1436 std::unique_ptr<const CompetingMuonClustersOnTrack> etaCompCluster =
m_compClusterCreator->createBroadCluster(etaClusterVec, 0.);
1437 if (!etaCompCluster) {
1438 ATH_MSG_DEBUG(
" failed to create competing ETA ROT " << etaClusterVec.size());
1441 ++netaPhiHits.first.first;
1444 for (
unsigned int i = 0;
i < etaCompCluster->containedROTs().
size(); ++
i) {
1446 " content: " <<
m_idHelperSvc->toString(etaCompCluster->containedROTs()[
i]->identify()));
1449 rioDistVec.emplace_back(dist, std::move(etaCompCluster));
1456 if (!phiClusterVec.empty()) {
1457 std::unique_ptr<const CompetingMuonClustersOnTrack> phiCompCluster =
m_compClusterCreator->createBroadCluster(phiClusterVec, 0.);
1458 if (!phiCompCluster) {
1459 ATH_MSG_DEBUG(
" failed to create competing PHI ROT " << phiClusterVec.size());
1462 phiHits.push_back(phiCompCluster.get());
1464 ++netaPhiHits.first.second;
1468 for (
unsigned int i = 0;
i < phiCompCluster->containedROTs().
size(); ++
i) {
1470 " content: " <<
m_idHelperSvc->toString(phiCompCluster->containedROTs()[
i]->identify()));
1476 double phiPos = isEndcap ? std::abs(phiCompCluster->globalPosition().z()) :
1477 phiCompCluster->globalPosition().
perp();
1478 posFirstPhiStation =
std::min(phiPos,posFirstPhiStation);
1479 posLastPhiStation =
std::max(phiPos,posLastPhiStation);
1480 rioDistVec.emplace_back(dist, std::move(phiCompCluster));
1491 std::map<Identifier, std::list<const Trk::PrepRawData*> > phiClusterMap;
1493 std::set<const MuonClusterOnTrack*> selectedClusters;
1494 std::vector<const Cluster2D*> phiClusters;
1495 phiClusters.reserve(spVecs.second.size());
1498 for (
const Cluster2D& phi_clus :spVecs.second) {
1499 if (!phi_clus.phiHit || phi_clus.corrupt()) {
1503 phiClusters.push_back(&phi_clus);
1504 selectedClusters.insert(phi_clus.phiHit);
1507 unsigned int recoveredUnassociatedPhiHits(0);
1511 for (
const Cluster2D& rpc_clust : spVecs.first) {
1513 if (!rpc_clust.phiHit || rpc_clust.corrupt())
continue;
1516 if (detElOnSegments.count(rpc_clust.detElId))
continue;
1520 if (phiIndices.count(
phiIndex))
continue;
1522 bool wasFound =
false;
1523 for (
const MuonClusterOnTrack* phi_hit : rpc_clust.phiHits) {
1525 if (!selectedClusters.insert(phi_hit).second) {
1531 for (
const MuonClusterOnTrack* erase_me : rpc_clust.phiHits) {
1532 if (erase_me == phi_hit)
break;
1533 selectedClusters.erase(erase_me);
1538 if (wasFound)
continue;
1541 phiClusters.push_back(&rpc_clust);
1542 ++recoveredUnassociatedPhiHits;
1546 unsigned int addedPhiHits(0);
1547 for (
const Cluster2D* phi_clus : phiClusters) {
1548 const Identifier& detElId = phi_clus->detElId;
1551 if (detElOnSegments.count(detElId))
continue;
1555 if (phiIndices.count(
phiIndex))
continue;
1562 double residual = resWithSegment.residual(
cl);
1563 double segError = std::sqrt(resWithSegment.trackError2(
cl));
1572 bool inBounds = std::abs(
residual) < 0.5 * stripLength + 2. + segError;
1575 <<
" pos y " <<
cl.position().y() <<
" : residual " <<
residual <<
" strip half length "
1576 << 0.5 * stripLength <<
" segment error " << segError);
1584 std::list<const Trk::PrepRawData*>& cham_hits{phiClusterMap[detElId]};
1585 std::transform(phi_clus->phiHits.begin(), phi_clus->phiHits.end(), std::back_inserter(cham_hits),
1586 [](
const MuonClusterOnTrack* clus){
1587 return clus->prepRawData();
1593 for (
const auto& [phi_id, prds] : phiClusterMap) {
1599 std::unique_ptr<const CompetingMuonClustersOnTrack> phiCompCluster =
m_compClusterCreator->createBroadCluster(prds, 0.);
1600 if (!phiCompCluster) {
1601 ATH_MSG_DEBUG(
" failed to create competing PHI ROT " << prds.size());
1608 <<
" distance to segment " << dist);
1611 phiHits.push_back(phiCompCluster.get());
1612 ++netaPhiHits.first.second;
1616 <<
" distance to segment " << dist);
1617 for (
unsigned int i = 0;
i < phiCompCluster->containedROTs().
size(); ++
i) {
1619 " content: " <<
m_idHelperSvc->toString(phiCompCluster->containedROTs()[
i]->identify()));
1622 rioDistVec.emplace_back(dist, std::move(phiCompCluster));
1625 ATH_MSG_VERBOSE(
"Added " << addedPhiHits <<
" unass phi hits out of " << spVecs.second.size()
1626 <<
" phi hits without eta hit and " << recoveredUnassociatedPhiHits <<
" with unassociated eta hit ");
1630 double phiDistanceMax = posLastPhiStation - posFirstPhiStation;
1631 if (isEndcap && phiDistanceMax < 1000.)
1633 else if (phiDistanceMax < 400.)
1636 netaPhiHits.second = refit;
◆ associateMDTsToSegment()
Definition at line 1157 of file DCMathSegmentMaker.cxx.
1168 if (
segment.hasCurvatureParameters()) {
1170 double ml2phi =
line.phi() -
segment.deltaAlpha();
1175 double chamberMidPtY = (ml1LocPos.
y() + ml2LocPos.
y()) / 2.0;
1181 toLineml2 = tmptoLine;
1191 const MdtDriftCircleOnTrack* riodc{dcit.rot()};
1195 if (
m_idHelperSvc->mdtIdHelper().multilayer(riodc->identify()) == 2) toLine = toLineml2;
1206 Amg::Vector3D posAlong = gToStation * riodc->globalPosition();
1209 posAlong[1] = pointOnLineAMDB.
x();
1210 posAlong[2] = pointOnLineAMDB.
y();
1217 ATH_MSG_WARNING(
" dynamic cast to StraightLineSurface failed for mdt!!! ");
1228 std::unique_ptr<MdtDriftCircleOnTrack> nonconstDC;
1229 bool hasT0 =
segment.hasT0Shift();
1232 nonconstDC.reset(
m_mdtCreator->createRIO_OnTrack(*riodc->prepRawData(), mdtGP, &gdir));
1233 if (hasT0)
ATH_MSG_WARNING(
"Attempted to change t0 without a properly configured MDT creator tool. ");
1236 nonconstDC.reset(
m_mdtCreatorT0->createRIO_OnTrack(*riodc->prepRawData(), mdtGP, &gdir,
segment.t0Shift()));
1247 dcit.driftState(), dcit.id(),
1250 dcit = std::move(new_dc_on_track);
1254 double shift = riodc->driftTime() - nonconstDC->driftTime();
1255 ATH_MSG_VERBOSE(
" t0 shift " <<
segment.t0Shift() <<
" from hit " << shift <<
" recal " << nonconstDC->driftRadius()
1256 <<
" t " << nonconstDC->driftTime() <<
" from fit " << dcit.r() <<
" old "
1257 << riodc->driftRadius() <<
" t " << riodc->driftTime());
1258 if (std::abs(std::abs(nonconstDC->driftRadius()) - std::abs(dcit.r())) > 0.1 && nonconstDC->driftRadius() < 19. &&
1259 nonconstDC->driftRadius() > 1.) {
1265 double dist = pointOnHit.
x();
1266 rioDistVec.emplace_back(dist, std::move(nonconstDC));
◆ calculateHoles()
Definition at line 1697 of file DCMathSegmentMaker.cxx.
1702 if (!InterSectSvc.isValid()) {
1703 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
1706 const MuonStationIntersect
intersect = InterSectSvc->tubesCrossedByTrack(chid, gpos, gdir);
1710 std::set<Identifier> hitsOnSegment, chambersOnSegment;
1711 int firstLayer{-1}, lastLayer{-1};
1712 for (
const std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>>& rdit : rioDistVec) {
1713 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(rdit.second.get());
1717 if (firstLayer == -1)
1722 hitsOnSegment.insert(
id);
1727 if (firstLayer > lastLayer) {
std::swap(firstLayer, lastLayer); }
1728 ATH_MSG_VERBOSE(
" Tube layer ranges: " << firstLayer <<
" -- " << lastLayer <<
" crossed tubes "
1731 std::vector<Identifier> holeVec;
1732 for (
const MuonTubeIntersect& tint :
intersect.tubeIntersects()) {
1733 if (!chambersOnSegment.count(
m_idHelperSvc->chamberId(tint.tubeId))) {
1734 ATH_MSG_VERBOSE(
" chamber not on segment, not counting tube " << tint.rIntersect <<
" l " << tint.xIntersect <<
" "
1742 bool notBetweenHits = layer < firstLayer || layer > lastLayer;
1743 double distanceCut = hasMeasuredCoordinate ? -20 : -200.;
1745 if (notBetweenHits && (std::abs(tint.rIntersect) > innerRadius || (!
m_allMdtHoles && tint.xIntersect > distanceCut))) {
1746 ATH_MSG_VERBOSE(
" not counting tube: distance to wire " << tint.rIntersect <<
" dist to tube end " << tint.xIntersect
1751 if (hitsOnSegment.count(tint.tubeId)) {
1752 ATH_MSG_VERBOSE(
" tube on segment: distance to wire " << tint.rIntersect <<
" dist to tube end " << tint.xIntersect
1758 if (deltaVec.count(tint.tubeId)) {
1759 ATH_MSG_VERBOSE(
" removing delta, distance to wire " << tint.rIntersect <<
" dist to tube end " << tint.xIntersect
1765 if (prd && std::abs(prd->localPosition()[
Trk::locR]) < std::abs(tint.rIntersect)) {
1766 ATH_MSG_VERBOSE(
" found and removed delta, distance to wire " << tint.rIntersect <<
" dist to tube end "
1767 << tint.xIntersect <<
" "
1772 ATH_MSG_VERBOSE((outoftimeVec.count(tint.tubeId) ?
"Out-of-time" :
"hole") <<
" distance to wire "
1773 << tint.rIntersect <<
" dist to tube end " << tint.xIntersect <<
" "
1774 <<
m_idHelperSvc->toString(tint.tubeId)<<(notBetweenHits ?
"outside hits" :
"between hits"));
1776 holeVec.push_back(tint.tubeId);
◆ checkBoundsInXZ()
bool Muon::DCMathSegmentMaker::checkBoundsInXZ |
( |
double |
xline, |
|
|
double |
zline, |
|
|
double |
dXdZ, |
|
|
const std::vector< HitInXZ > & |
hits |
|
) |
| const |
|
private |
check whether all hits are in bounds in the XZ plane
Definition at line 1830 of file DCMathSegmentMaker.cxx.
1835 for (
const HitInXZ& hit :
hits) {
1836 bool outBounds =
false;
1837 double locExX = xline + dXdZ * (hit.z - zline);
1838 if (hit.isMdt && (locExX < hit.xmin - 1. || locExX > hit.xmax + 1.)) {
1846 << std::setw(6) << (
int)hit.z <<
") ex pos " << std::setw(6) << (
int)locExX <<
" min " << std::setw(6)
1847 << (
int)hit.xmin <<
" max " << std::setw(6) << (
int)hit.xmax <<
" phimin " << std::setw(6)
1848 << hit.phimin <<
" phimax " << std::setw(6) << hit.phimax <<
" outBounds, cross-check");
◆ checkPhiConsistency()
bool Muon::DCMathSegmentMaker::checkPhiConsistency |
( |
double |
phi, |
|
|
double |
phimin, |
|
|
double |
phimax |
|
) |
| const |
|
private |
check whether phi is consistent with segment phi
Definition at line 2106 of file DCMathSegmentMaker.cxx.
2112 if (phimin * phimax < 0.) {
2115 if (
phi < phimin -
offset) phiOk =
false;
2117 if (
phi > phimin +
offset) phiOk =
false;
2121 if (
phi < phimax -
offset) phiOk =
false;
2123 if (
phi > phimax +
offset) phiOk =
false;
2127 if (phi < phimin - offset || phi > phimax +
offset) phiOk =
false;
◆ create1DClusters()
Definition at line 702 of file DCMathSegmentMaker.cxx.
712 for (
const MuonClusterOnTrack* clust :
clusters) {
718 if (phiVec.back().corrupt()) phiVec.pop_back();
721 if (clVec.back().corrupt()) clVec.pop_back();
◆ create2DClusters()
Definition at line 728 of file DCMathSegmentMaker.cxx.
733 for (
const MuonClusterOnTrack* clus:
clusters) {
741 gasGapHitMap[chId][gasGapId].first.push_back(clus);
743 gasGapHitMap[chId][gasGapId].second.push_back(clus);
◆ createChamberGeometry()
Definition at line 1081 of file DCMathSegmentMaker.cxx.
1106 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
1121 detEl2 = MuonDetMgr->getMdtReadoutElement(firstIdml1);
1122 firstTubeMl1 = gToStation * (detEl2->
surface(firstIdml1).
center());
1132 firstTubeMl0 = gToStation * (detEl1->
surface(firstIdml0).
center());
1145 double tubeDist = (secondTubeMl0 - firstTubeMl0).
y();
1146 double tubeStage = (firstTubeMl0lay1 - firstTubeMl0).
y();
1147 double layDist = (firstTubeMl0lay1 - firstTubeMl0).
z();
1149 TrkDriftCircleMath::MdtChamberGeometry mdtgeo(chid,
m_idHelperSvc.get(), nml, nlay, ntube1, ntube2, firstTube0, firstTube1, tubeDist, tubeStage,
◆ createClusterVec()
Definition at line 986 of file DCMathSegmentMaker.cxx.
990 const int chPhi =
m_idHelperSvc->mdtIdHelper().stationPhi(chid);
994 cls.reserve(spVec.size());
995 for (
const Cluster2D& clust : spVec) {
997 const MuonClusterOnTrack* meas = clust.etaHit ? clust.etaHit : clust.phiHit;
1022 << meas->detectorElement()->center().phi() <<
" index " <<
index);
1023 cls.emplace_back(lp, clust.error, clid, meas,
index);
◆ createDCVec()
Definition at line 1028 of file DCMathSegmentMaker.cxx.
1033 dcs.reserve(mdts.size());
1035 bool firstMdt =
true;
1037 for (
const MdtDriftCircleOnTrack* rot : mdts) {
1043 Amg::Vector3D locPos = gToStation * rot->prepRawData()->globalPosition();
1046 double r = rot->localParameters()[
Trk::locR];
1054 double preciseError =
dr;
1059 TubeEnds tubeEnds =
localTubeEnds(*rot, gToStation, amdbToGlobal);
1061 phimin = tubeEnds.phimin;
1062 phimax = tubeEnds.phimax;
1069 << rot->driftTime() <<
" r " <<
r <<
" dr " <<
dr <<
" phi range " << tubeEnds.phimin <<
" "
1070 << tubeEnds.phimax<<
" precise error "<<preciseError);
1071 dcs.push_back(std::move(dc));
1073 chamberSet.insert(elId);
1075 ++dcStatistics[rot->prepRawData()->detectorElement()];
◆ createROTVec()
Definition at line 1663 of file DCMathSegmentMaker.cxx.
1666 std::sort(rioDistVec.begin(), rioDistVec.end(), SortByDistanceToSegment());
1669 rioVec.reserve(rioDistVec.size());
1670 for (std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>>& rdit : rioDistVec) { rioVec.push_back(std::move(rdit.second)); }
◆ createRpcSpacePoint()
Definition at line 925 of file DCMathSegmentMaker.cxx.
928 std::vector<const MuonClusterOnTrack*> cleanPhihits;
929 cleanPhihits.reserve(phiHits.size());
931 double error{1.}, lpx{0.}, lpy{0.};
934 lpx = phiHits.front()->localParameters()[
Trk::locX];
938 for (
const MuonClusterOnTrack* clus : phiHits) {
940 if (clus->identify() == prevId)
continue;
941 prevId = clus->identify();
942 cleanPhihits.push_back(clus);
944 }
else if (phiHits.empty()) {
945 lpx = etaHit->localParameters()[
Trk::locX];
947 }
else if (etaHit && !phiHits.empty()) {
948 lpx = etaHit->localParameters()[
Trk::locX];
954 double minPos{1e9}, maxPos{-1e9};
958 for (
const MuonClusterOnTrack* phiHit : phiHits) {
960 if (phiHit->identify() == prevId)
continue;
961 prevId = phiHit->identify();
965 if (etaHit->associatedSurface().globalToLocal(phiHit->globalPosition(), phiHit->globalPosition(), phiLocPos)) {
970 cleanPhihits.push_back(phiHit);
973 if (cleanPhihits.size() > 1)
974 ATH_MSG_DEBUG(
" multiple phi hits: nhits " << cleanPhihits.size() <<
" cl width " << maxPos - minPos);
979 if (std::abs(
error) < 0.001) {
983 return Cluster2D(detElId, gasGapId,
Amg::Vector2D(lpx, lpy),
error, etaHit, !cleanPhihits.empty() ? cleanPhihits : phiHits);
◆ createSegment()
Use linearity of the sin at leading order to check that the angular differences are either 0 or PI
Copy hits into vector
recalculate global direction and position
Definition at line 234 of file DCMathSegmentMaker.cxx.
244 const bool isCurvedSegment =
segment.hasCurvatureParameters() &&
245 std::find(statWithField.begin(), statWithField.end(), chIndex) != statWithField.end();
248 if (
segment.hitsOnTrack() < 3)
return nullptr;
254 <<
line.position().y() <<
" phi " <<
line.phi() <<
" associated clusters "
259 Amg::Vector3D lroaddir = sInfo.globalTrans.linear() * roaddir2;
264 if (hasPhiMeasurements) {
268 double cphi = lroaddir.x();
278 double shortestTubeLen = 1e9;
283 const MdtDriftCircleOnTrack* riodc{
driftCircle.rot()};
284 int lay =
m_idHelperSvc->mdtIdHelper().tubeLayer(riodc->identify());
286 double tubelen = 0.5 * riodc->prepRawData()->detectorElement()->getActiveTubeLength(lay,
tube);
287 if (tubelen < shortestTubeLen) shortestTubeLen = tubelen;
290 if (std::abs(lxroad) > shortestTubeLen) {
291 ATH_MSG_DEBUG(
"coordinates far outside chamber! using global position of first hit ");
292 if (lxroad < 0.) shortestTubeLen *= -1.;
293 lxroad = shortestTubeLen;
296 lxroad = (sInfo.globalTrans * mdts[0]->prepRawData()->detectorElement()->surface(mdts[0]->identify()).center()).
x();
307 surfaceTransform.pretranslate(gpos);
308 double surfDim = 500.;
309 std::unique_ptr<Trk::PlaneSurface> surf = std::make_unique<Trk::PlaneSurface>(surfaceTransform, surfDim, surfDim);
313 double linephi =
line.phi();
320 std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> > rioDistVec;
323 std::set<Identifier> deltaVec;
324 std::set<Identifier> outoftimeVec;
327 std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>> garbage_collector;
341 linephi =
result.line().phi();
342 lpos[1] =
result.line().position().x();
343 lpos[2] =
result.line().position().y();
344 gpos = sInfo.amdbTrans * lpos;
348 surfaceTransform.pretranslate(gpos);
349 surf = std::make_unique<Trk::PlaneSurface>(surfaceTransform, surfDim, surfDim);
369 if (
std::min(std::abs(diff_phi), std::abs( std::abs(diff_phi) -
M_PI)) > 1.
e-3 ||
370 std::min(std::abs(diff_prec), std::abs(std::abs(diff_prec) -
M_PI)) > 1.
e-3) {
371 ATH_MSG_WARNING(
" ALARM updated angles wrong: diff phi " << diff_phi <<
" prec " << diff_prec <<
" phi rdir " << roaddir2.phi()
372 <<
" gdir " << gdir.phi() <<
" lphi " << linephi <<
" seg "
377 std::pair<std::pair<int, int>,
bool> netaPhiHits =
380 if (rioDistVec.empty()){
386 auto meas_for_fit = [&rioDistVec] () {
387 std::vector<const Trk::MeasurementBase*>
out{};
388 out.reserve(rioDistVec.size());
389 std::sort(rioDistVec.begin(), rioDistVec.end(), SortByDistanceToSegment());
390 for (
const std::pair<
double, std::unique_ptr<const Trk::MeasurementBase>>& ele : rioDistVec)
out.push_back(ele.second.get());
395 double dlocx{1000.}, dangleXZ{1000.}, qoverp{-99999.}, dqoverp{-99999.};
396 bool hasMeasuredCoordinate =
false;
398 ATH_MSG_DEBUG(
" distance between first and last phi hit sufficient to perform 4D fit: phi " << gdir.phi() <<
" theta "
404 if (isCurvedSegment &&
track->perigeeParameters() &&
track->perigeeParameters()->covariance()) {
408 hasMeasuredCoordinate =
true;
411 updatedCov.setZero();
424 if (
track->measurementsOnTrack() && rioDistVec.size() !=
track->measurementsOnTrack()->size()) {
425 if (
track->measurementsOnTrack()->empty()) {
429 ATH_MSG_DEBUG(
" ROT vector size changed after fit, updating ");
430 garbage_collector = std::move(rioDistVec);
431 rioDistVec.reserve(
track->measurementsOnTrack()->size());
436 if (!firstPars) firstPars =
pars;
443 rioDistVec.emplace_back(dist, meas->
uniqueClone());
448 netaPhiHits.second =
false;
455 if (
updateSegmentPhi(gpos, gdir, segLocPos, segLocDir, *surf, meas_for_fit(), sInfo.phimin, sInfo.phimax)) {
458 hasMeasuredCoordinate =
true;
465 std::vector<const Trk::MeasurementBase*> debug_meas = meas_for_fit();
466 ATH_MSG_DEBUG(
" number of hits " << debug_meas.size() <<
" of which trigger " << netaPhiHits.first.first <<
" eta and "
467 << netaPhiHits.first.second <<
" phi ");
472 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(rot);
475 <<
" radius " << std::setw(6) << mdt->driftRadius() <<
" time " << std::setw(6) << mdt->driftTime());
478 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(mit);
481 <<
" comp rot with hits " << crot->containedROTs().size());
488 std::vector<Identifier> holeVec =
calculateHoles(ctx, chid, gpos, gdir, hasMeasuredCoordinate, deltaVec, outoftimeVec, rioDistVec);
491 if (!outoftimeVec.empty()) holeVec.insert(holeVec.end(), std::make_move_iterator(outoftimeVec.begin()),
492 std::make_move_iterator(outoftimeVec.end()));
493 MuonSegmentQuality* quality =
new MuonSegmentQuality(
segment.chi2(),
segment.ndof(), holeVec);
504 bool hasFittedT0 =
false;
505 double fittedT0{0}, errorFittedT0{1.};
510 errorFittedT0 =
segment.t0Error();
511 }
else if (dcslFitter &&
result.hasT0Shift()) {
512 fittedT0 =
result.t0Shift();
513 errorFittedT0 =
result.t0Error();
520 std::unique_ptr<MuonSegment> msegment;
521 if (isCurvedSegment) {
522 if (qoverp == -99999.) {
526 constexpr
double BILALPHA(28.4366), BMLALPHA(62.8267), BMSALPHA(53.1259), BOLALPHA(29.7554);
529 dqoverp = M_SQRT2 *
segment.dtheta() / BILALPHA;
532 dqoverp = M_SQRT2 *
segment.dtheta() / BMLALPHA;
535 dqoverp = M_SQRT2 *
segment.dtheta() / BMSALPHA;
538 dqoverp = M_SQRT2 *
segment.dtheta() / BOLALPHA;
549 std::vector<Trk::DefinedParameter> defPars;
552 defPars.emplace_back(gdir.phi(),
Trk::phi);
553 defPars.emplace_back(gdir.theta(),
Trk::theta);
556 msegment = std::make_unique<MuonSegment>(
557 std::move(segLocPar),
572 std::make_unique<MuonSegment>(segLocPos,
581 if (hasFittedT0) msegment->setT0Error(fittedT0, errorFittedT0);
592 if (segmentQuality < 0) {
return nullptr; }
◆ createSpacePoint()
Definition at line 852 of file DCMathSegmentMaker.cxx.
855 double error{1.}, lpx{0.}, lpy{0.};
862 lpx = phiHit->localParameters()[
Trk::locX];
865 }
else if (!phiHit) {
866 lpx = etaHit->localParameters()[
Trk::locX];
868 }
else if (etaHit && phiHit) {
872 std::vector<const MuonClusterOnTrack*> phiVec{phiHit};
877 if (std::abs(
error) < 0.001) {
◆ createSpacePoints() [1/2]
Definition at line 749 of file DCMathSegmentMaker.cxx.
752 spacePoints.reserve(20);
755 for (
const auto& [
id, gasGapHits] : chIdHitMap) {
759 std::make_move_iterator(
cls.first.end()), std::back_inserter(spacePoints));
761 std::make_move_iterator(
cls.second.end()), std::back_inserter(phiVec));
764 return std::make_pair(std::move(spacePoints), std::move(phiVec));
◆ createSpacePoints() [2/2]
Definition at line 767 of file DCMathSegmentMaker.cxx.
769 bool isEndcap =
m_idHelperSvc->isEndcap((*(gasGapHitMap.begin())).first);
771 ATH_MSG_VERBOSE(
" creating Space points for " << gasGapHitMap.size() <<
" gas gaps ");
773 for (
const auto& [gasGapId, etaPhiHits] : gasGapHitMap) {
775 std::vector<bool> flagPhihit(etaPhiHits.second.size(), 0);
781 << etaPhiHits.second.size());
783 for (
const MuonClusterOnTrack* etaHit : etaPhiHits.first) {
785 if (etaHit->identify() == prevEtaId)
continue;
786 prevEtaId = etaHit->identify();
792 bool foundSP =
false;
795 for (
const MuonClusterOnTrack* phiHit : etaPhiHits.second) {
798 if (phiHit->identify() == prevPhiId)
continue;
799 prevPhiId = phiHit->identify();
804 if (sp.corrupt())
continue;
805 spacePoints.push_back(std::move(sp));
808 flagPhihit[phi_idx] =
true;
814 if (sp.corrupt())
continue;
815 spacePoints.push_back(std::move(sp));
819 if (sp.corrupt())
continue;
821 flagPhihit = std::vector<bool>(etaPhiHits.second.size(), 1);
822 spacePoints.push_back(std::move(sp));
828 for (
unsigned int i = 0;
i < flagPhihit.size(); ++
i) {
829 if (flagPhihit[
i])
continue;
832 if (etaPhiHits.second[
i]->identify() == prevPhiId)
continue;
833 prevPhiId = etaPhiHits.second[
i]->identify();
836 if (sp.corrupt())
continue;
837 phiVec.push_back(std::move(sp));
839 }
else if (etaPhiHits.first.empty() && !etaPhiHits.second.empty()) {
842 if (sp.corrupt())
continue;
843 phiVec.push_back(std::move(sp));
847 ATH_MSG_VERBOSE(
" Creating space points, number of gas-gaps " << gasGapHitMap.size() <<
" space points " << spacePoints.size());
849 return std::make_pair(std::move(spacePoints), std::move(phiVec));
◆ createTgcSpacePoint()
Definition at line 884 of file DCMathSegmentMaker.cxx.
887 double error{1.}, lpx{0.}, lpy{0.};
891 lpx = phiHit->localParameters()[
Trk::locX];
893 }
else if (!phiHit) {
894 lpx = etaHit->localParameters()[
Trk::locX];
896 }
else if (etaHit && phiHit) {
901 etaHit->globalPosition(),
902 phiHit->globalPosition());
905 lpx = lSpacePoint.x();
906 lpy = lSpacePoint.y();
908 if (
error <= std::numeric_limits<double>::epsilon()) {
910 if (etaHit->prepRawData())
914 <<
" " <<
m_idHelperSvc->toString(etaHit->identify()) << std::endl
917 if (std::abs(
error) < 0.001) {
◆ 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);
◆ 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.
◆ 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.
◆ 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()
◆ distanceToSegment()
Definition at line 1640 of file DCMathSegmentMaker.cxx.
1644 double cos_sinLine = cot(
line.phi());
1652 double delta_y = lpos.y() -
line.position().y();
1660 return pointOnHit.
x();
◆ errorScaleFactor()
double Muon::DCMathSegmentMaker::errorScaleFactor |
( |
const Identifier & |
id, |
|
|
double |
curvature, |
|
|
bool |
hasPhiMeasurements |
|
) |
| const |
|
private |
calculate error scaling factor
Definition at line 651 of file DCMathSegmentMaker.cxx.
657 double scaleMax = 5.;
665 if (!hasPhiMeasurements) {
666 double phiScale = 1.;
668 int stRegion =
m_idHelperSvc->mdtIdHelper().stationRegion(
id);
671 else if (stRegion == 1)
673 else if (stRegion == 2)
◆ errorScalingRegion()
bool Muon::DCMathSegmentMaker::errorScalingRegion |
( |
const Identifier & |
id | ) |
const |
|
private |
apply error scaling for low mometum tracks
Definition at line 684 of file DCMathSegmentMaker.cxx.
694 if (stName[1] ==
'I')
return true;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ find() [1/5]
find segments starting from:
- an estimate of the global position and direction of the particle in the chamber
- a list of MdtDriftCircleOnTrack
- a list of MuonClusterOnTrack
- a boolean to indicate whether the external prediction should be used to set the \( \phi \)-direction of the segment
- an estimate of the momentum of the particle
The global direction is used to perform a seeded search for segments.
Implements Muon::IMuonSegmentMaker.
Definition at line 91 of file DCMathSegmentMaker.cxx.
95 const EventContext& ctx = Gaudi::Hive::currentContext();
103 if (mdts.size() < 3)
return;
107 if (!firstRot) {
return; }
131 double chamber_angleYZ = std::atan2(dirCh.z(), dirCh.y());
134 double dotprod = globalDirCh.perp() *
std::sin(roaddir2.theta()) + globalDirCh.z() *
std::cos(roaddir2.theta());
135 if (dotprod < 0) roaddir2 = -roaddir2;
140 double road_angleXZ = std::atan2(
d.z(),
d.x());
141 double road_angleYZ = std::atan2(
d.z(),
d.y());
143 if (!hasPhiMeasurements) road_angleXZ =
M_PI;
145 << isEndcap <<
" central phi " << detEl->
center().phi() <<
" r " << detEl->
center().perp()
146 <<
" z " << detEl->
center().z());
162 std::stringstream sstr{};
163 for (
const MdtDriftCircleOnTrack* mdt : mdts)
165 ATH_MSG_VERBOSE(
" adding mdts " << mdts.size()<<std::endl<<sstr.str());
169 std::set<Identifier> chamberSet;
170 double phimin{-9999}, phimax{9999};
175 std::shared_ptr<const TrkDriftCircleMath::ChamberGeometry> multiGeo;
177 ATH_MSG_VERBOSE(
" using chamber geometry with #chambers " << chamberSet.size());
179 std::vector<TrkDriftCircleMath::MdtChamberGeometry> geos{};
182 geos.reserve(chamberSet.size());
188 multiGeo = std::make_unique<TrkDriftCircleMath::MdtMultiChamberGeometry>(geos);
194 if (sinAngleCut > 0)
angle = sinAngleCut;
201 std::stringstream sstr{};
202 unsigned int seg_n{0};
205 sstr<<
"Segment number "<<seg_n<<
" is at ("<<seg.line().x0()<<
","<<seg.line().y0()<<
") pointing to "<<seg.line().phi()*toDeg<<
" chi2: "<<
206 (seg.chi2()/seg.ndof())<<
"("<<seg.ndof()<<
")"<<std::endl;
207 sstr<<
"Mdt measurements: "<<seg.dcs().size()<<std::endl;
209 sstr<<
" **** "<<
m_printer->print(*mdt_meas.rot());
210 sstr<<
" ("<<mdt_meas.state()<<
")"<<std::endl;
212 sstr<<
"Cluster measurements "<<seg.clusters().size()<<std::endl;
214 sstr<<
" ---- "<<
m_printer->print(*clus.rot())<<std::endl;
219 ATH_MSG_VERBOSE(
"Found " << segs.size() <<
" segments "<<std::endl<<sstr.str());
223 if (segs.empty()) {
return; }
226 segmentCreationInfo sInfo(spVecs, multiGeo.get(), gToStation, amdbToGlobal, phimin, phimax);
228 std::unique_ptr<MuonSegment>
segment =
createSegment(ctx, seg, chid, roadpos, roaddir2, mdts, hasPhiMeasurements, sInfo);
◆ find() [2/5]
find segments starting from:
Implementation of IMuonSegmentMaker interface routine
Will call:
std::vector<const MuonSegment*>* find( const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements, double momentum );
Implements Muon::IMuonSegmentMaker.
Definition at line 615 of file DCMathSegmentMaker.cxx.
617 if (mdts.empty())
return;
619 const MdtDriftCircleOnTrack* mdt = mdts.front();
622 bool hasPhiMeasurements =
false;
625 find(gpos, gdir, mdts,
clusters, hasPhiMeasurements, segColl);
◆ find() [3/5]
find segments starting from a list of RIO_OnTrack objects, implementation of IMuonSegmentMaker interface routine.
Will call:
std::vector<const MuonSegment*>* find( const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements);
Implements Muon::IMuonSegmentMaker.
Definition at line 596 of file DCMathSegmentMaker.cxx.
597 std::vector<const MdtDriftCircleOnTrack*> mdts;
598 std::vector<const MuonClusterOnTrack*>
clusters;
603 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(
it);
604 if (!mdt) {
ATH_MSG_WARNING(
"failed dynamic_cast, not a MDT but hit has MDT id!!!"); }
607 const MuonClusterOnTrack* clus =
dynamic_cast<const MuonClusterOnTrack*
>(
it);
608 if (!clus) {
ATH_MSG_WARNING(
"failed dynamic_cast, not a cluster but hit has RPC/TGC id!!!"); }
◆ find() [4/5]
find segments starting from a list of RIO_OnTrack objects in multiple chambers, implementation of IMuonSegmentMaker interface routine Will call:
std::vector<const MuonSegment*>* find( const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements);
Implements Muon::IMuonSegmentMaker.
Definition at line 628 of file DCMathSegmentMaker.cxx.
630 std::vector<const Trk::RIO_OnTrack*> rios = rios1;
631 rios.insert(rios.end(), rios2.begin(), rios2.end());
◆ find() [5/5]
find segments starting from:
Implementation of IMuonSegmentMaker interface routine
Will call:
std::vector<const MuonSegment*>* find( const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements, double momentum );
Implements Muon::IMuonSegmentMaker.
Definition at line 635 of file DCMathSegmentMaker.cxx.
639 std::vector<const MdtDriftCircleOnTrack*> all_mdts;
640 for (
const std::vector<const MdtDriftCircleOnTrack*>& circle_vec : mdts) {
std::copy(circle_vec.begin(), circle_vec.end(), std::back_inserter(all_mdts)); }
643 std::vector<const MuonClusterOnTrack*> all_clus;
644 for (
const std::vector<const MuonClusterOnTrack*>& clus_vec :
clusters) {
std::copy(clus_vec.begin(), clus_vec.end(), std::back_inserter(all_clus)); }
◆ findFirstRotInChamberWithMostHits()
Definition at line 1800 of file DCMathSegmentMaker.cxx.
1802 int hitsInChamberWithMostHits = 0;
1803 std::map<Identifier, int> hitsPerChamber;
1804 int currentSector = -1;
1805 const MdtDriftCircleOnTrack* rotInChamberWithMostHits =
nullptr;
1808 for (
const MdtDriftCircleOnTrack* rot : mdts) {
1815 if (currentSector == -1) {
1816 currentSector = sector;
1817 }
else if (sector != currentSector) {
1820 int& hitsInCh = hitsPerChamber[chId];
1822 if (hitsInCh > hitsInChamberWithMostHits) {
1823 hitsInChamberWithMostHits = hitsInCh;
1824 rotInChamberWithMostHits = rot;
1827 return rotInChamberWithMostHits;
◆ findMdt()
Definition at line 1781 of file DCMathSegmentMaker.cxx.
1788 if (!MdtCont.isValid()) {
1793 if (!collptr)
return nullptr;
1794 for (
const MdtPrepData* prd : *collptr) {
1795 if (prd->identify() ==
id)
return prd;
◆ initialize()
StatusCode Muon::DCMathSegmentMaker::initialize |
( |
| ) |
|
|
virtual |
◆ 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.
◆ interfaceID()
const InterfaceID & Muon::IMuonSegmentMaker::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
access to tool interface
Definition at line 133 of file IMuonSegmentMaker.h.
133 {
return IID_IMuonSegmentMaker; }
◆ localTubeEnds()
calculate positions of tube ends
Definition at line 2054 of file DCMathSegmentMaker.cxx.
2058 Amg::Vector3D lpos = gToSegment * mdt.prepRawData()->globalPosition();
2061 Amg::Vector3D lropos = gToSegment * mdt.prepRawData()->detectorElement()->ROPos(
id);
2065 double tubeLen = (lropos - lhvpos).
mag();
2066 double activeTubeLen =
2067 mdt.detectorElement()->getActiveTubeLength(
m_idHelperSvc->mdtIdHelper().tubeLayer(
id),
m_idHelperSvc->mdtIdHelper().tube(
id));
2068 double scaleFactor = activeTubeLen / tubeLen;
2069 lropos[0] = scaleFactor * lropos.x();
2070 lhvpos[0] = scaleFactor * lhvpos.x();
2072 tubeEnds.lxmin =
std::min(lropos.x(), lhvpos.x());
2073 tubeEnds.lxmax =
std::max(lropos.x(), lhvpos.x());
2077 const double phiRO = ropos.phi();
2078 const double phiHV = hvpos.phi();
2079 tubeEnds.phimin =
std::min(phiRO, phiHV);
2080 tubeEnds.phimax =
std::max(phiRO, phiHV);
◆ 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.
◆ renounce()
◆ renounceArray()
◆ residualAndPullWithSegment()
Definition at line 1675 of file DCMathSegmentMaker.cxx.
1679 double cos_sinLine = cot(
line.phi());
1686 double delta_y = lpos.y() -
line.position().y();
1692 double residual = lpos.x() - lineSurfaceIntersect.x();
◆ 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.
◆ updateDirection()
update the global direction, keeping the phi of the input road direction but using the local angle YZ
Definition at line 2132 of file DCMathSegmentMaker.cxx.
2147 double dz =
std::cos(gdirs.theta());
2153 double dzo =
std::cos(gdiro.theta());
2163 if (b0 < 1e-8 && b0 > 0) b0 = 1
e-8;
2164 if (b0 > -1
e-8 && b0 < 0) b0 = -1
e-8;
2165 double dxn =
dx -
a0 * dxo / b0;
2166 double dyn =
dy -
a0 * dyo / b0;
2167 double dzn = dz -
a0 * dzo / b0;
2168 double norm = std::sqrt(dxn * dxn + dyn * dyn + dzn * dzn);
2172 if (dxn * roaddir.x() + dyn * roaddir.y() + dzn * roaddir.z() < 0.) {
norm = -
norm; }
2174 if (dxn * roaddir.x() + dyn * roaddir.y() < 0.) {
norm = -
norm; }
2177 if (isCurvedSegment)
norm =
norm / 2.;
◆ updatePhiRanges()
void Muon::DCMathSegmentMaker::updatePhiRanges |
( |
double |
phiminNew, |
|
|
double |
phimaxNew, |
|
|
double & |
phiminRef, |
|
|
double & |
phimaxRef |
|
) |
| |
|
staticprivate |
update phi ranges
Definition at line 2084 of file DCMathSegmentMaker.cxx.
2086 if (phiminRef * phimaxRef < 0.) {
2087 if (phiminRef < -1.1) {
2088 if (phiminRef > phiminNew) phiminRef = phiminNew;
2089 if (phimaxRef < phimaxNew) phimaxRef = phimaxNew;
2091 if (phiminRef < phiminNew) phiminRef = phiminNew;
2092 if (phimaxRef > phimaxNew) phimaxRef = phimaxNew;
2096 if (phiminRef < 0.) {
2097 if (phiminRef < phiminNew) phiminRef = phiminNew;
2098 if (phimaxRef > phimaxNew) phimaxRef = phimaxNew;
2100 if (phiminRef > phiminNew) phiminRef = phiminNew;
2101 if (phimaxRef < phimaxNew) phimaxRef = phimaxNew;
◆ updateSegmentPhi()
Definition at line 1854 of file DCMathSegmentMaker.cxx.
1858 bool hasUpdated =
false;
1865 if (ldir.z() < 0.0001)
return false;
1867 double dXdZ = ldir.x() / ldir.z();
1869 double xline = lsegPos.x();
1870 double zline = lsegPos.z();
1871 ATH_MSG_VERBOSE(
" Associated hits " << rots.size() <<
" angleXZ " << 90. * segLocDir.
angleXZ() / (M_PI_2) <<
" dXdZ " << dXdZ
1872 <<
" seg Pos (" << xline <<
" " << zline <<
") " << segLocPos);
1874 std::vector<HitInXZ>
hits;
1875 hits.reserve(rots.size());
1877 unsigned int nphiHits(0);
1878 const HitInXZ* firstPhiHit{
nullptr}, *lastPhiHit{
nullptr};
1882 if (!
id.is_valid())
continue;
1884 double lxmin{0}, lxmax{0}, phimin{0}, phimax{0};
1889 const MdtDriftCircleOnTrack* mdt =
static_cast<const MdtDriftCircleOnTrack*
>(meas);
1890 TubeEnds tubeEnds =
localTubeEnds(*mdt, gToSegment, segmentToGlobal);
1892 lxmin = tubeEnds.lxmin;
1893 lxmax = tubeEnds.lxmax;
1894 phimin = tubeEnds.phimin;
1895 phimax = tubeEnds.phimax;
1897 lpos = gToSegment * meas->globalPosition();
1901 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(meas);
1909 lxmin = lpos.x() - 0.5 * stripLength;
1910 lxmax = lpos.x() + 0.5 * stripLength;
1914 locPosition[0] = lxmin;
1916 double phi1 = globalPos.phi();
1918 locPosition[0] = lxmax;
1919 globalPos = segmentToGlobal * locPosition;
1920 double phi2 = globalPos.phi();
1934 ATH_MSG_WARNING(
"dynamic cast failed for CompetingMuonClustersOnTrack");
1937 auto detEl =
dynamic_cast<const MuonGM::TgcReadoutElement*
>(crot->containedROTs().front()->prepRawData()->detectorElement());
1940 const Amg::Vector3D segFrame_StripDir = gToSegment.linear()* detEl->stripDir(
gasGap, stripNo);
1941 const Amg::Vector3D segFrame_stripPos = gToSegment * detEl->channelPos(
id);
1943 lpos = segFrame_stripPos +
1944 Amg::intersect<3>(lsegPos, ldir, segFrame_stripPos, segFrame_StripDir).value_or(0) * segFrame_StripDir;
1951 phimin = globalPos.phi();
1957 ATH_MSG_DEBUG(
" Inconsistent phi " << phimin <<
" range " << seg_phimin <<
" " << seg_phimax);
1962 hits.emplace_back(
id, isMdt, measuresPhi, lpos.x(), lpos.z(), lxmin, lxmax, phimin, phimax);
1966 firstPhiHit = &
hits.back();
1968 double distPhiHits = std::abs(firstPhiHit->z -
hits.back().z);
1969 if (distPhiHits > 500.) {
1970 lastPhiHit = &
hits.back();
1979 double locExX = xline + dXdZ * (lpos.z() - zline);
1981 << std::setw(6) << (
int)lpos.z() <<
") ex pos " << std::setw(6) << (
int)locExX <<
" min "
1982 << std::setw(6) << (
int)lxmin <<
" max " << std::setw(6) << (
int)lxmax <<
" phimin " << std::setw(6)
1983 << phimin <<
" phimax " << std::setw(6) << phimax);
1984 if (lpos.x() < lxmin || lpos.x() > lxmax)
ATH_MSG_VERBOSE(
" outBounds");
1988 if (nphiHits == 1) {
1990 ATH_MSG_WARNING(
" Pointer to first phi hit not set, this should not happen! ");
1992 if (xline != firstPhiHit->x) {
1996 xline = firstPhiHit->x;
1997 zline = firstPhiHit->z;
2003 double dz = ipLocPos.z() - zline;
2004 if (std::abs(dz) > 0.001) {
2005 ATH_MSG_VERBOSE(
" hit (" << xline <<
"," << zline <<
") IP (" << ipLocPos.x() <<
"," << ipLocPos.z()
2006 <<
") dXdZ " << (ipLocPos.x() - xline) / dz <<
" old " << dXdZ);
2007 dXdZ = (ipLocPos.x() - xline) / dz;
2012 }
else if (nphiHits == 2) {
2013 if (!firstPhiHit || !lastPhiHit) {
2014 ATH_MSG_WARNING(
" Pointer to one of the two phi hit not set, this should not happen! ");
2016 double dz = lastPhiHit->z - firstPhiHit->z;
2018 xline = firstPhiHit->x;
2019 zline = firstPhiHit->z;
2020 if (std::abs(dz) > 300.) {
2021 double dx = lastPhiHit->x - firstPhiHit->x;
2034 double segX = xline - dXdZ * zline;
2040 ATH_MSG_DEBUG(
"still several out of bounds hits after rotation: posx(" << segX <<
") dXdZ " << dXdZ
2041 <<
" keeping old result ");
2045 double alphaYZ = segLocDir.
angleYZ();
2046 double alphaXZ = std::atan2(1, dXdZ);
◆ updateVHKA()
◆ m_addUnassociatedPhiHits
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_addUnassociatedPhiHits {this, "AddUnassociatedPhiHits", false} |
|
private |
◆ m_allMdtHoles
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_allMdtHoles {this, "AllMdtHoles", false} |
|
private |
◆ m_assumePointingPhi
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_assumePointingPhi {this, "AssumePointingPhi", false } |
|
private |
◆ m_chamberGeoKey
◆ m_clusterCreator
Initial value:{
this,
"MuonClusterCreator",
"Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
}
Definition at line 373 of file DCMathSegmentMaker.h.
◆ m_compClusterCreator
Initial value:{
this,
"MuonCompetingClustersCreator",
"Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator",
}
Definition at line 378 of file DCMathSegmentMaker.h.
◆ m_createCompetingROTsEta
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_createCompetingROTsEta {this, "CreateCompetingROTsEta", true} |
|
private |
◆ m_createCompetingROTsPhi
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_createCompetingROTsPhi {this, "CreateCompetingROTsPhi", true} |
|
private |
◆ m_curvedErrorScaling
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_curvedErrorScaling {this, "CurvedErrorScaling", true} |
|
private |
◆ m_dcslFitProvider
◆ m_DetectorManagerKey
Initial value:{
this,
"DetectorManagerKey",
"MuonDetectorManager",
"Key of input MuonDetectorManager condition data",
}
pointers to IdHelpers
Definition at line 344 of file DCMathSegmentMaker.h.
◆ m_detStore
◆ m_doGeometry
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_doGeometry {this, "DoGeometry", true} |
|
private |
◆ m_doSpacePoints
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_doSpacePoints {this, "UseTriggerSpacePoints", true} |
|
private |
◆ m_doTimeOutChecks
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_doTimeOutChecks {this, "UseTimeOutGard", false} |
|
private |
◆ m_edmHelperSvc
Initial value:{
this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface",
}
Definition at line 356 of file DCMathSegmentMaker.h.
◆ m_evtStore
◆ m_idHelperSvc
Initial value:{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}
Definition at line 351 of file DCMathSegmentMaker.h.
◆ m_maxAssociateClusterDistance
Gaudi::Property<double> Muon::DCMathSegmentMaker::m_maxAssociateClusterDistance {this, "MaxAssociateClusterDistance", 3000.} |
|
private |
◆ m_mdtCreator
Initial value:{
this,
"MdtCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
}
Definition at line 363 of file DCMathSegmentMaker.h.
◆ m_mdtCreatorT0
Initial value:{
this,
"MdtCreatorT0",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
}
Definition at line 368 of file DCMathSegmentMaker.h.
◆ m_mdtKey
◆ m_outputFittedT0
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_outputFittedT0 {this, "OutputFittedT0", false} |
|
private |
◆ m_preciseErrorScale
Gaudi::Property<double> Muon::DCMathSegmentMaker::m_preciseErrorScale {this, "PreciseErrorScale", 2.} |
|
private |
◆ m_printer
Initial value:{
this,
"EDMPrinter",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}
Definition at line 383 of file DCMathSegmentMaker.h.
◆ m_recoverBadRpcCabling
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_recoverBadRpcCabling {this, "RecoverBadRpcCabling", false} |
|
private |
◆ m_redo2DFit
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_redo2DFit {this, "Redo2DFit", true} |
|
private |
◆ m_refitParameters
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_refitParameters {this, "RefitSegment", false} |
|
private |
◆ m_reject1DTgcSpacePoints
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_reject1DTgcSpacePoints {this,"Reject1DTgcSpacePoints", true } |
|
private |
◆ m_removeDeltas
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_removeDeltas {this, "RemoveDeltasFromSegmentQuality", true} |
|
private |
◆ m_rpcKey
◆ m_segmentFinder
Initial value:{
this,
"MdtSegmentFinder",
"Muon::MdtMathSegmentFinder/MdtMathSegmentFinder",
}
Definition at line 388 of file DCMathSegmentMaker.h.
◆ m_segmentFitter
Initial value:{
this,
"SegmentFitter",
"Muon::MuonSegmentFittingTool/MuonSegmentFittingTool",
}
Definition at line 393 of file DCMathSegmentMaker.h.
◆ m_segmentSelectionTool
Initial value:{
this,
"SegmentSelector",
"Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool",
}
Definition at line 398 of file DCMathSegmentMaker.h.
◆ m_sinAngleCut
Gaudi::Property<double> Muon::DCMathSegmentMaker::m_sinAngleCut {this, "SinAngleCut", 0.2} |
|
private |
◆ m_strictRoadDirectionConsistencyCheck
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_strictRoadDirectionConsistencyCheck {this, "StrictRoadDirectionConsistencyCheck", true} |
|
private |
◆ m_tgcKey
◆ m_updatePhiUsingPhiHits
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_updatePhiUsingPhiHits {this, "UpdatePhiUsingPhiHits", false} |
|
private |
◆ m_usePreciseError
Gaudi::Property<bool> Muon::DCMathSegmentMaker::m_usePreciseError {this, "UsePreciseError", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_reject1DTgcSpacePoints
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
void localToGlobalDirection(const Trk::LocalDirection &locdir, Amg::Vector3D &globdir) const
This method transforms a local direction wrt the plane to a global direction.
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
int getNLayers() const
Returns the number of tube layers inside the multilayer.
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
std::pair< ClusterVec, ClusterVec > ClusterVecPair
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
std::vector< DCOnTrack > DCOnTrackVec
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
Scalar phi() const
phi method
std::string find(const std::string &s)
return a remapped string
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
ToolHandle< IMuonSegmentSelectionTool > m_segmentSelectionTool
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Scalar perp() const
perp method - perpenticular length
ClusterVecPair create1DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed=-99999.) const
Scalar eta() const
pseudorapidity method
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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...
std::vector< Cluster > CLVec
Gaudi::Property< bool > m_removeDeltas
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
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
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
ToolHandle< IMdtSegmentFinder > m_segmentFinder
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::map< Identifier, IdHitMap > ChIdHitMap
bool msgLvl(const MSG::Level lvl) const
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
@ loc2
generic first and second local coordinate
double x() const
Returns the x coordinate of the vector.
@ OutOfTime
delta electron
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
This class represents a drift time measurement.
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & center() const
Returns the center position of the Surface.
static void updatePhiRanges(double phiminNew, double phimaxNew, double &phiminRef, double &phimaxRef)
update phi ranges
PhiIndex
enum to classify the different phi layers in the muon spectrometer
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
Implementation of 2 dimensional vector class.
std::vector< DriftCircle > DCVec
Gaudi::Property< bool > m_curvedErrorScaling
virtual void setOwner(IDataHandleHolder *o)=0
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
double angleYZ() const
access method for angle of local YZ projection
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for StraightLineSurface: GlobalToLocal method without dynamic memory allocation This method...
TrkDriftCircleMath::Road - encodes the road given to the segment finder in station coordinates.
const Amg::Vector3D & globalDirection() const
Get the global direction of the road.
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)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
TrkDriftCircleMath::CLVec createClusterVec(const Identifier &chid, ClusterVec &spVec, const Amg::Transform3D &gToStation) const
Gaudi::Property< bool > m_usePreciseError
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
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
@ OWN_ELEMENTS
this data object owns its elements
bool errorScalingRegion(const Identifier &id) const
apply error scaling for low mometum tracks
const Amg::Vector3D & globalPosition() const
Get the global position of the road.
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
virtual unsigned int nlay() const =0
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Eigen::Affine3d Transform3D
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_rpcKey
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
double y() const
Returns the y coordinate of the vector.
Cluster2D createSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
Amg::Vector3D localSpacePoint(const Identifier &stripId, const Amg::Vector3D &etaHitPos, const Amg::Vector3D &phiHitPos) const
unsigned int nMDTinStation() const
How many MDT chambers are in the station.
Gaudi::Property< bool > m_refitParameters
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
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
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Gaudi::Property< bool > m_createCompetingROTsPhi
Gaudi::Property< bool > m_recoverBadRpcCabling
static Timeout & instance()
Get reference to Timeout singleton.
represents the three-dimensional global direction with respect to a planar surface frame.
def dot(G, fn, nodesToHighlight=[])
@ DCMathSegmentMakerCurved
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
TubeEnds localTubeEnds(const MdtDriftCircleOnTrack &mdt, const Amg::Transform3D &gToSegment, const Amg::Transform3D &segmentToG) const
calculate positions of tube ends
represents the track state (measurement, material, fit parameters and quality) at a surface.
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
class representing a cluster meaurement
ClusterVecPair create2DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
double charge(const T &p)
const MdtDriftCircleOnTrack * findFirstRotInChamberWithMostHits(const std::vector< const MdtDriftCircleOnTrack * > &mdts) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
class to calculate residual of a hit with a segment and calculate the local track errors
Eigen::Matrix< double, 3, 1 > Vector3D
virtual LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const =0
ToolHandle< IDCSLFitProvider > m_dcslFitProvider
Gaudi::Property< bool > m_doSpacePoints
DriftCircleSide
Enumerates the 'side' of the wire on which the tracks passed (i.e.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Cluster2D createTgcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
const Amg::Vector3D & momentum() const
Access method for the momentum.
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
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
const HitSelection selectHitsOnTrack(const DCOnTrackVec &dcs) const
const MdtPrepData * findMdt(const EventContext &ctx, const Identifier &id) const
Gaudi::Property< bool > m_assumePointingPhi
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Gaudi::Property< bool > m_updatePhiUsingPhiHits
class representing a drift circle meaurement on segment
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< Segment > SegVec
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
ChIndex
enum to classify the different chamber layers in the muon spectrometer
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
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
Gaudi::Property< bool > m_outputFittedT0
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcKey
double angleXZ() const
access method for angle of local XZ projection
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreatorT0
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
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>
Scalar mag() const
mag method
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)
@ InTime
drift time too small to be compatible with drift spectrum
double deltaEta() const
Get the width of the road in the eta direction.
This class offers no functionality, but to define a standard device for the maker to transfer to the ...