ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonR4::CombinatorialNSWSeedFinderAlg Class Reference

#include <CombinatorialNSWSeedFinderAlg.h>

Inheritance diagram for MuonR4::CombinatorialNSWSeedFinderAlg:
Collaboration diagram for MuonR4::CombinatorialNSWSeedFinderAlg:

Public Member Functions

virtual ~CombinatorialNSWSeedFinderAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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, V, H > &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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

enum  StripOrient { StripOrient::U, StripOrient::V, StripOrient::X, StripOrient::Unknown }
 Enumeration to classify the orientation of a NSW strip
More...
 
enum  HitWindow { HitWindow::tooLow, HitWindow::inside, HitWindow::tooHigh }
 To fastly check whether a hit is roughly compatible with a muon trajectory a narrow corridor is opened from the estimated beamspot to the first tested hit in the seed finding. More...
 
using HitVec = SpacePointPerLayerSplitter::HitVec
 
using HitLayVec = SpacePointPerLayerSplitter::HitLayVec
 
using HitLaySpan_t = std::vector< std::reference_wrapper< const HitVec > >
 Abbrivation of the space comprising multiple hit vectors without copy. More...
 
using UsedHitMarker_t = std::vector< std::vector< char > >
 Abbrivation of the container book keeping whether a hit is used or not. More...
 
using UsedHitSpan_t = std::vector< std::reference_wrapper< std::vector< char > >>
 Abbrivation of the container to pass a subset of markers wtihout copy. More...
 
using InitialSeed_t = std::array< const SpacePoint *, 4 >
 Abbrivation of the
More...
 
using InitialSeedVec_t = std::vector< InitialSeed_t >
 Vector of initial seeds. More...
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StripOrient classifyStrip (const SpacePoint &spacePoint) const
 Determines the orientation of the strip space point. More...
 
UsedHitMarker_t emptyBookKeeper (const HitLayVec &sortedSp) const
 Constructs an empty HitMarker from the split space points. More...
 
HitWindow hitFromIPCorridor (const SpacePoint &testHit, const Amg::Vector3D &beamSpotPos, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) const
 The hit is above the predefined corridor. More...
 
void constructPrelimnarySeeds (const Amg::Vector3D &beamSpot, const HitLaySpan_t &combinatoricLayers, const UsedHitSpan_t &usedHits, InitialSeedVec_t &outVec) const
 Construct a set of prelimnary seeds from the selected combinatoric layers. More...
 
std::unique_ptr< SegmentSeedbuildSegmentSeed (const InitialSeed_t &initialSeed, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLaySpan_t &extensionLayers, const UsedHitSpan_t &usedHits) const
 Build the final seed from the initial seed hits and then attempt to append hits from the complementary layers onto the seed. More...
 
void markHitsAsUsed (const SegmentSeed &seed, const HitLayVec &allSortHits, UsedHitMarker_t &usedHitMarker) const
 
HitVec extendHits (const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLaySpan_t &extensionLayers, const UsedHitSpan_t &usedHits) const
 
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum (const HoughMaximum &max, const ActsGeometryContext &gctx) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< EtaHoughMaxContainerm_etaKey {this, "CombinatorialReadKey", "MuonHoughNswMaxima"}
 
SG::WriteHandleKey< SegmentSeedContainerm_writeKey {this, "CombinatorialPhiWriteKey", "MuonHoughNswSegmentSeeds"}
 
SG::ReadHandleKey< ActsGeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
DoubleProperty m_windowTheta {this, "thetaWindow", 0.5 * Gaudi::Units::deg}
 
DoubleProperty m_minPullThreshold {this, "maxPull", 5.}
 
ToolHandle< MuonValR4::IPatternVisualizationToolm_visionTool {this, "VisualizationTool", ""}
 Pattern visualization tool. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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
 

Detailed Description

Definition at line 28 of file CombinatorialNSWSeedFinderAlg.h.

Member Typedef Documentation

◆ HitLaySpan_t

using MuonR4::CombinatorialNSWSeedFinderAlg::HitLaySpan_t = std::vector<std::reference_wrapper<const HitVec> >
private

Abbrivation of the space comprising multiple hit vectors without copy.

Definition at line 52 of file CombinatorialNSWSeedFinderAlg.h.

◆ HitLayVec

Definition at line 50 of file CombinatorialNSWSeedFinderAlg.h.

◆ HitVec

Definition at line 48 of file CombinatorialNSWSeedFinderAlg.h.

◆ InitialSeed_t

Abbrivation of the

Definition at line 58 of file CombinatorialNSWSeedFinderAlg.h.

◆ InitialSeedVec_t

Vector of initial seeds.

Definition at line 60 of file CombinatorialNSWSeedFinderAlg.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ UsedHitMarker_t

using MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitMarker_t = std::vector<std::vector<char> >
private

Abbrivation of the container book keeping whether a hit is used or not.

Definition at line 54 of file CombinatorialNSWSeedFinderAlg.h.

