Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 > &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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::unique_ptr< SegmentSeedbuildSegmentSeed (HitVec &hits, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLayVec &extensionLayers) const
 
HitVec extendHits (const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLayVec &stripHitsLayers) const
 
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum (const HoughMaximum &max, const ActsGeometryContext &gctx) const
 
HitLayVec findCombinatoricHits (const Amg::Vector3D &beamSpot, const HitLayVec &combinatoricLayers) const
 
HitWindow findHitInWindow (const Amg::Vector3D &startPos, const SpacePoint *testHit, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) 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...
 

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"}
 
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
 
DoubleProperty m_windowTheta {this, "m_windowTheta", 0.5 * Gaudi::Units::deg}
 
DoubleProperty m_minPullThreshold {this, "m_minPullThreshold", 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 39 of file CombinatorialNSWSeedFinderAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~CombinatorialNSWSeedFinderAlg()

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

Member Function Documentation

◆ buildSegmentSeed()

std::unique_ptr< SegmentSeed > MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed ( HitVec hits,
const AmgSymMatrix(2)&  bMatrix,
const HoughMaximum max,
const HitLayVec extensionLayers 
) const
private

Definition at line 200 of file CombinatorialNSWSeedFinderAlg.cxx.

203  {
204  // we require at least four hits for the seeding
205  if (hits.size() != minLayers) {
206  ATH_MSG_VERBOSE("Seed Rejection: Wrong number of initial layers for seeding --they should be four");
207  return nullptr;
208  }
209 
210  std::array<double, 4> params = CombinatorialSeedSolver::defineParameters(bMatrix, hits);
211 
212  const auto [segPos, direction] = CombinatorialSeedSolver::seedSolution(hits, params);
213 
214  double tanPhi = houghTanPhi(direction);
215  double tanTheta = houghTanTheta(direction);
216 
217  double interceptX = segPos.x();
218  double interceptY = segPos.y();
219  // check the consistency of the parameters - expected to lay in the strip's
220  // length
221  for (std::size_t i = 0; i < 4; i++) {
222  const xAOD::UncalibratedMeasurement *primaryMeas = hits[i]->primaryMeasurement();
223 
224  if (primaryMeas->type() == xAOD::UncalibMeasType::MMClusterType) {
225  const auto *clust = static_cast<const xAOD::MMCluster *>(primaryMeas);
226 
227  double halfLength = 0.5 * clust->readoutElement()->stripLayer(clust->measurementHash()).design().stripLength(clust->channelNumber());
228 
229  if (std::abs(params[i]) > halfLength) {
230  ATH_MSG_VERBOSE("Seed Rejection: Invalid seed - outside of the strip's length");
231  return nullptr;
232  }
233  }
234  }
235 
236  // extend the seed to the segment -- include hits from the other layers too
237  auto extendedHits = extendHits(segPos, direction, extensionLayers);
238  hits.insert(hits.end(), extendedHits.begin(), extendedHits.end());
239  return std::make_unique<SegmentSeed>(tanTheta, interceptY, tanPhi,
240  interceptX, hits.size(),
241  std::move(hits), max.parentBucket());
242 }

◆ 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 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  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; }

◆ 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 336 of file CombinatorialNSWSeedFinderAlg.cxx.

