|
ATLAS Offline Software
|
#include <MuonTrackSummaryHelperTool.h>
|
| MuonTrackSummaryHelperTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~MuonTrackSummaryHelperTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual void | analyse (const Trk::Track &trk, const Trk::RIO_OnTrack *rot, const Trk::TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const override final |
|
virtual void | analyse (const Trk::Track &trk, const Trk::CompetingRIOsOnTrack *crot, const Trk::TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const override final |
|
virtual void | searchForHoles (const Trk::Track &track, std::vector< int > &information, Trk::ParticleHypothesis hyp) const override final |
|
virtual void | addDetailedTrackSummary (const Trk::Track &track, Trk::TrackSummary &summary) const override final |
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ToolHandle< Trk::IExtrapolator > | m_slExtrapolator {this, "StaightLineExtrapolator", "Trk::Extrapolator/MuonStraightLineExtrapolator"} |
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"} |
|
Gaudi::Property< bool > | m_calculateCloseHits {this, "CalculateCloseHits", false} |
| allow us to block the calculation of close hits More...
|
|
Gaudi::Property< double > | m_roadWidth {this, "RoadWidth", 135., "width used to calculate hits within the road (mm)"} |
| width road use to associate close hits
More...
|
|
SG::ReadHandleKey< Muon::MdtPrepDataContainer > | m_mdtKey {this, "MdtPrepDataContainer", "MDT_DriftCircles", "MDT PRDs"} |
| storegate key of MdtPrepDataContainer More...
|
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
|
◆ MuonTrackSummaryHelperTool()
Muon::MuonTrackSummaryHelperTool::MuonTrackSummaryHelperTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonTrackSummaryHelperTool()
virtual Muon::MuonTrackSummaryHelperTool::~MuonTrackSummaryHelperTool |
( |
| ) |
|
|
virtualdefault |
◆ addDetailedTrackSummary()
go back through the chamber, nallhitsinroad - nhitsontrack = ncloseHits for both projection1 and projection2 pass chamber summary to function calculateRoadHits(currentChamberSummary)
check whether first chamber or new chamber
calculate road hits for last chamber on track (otherwise it would have been skipped)
Definition at line 115 of file MuonTrackSummaryHelperTool.cxx.
116 if (
summary.m_muonTrackSummary) {
117 ATH_MSG_DEBUG(
"TrackSummary already has detailed muon track summary, not adding a new one");
120 const EventContext& ctx = Gaudi::Hive::currentContext();
123 if (MuonDetMgr ==
nullptr) {
124 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
143 for (; tsit != tsit_end; ++tsit) {
153 ATH_MSG_WARNING(
" Hole state without track parameters, cannot identify hole ");
156 if (
pars->associatedSurface().associatedDetectorElement()) {
157 Identifier id =
pars->associatedSurface().associatedDetectorElement()->identify();
161 Identifier idh =
pars->associatedSurface().associatedDetectorElementIdentifier();
162 if (idh.is_valid()) {
id = idh; }
172 if (!currentChamberSummary || currentChamberSummary->
m_chId != chId) {
182 if (currentChamberSummary && !currentChamberSummary->
isMdt()) {
updateHoleContent(*currentChamberSummary); }
187 currentChamberPars =
pars;
191 isFirst ? currentChamberSummary->
m_first : currentChamberSummary->
m_second;
211 if (!meas) {
continue; }
229 bool inBounds =
true;
232 std::set<Identifier> layIds;
233 std::set<Identifier> goodLayIds;
243 double tol2 = 2 * tol1;
249 const MMClusterOnTrack* mmClusterOnTrack =
dynamic_cast<const MMClusterOnTrack*
>(meas);
254 }
else if (mmClusterOnTrack) {
256 inBounds = mmClusterOnTrack->detectorElement()->insideActiveBounds(
id, locPos, tol1, tol2);
262 layIds.insert(layId);
263 const MdtDriftCircleOnTrack* mdtdc =
dynamic_cast<const MdtDriftCircleOnTrack*
>(rot);
265 MuonDriftCircleErrorStrategy errStrat = mdtdc->errorStrategy();
268 goodLayIds.insert(layId);
274 goodLayIds.insert(layId);
277 goodLayIds.insert(layId);
280 goodLayIds.insert(layId);
291 std::vector<const Muon::MuonClusterOnTrack*>::const_iterator cl_it = crot->
containedROTs().begin();
292 std::vector<const Muon::MuonClusterOnTrack*>::const_iterator cl_it_end = crot->
containedROTs().end();
293 for (; cl_it != cl_it_end; ++cl_it) {
296 layIds.insert(layId);
302 goodLayIds.insert(layId);
319 if (!currentChamberSummary || currentChamberSummary->
m_chId != chId) {
326 if (currentChamberSummary && !currentChamberSummary->
isMdt()) {
updateHoleContent(*currentChamberSummary); }
331 currentChamberPars =
pars;
335 isFirst ? currentChamberSummary->
m_first : currentChamberSummary->
m_second;
342 double innerRadius = MuonDetMgr->getMdtReadoutElement(
id)->innerTubeRadius();
343 if (rTrack > rDrift && rTrack < innerRadius) {
351 proj.nhits += layIds.size();
352 proj.ngoodHits += goodLayIds.size();
354 if (!inBounds && isMdt)
proj.noutBounds++;
366 if (currentChamberSummary && !currentChamberSummary->
isMdt()) {
updateHoleContent(*currentChamberSummary); }
368 summary.m_muonTrackSummary.reset(muonTrackSummary);
◆ analyse() [1/2]
◆ analyse() [2/2]
- Parameters
-
trk | trk |
hitPattern | hitPattern |
Definition at line 43 of file MuonTrackSummaryHelperTool.cxx.
61 const CscClusterOnTrack* clus =
dynamic_cast<const CscClusterOnTrack*
>(rot);
◆ calculateRoadHits()
Definition at line 423 of file MuonTrackSummaryHelperTool.cxx.
425 const EventContext& ctx = Gaudi::Hive::currentContext();
426 bool isStraightLine =
false;
427 if (
pars.parameters().rows() < 5) {
428 isStraightLine =
true;
429 }
else if (std::abs(
pars.parameters()[4]) < 1
e-8) {
430 isStraightLine =
true;
433 if (
pars.covariance()) {
435 if (covMat.rows() < 5) {
436 isStraightLine =
true;
439 if (std::abs(covMat(4, 4)) < 1
e-20) isStraightLine =
true;
448 if (!extrapolator)
return;
453 if (!chamberHitSummary.
isMdt())
return;
458 ATH_MSG_DEBUG(
" Retrieval of MdtPrepDataCollection failed!! ");
462 if (isStraightLine) {
463 ATH_MSG_VERBOSE(
"Doing straight line extrapolation to get hits in road");
465 ATH_MSG_VERBOSE(
"Doing curved track extrapolation to get hits in road");
468 std::set<Identifier> addedIds;
472 for (; pit != pit_end; ++pit) {
482 if (
pars.associatedSurface() == surf) {
485 exPars = extrapolator->extrapolateDirectly(ctx,
490 if (isStraightLine) {
504 if (addedIds.count(
id)) {
505 ATH_MSG_DEBUG(
" same tube hit, not adding to close hits in road");
519 if (exPars != &
pars)
delete exPars;
528 <<
", setting = 0. (nhits in first projection = "
535 <<
", setting = 0. (nhits in second projection = "
◆ findMdtPrdCollection()
Definition at line 546 of file MuonTrackSummaryHelperTool.cxx.
547 const EventContext& ctx = Gaudi::Hive::currentContext();
550 if (!mdtPrdContainer.isValid()) {
555 if (!mdtPrdContainer.isPresent()) {
560 IdentifierHash hash_id;
563 const auto *coll = mdtPrdContainer->indexFindPtr(hash_id);
564 if (coll ==
nullptr) {
◆ increment()
void Muon::MuonTrackSummaryHelperTool::increment |
( |
int & |
type | ) |
|
|
staticprivate |
◆ initialize()
StatusCode Muon::MuonTrackSummaryHelperTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isFirstProjection()
bool Muon::MuonTrackSummaryHelperTool::isFirstProjection |
( |
const Identifier & |
id | ) |
const |
|
private |
◆ searchForHoles()
◆ updateHoleContent()
Definition at line 371 of file MuonTrackSummaryHelperTool.cxx.
378 const EventContext& ctx = Gaudi::Hive::currentContext();
382 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
387 int neta = isCsc ? 4 : 2;
388 int nphi = isCsc ? 4 : 2;
406 if (nMisEta > 0 && nholes > 0) {
410 if (nMisPhi > 0 && nholes > 0) {
412 if (nholes != nMisPhi) {
414 << neta <<
" phi " << nphi <<
" hits eta "
417 << nMisEta <<
" phi " << nMisPhi <<
" holes eta " << chamberHitSummary.
etaProjection().
nholes <<
" phi "
◆ m_calculateCloseHits
Gaudi::Property<bool> Muon::MuonTrackSummaryHelperTool::m_calculateCloseHits {this, "CalculateCloseHits", false} |
|
private |
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 86 of file MuonTrackSummaryHelperTool.h.
◆ m_extrapolator
◆ m_idHelperSvc
◆ m_mdtKey
◆ m_roadWidth
Gaudi::Property<double> Muon::MuonTrackSummaryHelperTool::m_roadWidth {this, "RoadWidth", 135., "width used to calculate hits within the road (mm)"} |
|
private |
◆ m_slExtrapolator
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
const Projection & phiProjection() const
access to the data of the phi projection, users have to check whether this is NOT a MDT chamber first...
Const iterator class for DataVector/DataList.
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds of the Surface by reference.
const Identifier & chamberId() const
returns the chamber identifier
Eigen::Matrix< double, 2, 1 > Vector2D
@ numberOfCscUnspoiltEtaHits
number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt).
bool isMdt() const
returns whether this is a MDT chamber
unsigned int m_npseudoMeasurements
#define ATH_MSG_VERBOSE(x)
#define AmgSymMatrix(dim)
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
structure to hold information per chamber in the muon system
std::vector< ChamberHitSummary > m_chamberHitSummary
unsigned int m_nscatterers
@ numberOfMmHits
number of TGC Eta measurements missing from the track
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Class to handle pseudo-measurements in fitters and on track objects.
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
@ FixedError
A fixed error is given to this hit (user defined via jobProperties)
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
@ Hole
A hole on the track - this is defined in the following way.
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Detailed track summary for the muon system Give access to hit counts per chamber.
Template to hold collections of MuonPrepRawData objects.
const Projection & etaProjection() const
access to the data of the eta projection, users have to check whether this is NOT a MDT chamber first...
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const =0
Extend the interface to for single inside Loc 1 / Loc2 tests.
@ numberOfStgcEtaHits
number of TGC Eta measurements missing from the track
Identifier identify() const
return the identifier
Ensure that the ATLAS eigen extensions are properly loaded.
@ StationError
A term is added to account for misaligned.
@ CscStatusUnspoiled
Clean cluster with precision fit.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
StatusCode initialize(bool used=true)
Class to represent measurements from the Monitored Drift Tubes.
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class to represent the calibrated clusters created from CSC strips.
@ numberOfStgcPhiHits
number of TGC Phi measurements missing from the track
@ CscStatusSplitUnspoiled
Clean cluster with precision fit after split cluster.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
CscClusterStatus status() const
Returns Csc position measurement status flag.
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
structure to hold the information for the eta/phi projection of RPC, TGC and CSC chambers and per mul...
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
@ numberOfMdtHits
number of mdt hits
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.