◆ UsedHitSpan_t

using MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitSpan_t = std::vector<std::reference_wrapper<std::vector<char> >>
private

Abbrivation of the container to pass a subset of markers wtihout copy.

Definition at line 56 of file CombinatorialNSWSeedFinderAlg.h.

Member Enumeration Documentation

◆ HitWindow

To fastly check whether a hit is roughly compatible with a muon trajectory a narrow corridor is opened from the estimated beamspot to the first tested hit in the seed finding.

Hits in subsequent layers need to be within this corridor in order to be considered for seed construction. The HitWindow is the output classification of such a corridor test.

Enumerator
tooLow 
inside 

The hit is below the predefined corridor.

tooHigh 

The hit is inside the defined window and hence an initial candidate.

Definition at line 69 of file CombinatorialNSWSeedFinderAlg.h.

69  {tooLow,
70  inside,
71  tooHigh};

◆ StripOrient

Enumeration to classify the orientation of a NSW strip

Enumerator

Stereo strips with positive angle.

Stereo strips with negative angle.

Unknown 

Ordinary eta strips.

Definition at line 39 of file CombinatorialNSWSeedFinderAlg.h.

39  {
40  U,
41  V,
42  X,
43  Unknown
44  };

Constructor & Destructor Documentation

◆ ~CombinatorialNSWSeedFinderAlg()

virtual MuonR4::CombinatorialNSWSeedFinderAlg::~CombinatorialNSWSeedFinderAlg ( )
virtualdefault

Member Function Documentation

◆ buildSegmentSeed()

std::unique_ptr< SegmentSeed > MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed ( const InitialSeed_t initialSeed,
const AmgSymMatrix(2)&  bMatrix,
const HoughMaximum max,
const HitLaySpan_t extensionLayers,
const UsedHitSpan_t usedHits 
) const
private

Build the final seed from the initial seed hits and then attempt to append hits from the complementary layers onto the seed.

Parameters
initialSeedReference to the hit quadruplet that may form a seed
bMatrixKernel matrix calculated from the layer configuration to construct the seed
maxRefrence to the eta maximum from which the segment seed is constructed
extensionLayersReference to the hits on the remaining layers of the detector
usedExtensionHitsRefrence to the book keeper of which of the hits on the extension was already used

Definition at line 283 of file CombinatorialNSWSeedFinderAlg.cxx.

287  {
288 
289  HitVec hits{initialSeed.begin(), initialSeed.end()};
290  std::array<double, 4> params = CombinatorialSeedSolver::defineParameters(bMatrix, hits);
291 
292  const auto [segPos, direction] = CombinatorialSeedSolver::seedSolution(hits, params);
293 
294  // check the consistency of the parameters - expected to lay in the strip's
295  // length
296  for (std::size_t i = 0; i < 4; ++i) {
297  const double halfLength = stripHalfLength(*hits[i]);
298 
299  if (std::abs(params[i]) > halfLength) {
300  ATH_MSG_VERBOSE("Seed Rejection: Invalid seed - outside of the strip's length");
301  return nullptr;
302  }
303  }
304  double tanPhi = houghTanPhi(direction);
305  double tanTheta = houghTanTheta(direction);
306 
307  double interceptX = segPos.x();
308  double interceptY = segPos.y();
309 
310 
311  // extend the seed to the segment -- include hits from the other layers too
312  auto extendedHits = extendHits(segPos, direction, extensionLayers, usedHits);
313  hits.insert(hits.end(), extendedHits.begin(), extendedHits.end());
314  return std::make_unique<SegmentSeed>(tanTheta, interceptY, tanPhi,
315  interceptX, hits.size(),
316  std::move(hits), max.parentBucket());
317 }

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ classifyStrip()

CombinatorialNSWSeedFinderAlg::StripOrient MuonR4::CombinatorialNSWSeedFinderAlg::classifyStrip ( const SpacePoint spacePoint) const
private

Determines the orientation of the strip space point.

Definition at line 90 of file CombinatorialNSWSeedFinderAlg.cxx.

90  {
91 
92  if (sp.type() == xAOD::UncalibMeasType::MMClusterType) {
93  const auto& design = getDesign(sp);
94  if (!design.hasStereoAngle()) {
95  return StripOrient::X;
96  }
97  return design.stereoAngle() > 0. ? StripOrient::U : StripOrient::V;
98  } else if (sp.type() == xAOD::UncalibMeasType::sTgcStripType) {
99  const auto* prd = static_cast<const xAOD::sTgcMeasurement*>(sp.primaryMeasurement());
100  if (sp.dimension() == 1 && prd->channelType() == sTgcIdHelper::Strip){
101  return StripOrient::X;
102  }
103  }
104  ATH_MSG_WARNING("Cannot classify orientation of "<<m_idHelperSvc->toString(sp.identify()));
105  return StripOrient::Unknown;
106 }

◆ constructPrelimnarySeeds()