336  {
337  // read the inputs
338  const EtaHoughMaxContainer *maxima{nullptr};
339  ATH_CHECK(SG::get( maxima, m_etaKey, ctx));
340 
341  const ActsGeometryContext *gctx{nullptr};
342  ATH_CHECK(SG::get(gctx, m_geoCtxKey, ctx));
343 
344  // prepare our output collection
345  SG::WriteHandle writeMaxima{m_writeKey, ctx};
346  ATH_CHECK(writeMaxima.record(std::make_unique<SegmentSeedContainer>()));
347 
348  // we use the information from the previous eta-hough transform
349  // to get the combined hits that belong in the same maxima
350  for (const HoughMaximum *max : *maxima) {
351  std::vector<std::unique_ptr<SegmentSeed>> seeds = findSeedsFromMaximum(*max, *gctx);
352 
353  for(const auto& hitMax : max->getHitsInMax()){
354  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hitMax->identify())<<", "
355  <<Amg::toString(hitMax->positionInChamber())<<", dir: "<<Amg::toString(hitMax->directionInChamber()));
356  }
357 
358  for (auto &seed : seeds) {
359  ATH_MSG_VERBOSE("Seed tanTheta = "<<seed->tanTheta()<<", y0 = "<<seed->interceptY()
360  <<", tanPhi = "<<seed->tanPhi()<<", x0 = "<<seed->interceptX()<<", hits in the seed "<<seed->getHitsInMax().size());
361 
362  for(const auto& hit : seed->getHitsInMax()){
363  ATH_MSG_VERBOSE("Hit "<<m_idHelperSvc->toString(hit->identify())<<", "
364  <<Amg::toString(hit->positionInChamber())<<", dir: "<<Amg::toString(hit->directionInChamber()));
365  }
366  if (m_visionTool.isEnabled()) {
367  m_visionTool->visualizeSeed(ctx, *seed, "#phi-combinatorialSeed");
368  }
369  writeMaxima->push_back(std::move(seed));
370  }
371  }
372 
373 
374  return StatusCode::SUCCESS;
375 }

◆ extendHits()

HitVec MuonR4::CombinatorialNSWSeedFinderAlg::extendHits ( const Amg::Vector3D startPos,
const Amg::Vector3D direction,
const HitLayVec stripHitsLayers 
) const
private

Definition at line 151 of file CombinatorialNSWSeedFinderAlg.cxx.

153  {
154 
155  //the hits we need to return to extend the segment seed
156  HitVec combinatoricHits;
157 
158  //the stripHitsLayers are already the unused ones - only use for the extension
159  for (unsigned int i = 0; i < stripHitsLayers.size(); i++) {
160 
161  double offset = stripHitsLayers[i].front()->positionInChamber().dot(stripHitsLayers[i].front()->planeNormal());
162  const Amg::Vector3D extrapPos = startPos + Amg::intersect<3>(startPos, direction, stripHitsLayers[i].front()->planeNormal(), offset).value_or(0) * direction;
163 
164  unsigned int indexOfHit = stripHitsLayers[i].size()+1;
165  unsigned int triedHit{0};
166  double minPull{std::numeric_limits<double>::max()};
167 
168  // loop over the hits on the same layer
169  for (unsigned int j = 0; j < stripHitsLayers[i].size(); j++) {
170  auto hit = stripHitsLayers[i].at(j);
171  double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(extrapPos, direction, *hit, msg()));
172  ATH_MSG_VERBOSE("Trying extension with hit " << m_idHelperSvc->toString(hit->identify()));
173 
174  //find the hit with the minimum pull (check at least one hit after we have increasing pulls)
175  if (pull > minPull) {
176 
177  triedHit+=1;
178  continue;
179  }
180 
181  if(triedHit>1){
182  break;
183  }
184 
185  indexOfHit = j;
186  minPull = pull;
187  }
188 
189  // complete the seed with the extended hits
190  if (minPull < m_minPullThreshold) {
191  ATH_MSG_VERBOSE("Extension successfull - hit" << m_idHelperSvc->toString(stripHitsLayers[i].at(indexOfHit)->identify())<<", pos: "
192  <<Amg::toString(stripHitsLayers[i].at(indexOfHit)->positionInChamber())<<", dir: "<<Amg::toString(stripHitsLayers[i].at(indexOfHit)->directionInChamber())<<" found with pull "<<minPull);
193  combinatoricHits.push_back(stripHitsLayers[i].at(indexOfHit));
194  }
195  }
196  return combinatoricHits;
197 }

◆ 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  }

◆ findCombinatoricHits()

