|
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"} |
|
ToolHandle< 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);
◆ 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()
◆ 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 352 of file MuonChamberHoleRecoveryTool.cxx.
357 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
361 return MuonDetMgr->getMdtReadoutElement(detElId);
363 return MuonDetMgr->getTgcReadoutElement(detElId);
365 return MuonDetMgr->getRpcReadoutElement(detElId);
367 return MuonDetMgr->getCscReadoutElement(detElId);
370 return MuonDetMgr->getsTgcReadoutElement(detElId);
372 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 454 of file MuonChamberHoleRecoveryTool.cxx.
456 std::set<Identifier> holeGaps{};
459 for (
int ml = 1; ml <= idHelper.numberOfMultilayers(detElId); ++ml) {
460 for (
int layer = idHelper.tubeLayerMin(detElId);
461 layer <= idHelper.tubeLayerMax(detElId); ++
layer) {
463 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
468 for (
int ml : {1 ,2}) {
470 const Identifier layerId = idHelper.channelID(detElId, ml,
gap, 1);
471 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
477 for (
int ml : {1, 2}) {
478 for (
const channelType
chType : {channelType::Strip,
484 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
490 const int gapMax{idHelper.
gasGapMax(detElId)};
491 for (
int gasgap = idHelper.
gasGapMin(detElId);
492 gasgap < gapMax; ++gasgap){
493 for (
int measPhi: {0,1}) {
495 if (gapMax == 3 && gasgap ==2 && measPhi == 1)
continue;
497 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
502 const int doubZ{idHelper.
doubletZ(detElId)};
503 const int gapMax{idHelper.
gasGapMax(detElId)};
504 for (
int phiGap = idHelper.
doubletPhi(detElId);
508 for (
int measPhi: {0, 1}) {
510 if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
517 for (
bool measPhi: {
false,
true}) {
519 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 119 of file MuonChamberHoleRecoveryTool.cxx.
120 while(trkRecov.nextState()) {
125 if (msVol.inside(
pars->position())) {
127 trkRecov.copyState(
target);
138 ATH_MSG_VERBOSE(
"The track state does not have an associated measurement");
139 trkRecov.copyState(
target);
144 if (!trkRecov.tsosId.is_valid() || !
m_idHelperSvc->isMuon(trkRecov.tsosId)) {
146 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 376 of file MuonChamberHoleRecoveryTool.cxx.
380 if (!interSectSvc.isValid()) {
381 ATH_MSG_ERROR(
"Failed to retrieve chamber intersection service");
382 throw std::runtime_error(
"No chamber intersection service");
386 MuonStationIntersect
intersect = interSectSvc->tubesCrossedByTrack(chId, position, direction);
389 std::set<Identifier>
holes;
390 for (
unsigned int ii = 0; ii <
intersect.tubeIntersects().
size(); ++ii) {
391 const MuonTubeIntersect& tint =
intersect.tubeIntersects()[ii];
393 if (tubeIds.count(tint.tubeId)) {
continue; }
395 <<
" dist to tube end " << tint.xIntersect);
397 if (std::abs(tint.rIntersect) > readoutEle->
innerTubeRadius() || tint.xIntersect > -10.) {
403 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 154 of file MuonChamberHoleRecoveryTool.cxx.
155 std::set<Identifier> layerIds{};
162 layerIds.insert(measId);
165 const CompetingMuonClustersOnTrack*
comp =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(meas);
166 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 408 of file MuonChamberHoleRecoveryTool.cxx.
411 std::vector<const Prd*> collectedHits{};
414 return collectedHits;
417 if (!prdContainer.isPresent()) {
419 throw std::runtime_error(
"Invalid prepdata container");
422 std::set<IdentifierHash> chamberIds{};
424 std::inserter(chamberIds, chamberIds.end()),
426 return m_idHelperSvc->moduleHash(id);
429 const MuonPrepDataCollection<Prd>* prdColl = prdContainer->indexFindPtr(moduleHash);
430 if (!prdColl)
continue;
431 collectedHits.reserve(collectedHits.size() + prdColl->size());
432 for (
const Prd* prd: *prdColl) {
433 bool appendPrd{
false};
435 appendPrd = gasGapIds.count(prd->identify());
437 appendPrd = gasGapIds.count(
m_idHelperSvc->layerId(prd->identify()));
441 collectedHits.push_back(prd);
448 std::sort(collectedHits.begin(), collectedHits.end(), [](
const Prd*
a,
const Prd*
b){
449 return a->identify() < b->identify();
452 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 175 of file MuonChamberHoleRecoveryTool.cxx.
180 RecoveryState recovState{
track};
187 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(
track.info(), recovState.releaseStates(),
188 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 525 of file MuonChamberHoleRecoveryTool.cxx.
531 const std::set<Identifier> missingLayers =
getHoleLayerIds(detElId, knownLayers);
532 std::vector<const Prd*> prdCandidates =
loadPrepDataHits(ctx, prdKey, missingLayers);
534 using LayerParsMap = std::map<Identifier, std::unique_ptr<Trk::TrackParameters>>;
535 LayerParsMap parsAtSurfMap{};
536 for (
const Identifier& holeId : missingLayers) {
539 std::unique_ptr<Trk::TrackParameters>
pars =
m_extrapolator->extrapolateDirectly(ctx, parsInChamb, surf,
551 bool inbounds{
false};
555 inbounds = surf.insideBounds(locExPos, 10., 10.);
560 <<
" is outside of the chamber "<<
Amg::toString(locExPos, 2));
563 parsAtSurfMap[holeId] = std::move(
pars);
565 ClusterLayerMap bestClusterInLay;
567 for (
const Prd* hit : prdCandidates) {
570 LayerParsMap::const_iterator pars_itr = parsAtSurfMap.find(layId);
571 if (pars_itr == parsAtSurfMap.end()) {
574 const std::unique_ptr<Trk::TrackParameters>& parsInLay{pars_itr->second};
575 std::unique_ptr<MuonClusterOnTrack> calibClus{};
578 parsInLay->position(),
579 parsInLay->momentum().unit()));
582 parsInLay->position(),
583 parsInLay->momentum().unit()));
585 if (!calibClus)
continue;
589 if (idHelper.channelType(hit->identify()) == sTgcIdHelper::sTgcChannelTypes::Pad){
603 const double xPull = padDist.x() / xCov;
604 const double yPull = padDist.y() / yCov;
608 <<
" covariance: ("<<xCov<<
", "<<yCov<<
")"
609 <<
" pull: ("<<xPull<<
","<<yPull<<
").");
613 const double pull = std::hypot(xPull, yPull);
616 PullCluster& bestClus = bestClusterInLay[layId];
617 if (bestClus.pull <
pull)
continue;
618 bestClus.pull =
pull;
619 bestClus.clus = std::move(calibClus);
620 bestClus.pars = parsInLay->uniqueClone();
626 std::optional<const Trk::ResidualPull> resPull{
629 if (!resPull || resPull->pull().empty()) {
633 const double pull = std::abs(resPull->pull().front());
636 if (
pull > pullCut)
continue;
638 PullCluster& bestClus = bestClusterInLay[layId];
639 if (bestClus.pull <
pull)
continue;
640 bestClus.pull =
pull;
641 bestClus.clus = std::move(calibClus);
642 bestClus.pars = parsInLay->uniqueClone();
646 for (
auto& [layerId, foundClus]: bestClusterInLay) {
649 std::move(foundClus.pars),
651 recoveredStates.emplace_back(std::move(tsos));
652 knownLayers.insert(layerId);
653 parsAtSurfMap[layerId].reset();
656 for (
auto& [layerId, exPars] : parsAtSurfMap) {
657 if (!exPars)
continue;
661 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 191 of file MuonChamberHoleRecoveryTool.cxx.
194 std::set<Identifier> chambInStation{};
196 if (currStation !=
m_idHelperSvc->chamberIndex(trkRecov.tsosId)) {
197 trkRecov.finalizeChamber();
203 if (chambInStation.insert(
m_idHelperSvc->chamberId(trkRecov.tsosId)).second) {
205 recoverMdtHits(ctx, trkRecov.tsosId, *trkRecov.tsos()->trackParameters(),
206 trkRecov.chamberStates, trkRecov.layersOnTrk);
209 trkRecov.chamberStates, trkRecov.layersOnTrk);
213 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 215 of file MuonChamberHoleRecoveryTool.cxx.
223 if (chHoles.empty())
return;
225 const std::vector<const MdtPrepData*> prdCandidates{loadPrepDataHits<MdtPrepData>(ctx,
m_key_mdt, chHoles)};
226 bool addedState{
false};
227 for (
const MdtPrepData* mdtPrd : prdCandidates) {
241 if (!surf.insideBounds(locPos)) {
242 chHoles.erase(mdtPrd->identify());
248 std::unique_ptr<MdtDriftCircleOnTrack> mdtROT{
m_mdtRotCreator->createRIO_OnTrack(*mdtPrd,
251 if (!mdtROT)
continue;
259 std::optional<const Trk::ResidualPull> resPull{
m_pullCalculator->residualPull(mdtROT.get(),
262 if (!resPull) {
continue; }
264 const double pull = resPull->pull().front();
265 const double radialResidual = std::abs(mdtROT->localParameters()[
Trk::locR]) -
266 std::abs(exPars->parameters()[
Trk::locR]);
268 unsigned int hitFlag = 1;
273 else if (radialResidual > 0.)
284 newStates.emplace_back(std::move(tsos));
287 const MdtDriftCircleOnTrack* prevDC =
static_cast<const MdtDriftCircleOnTrack*
>(newStates.back()->measurementOnTrack());
288 if (prevDC->identify() != mdtPrd->identify()) {
289 newStates.emplace_back(std::move(tsos));
291 ATH_MSG_DEBUG(
"Two hits recorded for the same tube "<<std::endl<<
293 " *** previous: "<<
m_printer->print(*prevDC));
294 std::optional<Trk::ResidualPull> prevPullObj{
m_pullCalculator->residualPull(prevDC,
297 const double prevPull = prevPullObj->pull().front();
299 if (std::abs(
pull) < std::abs(prevPull) ||
302 newStates.back() = std::move(tsos);
307 chHoles.erase(mdtPrd->identify());
308 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 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)
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