|
ATLAS Offline Software
|
Implementation of an IMuonHoleRecoveryTool.
More...
#include <MuonSegmentRegionRecoveryTool.h>
|
| MuonSegmentRegionRecoveryTool (const std::string &, const std::string &, const IInterface *) |
| constructor More...
|
|
virtual | ~MuonSegmentRegionRecoveryTool ()=default |
| destructor More...
|
|
virtual StatusCode | initialize () override |
| AlgTool initialize. More...
|
|
virtual std::unique_ptr< Trk::Track > | recover (const Trk::Track &track, const EventContext &ctx) const override |
| returns a new track with segments recovered using RegionSelector More...
|
|
void | createHoleTSOSsForClusterChamber (const Identifier &detElId, const EventContext &ctx, const Trk::TrackParameters &pars, std::set< Identifier > &layIds, std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > &states) const override |
|
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 |
|
|
std::unique_ptr< const Trk::TrackParameters > | reachableDetEl (const EventContext &ctx, const Trk::Track &track, const Trk::TrkDetElementBase &detEl, bool smallerBounds=false) const |
|
void | collectCrossedChambers (const EventContext &ctx, const Trk::Track &track, MuonData &data) const |
| methods used by recover More...
|
|
void | fillOnTrackChambers (const Trk::Track &theTrack, MuonData &data) const |
|
std::unique_ptr< Trk::Track > | addMissingChambers (const EventContext &ctx, const Trk::Track &track, MuonData &data, bool addMdt) const |
|
void | addHashes (const EventContext &ctx, DETID type, const IRoiDescriptor &roi, std::set< IdentifierHash > &hashes, const std::set< IdentifierHash > &exclusion) const |
|
std::unique_ptr< Trk::Track > | findHoles (const EventContext &ctx, const Trk::Track &track, MuonData &data) 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...
|
|
|
ServiceHandle< IMuonEDMHelperSvc > | m_edmHelperSvc |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ToolHandle< IMuonSeededSegmentFinder > | m_seededSegmentFinder |
|
ToolHandle< IMuonTrackSegmentMatchingTool > | m_trackSegmentMatchingTool |
|
ToolHandle< MuonChamberHoleRecoveryTool > | m_chamberHoleRecoveryTool {this, "ChamberHoleRecoveryTool", "", "hit-based hole search"} |
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/MuonExtrapolator"} |
|
ToolHandle< Rec::ICombinedMuonTrackFitter > | m_builder {this, "Builder", ""} |
|
ToolHandle< Trk::ITrackFitter > | m_fitter {this, "Fitter", "Trk::GlobalChi2Fitter/MCTBSLFitter"} |
|
ToolHandle< IMuonHitSummaryTool > | m_hitSummaryTool {this, "HitSummaryTool", "Muon::MuonHitSummaryTool/MuonHitSummaryTool"} |
|
ToolHandle< IRegSelTool > | m_regsel_mdt {this, "MDTRegionSelector", "RegSelTool/RegSelTool_MDT"} |
|
ToolHandle< IRegSelTool > | m_regsel_csc {this, "CSCRegionSelector", "RegSelTool/RegSelTool_CSC"} |
|
ToolHandle< IRegSelTool > | m_regsel_rpc {this, "RPCRegionSelector", "RegSelTool/RegSelTool_RPC"} |
|
ToolHandle< IRegSelTool > | m_regsel_tgc {this, "TGCRegionSelector", "RegSelTool/RegSelTool_TGC"} |
|
ToolHandle< IRegSelTool > | m_regsel_stgc {this, "STGCRegionSelector", "RegSelTool/RegSelTool_STGC"} |
|
ToolHandle< IRegSelTool > | m_regsel_mm {this, "MMRegionSelector", "RegSelTool/RegSelTool_MM"} |
|
PublicToolHandle< MuonEDMPrinterTool > | m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
ToolHandle< Trk::IExtendedTrackSummaryTool > | m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"} |
|
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > | m_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"} |
|
Gaudi::Property< double > | m_deta {this, "DeltaEtaRegion", 0.05} |
|
Gaudi::Property< double > | m_dphi {this, "DeltaPhiRegion", 0.1} |
|
Gaudi::Property< bool > | m_excludeEES {this, "ExcludeEES", true} |
|
Gaudi::Property< bool > | m_onlyEO {this, "OnlyEO", false} |
|
Gaudi::Property< bool > | m_useFitterOutlierLogic {this, "UseFitterOutlierLogic", true} |
|
Gaudi::Property< bool > | m_recoverMM {this, "RecoverMM", true, "Pick up dropped micromega chambers"} |
|
Gaudi::Property< bool > | m_recoverSTGC {this, "RecoverSTGC", true, "Pick up dropped sTGC chambers"} |
|
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 an IMuonHoleRecoveryTool.
It propagates the track to a chamber where no segments where found and runs the SeededSegmentFinder in a region selected by the region selector
Definition at line 67 of file MuonSegmentRegionRecoveryTool.h.
◆ StoreGateSvc_t
◆ MuonSegmentRegionRecoveryTool()
MuonSegmentRegionRecoveryTool::MuonSegmentRegionRecoveryTool |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
◆ ~MuonSegmentRegionRecoveryTool()
virtual Muon::MuonSegmentRegionRecoveryTool::~MuonSegmentRegionRecoveryTool |
( |
| ) |
|
|
virtualdefault |
◆ addHashes()
◆ addMissingChambers()
Definition at line 694 of file MuonSegmentRegionRecoveryTool.cxx.
697 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>>
states;
698 std::set<IdentifierHash> newMdtHashes;
699 std::set<IdentifierHash> newRpcHashes;
700 std::set<IdentifierHash> newTgcHashes;
701 std::set<IdentifierHash> newCscHashes;
703 std::set<IdentifierHash> newMMHashes;
704 std::set<IdentifierHash> newsTgcHashes;
706 ATH_MSG_DEBUG(
"Adding Missing MDT chambers: regions " <<
data.mdtPerStation.size());
707 std::vector<const MdtPrepDataCollection*> newmcols;
708 for (
const auto& chit :
data.mdtPerStation) {
710 std::vector<const MdtPrepDataCollection*>
cols;
712 std::map<int, std::vector<const MdtPrepData*>> mdtPrds;
713 std::unique_ptr<const Trk::TrackParameters> exParsFirst;
715 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *mit->front()->detectorElement())};
719 <<
" sector " << sector);
720 newmcols.emplace_back(mit);
721 std::vector<const MdtPrepData*>&
col = mdtPrds[sector];
722 col.insert(
col.end(), mit->begin(), mit->end());
723 if (!exParsFirst) exParsFirst.swap(exPars);
727 << mit->identifyHash());
730 std::vector<const MdtPrepData*>* prds =
nullptr;
731 std::map<int, std::vector<const MdtPrepData*>>
::iterator sectorIt = mdtPrds.begin();
732 if (mdtPrds.empty()) {
734 }
else if (mdtPrds.size() == 1) {
735 prds = §orIt->second;
738 ATH_MSG_VERBOSE(
"Multiple sectors selected, using main sector: " << hitSummary.mainSector);
739 std::map<int, std::vector<const MdtPrepData*>>
::iterator pos = mdtPrds.find(hitSummary.mainSector);
740 if (
pos != mdtPrds.end())
743 ATH_MSG_DEBUG(
"Failed to find prds in main sector: " << hitSummary.mainSector);
746 if (prds && exParsFirst) {
747 std::unique_ptr<Trk::SegmentCollection> segments =
m_seededSegmentFinder->find(ctx, *exParsFirst, *prds);
752 std::unique_ptr<const Trk::TrackParameters> bestSegmentPars;
764 std::unique_ptr<const Trk::TrackParameters> segPars{
m_extrapolator->extrapolateDirectly(
769 mseg->associatedSurface().globalToLocalDirection(segPars->momentum(),
locDir);
770 double dangleYZ = mseg->localDirection().angleYZ() -
locDir.angleYZ();
772 if (std::abs(dangleYZ) < 0.05) {
774 bestSegmentPars.swap(segPars);
782 std::unique_ptr<Trk::TrackParameters> hitPars{
m_extrapolator->extrapolateDirectly(
785 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
789 states.emplace_back(tsos);
790 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(hit);
791 if (mdt) newMdtHashes.insert(mdt->collectionHash());
800 data.mdtCols = std::move(newmcols);
802 unsigned int nstates =
states.size();
805 std::vector<const RpcPrepDataCollection*> newtcols;
807 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *(rit)->front()->detectorElement())};
809 newtcols.emplace_back(rit);
811 std::set<Identifier> layIds;
813 if (
states.size() != nstates) {
815 newRpcHashes.insert(rit->identifyHash());
819 data.rpcCols = std::move(newtcols);
823 std::vector<const TgcPrepDataCollection*> newtcols;
825 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *(tgcit)->front()->detectorElement())};
827 newtcols.emplace_back(tgcit);
829 std::set<Identifier> layIds;
831 if (
states.size() != nstates) {
833 newTgcHashes.insert(tgcit->identifyHash());
837 data.tgcCols = std::move(newtcols);
841 std::vector<const CscPrepDataCollection*> newccols;
843 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *(cit)->front()->detectorElement())};
845 newccols.push_back(cit);
847 std::set<Identifier> layIds;
849 if (
states.size() != nstates) {
851 newCscHashes.insert(cit->identifyHash());
855 data.cscCols = std::move(newccols);
860 std::vector<const sTgcPrepDataCollection*> newstcols;
861 ATH_MSG_DEBUG(
" extractsTgcPrdCols data.stgcCols.size() " <<
data.stgcCols.size());
863 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *(stgcit)->front()->detectorElement())};
865 newstcols.push_back(stgcit);
867 std::set<Identifier> layIds;
870 if (
states.size() != nstates) {
872 newsTgcHashes.insert(stgcit->identifyHash());
876 data.stgcCols = std::move(newstcols);
882 std::vector<const MMPrepDataCollection*> newmcols;
884 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *mit->front()->detectorElement())};
886 newmcols.push_back(mit);
888 std::set<Identifier> layIds;
891 if (
states.size() != nstates) {
893 newMMHashes.insert(mit->identifyHash());
897 data.mmCols = std::move(newmcols);
914 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
915 trackStateOnSurfaces->reserve(
states.size());
916 for (std::unique_ptr<const Trk::TrackStateOnSurface>&
sorted :
states) { trackStateOnSurfaces->push_back(
sorted.release()); }
918 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(
track.info(), std::move(trackStateOnSurfaces),
919 track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
920 std::unique_ptr<Trk::Track> refittedTrack;
929 data.mdtTrack.insert(newMdtHashes.begin(), newMdtHashes.end());
930 data.rpcTrack.insert(newRpcHashes.begin(), newRpcHashes.end());
931 data.tgcTrack.insert(newTgcHashes.begin(), newTgcHashes.end());
932 data.cscTrack.insert(newCscHashes.begin(), newCscHashes.end());
934 data.stgcTrack.insert(newsTgcHashes.begin(), newsTgcHashes.end());
935 data.mmTrack.insert(newMMHashes.begin(), newMMHashes.end());
937 return refittedTrack;
◆ collectCrossedChambers()
methods used by recover
Definition at line 219 of file MuonSegmentRegionRecoveryTool.cxx.
229 std::set<MuonStationIndex::StIndex> stations;
230 double etamin{1e9}, etamax{-1e9}, phimin{1e9}, phimax{-1e9};
235 for (; tsit != tsit_end; ++tsit) {
239 double rpos =
pars->position().perp();
240 double zpos = std::abs(
pars->position().z());
241 if (rpos < 2500 && zpos < 4000)
continue;
242 double eta =
pars->position().eta();
243 double phi =
pars->position().phi();
245 msg() <<
"All State parameters: eta: " <<
eta <<
" ,phi: " <<
phi <<
" pos r " << rpos <<
" z " << zpos;
255 bool pseudo = !
id.is_valid();
257 if (pseudo || !
m_idHelperSvc->mdtIdHelper().is_muon(
id))
continue;
259 if (eta > etamax) etamax =
eta;
261 if (phi > phimax) phimax =
phi;
262 if (phi < phimin) phimin =
phi;
264 msg() <<
"Selected State parameters: eta: " <<
eta <<
" ,phi: " <<
phi <<
" pos r " << rpos <<
" z " << zpos;
270 if (stations.count(stIndex))
continue;
271 stations.insert(stIndex);
280 ATH_MSG_DEBUG(
"Eta range: " <<
etamin <<
" " << etamax <<
" Phi range " << phimin <<
" " << phimax);
282 ATH_MSG_DEBUG(
"no hits selected, nothing further will be done");
297 for (; hsit != hsit_end; ++hsit) {
302 data.mdtPerStation[chIndex].insert(*hsit);
305 hsit =
data.csc.begin();
306 hsit_end =
data.csc.end();
307 for (; hsit != hsit_end; ++hsit) {
◆ createHoleTSOSsForClusterChamber()
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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()
◆ 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
◆ fillOnTrackChambers()
Definition at line 317 of file MuonSegmentRegionRecoveryTool.cxx.
327 std::set<MuonStationIndex::StIndex> stations;
332 for (; tsit != tsit_end; ++tsit) {
347 const MuonClusterOnTrack* clus =
nullptr;
348 const CompetingMuonClustersOnTrack* compRot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(meas);
350 clus = &compRot->rioOnTrack(0);
352 clus =
dynamic_cast<const MuonClusterOnTrack*
>(meas);
356 const RpcClusterOnTrack* rpc =
dynamic_cast<const RpcClusterOnTrack*
>(clus);
357 if (rpc && !
data.rpcTrack.count(rpc->collectionHash())) {
358 data.rpcTrack.insert(rpc->collectionHash());
362 const TgcClusterOnTrack* tgc =
dynamic_cast<const TgcClusterOnTrack*
>(clus);
363 if (tgc && !
data.tgcTrack.count(tgc->collectionHash())) {
364 data.tgcTrack.insert(tgc->collectionHash());
368 const CscClusterOnTrack* csc =
dynamic_cast<const CscClusterOnTrack*
>(clus);
369 if (csc && !
data.cscTrack.count(csc->collectionHash())) {
370 data.cscTrack.insert(csc->collectionHash());
375 const sTgcClusterOnTrack* stgc =
dynamic_cast<const sTgcClusterOnTrack*
>(clus);
376 if (stgc && !
data.stgcTrack.count(stgc->collectionHash())) {
377 data.stgcTrack.insert(stgc->collectionHash());
381 const MMClusterOnTrack*
mm =
dynamic_cast<const MMClusterOnTrack*
>(clus);
382 if (
mm && !
data.mmTrack.count(
mm->collectionHash())) {
383 data.mmTrack.insert(
mm->collectionHash());
◆ findHoles()
Definition at line 390 of file MuonSegmentRegionRecoveryTool.cxx.
394 ATH_MSG_WARNING(
" track without states, cannot perform mdt hole search ");
399 if (!InterSectSvc.isValid()) {
400 ATH_MSG_ERROR(
"Failed to retrieve chamber intersection service");
405 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>>
states;
406 unsigned int nholes = 0;
407 std::set<Identifier> chambersInSearch;
410 if (
data.mdtTrack.count(ith)) {
419 if (chambersInSearch.count(chId)) {
428 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
436 const MuonStationIntersect
intersect = InterSectSvc->tubesCrossedByTrack(chId, exPars->position(), exPars->momentum().unit());
439 for (
unsigned int ii = 0; ii <
intersect.tubeIntersects().
size(); ++ii) {
440 const MuonTubeIntersect& tint =
intersect.tubeIntersects()[ii];
448 chambersInSearch.insert(
ch);
451 std::unique_ptr<Trk::TrackParameters> tubePars{
460 double distEdge = std::abs(tubePars->parameters()[
Trk::locZ]) - 0.5 * tubeLen;
464 std::optional<Amg::Vector2D> locPos = surf.Trk::Surface::globalToLocal(tubePars->position());
466 bool inBounds =
false;
473 <<
" outside bounds ");
477 <<
" dist tube edge " << distEdge <<
" pullEdge " << pullEdge);
480 states.emplace_back(std::move(tsos));
487 if (
data.cscTrack.count(ith)) {
502 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
508 std::set<Identifier> layIds;
509 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> cscstates;
513 for (std::unique_ptr<const Trk::TrackStateOnSurface>& cscit : cscstates) {
515 states.emplace_back(std::move(cscit));
520 if (
data.tgcTrack.count(ith)) {
535 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
541 std::set<Identifier> layIds;
542 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> tgcstates;
546 for (std::unique_ptr<const Trk::TrackStateOnSurface>& tgcit : tgcstates) {
548 states.emplace_back(std::move(tgcit));
554 if (
data.rpcTrack.count(ith)) {
569 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
575 std::set<Identifier> layIds;
576 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> rpcstates;
580 for (std::unique_ptr<const Trk::TrackStateOnSurface>& rpcit : rpcstates) {
582 states.emplace_back(std::move(rpcit));
590 if (
data.stgcTrack.count(ith)) {
611 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
617 std::set<Identifier> layIds;
618 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> stgcstates;
622 for (std::unique_ptr<const Trk::TrackStateOnSurface>& stgcit : stgcstates) {
624 states.push_back(std::move(stgcit));
631 if (
data.mmTrack.count(ith)) {
652 std::unique_ptr<const Trk::TrackParameters> exPars{
reachableDetEl(ctx,
track, *detEl,
true)};
658 std::set<Identifier> layIds;
659 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> mmstates;
663 for (std::unique_ptr<const Trk::TrackStateOnSurface>& mmit : mmstates) {
665 states.emplace_back(std::move(mmit));
670 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
671 trackStateOnSurfaces->reserve(oldStates->
size() +
states.size());
673 std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> toBeSorted;
674 toBeSorted.reserve(oldStates->
size() +
states.size());
678 for (std::unique_ptr<const Trk::TrackStateOnSurface>& stit :
states) toBeSorted.emplace_back(std::move(stit));
682 for (std::unique_ptr<const Trk::TrackStateOnSurface>&
sorted : toBeSorted) { trackStateOnSurfaces->push_back(
sorted.release()); }
683 std::unique_ptr<Trk::Track> trackWithHoles = std::make_unique<Trk::Track>(
684 track.info(), std::move(trackStateOnSurfaces),
track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
688 <<
m_printer->printStations(*trackWithHoles));
689 return trackWithHoles;
◆ initialize()
StatusCode MuonSegmentRegionRecoveryTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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()
static const InterfaceID& Muon::IMuonHoleRecoveryTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
access to tool interface
Definition at line 23 of file IMuonHoleRecoveryTool.h.
24 static const InterfaceID IID_IMuonHoleRecoveryTool(
"Muon::IMuonHoleRecoveryTool", 1, 0);
25 return IID_IMuonHoleRecoveryTool;
◆ 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.
◆ reachableDetEl()
Definition at line 942 of file MuonSegmentRegionRecoveryTool.cxx.
947 std::unique_ptr<const Trk::TrackParameters> exPars;
971 if (covx > 0.0 && covy > 0.0) {
980 if (tolx > 10.) tolx = 10.;
981 if (toly > 10.) toly = 10.;
988 std::ostringstream parsType;
991 parsType <<
" tolerance=(" << tolx <<
"," << toly <<
")";
993 parsType <<
" => inbounds";
995 parsType <<
" => outbounds";
998 if (!inbounds) {
return nullptr; }
◆ recover()
returns a new track with segments recovered using RegionSelector
Algorithmic part Strategy: 1) Extrapolate back to MS entry record 2) Collect hashes of chambers close to where the track passed 3) Compare collected Hashes with the ones already on track 4) Recover segments on the missing chambers by launching the SeededSegmentFinder.
2) Collect hashes of chambers close to where the track passed 2a) Extrapolate forward to the next station 2b) Launch selector to get IDHashes 2c) push_back hashes for this station into a set 2d) stop where outer layers are 2e) the outcome of all of this is a std::set of collected hashes (some are already on the track, no need to recover)
Implements Muon::IMuonHoleRecoveryTool.
Definition at line 102 of file MuonSegmentRegionRecoveryTool.cxx.
109 ATH_MSG_DEBUG(
" MuonChamberHoleRecoveryTool failed to create a new track "
110 <<
" Returning input (unrecovered) track ");
111 return std::make_unique<Trk::Track>(
track);
114 <<
m_printer->printStations(*chRecTrack));
122 IMuonHitSummaryTool::CompactSummary hitSummary =
m_hitSummaryTool->summary(*chRecTrack);
125 if (hitSummary.stationLayers.size() != 1 || !hitSummary.stationLayers.count(
MuonStationIndex::EM))
return chRecTrack;
149 std::unique_ptr<Trk::Track> triggerRecTrack =
addMissingChambers(ctx, *chRecTrack, muonData,
false);
150 if (triggerRecTrack) chRecTrack.swap(triggerRecTrack);
152 std::unique_ptr<Trk::Track> mdtRecTrack =
addMissingChambers(ctx, *chRecTrack, muonData,
true);
153 if (mdtRecTrack) chRecTrack.swap(mdtRecTrack);
155 std::unique_ptr<Trk::Track> mdtRecTrackWithHoles =
findHoles(ctx, *chRecTrack, muonData);
156 if (mdtRecTrackWithHoles) chRecTrack.swap(mdtRecTrackWithHoles);
◆ renounce()
◆ renounceArray()
◆ 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.
◆ updateVHKA()
◆ m_builder
◆ m_chamberGeoKey
◆ m_chamberHoleRecoveryTool
ToolHandle<MuonChamberHoleRecoveryTool> Muon::MuonSegmentRegionRecoveryTool::m_chamberHoleRecoveryTool {this, "ChamberHoleRecoveryTool", "", "hit-based hole search"} |
|
private |
◆ m_deta
Gaudi::Property<double> Muon::MuonSegmentRegionRecoveryTool::m_deta {this, "DeltaEtaRegion", 0.05} |
|
private |
◆ m_detStore
◆ m_dphi
Gaudi::Property<double> Muon::MuonSegmentRegionRecoveryTool::m_dphi {this, "DeltaPhiRegion", 0.1} |
|
private |
◆ m_edmHelperSvc
Initial value:{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 128 of file MuonSegmentRegionRecoveryTool.h.
◆ m_evtStore
◆ m_excludeEES
Gaudi::Property<bool> Muon::MuonSegmentRegionRecoveryTool::m_excludeEES {this, "ExcludeEES", true} |
|
private |
◆ m_extrapolator
◆ m_fitter
◆ m_hitSummaryTool
◆ m_idHelperSvc
◆ m_onlyEO
Gaudi::Property<bool> Muon::MuonSegmentRegionRecoveryTool::m_onlyEO {this, "OnlyEO", false} |
|
private |
◆ m_printer
◆ m_recoverMM
Gaudi::Property<bool> Muon::MuonSegmentRegionRecoveryTool::m_recoverMM {this, "RecoverMM", true, "Pick up dropped micromega chambers"} |
|
private |
◆ m_recoverSTGC
Gaudi::Property<bool> Muon::MuonSegmentRegionRecoveryTool::m_recoverSTGC {this, "RecoverSTGC", true, "Pick up dropped sTGC chambers"} |
|
private |
◆ m_regsel_csc
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_csc {this, "CSCRegionSelector", "RegSelTool/RegSelTool_CSC"} |
|
private |
◆ m_regsel_mdt
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_mdt {this, "MDTRegionSelector", "RegSelTool/RegSelTool_MDT"} |
|
private |
◆ m_regsel_mm
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_mm {this, "MMRegionSelector", "RegSelTool/RegSelTool_MM"} |
|
private |
◆ m_regsel_rpc
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_rpc {this, "RPCRegionSelector", "RegSelTool/RegSelTool_RPC"} |
|
private |
◆ m_regsel_stgc
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_stgc {this, "STGCRegionSelector", "RegSelTool/RegSelTool_STGC"} |
|
private |
◆ m_regsel_tgc
ToolHandle<IRegSelTool> Muon::MuonSegmentRegionRecoveryTool::m_regsel_tgc {this, "TGCRegionSelector", "RegSelTool/RegSelTool_TGC"} |
|
private |
◆ m_seededSegmentFinder
◆ m_trackSegmentMatchingTool
Initial value:{this, "TrackSegmentMatchingTool",
"Muon::MooCandidateMatchingTool/MooCandidateMatchingTool"}
Definition at line 135 of file MuonSegmentRegionRecoveryTool.h.
◆ m_trackSummaryTool
◆ m_useFitterOutlierLogic
Gaudi::Property<bool> Muon::MuonSegmentRegionRecoveryTool::m_useFitterOutlierLogic {this, "UseFitterOutlierLogic", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
static const std::string & chName(ChIndex index)
convert ChIndex into a string
char data[hepevt_bytes_allocation_ATLAS]
Const iterator class for DataVector/DataList.
bool hasPositiveDiagElems(const AmgSymMatrix(N) &mat)
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above defin...
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
static std::unique_ptr< Trk::TrackParameters > closestParameters(const Trk::Track &track, const Amg::Vector3D &pos, bool onlyUseMeasured=false)
static std::unique_ptr< Trk::TrackStateOnSurface > createHoleTSOS(std::unique_ptr< Trk::TrackParameters > pars)
create a hole TSOS, takes ownership of the pointers
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
virtual Identifier identify() const =0
Identifier.
#define ATH_MSG_VERBOSE(x)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
bool is_valid() const
Check if id is in a valid state.
#define AmgSymMatrix(dim)
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
virtual void setOwner(IDataHandleHolder *o)=0
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
double getActiveTubeLength(const int tubeLayer, const int tube) const
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
virtual const Surface & surface() const =0
Return surface associated with this detector element.
Describes the Region of Ineterest geometry It has basically 9 parameters.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
represents the three-dimensional global direction with respect to a planar surface frame.
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const =0
Extend the interface to for single inside Loc 1 / Loc2 tests.
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
represents the track state (measurement, material, fit parameters and quality) at a surface.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
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 ...
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
StatusCode initialize(bool used=true)
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
MuonPrepDataCollection< MMPrepData > MMPrepDataCollection
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Identifier identify() const
return the identifier -extends MeasurementBase
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ChIndex
enum to classify the different chamber layers in the muon spectrometer
StIndex
enum to classify the different station layers in the muon spectrometer
IdentifierHash collectionHash() const
Returns the hashID of the PRD collection.
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool empty() const noexcept
Returns true if the collection is empty.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.