HitLayVec MuonR4::CombinatorialNSWSeedFinderAlg::findCombinatoricHits ( const Amg::Vector3D beamSpot,
const HitLayVec combinatoricLayers 
) const
private

Construct the beamspot to first hit connection to guestimate the angle

Apply cut window on theta of the seed.

Definition at line 89 of file CombinatorialNSWSeedFinderAlg.cxx.

90  {
91 
92 
93  HitLayVec seedHitsFromLayers{};
94  //try all the hits combinations from the layers for now (--rethink about optimized way)
95  unsigned int iterLay0{0}, iterLay1{0}, iterLay2{0}, iterLay3{0};
96  unsigned int startLay1{0}, startLay2{0}, startLay3{0};
97 
98  for( ; iterLay0 < combinatoricLayers[0].size() ; ++iterLay0){
99 
100  const SpacePoint* hit0 = combinatoricLayers[0][iterLay0];
102  const Amg::Vector3D initSeedDir{(beamSpot - hit0->positionInChamber()).unit()};
103  const Amg::Vector3D dirEstUp = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() - m_windowTheta);
104  const Amg::Vector3D dirEstDn = Amg::dirFromAngles(initSeedDir.phi(), initSeedDir.theta() + m_windowTheta);
105 
106  ATH_MSG_VERBOSE("Reference hit: "<<m_idHelperSvc->toString(hit0->identify())
107  <<", position: "<<Amg::toString(hit0->positionInChamber())<<" seed dir: "<<Amg::toString(initSeedDir)
108  <<" seed plane"<<Amg::toString(beamSpot + Amg::intersect<3>(beamSpot, initSeedDir, hit0->planeNormal(),
109  hit0->planeNormal().dot(hit0->positionInChamber())).value_or(0.) * initSeedDir ));
111  for( iterLay1 = startLay1; iterLay1 < combinatoricLayers[1].size() ; ++iterLay1){
112  const SpacePoint* hit1 = combinatoricLayers[1][iterLay1];
113  const auto hit1InWindow = findHitInWindow(beamSpot, hit1, dirEstUp, dirEstDn);
114  // hit is above- hits are sorted in y so break the loops (we need 4 hits for the seed = no reason to check the others)
115  if(hit1InWindow == HitWindow::tooHigh) {
116  break;
117  }else if(hit1InWindow == HitWindow::tooLow){
118  startLay1=iterLay1;
119  continue;
120  }
121  for( iterLay2 = startLay2; iterLay2 < combinatoricLayers[2].size() ; ++iterLay2){
122  const SpacePoint* hit2 = combinatoricLayers[2][iterLay2];
123  const auto hit2InWindow = findHitInWindow(beamSpot, hit2, dirEstUp, dirEstDn);
124  if (hit2InWindow == HitWindow::tooHigh){
125  iterLay1 = combinatoricLayers[1].size();
126  break;
127  }else if(hit2InWindow == HitWindow::tooLow){
128  startLay2=iterLay2;
129  continue;
130  }
131  for( iterLay3 = startLay3; iterLay3 < combinatoricLayers[3].size(); ++iterLay3){
132  const SpacePoint* hit3 = combinatoricLayers[3][iterLay3];
133  const auto hit3InWindow = findHitInWindow(beamSpot, hit3, dirEstUp, dirEstDn);
134  if (hit3InWindow == HitWindow::tooHigh){
135  iterLay1 = combinatoricLayers[1].size();
136  iterLay2 = combinatoricLayers[2].size();
137  break;
138  }else if(hit3InWindow == HitWindow::tooLow){
139  startLay3=iterLay3;
140  continue;
141  }
142  seedHitsFromLayers.emplace_back(HitVec{hit0, hit1, hit2, hit3});
143  }
144  }
145  }
146  }
147  return seedHitsFromLayers;
148 }

◆ findHitInWindow()

