31 declareInterface<ITrackSummaryHelperTool>(
this);
40 return StatusCode::SUCCESS;
45 std::bitset<Trk::numberOfDetectorTypes>& )
const {
87 std::bitset<Trk::numberOfDetectorTypes>& hitPattern)
const {
89 std::set<Identifier> layIds;
94 std::pair<std::set<Identifier>::iterator,
bool> pr = layIds.insert(layId);
97 ATH_MSG_DEBUG(
"Have found hit on new layer. # of layers for this cROT currently=" << layIds.size());
98 analyse(trk, rot, tsos, information, hitPattern);
112 ATH_MSG_WARNING(
"searchForHoles is not implemented in MuonTrackSummaryHelperTool");
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");
132 if (!states || states->empty()) {
return; }
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();
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;
254 }
else if (mmClusterOnTrack) {
262 layIds.insert(layId);
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;
341 double rTrack = std::abs(pars->parameters()[
Trk::locR]);
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);
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 "
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]) < 1e-8) {
430 isStraightLine =
true;
433 if (pars.covariance()) {
435 if (covMat.rows() < 5) {
436 isStraightLine =
true;
439 if (std::abs(covMat(4, 4)) < 1e-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) {
490 if (isStraightLine) {
500 double distance = exPars->parameters()[
Trk::locR];
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 = "
547 const EventContext& ctx = Gaudi::Hive::currentContext();
550 if (!mdtPrdContainer.
isValid()) {
563 const auto *coll = mdtPrdContainer->indexFindPtr(hash_id);
564 if (coll ==
nullptr) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define AmgSymMatrix(dim)
Handle class for reading from StoreGate.
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
const_iterator begin() const noexcept
This is a "hash" representation of an Identifier.
bool is_valid() const
Check if id is in a valid state.
bool insideActiveBounds(const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
Class for competing MuonClusters, it extends the Trk::CompetingRIOsOnTrack base class.
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Class to represent the calibrated clusters created from CSC strips.
CscClusterStatus status() const
Returns Csc position measurement status flag.
Class to represent calibrated clusters formed from TGC strips.
virtual const MuonGM::MMReadoutElement * detectorElement() const
Returns the detector element, assoicated with the PRD of this class.
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
const MuonDriftCircleErrorStrategy & errorStrategy() const
Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making th...
Class to represent measurements from the Monitored Drift Tubes.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
bool creationParameter(CreationParameter) const
@ StationError
A term is added to account for misaligned.
@ FixedError
A fixed error is given to this hit (user defined via jobProperties)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isPresent() const
Is the referenced object present in SG?
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
This class is the pure abstract base class for all fittable tracking measurements.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
Detailed track summary for the muon system Give access to hit counts per chamber.
std::vector< ChamberHitSummary > m_chamberHitSummary
unsigned int m_nscatterers
unsigned int m_npseudoMeasurements
Identifier identify() const
return the identifier
Class to handle pseudo-measurements in fitters and on track objects.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Identifier identify() const
return the identifier -extends MeasurementBase
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds of the Surface by reference.
virtual bool insideLoc2(const Amg::Vector2D &locpo, double tol2=0.) const =0
Extend the interface to for single inside Loc 1 / Loc2 tests.
Abstract Base Class for tracking surfaces.
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...
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
represents the track state (measurement, material, fit parameters and quality) at a surface.
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
@ Hole
A hole on the track - this is defined in the following way.
A summary of the information contained by a track.
Eigen::Matrix< double, 2, 1 > Vector2D
@ CscStatusUnspoiled
Clean cluster with precision fit.
@ CscStatusSplitUnspoiled
Clean cluster with precision fit after split cluster.
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ numberOfMmHits
number of TGC Eta measurements missing from the track
@ numberOfStgcEtaHits
number of TGC Eta measurements missing from the track
@ numberOfMdtHits
number of mdt hits
@ numberOfStgcPhiHits
number of TGC Phi measurements missing from the track
@ numberOfCscUnspoiltEtaHits
number of unspoilt CSC eta measurements (all CSC phi measurements are by definition spoilt).
structure to hold the information for the eta/phi projection of RPC, TGC and CSC chambers and per mul...
structure to hold information per chamber in the muon system
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 Projection & etaProjection() const
access to the data of the eta projection, users have to check whether this is NOT a MDT chamber first...
const Identifier & chamberId() const
returns the chamber identifier
bool isMdt() const
returns whether this is a MDT chamber