void MuonR4::CombinatorialNSWSeedFinderAlg::constructPrelimnarySeeds ( const Amg::Vector3D beamSpot,
const HitLaySpan_t combinatoricLayers,
const UsedHitSpan_t usedHits,
InitialSeedVec_t outVec 
) const
private

Construct a set of prelimnary seeds from the selected combinatoric layers.

Quadruplets of hits, one from each layer, are formed if they are all within the the corridor as described above

Parameters
beamSpotPosition of the beam spot in the sector's frame
combinatoricLayersQuadruplet of four hit vectors from which the hits are retrieved
usedHitsMask marking hits that were already successfully added to a seed
outVecReference to the output vector where the initial seeds are stored. The vector is cleared at the beginning and capacity is allocated accordingly

Assign enough memory to the vector

The hit is alrady in a good seed. Don't consider again

Construct the beamspot to first hit connection to guestimate the angle

Apply cut window on theta of the seed.

Definition at line 181 of file CombinatorialNSWSeedFinderAlg.cxx.

184  {
186  seedHitsFromLayers.clear();
187  std::size_t maxSize{1};
188  for (const HitVec& hitVec : combinatoricLayers) {
189  maxSize = maxSize * hitVec.size();
190  }
191  seedHitsFromLayers.reserve(maxSize);
192 
193 
194  unsigned int iterLay0{0}, iterLay1{0}, iterLay2{0}, iterLay3{0};
195  unsigned int startLay1{0}, startLay2{0}, startLay3{0};
196 
197  for( ; iterLay0 < combinatoricLayers[0].get().size() ; ++iterLay0){
199  if (usedHits[0].get()[iterLay0]) {
200  continue;
201  }
202  const SpacePoint* hit0 = combinatoricLayers[0].get()[iterLay0];
204  const Amg::Vector3D initSeedDir{(beamSpot - hit0->positionInChamber()).unit()};
205  const Amg::Vector3D dirEstUp = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() - m_windowTheta);
206  const Amg::Vector3D dirEstDn = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() + m_windowTheta);
207 
208  ATH_MSG_VERBOSE("Reference hit: "<<m_idHelperSvc->toString(hit0->identify())
209  <<", position: "<<Amg::toString(hit0->positionInChamber())
210  <<", seed dir: "<<Amg::toString(initSeedDir)
211  <<", seed plane: "<<Amg::toString(extrapolateToPlane(beamSpot, initSeedDir, *hit0)));
213  for( iterLay1 = startLay1; iterLay1 < combinatoricLayers[1].get().size() ; ++iterLay1){
214  TEST_HIT_CORRIDOR(1, iterLay1, startLay1);
215  for( iterLay2 = startLay2; iterLay2 < combinatoricLayers[2].get().size() ; ++iterLay2){
216  TEST_HIT_CORRIDOR(2, iterLay2, startLay2);
217  for( iterLay3 = startLay3; iterLay3 < combinatoricLayers[3].get().size(); ++iterLay3){
218  TEST_HIT_CORRIDOR(3, iterLay3, startLay3);
219  seedHitsFromLayers.emplace_back(std::array{hit0, combinatoricLayers[1].get()[iterLay1],
220  combinatoricLayers[2].get()[iterLay2],
221  combinatoricLayers[3].get()[iterLay3]});
222  }
223  }
224  }
225  }
226 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ emptyBookKeeper()

CombinatorialNSWSeedFinderAlg::UsedHitMarker_t MuonR4::CombinatorialNSWSeedFinderAlg::emptyBookKeeper ( const HitLayVec sortedSp) const
private

Constructs an empty HitMarker from the split space points.

Parameters
sortedSpList of space points sorted by layer

Definition at line 81 of file CombinatorialNSWSeedFinderAlg.cxx.