HitWindow MuonR4::CombinatorialNSWSeedFinderAlg::findHitInWindow ( const Amg::Vector3D startPos,
const SpacePoint testHit,
const Amg::Vector3D dirEstUp,
const Amg::Vector3D dirEstDn 
) const
private

Calculate the strip edges

Definition at line 49 of file CombinatorialNSWSeedFinderAlg.cxx.

52  {
53 
54  const double planeOffSet = testHit->positionInChamber().dot(testHit->planeNormal());
55 
56  const Amg::Vector3D estPlaneArrivalUp = startPos+
57  Amg::intersect<3>(startPos, dirEstUp, testHit->planeNormal(), planeOffSet).value_or(0) * dirEstUp;
58  const Amg::Vector3D estPlaneArrivalDn = startPos +
59  Amg::intersect<3>(startPos, dirEstDn, testHit->planeNormal(), planeOffSet).value_or(0) * dirEstDn;
60 
61  switch (testHit->type()) {
63  const auto* prd = static_cast<const xAOD::MMCluster*>(testHit->primaryMeasurement());
64 
65  const double halfLength = prd->readoutElement()->stripLayer(prd->measurementHash()).design().stripLength(prd->channelNumber()) * 0.5;
67  const Amg::Vector3D leftEdge = testHit->positionInChamber() - halfLength * testHit->directionInChamber();
68  const Amg::Vector3D rightEdge = testHit->positionInChamber() + halfLength * testHit->directionInChamber();
69 
70  const bool below = estPlaneArrivalDn.y() > std::max(leftEdge.y(), rightEdge.y());
71  const bool above = estPlaneArrivalUp.y() < std::min(leftEdge.y(), rightEdge.y());
72  ATH_MSG_DEBUG("Hit " << m_idHelperSvc->toString(testHit->identify())
73  << (below || above ? " is outside the window" : " is inside the window"));
74 
75 
76  if(below) return HitWindow::tooLow;
77  if(above) return HitWindow::tooHigh;
78 
79  return HitWindow::inside;
80  }
81  default:
82  ATH_MSG_DEBUG("STGCs not implemented yet - I will do ");
83  break;
84  }
85  //return randmoly an outside hit for now
86  return HitWindow::tooHigh;
87 };

◆ findSeedsFromMaximum()

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

Definition at line 245 of file CombinatorialNSWSeedFinderAlg.cxx.

