|
ATLAS Offline Software
|
tool to select tracks
More...
#include <MuonChamberHoleRecoveryTool.h>
|
| MuonChamberHoleRecoveryTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~MuonChamberHoleRecoveryTool ()=default |
|
StatusCode | initialize () override |
|
std::unique_ptr< Trk::Track > | recover (const Trk::Track &track, const EventContext &ctx) const override |
| returns a new track with holes recovered More...
|
|
void | createHoleTSOSsForClusterChamber (const Identifier &detElId, const EventContext &ctx, const Trk::TrackParameters &pars, std::set< Identifier > &layIds, NewTrackStates &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 |
|
virtual 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 =0 |
|
|
bool | getNextMuonMeasurement (RecoveryState &trkRecov, RecoveryState::CopyTarget target) const |
| Increments the internal iterator of the RecoveryState until the next muon measurement on track is found Measurements inside the MS volume or any scatterer are copied automatically copied onto the target vector. More...
|
|
void | recoverHitsInChamber (const EventContext &ctx, RecoveryState &trkRecov) const |
| Loops over all muon hits in a muon chamber and tries to find missed ones by checking each tracking layer for hits. More...
|
|
std::set< Identifier > | holesInMdtChamber (const EventContext &ctx, const Amg::Vector3D &position, const Amg::Vector3D &direction, const Identifier &chId, const std::set< Identifier > &tubeIds) const |
| calculate holes in a given chamber using local straight line extrapolation More...
|
|
void | recoverMdtHits (const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &pars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const |
|
void | recoverClusterHits (const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &chambPars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const |
|
std::set< Identifier > | layersOnTrkIds (const Trk::Track &track) const |
| Returns a set of all layer Identifiers of the associated track hits. More...
|
|
const Trk::TrkDetElementBase * | getDetectorElement (const EventContext &ctx, const Identifier &id) const |
| Returns the detector element associated with the muon Identifier. More...
|
|
std::set< Identifier > | getHoleLayerIds (const Identifier &detElId, const std::set< Identifier > &knownLayers) const |
| Returns a set of all layer Identifiers (GasGap + channel orientation) in a muon chamber of type X excluding the ones in the knownLayers set
More...
|
|
template<class Prd > |
NewTrackStates | recoverChamberClusters (const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &prdKey, const Identifier &chambId, const Trk::TrackParameters &parsInChamb, std::set< Identifier > &knownLayers) const |
| Attempts to recover all missing hits in a chamber. More...
|
|
template<class Prd > |
std::vector< const Prd * > | loadPrepDataHits (const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &key, const std::set< Identifier > &layerIds) 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< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ServiceHandle< Muon::IMuonEDMHelperSvc > | m_edmHelperSvc |
|
ServiceHandle< Trk::ITrackingVolumesSvc > | m_trackingVolumesSvc {this, "TrackingVolumesSvc", "TrackingVolumesSvc/TrackingVolumesSvc"} |
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/MuonExtrapolator"} |
|
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > | m_mdtRotCreator |
|
ToolHandle< Muon::IMuonClusterOnTrackCreator > | m_cscRotCreator |
|
ToolHandle< Muon::IMuonClusterOnTrackCreator > | m_clusRotCreator |
|
ToolHandle< Trk::IResidualPullCalculator > | m_pullCalculator |
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
|
SG::ReadHandleKey< Muon::MdtPrepDataContainer > | m_key_mdt {this, "MdtPrepDataContainer", "MDT_DriftCircles", "MDT PRDs"} |
|
SG::ReadHandleKey< Muon::CscPrepDataContainer > | m_key_csc {this, "CscPrepDataContainer", "CSC_Clusters", "CSC PRDS"} |
|
SG::ReadHandleKey< Muon::TgcPrepDataContainer > | m_key_tgc {this, "TgcPrepDataContainer", "TGC_Measurements", "TGC PRDs"} |
|
SG::ReadHandleKey< Muon::RpcPrepDataContainer > | m_key_rpc {this, "RpcPrepDataContainer", "RPC_Measurements", "RPC PRDs"} |
|
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > | m_key_stgc {this, "sTgcPrepDataContainer", "STGC_Measurements", "sTGC PRDs"} |
|
SG::ReadHandleKey< Muon::MMPrepDataContainer > | m_key_mm {this, "MMPrepDataContainer", "MM_Measurements", "MM PRDs"} |
|
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > | m_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"} |
|
Gaudi::Property< bool > | m_addMeasurements {this, "AddMeasurements", true} |
|
Gaudi::Property< bool > | m_detectBadSort {this, "DetectBadSorting", false} |
|
Gaudi::Property< double > | m_associationPullCutEta {this, "AssociationPullCutEta", 3} |
|
Gaudi::Property< double > | m_associationPullCutPhi {this, "AssociationPullCutPhi", 10} |
|
Gaudi::Property< double > | m_adcCut {this, "AdcCut", 50} |
|
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 |
|
tool to select tracks
Definition at line 34 of file MuonChamberHoleRecoveryTool.h.
◆ NewTrackStates
◆ StoreGateSvc_t
◆ MuonChamberHoleRecoveryTool()
Muon::MuonChamberHoleRecoveryTool::MuonChamberHoleRecoveryTool |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
◆ ~MuonChamberHoleRecoveryTool()
virtual Muon::MuonChamberHoleRecoveryTool::~MuonChamberHoleRecoveryTool |
( |
| ) |
|
|
virtualdefault |
◆ createHoleTSOSsForClusterChamber() [1/2]
◆ createHoleTSOSsForClusterChamber() [2/2]
◆ 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
◆ getDetectorElement()
Returns the detector element associated with the muon Identifier.
Definition at line 354 of file MuonChamberHoleRecoveryTool.cxx.
359 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
363 return MuonDetMgr->getMdtReadoutElement(detElId);
365 return MuonDetMgr->getTgcReadoutElement(detElId);
367 return MuonDetMgr->getRpcReadoutElement(detElId);
369 return MuonDetMgr->getCscReadoutElement(detElId);
372 return MuonDetMgr->getsTgcReadoutElement(detElId);
374 return MuonDetMgr->getMMReadoutElement(detElId);
◆ getHoleLayerIds()
Returns a set of all layer Identifiers (GasGap + channel orientation) in a muon chamber of type X excluding the ones in the knownLayers set
the second gas gap of the three layer stations does not have a phi measurement
Definition at line 456 of file MuonChamberHoleRecoveryTool.cxx.
458 std::set<Identifier> holeGaps{};
461 for (
int ml = 1; ml <= idHelper.numberOfMultilayers(detElId); ++ml) {
462 for (
int layer = idHelper.tubeLayerMin(detElId);
463 layer <= idHelper.tubeLayerMax(detElId); ++
layer) {
465 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
470 for (
int ml : {1 ,2}) {
472 const Identifier layerId = idHelper.channelID(detElId, ml,
gap, 1);
473 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
479 for (
int ml : {1, 2}) {
480 for (
const channelType
chType : {channelType::Strip,
486 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
492 const int gapMax{idHelper.
gasGapMax(detElId)};
493 for (
int gasgap = idHelper.
gasGapMin(detElId);
494 gasgap < gapMax; ++gasgap){
495 for (
int measPhi: {0,1}) {
497 if (gapMax == 3 && gasgap ==2 && measPhi == 1)
continue;
499 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
504 const int doubZ{idHelper.
doubletZ(detElId)};
505 const int gapMax{idHelper.
gasGapMax(detElId)};
506 for (
int phiGap = idHelper.
doubletPhi(detElId);
510 for (
int measPhi: {0, 1}) {
512 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
519 for (
bool measPhi: {
false,
true}) {
521 if (!knownLayers.count(layId)) holeGaps.insert(layId);
◆ getNextMuonMeasurement()
Increments the internal iterator of the RecoveryState until the next muon measurement on track is found Measurements inside the MS volume or any scatterer are copied automatically copied onto the target vector.
Copy all track states inside the MS
Scatteres AEOTs, material etc.
Definition at line 121 of file MuonChamberHoleRecoveryTool.cxx.
122 while(trkRecov.nextState()) {
127 if (msVol.inside(
pars->position())) {
129 trkRecov.copyState(
target);
140 ATH_MSG_VERBOSE(
"The track state does not have an associated measurement");
141 trkRecov.copyState(
target);
146 if (!trkRecov.tsosId.is_valid() || !
m_idHelperSvc->isMuon(trkRecov.tsosId)) {
148 trkRecov.copyState(
target);
◆ holesInMdtChamber()
calculate holes in a given chamber using local straight line extrapolation
- Parameters
-
pars | TrackParameters in the chamber |
chId | Identifier of the chamber |
tubeIds | set containing the Identifier of the hits that should not be counted as holes |
- Returns
- a vector of hole Identifiers
Definition at line 378 of file MuonChamberHoleRecoveryTool.cxx.
382 if (!interSectSvc.isValid()) {
383 ATH_MSG_ERROR(
"Failed to retrieve chamber intersection service");
384 throw std::runtime_error(
"No chamber intersection service");
388 MuonStationIntersect
intersect = interSectSvc->tubesCrossedByTrack(chId, position, direction);
391 std::set<Identifier>
holes;
392 for (
unsigned int ii = 0; ii <
intersect.tubeIntersects().
size(); ++ii) {
393 const MuonTubeIntersect& tint =
intersect.tubeIntersects()[ii];
395 if (tubeIds.count(tint.tubeId)) {
continue; }
397 <<
" dist to tube end " << tint.xIntersect);
399 if (std::abs(tint.rIntersect) > readoutEle->
innerTubeRadius() || tint.xIntersect > -10.) {
405 holes.insert(tint.tubeId);
◆ initialize()
StatusCode Muon::MuonChamberHoleRecoveryTool::initialize |
( |
| ) |
|
|
override |
◆ 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;
◆ layersOnTrkIds()
Returns a set of all layer Identifiers of the associated track hits.
Definition at line 156 of file MuonChamberHoleRecoveryTool.cxx.
157 std::set<Identifier> layerIds{};
164 layerIds.insert(measId);
167 const CompetingMuonClustersOnTrack*
comp =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(meas);
168 if (!
comp) {
continue; }
◆ loadPrepDataHits()
Create a subset of Identifiers
Sort the Mdt prepdatas per Identifier as there's the possibily 2 DC can exist for the same channel
Definition at line 410 of file MuonChamberHoleRecoveryTool.cxx.
413 std::vector<const Prd*> collectedHits{};
416 return collectedHits;
419 if (!prdContainer.isPresent()) {
421 throw std::runtime_error(
"Invalid prepdata container");
424 std::set<IdentifierHash> chamberIds{};
426 std::inserter(chamberIds, chamberIds.end()),
428 return m_idHelperSvc->moduleHash(id);
431 const MuonPrepDataCollection<Prd>* prdColl = prdContainer->indexFindPtr(moduleHash);
432 if (!prdColl)
continue;
433 collectedHits.reserve(collectedHits.size() + prdColl->size());
434 for (
const Prd* prd: *prdColl) {
435 bool appendPrd{
false};
437 appendPrd = gasGapIds.count(prd->identify());
439 appendPrd = gasGapIds.count(
m_idHelperSvc->layerId(prd->identify()));
443 collectedHits.push_back(prd);
450 std::sort(collectedHits.begin(), collectedHits.end(), [](
const Prd*
a,
const Prd*
b){
451 return a->identify() < b->identify();
454 return collectedHits;
◆ 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.
◆ recover()
returns a new track with holes recovered
Copy all parameters befor the MS onto the new track state
Start an iterative recovery looping over each chamber
Implements Muon::IMuonHoleRecoveryTool.
Definition at line 177 of file MuonChamberHoleRecoveryTool.cxx.
182 RecoveryState recovState{
track};
189 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(
track.info(), recovState.releaseStates(),
190 track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
◆ recoverChamberClusters()
Attempts to recover all missing hits in a chamber.
The hit is out of bounds --> continue
Loop over all prd candidates
The surface cannot be reached. Discard the prd
Compare the pad & local positions
Calculate the pull by hand
For one reason or another, the pads have 1D covariances
Check whether the pull is reasonable
Assign the best pad onto the track
Calculate the track pull
the best clusters are found. Put them onto the track
Next loop over the reamining parameters at surface to create holes
Definition at line 527 of file MuonChamberHoleRecoveryTool.cxx.
533 const std::set<Identifier> missingLayers =
getHoleLayerIds(detElId, knownLayers);
534 std::vector<const Prd*> prdCandidates =
loadPrepDataHits(ctx, prdKey, missingLayers);
536 using LayerParsMap = std::map<Identifier, std::unique_ptr<Trk::TrackParameters>>;
537 LayerParsMap parsAtSurfMap{};
538 for (
const Identifier& holeId : missingLayers) {
541 std::unique_ptr<Trk::TrackParameters>
pars =
m_extrapolator->extrapolateDirectly(ctx, parsInChamb, surf,
553 bool inbounds{
false};
557 inbounds = surf.insideBounds(locExPos, 10., 10.);
562 <<
" is outside of the chamber "<<
Amg::toString(locExPos, 2));
565 parsAtSurfMap[holeId] = std::move(
pars);
567 ClusterLayerMap bestClusterInLay;
569 for (
const Prd* hit : prdCandidates) {
572 LayerParsMap::const_iterator pars_itr = parsAtSurfMap.find(layId);
573 if (pars_itr == parsAtSurfMap.end()) {
576 const std::unique_ptr<Trk::TrackParameters>& parsInLay{pars_itr->second};
577 std::unique_ptr<MuonClusterOnTrack> calibClus{};
580 parsInLay->position(),
581 parsInLay->momentum().unit()));
584 parsInLay->position(),
585 parsInLay->momentum().unit()));
587 if (!calibClus)
continue;
591 if (idHelper.channelType(hit->identify()) == sTgcIdHelper::sTgcChannelTypes::Pad){
605 const double xPull = padDist.x() / xCov;
606 const double yPull = padDist.y() / yCov;
610 <<
" covariance: ("<<xCov<<
", "<<yCov<<
")"
611 <<
" pull: ("<<xPull<<
","<<yPull<<
").");
615 const double pull = std::hypot(xPull, yPull);
618 PullCluster& bestClus = bestClusterInLay[layId];
619 if (bestClus.pull <
pull)
continue;
620 bestClus.pull =
pull;
621 bestClus.clus = std::move(calibClus);
622 bestClus.pars = parsInLay->uniqueClone();
628 std::optional<const Trk::ResidualPull> resPull{
631 if (!resPull || resPull->pull().empty()) {
635 const double pull = std::abs(resPull->pull().front());
638 if (
pull > pullCut)
continue;
640 PullCluster& bestClus = bestClusterInLay[layId];
641 if (bestClus.pull <
pull)
continue;
642 bestClus.pull =
pull;
643 bestClus.clus = std::move(calibClus);
644 bestClus.pars = parsInLay->uniqueClone();
648 for (
auto& [layerId, foundClus]: bestClusterInLay) {
651 std::move(foundClus.pars),
653 recoveredStates.emplace_back(std::move(tsos));
654 knownLayers.insert(layerId);
655 parsAtSurfMap[layerId].reset();
658 for (
auto& [layerId, exPars] : parsAtSurfMap) {
659 if (!exPars)
continue;
663 return recoveredStates;
◆ recoverClusterHits()
◆ recoverHitsInChamber()
void Muon::MuonChamberHoleRecoveryTool::recoverHitsInChamber |
( |
const EventContext & |
ctx, |
|
|
RecoveryState & |
trkRecov |
|
) |
| const |
|
private |
Loops over all muon hits in a muon chamber and tries to find missed ones by checking each tracking layer for hits.
If a new chamber is reached another iteration of the method is called
Collect all hits in a chamber
New chamber added
Definition at line 193 of file MuonChamberHoleRecoveryTool.cxx.
196 std::set<Identifier> chambInStation{};
198 if (currStation !=
m_idHelperSvc->chamberIndex(trkRecov.tsosId)) {
199 trkRecov.finalizeChamber();
205 if (chambInStation.insert(
m_idHelperSvc->chamberId(trkRecov.tsosId)).second) {
207 recoverMdtHits(ctx, trkRecov.tsosId, *trkRecov.tsos()->trackParameters(),
208 trkRecov.chamberStates, trkRecov.layersOnTrk);
211 trkRecov.chamberStates, trkRecov.layersOnTrk);
215 trkRecov.finalizeChamber();
◆ recoverMdtHits()
calculate Amg::Vector2D using surf to obtain sign
calculate side
update sign
pointer to resPull
Overwrite the previous drift circle if the pull of this one is better or it's an outlier
Definition at line 217 of file MuonChamberHoleRecoveryTool.cxx.
225 if (chHoles.empty())
return;
227 const std::vector<const MdtPrepData*> prdCandidates{loadPrepDataHits<MdtPrepData>(ctx,
m_key_mdt, chHoles)};
228 bool addedState{
false};
229 for (
const MdtPrepData* mdtPrd : prdCandidates) {
243 if (!surf.insideBounds(locPos)) {
244 chHoles.erase(mdtPrd->identify());
250 std::unique_ptr<MdtDriftCircleOnTrack> mdtROT{
m_mdtRotCreator->createRIO_OnTrack(*mdtPrd,
253 if (!mdtROT)
continue;
261 std::optional<const Trk::ResidualPull> resPull{
m_pullCalculator->residualPull(mdtROT.get(),
264 if (!resPull) {
continue; }
266 const double pull = resPull->pull().front();
267 const double radialResidual = std::abs(mdtROT->localParameters()[
Trk::locR]) -
268 std::abs(exPars->parameters()[
Trk::locR]);
270 unsigned int hitFlag = 1;
275 else if (radialResidual > 0.)
286 newStates.emplace_back(std::move(tsos));
289 const MdtDriftCircleOnTrack* prevDC =
static_cast<const MdtDriftCircleOnTrack*
>(newStates.back()->measurementOnTrack());
290 if (prevDC->identify() != mdtPrd->identify()) {
291 newStates.emplace_back(std::move(tsos));
293 ATH_MSG_DEBUG(
"Two hits recorded for the same tube "<<std::endl<<
295 " *** previous: "<<
m_printer->print(*prevDC));
296 std::optional<Trk::ResidualPull> prevPullObj{
m_pullCalculator->residualPull(prevDC,
299 const double prevPull = prevPullObj->pull().front();
301 if (std::abs(
pull) < std::abs(prevPull) ||
304 newStates.back() = std::move(tsos);
309 chHoles.erase(mdtPrd->identify());
310 knownLayers.insert(mdtPrd->identify());
◆ 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_adcCut
Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_adcCut {this, "AdcCut", 50} |
|
private |
◆ m_addMeasurements
Gaudi::Property<bool> Muon::MuonChamberHoleRecoveryTool::m_addMeasurements {this, "AddMeasurements", true} |
|
private |
◆ m_associationPullCutEta
Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_associationPullCutEta {this, "AssociationPullCutEta", 3} |
|
private |
◆ m_associationPullCutPhi
Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_associationPullCutPhi {this, "AssociationPullCutPhi", 10} |
|
private |
◆ m_chamberGeoKey
◆ m_clusRotCreator
Initial value:{this, "ClusterRotCreator",
"Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
"IMuonClusterOnTrackCreator for RPC, TGC, NSW hits"}
Definition at line 173 of file MuonChamberHoleRecoveryTool.h.
◆ m_cscRotCreator
◆ m_detectBadSort
Gaudi::Property<bool> Muon::MuonChamberHoleRecoveryTool::m_detectBadSort {this, "DetectBadSorting", false} |
|
private |
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 179 of file MuonChamberHoleRecoveryTool.h.
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 158 of file MuonChamberHoleRecoveryTool.h.
◆ m_evtStore
◆ m_extrapolator
◆ m_idHelperSvc
◆ m_key_csc
◆ m_key_mdt
◆ m_key_mm
◆ m_key_rpc
◆ m_key_stgc
◆ m_key_tgc
◆ m_mdtRotCreator
Initial value:{this, "MdtRotCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
"IMdtDriftCircleOnTrackCreator full calibration"}
Definition at line 168 of file MuonChamberHoleRecoveryTool.h.
◆ m_printer
◆ m_pullCalculator
◆ m_trackingVolumesSvc
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Parameters defining the design of the readout sTGC pads.
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.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
int doubletZ(const Identifier &id) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
static std::unique_ptr< Trk::TrackStateOnSurface > createHoleTSOS(std::unique_ptr< Trk::TrackParameters > pars)
create a hole TSOS, takes ownership of the pointers
@ Unbiased
RP with track state that has measurement not included.
@ MuonSpectrometerEntryLayer
Tracking Volume which defines the entrance surfaces of the MS.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
static int doubletPhiMax()
#define ATH_MSG_VERBOSE(x)
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
def gap(flags, cells_name, *args, **kw)
@ MdtStatusDriftTime
The tube produced a vaild measurement.
virtual void setOwner(IDataHandleHolder *o)=0
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
@ Hole
A hole on the track - this is defined in the following way.
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOS(std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
virtual const Surface & surface() const =0
Return surface associated with this detector element.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static int gasGapMax(bool triplet)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
represents the track state (measurement, material, fit parameters and quality) at a surface.
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 ...
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
DriftCircleSide
Enumerates the 'side' of the wire on which the tracks passed (i.e.
const Amg::Vector3D & momentum() const
Access method for the momentum.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
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.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
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
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Amg::Vector2D distanceToPad(const Amg::Vector2D &pos, int channel) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Base class for Muon cluster RIO_OnTracks.
int doubletPhi(const Identifier &id) const