81  {
82  UsedHitMarker_t emptyKeeper(sortedSp.size());
83  for (std::size_t l = 0; l < sortedSp.size(); ++l) {
84  emptyKeeper[l].resize(sortedSp[l].size(), 0);
85  }
86  return emptyKeeper;
87 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode MuonR4::CombinatorialNSWSeedFinderAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 432 of file CombinatorialNSWSeedFinderAlg.cxx.

432  {
433  // read the inputs
434  const EtaHoughMaxContainer *maxima{nullptr};
435  ATH_CHECK(SG::get( maxima, m_etaKey, ctx));
436 
437  const ActsGeometryContext *gctx{nullptr};
438  ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
439 
440  // prepare our output collection
441  SG::WriteHandle writeMaxima{m_writeKey, ctx};
442  ATH_CHECK(writeMaxima.record(std::make_unique<SegmentSeedContainer>()));
443 
444  // we use the information from the previous eta-hough transform
445  // to get the combined hits that belong in the same maxima
446  for (const HoughMaximum *max : *maxima) {
447  std::vector<std::unique_ptr<SegmentSeed>> seeds = findSeedsFromMaximum(*max, *gctx);
448  if (msgLvl(MSG::VERBOSE)) {
449  for(const auto& hitMax : max->getHitsInMax()){
450  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hitMax->identify())<<", "
451  <<Amg::toString(hitMax->positionInChamber())<<", dir: "
452  <<Amg::toString(hitMax->directionInChamber()));
453  }
454  }
455  for (auto &seed : seeds) {
456  if (msgLvl(MSG::VERBOSE)){
457  std::stringstream sstr{};
458  sstr<<"Seed tanTheta = "<<seed->tanTheta()<<", y0 = "<<seed->interceptY()
459  <<", tanPhi = "<<seed->tanPhi()<<", x0 = "<<seed->interceptX()<<", hits in the seed "
460  <<seed->getHitsInMax().size()<<std::endl;
461 
462  for(const auto& hit : seed->getHitsInMax()){
463  sstr<<" *** Hit "<<m_idHelperSvc->toString(hit->identify())<<", "
464  << Amg::toString(hit->positionInChamber())<<", dir: "<<Amg::toString(hit->directionInChamber())<<std::endl;
465  }
466  ATH_MSG_VERBOSE(sstr.str());
467  }
468  if (m_visionTool.isEnabled()) {
469  m_visionTool->visualizeSeed(ctx, *seed, "#phi-combinatorialSeed");
470  }
471  writeMaxima->push_back(std::move(seed));
472  }
473  }
474  return StatusCode::SUCCESS;
475 }

◆ extendHits()

CombinatorialNSWSeedFinderAlg::HitVec MuonR4::CombinatorialNSWSeedFinderAlg::extendHits ( const Amg::Vector3D startPos,
const Amg::Vector3D direction,
const HitLaySpan_t extensionLayers,
const UsedHitSpan_t usedHits 
) const
private

Definition at line 230 of file CombinatorialNSWSeedFinderAlg.cxx.

233  {
234 
235  //the hits we need to return to extend the segment seed
236  HitVec combinatoricHits;
237 
238  //the stripHitsLayers are already the unused ones - only use for the extension
239  for (std::size_t i = 0; i < extensionLayers.size(); ++i) {
240  const HitVec& layer{extensionLayers[i].get()};
241  const Amg::Vector3D extrapPos = extrapolateToPlane(startPos, direction, *layer.front());
242 
243  unsigned int indexOfHit = layer.size() + 1;
244  unsigned int triedHit{0};
245  double minPull{std::numeric_limits<double>::max()};
246 
247  // loop over the hits on the same layer
248  for (unsigned int j = 0; j < layer.size(); ++j) {
249  if (usedHits[i].get().at(j)) {
250  continue;
251  }
252  auto hit = layer.at(j);
253  double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(extrapPos, direction, *hit, msg()));
254  ATH_MSG_VERBOSE("Trying extension with hit " << m_idHelperSvc->toString(hit->identify()));
255 
256  //find the hit with the minimum pull (check at least one hit after we have increasing pulls)
257  if (pull > minPull) {
258  triedHit+=1;
259  continue;
260  }
261 
262  if(triedHit>1){
263  break;
264  }
265 
266  indexOfHit = j;
267  minPull = pull;
268  }
269 
270  // complete the seed with the extended hits
271  if (minPull < m_minPullThreshold) {
272  const auto* bestCand = layer.at(indexOfHit);
273  ATH_MSG_VERBOSE("Extension successfull - hit" << m_idHelperSvc->toString(bestCand->identify())
274  <<", pos: "<<Amg::toString(bestCand->positionInChamber())
275  <<", dir: "<<Amg::toString(bestCand->directionInChamber())<<" found with pull "<<minPull);
276  combinatoricHits.push_back(bestCand);
277  }
278  }
279  return combinatoricHits;
280 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ findSeedsFromMaximum()

std::vector< std::unique_ptr< SegmentSeed > > MuonR4::CombinatorialNSWSeedFinderAlg::findSeedsFromMaximum ( const HoughMaximum max,
const ActsGeometryContext gctx 
) const
private

Definition at line 321 of file CombinatorialNSWSeedFinderAlg.cxx.