245  {
246  // first sort the hits per layer from the maximum
247  SpacePointPerLayerSplitter hitLayers{max.getHitsInMax()};
248 
249  HitLayVec stripHitsLayers{hitLayers.stripHits()};
250 
251  std::vector<std::unique_ptr<SegmentSeed>> seeds;
252 
253  unsigned int layerSize = stripHitsLayers.size();
254 
255  if (layerSize < minLayers) {
256  ATH_MSG_VERBOSE("Not enough layers to build a seed");
257  return seeds;
258  }
259 
260  if (m_visionTool.isEnabled()) {
262  const auto truthHits = getMatchingSimHits(max.getHitsInMax());
263  constexpr double legX{0.2};
264  double legY{0.8};
265  for (const SpacePoint* sp : max.getHitsInMax()) {
266  const auto* mmClust = static_cast<const xAOD::MMCluster*>(sp->primaryMeasurement());
267  const xAOD::MuonSimHit* simHit = getTruthMatchedHit(*mmClust);
268  if (!simHit || !MC::isMuon(simHit)) continue;
269  const MuonGMR4::MmReadoutElement* reEle = mmClust->readoutElement();
270  const MuonGMR4::StripDesign& design = reEle->stripLayer(mmClust->measurementHash()).design();
271  const Amg::Transform3D toChamb = reEle->msSector()->globalToLocalTrans(gctx) *
272  reEle->localToGlobalTrans(gctx, simHit->identify());
273  const Amg::Vector3D hitPos = toChamb * xAOD::toEigen(simHit->localPosition());
274  const Amg::Vector3D hitDir = toChamb.linear() * xAOD::toEigen(simHit->localDirection());
275 
276  const double pull = std::sqrt(SegmentFitHelpers::chiSqTermStrip(hitPos,hitDir, *sp, msgStream()));
277  const double pull2 = (mmClust->localPosition<1>().x() - simHit->localPosition().x()) / std::sqrt(mmClust->localCovariance<1>().x());
278  primitives.push_back(MuonValR4::drawLabel(std::format("ml: {:1d}, gap: {:1d}, {:}, pull: {:.2f} / {:.2f}", reEle->multilayer(), mmClust->gasGap(),
279  !design.hasStereoAngle() ? "X" : design.stereoAngle() >0 ? "U": "V",pull, pull2),legX,legY,14));
280  legY-=0.05;
281  }
282  m_visionTool->visualizeBucket(Gaudi::Hive::currentContext(), *max.parentBucket(),
283  "truth", std::move(primitives));
284  }
285 
286  const Amg::Transform3D globToLocal = max.msSector()->globalToLocalTrans(gctx);
287  std::array<const SpacePoint*, 4> seedHits{};
288  for (std::size_t i = 0; i < layerSize - 3; ++i) {
289  seedHits[0] = stripHitsLayers[i].front();
290  for (std::size_t j = i + 1; j < layerSize - 2; ++j) {
291  seedHits[1] = stripHitsLayers[j].front();
292  for (std::size_t k = j + 1; k < layerSize - 1; ++k) {
293  seedHits[2] = stripHitsLayers[k].front();
294  for (std::size_t l = k + 1; l < layerSize; ++l) {
295  seedHits[3] = stripHitsLayers[l].front();
296  AmgSymMatrix(2) bMatrix = CombinatorialSeedSolver::betaMatrix(seedHits);
297  if (std::abs(bMatrix.determinant()) < 1.e-6) {
298 
299  continue;
300  }
301 
302  const HitLayVec layers{stripHitsLayers[i], stripHitsLayers[j], stripHitsLayers[k], stripHitsLayers[l]};
303 
304 
305  // each layer may have more than one hit - take the hit combinations
306  HitLayVec result = findCombinatoricHits(globToLocal.translation(), layers);
307 
308  //the layers not participated in the seed build - gonna be used for the extension
309  HitLayVec extensionLayers;
310  std::copy_if(stripHitsLayers.begin(), stripHitsLayers.end(), std::back_inserter(extensionLayers),
311  [&layers,this](const HitVec& stripLayer){
312  const Identifier gasGapId = m_idHelperSvc->gasGapId(stripLayer.front()->identify());
313  return std::ranges::find_if(layers,[&gasGapId, this](const HitVec& spacePoints){
314  return gasGapId == m_idHelperSvc->gasGapId(spacePoints.front()->identify());
315  }) == layers.end();
316  });
317 
318  // we have made sure to have hits from all the four layers -
319  // start by 4 hits for the seed and try to build the seed for the combinatorics found
320  for (auto &combinatoricHits : result) {
321  auto seed = buildSegmentSeed(combinatoricHits, bMatrix, max, extensionLayers);
322  if (seed) {
323  seeds.push_back(std::move(seed));
324 
325  }
326  }
327 
328  }
329  }
330  }
331  }
332 
333  return seeds;
334 }

◆ initialize()

StatusCode MuonR4::CombinatorialNSWSeedFinderAlg::initialize ( )
overridevirtual

Definition at line 33 of file CombinatorialNSWSeedFinderAlg.cxx.

33  {
35  ATH_CHECK(m_etaKey.initialize());
36  ATH_CHECK(m_writeKey.initialize());
37  ATH_CHECK(m_idHelperSvc.retrieve());
38  ATH_CHECK(m_visionTool.retrieve(DisableTool{m_visionTool.empty()}));
40 
41  if (!(m_idHelperSvc->hasMM() || m_idHelperSvc->hasSTGC())) {
42  ATH_MSG_ERROR("MM or STGC not part of initialized detector layout");
43  return StatusCode::FAILURE;
44  }
45 
46  return StatusCode::SUCCESS;
47 }