321  {
322  // first sort the hits per layer from the maximum
323  SpacePointPerLayerSplitter hitLayers{max.getHitsInMax()};
324 
325  const HitLayVec& stripHitsLayers{hitLayers.stripHits()};
326  const std::size_t layerSize = stripHitsLayers.size();
327 
328  std::vector<std::unique_ptr<SegmentSeed>> seeds{};
329 
330 
331  if (layerSize < minLayers) {
332  ATH_MSG_VERBOSE("Not enough layers to build a seed");
333  return seeds;
334  }
335 
336 
337  if (m_visionTool.isEnabled()) {
339  const auto truthHits = getMatchingSimHits(max.getHitsInMax());
340  constexpr double legX{0.2};
341  double legY{0.8};
342  for (const SpacePoint* sp : max.getHitsInMax()) {
343  const auto* mmClust = static_cast<const xAOD::MMCluster*>(sp->primaryMeasurement());
344  const xAOD::MuonSimHit* simHit = getTruthMatchedHit(*mmClust);
345  if (!simHit || !MC::isMuon(simHit)) continue;
346  const MuonGMR4::MmReadoutElement* reEle = mmClust->readoutElement();
347  const MuonGMR4::StripDesign& design = reEle->stripLayer(mmClust->measurementHash()).design();
348  const Amg::Transform3D toChamb = reEle->msSector()->globalToLocalTrans(gctx) *
349  reEle->localToGlobalTrans(gctx, simHit->identify());
350  const Amg::Vector3D hitPos = toChamb * xAOD::toEigen(simHit->localPosition());
351  const Amg::Vector3D hitDir = toChamb.linear() * xAOD::toEigen(simHit->localDirection());
352 
353  const double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(hitPos,hitDir, *sp, msgStream()));
354  const double pull2 = (mmClust->localPosition<1>().x() - simHit->localPosition().x()) / std::sqrt(mmClust->localCovariance<1>().x());
355  primitives.push_back(MuonValR4::drawLabel(std::format("ml: {:1d}, gap: {:1d}, {:}, pull: {:.2f} / {:.2f}", reEle->multilayer(), mmClust->gasGap(),
356  !design.hasStereoAngle() ? "X" : design.stereoAngle() >0 ? "U": "V",pull, pull2),legX,legY,14));
357  legY-=0.05;
358  }
359  m_visionTool->visualizeBucket(Gaudi::Hive::currentContext(), *max.parentBucket(),
360  "truth", std::move(primitives));
361  }
362 
363  UsedHitMarker_t allUsedHits = emptyBookKeeper(stripHitsLayers);
364  const Amg::Transform3D globToLocal = max.msSector()->globalToLocalTrans(gctx);
365  std::array<const SpacePoint*, 4> seedHits{};
366 
367  InitialSeedVec_t preLimSeeds{};
368 
369  for (std::size_t i = 0; i < layerSize - 3; ++i) {
370  seedHits[0] = stripHitsLayers[i].front();
371  for (std::size_t j = i + 1; j < layerSize - 2; ++j) {
372  seedHits[1] = stripHitsLayers[j].front();
373  for (std::size_t k = j + 1; k < layerSize - 1; ++k) {
374  seedHits[2] = stripHitsLayers[k].front();
375  for (std::size_t l = k + 1; l < layerSize; ++l) {
376  seedHits[3] = stripHitsLayers[l].front();
377  AmgSymMatrix(2) bMatrix = CombinatorialSeedSolver::betaMatrix(seedHits);
378  if (std::abs(bMatrix.determinant()) < 1.e-6) {
379  continue;
380  }
381 
382  const HitLaySpan_t layers{stripHitsLayers[i], stripHitsLayers[j], stripHitsLayers[k], stripHitsLayers[l]};
383  UsedHitSpan_t usedHits{allUsedHits[i], allUsedHits[j], allUsedHits[k], allUsedHits[l]};
384  // each layer may have more than one hit - take the hit combinations
385  constructPrelimnarySeeds(globToLocal.translation(), layers, usedHits, preLimSeeds);
386 
387  //the layers not participated in the seed build - gonna be used for the extension
388  HitLaySpan_t extensionLayers{};
389  UsedHitSpan_t usedExtensionHits{};
390  usedExtensionHits.reserve(stripHitsLayers.size());
391  extensionLayers.reserve(stripHitsLayers.size());
392  for (std::size_t e = 0 ; e < stripHitsLayers.size(); ++e) {
393  if (!(e == i || e == j || e == k || e == l)){
394  extensionLayers.emplace_back(stripHitsLayers[e]);
395  usedExtensionHits.emplace_back(allUsedHits[e]);
396  }
397  }
398  // we have made sure to have hits from all the four layers -
399  // start by 4 hits for the seed and try to build the seed for the combinatorics found
400  for (auto &combinatoricHits : preLimSeeds) {
401  auto seed = buildSegmentSeed(combinatoricHits, bMatrix, max, extensionLayers, usedExtensionHits);
402  if (seed) {
403  markHitsAsUsed(*seed,stripHitsLayers, allUsedHits);
404  seeds.push_back(std::move(seed));
405  }
406  }
407  }
408  }
409  }
410  }
411 
412  return seeds;
413 }

◆ hitFromIPCorridor()

CombinatorialNSWSeedFinderAlg::HitWindow MuonR4::CombinatorialNSWSeedFinderAlg::hitFromIPCorridor ( const SpacePoint testHit,
const Amg::Vector3D beamSpotPos,
const Amg::Vector3D dirEstUp,
const Amg::Vector3D dirEstDn 
) const
inlineprivate

The hit is above the predefined corridor.

Tests whether a hit is inside the corridor defined by line connecting the centre of the first candidate hit in the seed and the beam spot. The theta angle is varied by m_windowTheta to define the lower & upper direction etimate. The function tests whether the strip then crosses the corridor.