◆ 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 }

◆ 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_detMgr

const MuonGMR4::MuonDetectorManager* MuonR4::CombinatorialNSWSeedFinderAlg::m_detMgr {nullptr}
private

Definition at line 61 of file CombinatorialNSWSeedFinderAlg.h.

◆ 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 49 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 55 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_idHelperSvc

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

Definition at line 58 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_minPullThreshold

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

Definition at line 86 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 89 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_windowTheta

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

Definition at line 83 of file CombinatorialNSWSeedFinderAlg.h.

◆ m_writeKey

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

Definition at line 52 of file CombinatorialNSWSeedFinderAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonR4::minLayers
constexpr unsigned int minLayers
Definition: CombinatorialNSWSeedFinderAlg.cxx:31
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
MuonR4::CombinatorialNSWSeedFinderAlg::findHitInWindow
HitWindow findHitInWindow(const Amg::Vector3D &startPos, const SpacePoint *testHit, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:49
MuonGMR4::StripDesign::stereoAngle
double stereoAngle() const
Returns the value of the stereo angle.
MuonGMR4::MmReadoutElement
Definition: MmReadoutElement.h:19
MuonGMR4::StripDesign
Definition: StripDesign.h:30
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
get_generator_info.result
result
Definition: get_generator_info.py:21
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
xAOD::MMCluster_v1
Definition: MMCluster_v1.h:20
MuonR4::CombinatorialNSWSeedFinderAlg::findCombinatoricHits
HitLayVec findCombinatoricHits(const Amg::Vector3D &beamSpot, const HitLayVec &combinatoricLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:89
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
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:114
xAOD::MMCluster_v1::readoutElement
const MuonGMR4::MmReadoutElement * readoutElement() const
Retrieve the associated MmReadoutElement.
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
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
MuonR4::HitWindow::tooLow
@ tooLow
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:89
x
#define x
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::extendHits
HitVec extendHits(const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLayVec &stripHitsLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:151
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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
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:76
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: CombinatorialNSWSeedFinderAlg.h:55
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
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].
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGMR4::SpectrometerSector::globalToLocalTrans
Amg::Transform3D globalToLocalTrans(const ActsGeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
Definition: SpectrometerSector.cxx:54
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::m_writeKey
SG::WriteHandleKey< SegmentSeedContainer > m_writeKey
Definition: CombinatorialNSWSeedFinderAlg.h:52
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
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:298
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
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
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
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
MuonGMR4::MmReadoutElement::stripLayer
const StripLayer & stripLayer(const Identifier &measId) const
MuonR4::CombinatorialNSWSeedFinderAlg::m_windowTheta
DoubleProperty m_windowTheta
Definition: CombinatorialNSWSeedFinderAlg.h:83
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::HitWindow::inside
@ inside
MuonR4::HitVec
SpacePointPerLayerSplitter::HitVec HitVec
Definition: SpacePointPerLayerSplitter.cxx:11
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CombinatorialNSWSeedFinderAlg.h:58
MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey
SG::ReadHandleKey< EtaHoughMaxContainer > m_etaKey
Definition: CombinatorialNSWSeedFinderAlg.h:49
MuonGMR4::StripLayer::design
const StripDesign & design() const
Returns the underlying strip design.
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
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
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed
std::unique_ptr< SegmentSeed > buildSegmentSeed(HitVec &hits, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLayVec &extensionLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:200
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
MuonR4::CombinatorialNSWSeedFinderAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: CombinatorialNSWSeedFinderAlg.h:61
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
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:455
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:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
MuonR4::HitWindow::tooHigh
@ tooHigh
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:150
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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:245
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
MuonR4::HitLayVec
SpacePointPerLayerSplitter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:28
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:194
MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold
DoubleProperty m_minPullThreshold
Definition: CombinatorialNSWSeedFinderAlg.h:86