Parameters
testHitReference to the hit to test
beamSpotPosPosition of the beam spot serving as starting point
dirEstUpDirection vector defining the upper limit of the corridor
dirEstDnDirection vector defining the lower limit of the corridor

Calculate the strip edges

Check whether the both edges are below the lower estimated muon arrival

Analogous check for the upper edge

No extrapolation needed

Analogous check for the upper edge

Definition at line 108 of file CombinatorialNSWSeedFinderAlg.cxx.

111  {
112 
113  const Amg::Vector3D estPlaneArrivalUp = extrapolateToPlane(beamSpotPos, dirEstUp, testHit);
114  const Amg::Vector3D estPlaneArrivalDn = extrapolateToPlane(beamSpotPos, dirEstDn, testHit);
115 
116  bool below{true}, above{true};
117  switch (classifyStrip(testHit)) {
118  using enum StripOrient;
119  case U:
120  case V:{
121  const double halfLength = 0.5* stripHalfLength(testHit);
123  const Amg::Vector3D leftEdge = testHit.positionInChamber() - halfLength * testHit.directionInChamber();
124  const Amg::Vector3D rightEdge = testHit.positionInChamber() + halfLength * testHit.directionInChamber();
125 
127  below = estPlaneArrivalDn.y() > std::max(leftEdge.y(), rightEdge.y());
129  above = estPlaneArrivalUp.y() < std::min(leftEdge.y(), rightEdge.y());
130  break;
131  } case X: {
133  const double hY = testHit.positionInChamber().y();
134  below = estPlaneArrivalDn.y() > hY;
136  above = estPlaneArrivalUp.y() < hY;
137  break;
138  }
139  case Unknown:{
140  break;
141  }
142 
143  }
144  ATH_MSG_VERBOSE("Hit " << m_idHelperSvc->toString(testHit.identify())
145  << (below || above ? " is outside the window" : " is inside the window"));
146  if(below) {
147  return HitWindow::tooLow;
148  }
149  if(above) {
150  return HitWindow::tooHigh;
151  }
152  return HitWindow::inside;
153 };

◆ initialize()

StatusCode MuonR4::CombinatorialNSWSeedFinderAlg::initialize ( )
overridevirtual

Definition at line 65 of file CombinatorialNSWSeedFinderAlg.cxx.

65  {
67  ATH_CHECK(m_etaKey.initialize());
68  ATH_CHECK(m_writeKey.initialize());
69  ATH_CHECK(m_idHelperSvc.retrieve());
70  ATH_CHECK(m_visionTool.retrieve(DisableTool{m_visionTool.empty()}));
71 
72  if (!(m_idHelperSvc->hasMM() || m_idHelperSvc->hasSTGC())) {
73  ATH_MSG_ERROR("MM or STGC not part of initialized detector layout");
74  return StatusCode::FAILURE;
75  }
76 
77  return StatusCode::SUCCESS;
78 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ markHitsAsUsed()

void MuonR4::CombinatorialNSWSeedFinderAlg::markHitsAsUsed ( const SegmentSeed seed,
const HitLayVec allSortHits,
UsedHitMarker_t usedHitMarker 
) const
private

That's ultra slow & should be revised

Definition at line 414 of file CombinatorialNSWSeedFinderAlg.cxx.

416  {
418  for (const auto* sp : seed.getHitsInMax()) {
419  bool found{false};
420  for (std::size_t lIdx = 0; !found && lIdx < allSortHits.size(); ++lIdx) {
421  const HitVec& hVec{allSortHits[lIdx]};
422  for (std::size_t hIdx = 0 ; hIdx < hVec.size(); ++hIdx) {
423  if (hVec[hIdx] == sp) {
424  usedHitMarker[lIdx][hIdx] = true;
425  found = true;
426  break;
427  }
428  }
429  }
430  }
431 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etaKey

SG::ReadHandleKey<EtaHoughMaxContainer> MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey {this, "CombinatorialReadKey", "MuonHoughNswMaxima"}
private

Definition at line 118 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsGeometryContext> MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Definition at line 124 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 127 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_minPullThreshold

DoubleProperty MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold {this, "maxPull", 5.}
private

Definition at line 138 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_visionTool

ToolHandle<MuonValR4::IPatternVisualizationTool> MuonR4::CombinatorialNSWSeedFinderAlg::m_visionTool {this, "VisualizationTool", ""}
private

Pattern visualization tool.

Definition at line 141 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_windowTheta

DoubleProperty MuonR4::CombinatorialNSWSeedFinderAlg::m_windowTheta {this, "thetaWindow", 0.5 * Gaudi::Units::deg}
private

Definition at line 135 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_writeKey

SG::WriteHandleKey<SegmentSeedContainer> MuonR4::CombinatorialNSWSeedFinderAlg::m_writeKey {this, "CombinatorialPhiWriteKey", "MuonHoughNswSegmentSeeds"}
private

Definition at line 121 of file CombinatorialNSWSeedFinderAlg.h.


The documentation for this class was generated from the following files:
MuonR4::minLayers
constexpr unsigned int minLayers
Definition: CombinatorialNSWSeedFinderAlg.cxx:63
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonGMR4::StripDesign::stereoAngle
double stereoAngle() const
Returns the value of the stereo angle.
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:18
MuonGMR4::StripDesign
Definition: StripDesign.h:30
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonGMR4::MuonReadoutElement::msSector
const SpectrometerSector * msSector() const
Returns the pointer to the envelope volume enclosing all chambers in the sector.
xAOD::MuonSimHit_v1::identify
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Definition: xAODMuonSimHit_V1.cxx:42
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonR4::CombinatorialNSWSeedFinderAlg::extendHits
HitVec extendHits(const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLaySpan_t &extensionLayers, const UsedHitSpan_t &usedHits) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:230
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed
std::unique_ptr< SegmentSeed > buildSegmentSeed(const InitialSeed_t &initialSeed, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLaySpan_t &extensionLayers, const UsedHitSpan_t &usedHits) const
Build the final seed from the initial seed hits and then attempt to append hits from the complementar...
Definition: CombinatorialNSWSeedFinderAlg.cxx:283
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonR4::CombinatorialNSWSeedFinderAlg::constructPrelimnarySeeds
void constructPrelimnarySeeds(const Amg::Vector3D &beamSpot, const HitLaySpan_t &combinatoricLayers, const UsedHitSpan_t &usedHits, InitialSeedVec_t &outVec) const
Construct a set of prelimnary seeds from the selected combinatoric layers.
Definition: CombinatorialNSWSeedFinderAlg.cxx:181
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:113
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
sTgcIdHelper::Strip
@ Strip
Definition: sTgcIdHelper.h:190
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient::Unknown
@ Unknown
Ordinary eta strips.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonR4::CombinatorialNSWSeedFinderAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: CombinatorialNSWSeedFinderAlg.h:141
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
MuonR4::CombinatorialNSWSeedFinderAlg::classifyStrip
StripOrient classifyStrip(const SpacePoint &spacePoint) const
Determines the orientation of the strip space point.
Definition: CombinatorialNSWSeedFinderAlg.cxx:90
x
#define x
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient::X
@ X
Stereo strips with negative angle.
MuonValR4::drawLabel
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
Definition: VisualizationHelpers.cxx:32
MuonR4::CombinatorialNSWSeedFinderAlg::HitWindow::inside
@ inside
The hit is below the predefined corridor.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonR4::SegmentFitHelpers::extrapolateToPlane
Amg::Vector3D extrapolateToPlane(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const SpacePoint &hit)
Extrapolates the segment line onto the plane defined by the by the space-point's position & plane nor...
Definition: SegmentFitHelperFunctions.cxx:76
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
MuonR4::houghTanPhi
double houghTanPhi(const Amg::Vector3D &v)
: Returns the hough tanPhi [x] / [z]
Definition: SegmentFitterEventData.cxx:18
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MuonR4::CombinatorialNSWSeedFinderAlg::InitialSeedVec_t
std::vector< InitialSeed_t > InitialSeedVec_t
Vector of initial seeds.
Definition: CombinatorialNSWSeedFinderAlg.h:60
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
MuonR4::SegmentFitHelpers::chiSqTermStrip
double chiSqTermStrip(const Amg::Vector3D &posInChamber, const Amg::Vector3D &dirInChamber, const SpacePoint &measurement, MsgStream &msg)
Calculates the chi2 contribuation to a linear segment line from an uncalibrated strip measurement.
Definition: SegmentFitHelperFunctions.cxx:82
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: CombinatorialNSWSeedFinderAlg.h:124
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
MuonGMR4::MmReadoutElement::multilayer
int multilayer() const
Returns the multi layer of the element [1-2].
MuonR4::CombinatorialNSWSeedFinderAlg::HitLayVec
SpacePointPerLayerSplitter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:50
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonR4::CombinatorialNSWSeedFinderAlg::HitWindow::tooHigh
@ tooHigh
The hit is inside the defined window and hence an initial candidate.
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
MuonGMR4::SpectrometerSector::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
Definition: SpectrometerSector.cxx:78
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient::U
@ U
MuonR4::CombinatorialNSWSeedFinderAlg::m_writeKey
SG::WriteHandleKey< SegmentSeedContainer > m_writeKey
Definition: CombinatorialNSWSeedFinderAlg.h:121
MuonR4::CombinatorialSeedSolver::seedSolution
requires acceptedContainer< spacePointContainer > &&hasPointerValues< spacePointContainer > std::pair< Amg::Vector3D, Amg::Vector3D > seedSolution(const spacePointContainer &spacePoints, const std::array< double, 4 > &parameters)
solves the equation system to calculate the seed
Definition: CombinatorialSeedSolver.h:127
TEST_HIT_CORRIDOR
#define TEST_HIT_CORRIDOR(LAYER, HIT_ITER, START_LAYER)
Macro to check whether a hit is compatible with the hit corridor.
Definition: CombinatorialNSWSeedFinderAlg.cxx:156
MuonR4::CombinatorialNSWSeedFinderAlg::emptyBookKeeper
UsedHitMarker_t emptyBookKeeper(const HitLayVec &sortedSp) const
Constructs an empty HitMarker from the split space points.
Definition: CombinatorialNSWSeedFinderAlg.cxx:81
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:305
xAOD::MuonSimHit_v1::localDirection
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:66
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitMarker_t
std::vector< std::vector< char > > UsedHitMarker_t
Abbrivation of the container book keeping whether a hit is used or not.
Definition: CombinatorialNSWSeedFinderAlg.h:54
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonR4::CombinatorialNSWSeedFinderAlg::HitWindow::tooLow
@ tooLow
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonGMR4::StripLayer::design
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
lumiFormat.array
array
Definition: lumiFormat.py:91
MuonGMR4::MmReadoutElement::stripLayer
const StripLayer & stripLayer(const Identifier &measId) const
MuonR4::CombinatorialNSWSeedFinderAlg::UsedHitSpan_t
std::vector< std::reference_wrapper< std::vector< char > >> UsedHitSpan_t
Abbrivation of the container to pass a subset of markers wtihout copy.
Definition: CombinatorialNSWSeedFinderAlg.h:56
MuonR4::CombinatorialNSWSeedFinderAlg::m_windowTheta
DoubleProperty m_windowTheta
Definition: CombinatorialNSWSeedFinderAlg.h:135
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MuonValR4::IPatternVisualizationTool::PrimitiveVec
std::vector< PrimitivePtr > PrimitiveVec
Definition: IPatternVisualizationTool.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient::V
@ V
Stereo strips with positive angle.
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CombinatorialNSWSeedFinderAlg.h:127
MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey
SG::ReadHandleKey< EtaHoughMaxContainer > m_etaKey
Definition: CombinatorialNSWSeedFinderAlg.h:118
MuonR4::CombinatorialNSWSeedFinderAlg::StripOrient
StripOrient
Enumeration to classify the orientation of a NSW strip
Definition: CombinatorialNSWSeedFinderAlg.h:39
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
MuonR4::CombinatorialNSWSeedFinderAlg::markHitsAsUsed
void markHitsAsUsed(const SegmentSeed &seed, const HitLayVec &allSortHits, UsedHitMarker_t &usedHitMarker) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:414
Trk::inside
@ inside
Definition: PropDirection.h:29
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonR4::CombinatorialSeedSolver::defineParameters
requires acceptedContainer< spacePointContainer > &&hasPointerValues< spacePointContainer > std::array< double, 4 > defineParameters(AmgSymMatrix(2) betaMatrix, const spacePointContainer &spacePoints)
calculates the parameters lamda,alpha,gamma,kappa of the system
Definition: CombinatorialSeedSolver.h:97
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
MuonR4::CombinatorialNSWSeedFinderAlg::HitVec
SpacePointPerLayerSplitter::HitVec HitVec
Definition: CombinatorialNSWSeedFinderAlg.h:48
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MuonGMR4::MuonReadoutElement::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonReadoutElement.cxx:81
MuonR4::getTruthMatchedHit
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
Definition: MuonSimHitHelpers.cxx:16
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:475
MuonGMR4::StripDesign::hasStereoAngle
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
MuonR4::EtaHoughMaxContainer
DataVector< HoughMaximum > EtaHoughMaxContainer
Definition: MuonPatternContainer.h:14
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
MuonR4::AmgSymMatrix
const AmgSymMatrix(2) &SpacePoint
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:90
MuonR4::CombinatorialNSWSeedFinderAlg::HitLaySpan_t
std::vector< std::reference_wrapper< const HitVec > > HitLaySpan_t
Abbrivation of the space comprising multiple hit vectors without copy.
Definition: CombinatorialNSWSeedFinderAlg.h:52
MuonR4::houghTanTheta
double houghTanTheta(const Amg::Vector3D &v)
Returns the hough tanTheta [y] / [z].
Definition: SegmentFitterEventData.cxx:14
MuonR4::CombinatorialNSWSeedFinderAlg::findSeedsFromMaximum
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum(const HoughMaximum &max, const ActsGeometryContext &gctx) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:321
MuonR4::getMatchingSimHits
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Definition: MuonSimHitHelpers.cxx:27
fitman.k
k
Definition: fitman.py:528
xAOD::sTgcMeasurement_v1
Definition: sTgcMeasurement_v1.h:21
ServiceHandle< ICondSvc >
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:202
MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold
DoubleProperty m_minPullThreshold
Definition: CombinatorialNSWSeedFinderAlg.h:138