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

#include <SegmentActsRefitAlg.h>

Inheritance diagram for MuonR4::SegmentActsRefitAlg:
Collaboration diagram for MuonR4::SegmentActsRefitAlg:

Public Member Functions

virtual StatusCode initialize () override final
 
virtual StatusCode execute (const EventContext &ctx) const override final
 
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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::tuple< Amg::Vector3D, Amg::Vector3DsmearSegment (const ActsGeometryContext &gctx, const MuonR4::Segment &segment, CLHEP::HepRandomEngine *engine) const
 Smear the segment's position and direction by one sigma defined by the segment's covariance. More...
 
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< xAOD::MuonSegmentContainerm_readKey {this, "SegmentContainer", "MuonSegmentsFromR4"}
 Declare the data dependency on the standard Mdt+Rpc+Tgc segment container. More...
 
SG::WriteHandleKey< xAOD::MuonSegmentContainerm_writeKey {this, "OutContainer", "ActsRefitSegments"}
 Declare the key for the refitted segment container. More...
 
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainerm_linkKey {this, "LinkKey", m_writeKey, "prefitSegmentLink"}
 Construct a link from the refitted segment to the input segment. More...
 
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainerm_localParsKey {this, "LocalParsKey", m_writeKey, "localSegPars"}
 Decorate directly the local segment parameters on to the object. More...
 
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainerm_seedParsKey {this, "SeedParsKey", m_writeKey, "seedSegPars"}
 Decorate the seed parameters entering the fit. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers. More...
 
ToolHandle< ActsTrk::IFitterToolm_trackFitTool {this, "FittingTool", ""}
 Track fitting tool. More...
 
PublicToolHandle< ActsTrk::ITrackingGeometryToolm_trackingGeometryTool {this, "TrackingGeometryTool", ""}
 Tracking geometry tool. More...
 
ToolHandle< IActsExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool" ,"" }
 Track extrapolation tool. More...
 
ToolHandle< MuonR4::ISegmentSelectionToolm_segSelector {this, "SegmentSelectionTool" , "" }
 Segment selection tool to pick the good quality segments. More...
 
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Range service to smear the segment parameters. More...
 
Gaudi::Property< double > m_smearRange {this, "SmearRange", 3.}
 Smear interval in terms of standard deviations. More...
 
SG::WriteHandleKey< xAOD::TrackSurfaceContainerm_surfKey {this, "SurfaceKey", "RefitSegmentSurf"}
 Key to setup a surface container for the external constraints. More...
 
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv {this}
 
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 32 of file SegmentActsRefitAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

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

◆ 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::SegmentActsRefitAlg::execute ( const EventContext &  ctx) const
finaloverridevirtual

Create the context object

Random engine to smear the segment parameters

Loop over the segment container

Fetch the measurements

We add two pseudo measurements above & beneath the segment to stabilize the fit

Global chi2 fitter runs only with at least 5 measurements

Fetch a smeared segment position & direction

Construct the reference surface before the first measurement

Reference position of the surface.

Plane surface

Fetch the measurements from the track state

Direction is always expressed in global frame -> transform to local

Express the parameters at the reference surface of the original segment

Straight line extension to plane

Seed paramters

Definition at line 70 of file SegmentActsRefitAlg.cxx.

70  {
71 
72  const xAOD::MuonSegmentContainer* segments{nullptr};
73  ATH_CHECK(SG::get(segments, m_readKey, ctx));
75  const ActsGeometryContext& gctx{m_trackingGeometryTool->getGeometryContext(ctx)};
76  const Acts::GeometryContext tgContext = gctx.context();
77  const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
78  const Acts::CalibrationContext calContext = ActsTrk::getCalibrationContext(ctx);
79 
81  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, name());
82  rngWrapper->setSeed(name(), ctx);
83  CLHEP::HepRandomEngine* randEngine = rngWrapper->getEngine(ctx);
84 
85  SG::WriteHandle outHandle{m_writeKey, ctx};
86  ATH_CHECK(outHandle.record(std::make_unique<xAOD::MuonSegmentContainer>(),
87  std::make_unique<xAOD::MuonSegmentAuxContainer>()));
88 
89  SG::WriteHandle surfaceHandle{m_surfKey, ctx};
90  ATH_CHECK(surfaceHandle.record(std::make_unique<xAOD::TrackSurfaceContainer>(),
91  std::make_unique<xAOD::TrackStateAuxContainer>()));
92 
94  auto auxMeasHandle = m_auxMeasProv.makeHandle(ctx, *surfaceHandle);
95 
100 
101  ParDecor_t dec_locPars{m_localParsKey, ctx};
102  ParDecor_t dec_seedPars{m_seedParsKey, ctx};
104  for (const xAOD::MuonSegment* seg: *segments){
105  const MuonR4::Segment* reFitMe = MuonR4::detailedSegment(*seg);
106  const Amg::Transform3D& sectorTrf{reFitMe->msSector()->localToGlobalTrans(gctx)};
107  const GeoTrf::CoordEulerAngles sectorAngles = GeoTrf::getCoordRotationAngles(sectorTrf);
109  std::vector<const xAOD::UncalibratedMeasurement*> startMeas = MuonR4::collectMeasurements(*reFitMe);
110 
111  const auto* refMeas = startMeas.front();
112 
113  const Amg::Vector3D firstSurfPos{surfAcc.get(refMeas)->transform(tgContext).translation()};
114  if (!reFitMe->summary().nPhiHits) {
115  const Amg::Vector3D planeNormal = sectorTrf.linear().col(2);
116 
117  const Amg::Vector3D lastSurfPos = surfAcc.get(startMeas.back())->transform(tgContext).translation();
119 
120  const Amg::Transform3D trfBeneath = GeoTrf::GeoTransformRT{sectorAngles, firstSurfPos - pseudoSurfDist * planeNormal};
121  const Amg::Transform3D trfAbove = GeoTrf::GeoTransformRT{sectorAngles, lastSurfPos + pseudoSurfDist * planeNormal};
122 
123  auto surfBeneath = Acts::Surface::makeShared<Acts::PlaneSurface>(trfBeneath);
124  auto surfAbove = Acts::Surface::makeShared<Acts::PlaneSurface>(trfAbove);
125  const double covVal = std::pow(1.*Gaudi::Units::cm, 2);
126  startMeas.insert(startMeas.begin(), auxMeasHandle.newMeasurement<1>(surfBeneath, ProjectorType::e1DimNoTime, AmgSymMatrix(1){covVal}));
127  startMeas.insert(startMeas.end(), auxMeasHandle.newMeasurement<1>(surfAbove, ProjectorType::e1DimNoTime, AmgSymMatrix(1){covVal}));
128 
129  } else if (const auto& firstMeas = reFitMe->measurements().front(); firstMeas->type() == xAOD::UncalibMeasType::Other) {
130  auto pseudoSurf = Acts::Surface::makeShared<Acts::PlaneSurface>(
131  GeoTrf::GeoTransformRT{sectorAngles, Amg::Vector3D::Zero()});
132  startMeas.insert(startMeas.begin(), auxMeasHandle.newMeasurement<2>(pseudoSurf, ProjectorType::e2DimNoTime, AmgSymMatrix(2)::Identity()));
133  }
135  if (startMeas.size() < 5){
136  continue;
137  }
139  const auto [pos, dir] = smearSegment(gctx,*reFitMe, randEngine);
141 
143  const double extDist = dir.dot(firstSurfPos - pos) - 5.*Gaudi::Units::cm;
145  const Amg::Vector3D refPos = pos + extDist * dir;
146  const Amg::Transform3D trf{GeoTrf::GeoTransformRT{sectorAngles, refPos}};
147  if (msgLvl(MSG::VERBOSE)) {
148  const auto [locPos, locDir] = makeLine(localSegmentPars(gctx, *reFitMe));
149 
150  std::stringstream sstr{};
151  sstr<<"pos: "<<Amg::toString(pos)<<", dir: "<<Amg::toString(dir)<<", chi2/nDoF: "
152  <<reFitMe->chi2() / reFitMe->nDoF()<<", nDoF: "<<reFitMe->nDoF()<<", "
153  <<reFitMe->summary().nPrecHits<<", "<<reFitMe->summary().nPhiHits<<std::endl;
154  for (const xAOD::UncalibratedMeasurement* meas : startMeas) {
155  const auto calib_sp = std::ranges::find_if(reFitMe->measurements(), [meas](const auto& sp) {
156  if (!sp->spacePoint()) return false;
157  return sp->spacePoint()->primaryMeasurement() == meas ||
158  sp->spacePoint()->secondaryMeasurement() == meas;
159  });
160  sstr<<" **** "<<m_idHelperSvc->toString(xAOD::identify(meas))<<" @ "
161  <<Amg::toString(surfAcc.get(meas)->transform(tgContext).translation())
162  <<", "<<surfAcc.get(meas)->geometryId()<<", "
163  <<(calib_sp != reFitMe->measurements().end() ?
164  SegmentFitHelpers::chiSqTerm(locPos, locDir,0., std::nullopt,
165  **calib_sp, msgStream()) : 0.)
166  <<std::endl;
167  }
168  sstr<<" Target surf: "<<Amg::toString(trf)<<", firstSurf: "<< Amg::toString(trf.inverse()*firstSurfPos)
169  <<", refPoint: "<<Amg::toString(trf.inverse()*refPos)<<std::endl;
170  ATH_MSG_VERBOSE("Run G2F fit on "<<reFitMe->msSector()->identString()<<std::endl<<sstr.str());
171  }
173  auto target = Acts::Surface::makeShared<Acts::PlaneSurface>(trf);
174 
175  Acts::ActsVector<4> fourPos{};
176  fourPos.block<3,1>(Acts::ePos0, 0) = refPos;
177  fourPos[Acts::eTime] = refPos.mag() / Gaudi::Units::c_light;
178  Acts::BoundMatrix initialCov{Acts::BoundMatrix::Identity()};
179 
180  auto initialPars = Acts::BoundTrackParameters::create(tgContext, target, fourPos, dir, straightQoverP,
181  initialCov, Acts::ParticleHypothesis::muon());
182  if (!initialPars.ok()) {
183  ATH_MSG_WARNING("Initial estimate of the parameters failed");
184  continue;
185  }
186  auto fitTraject = m_trackFitTool->fit(startMeas, *initialPars, tgContext, mfContext, calContext, target.get());
187  if (!fitTraject) {
188  ATH_MSG_WARNING("Track fit failed.");
189  continue;
190  }
191  auto track = fitTraject->getTrack(0);
192  ATH_MSG_DEBUG("Track fit succeeded. ");
193 
196  std::vector<const xAOD::UncalibratedMeasurement*> goodMeas{};
197  unsigned int itr{0};
198  fitTraject->trackStateContainer().visitBackwards(track.tipIndex(),[&](const auto& state){
199  if (!state.hasUncalibratedSourceLink()){
200  return;
201  }
202  goodMeas.insert(goodMeas.begin(),
203  ActsTrk::detail::xAODUncalibMeasCalibrator::unpack(state.getUncalibratedSourceLink()));
204  ATH_MSG_VERBOSE("Loop over track state: "<<(itr++)<<", "<<m_idHelperSvc->toString(xAOD::identify(goodMeas.front()))
205  <<", id: "<<surfAcc.get(goodMeas.front())->geometryId());
206 
207  summary.nPrecHits += (goodMeas.front()->type() == xAOD::UncalibMeasType::MdtDriftCircleType);
208  if (m_idHelperSvc->measuresPhi(xAOD::identify(goodMeas.front()))){
209  ++summary.nPhiHits;
210  } else {
211  summary.nEtaTrigHits += (goodMeas.front()->type() != xAOD::UncalibMeasType::MdtDriftCircleType);
212  }
213  });
214 
215  Acts::BoundTrackParameters parameters = track.createParametersAtReference();
216 
218  const Amg::Vector3D globDir = parameters.direction();
220  const Amg::Transform3D globToLoc{reFitMe->msSector()->globalToLocalTrans(gctx)};
221  const Amg::Vector3D refitPos = globToLoc * parameters.position(tgContext);
222  const Amg::Vector3D refitDir = globToLoc.linear() * globDir;
224  const Amg::Vector3D refitSeg = refitPos + Amg::intersect<3>(refitPos, refitDir, Amg::Vector3D::UnitZ(), 0).value_or(0.) * refitDir;
225  const Amg::Vector3D globPos{reFitMe->msSector()->localToGlobalTrans(gctx) * refitSeg};
226 
227  auto newSegment = outHandle->push_back(std::make_unique<xAOD::MuonSegment>());
228  dec_segLink(*newSegment) = Link_t{*segments, seg->index(), ctx};
229 
230  newSegment->setDirection(globDir.x(), globDir.y(), globDir.z());
231  newSegment->setPosition(globPos.x(), globPos.y(), globPos.z());
232 
233  newSegment->setFitQuality(track.chi2(), track.nDoF());
234  newSegment->setNHits(summary.nPrecHits, summary.nPhiHits, summary.nEtaTrigHits);
235  dec_locPars(*newSegment)[toInt(ParamDefs::x0)] = refitSeg.x();
236  dec_locPars(*newSegment)[toInt(ParamDefs::y0)] = refitSeg.y();
237  dec_locPars(*newSegment)[toInt(ParamDefs::theta)] = refitDir.theta();
238  dec_locPars(*newSegment)[toInt(ParamDefs::phi)] = refitDir.phi();
240  const Amg::Vector3D locSeedPos = globToLoc * pos;
241  const Amg::Vector3D locSeedDir = globToLoc.linear() * dir;
242  dec_seedPars(*newSegment)[toInt(ParamDefs::x0)] = locSeedPos.x();
243  dec_seedPars(*newSegment)[toInt(ParamDefs::y0)] = locSeedPos.y();
244  dec_seedPars(*newSegment)[toInt(ParamDefs::theta)] = locSeedDir.theta();
245  dec_seedPars(*newSegment)[toInt(ParamDefs::phi)] = locSeedDir.phi();
246 
247  }
248  return StatusCode::SUCCESS;
249  }

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

◆ initialize()

StatusCode MuonR4::SegmentActsRefitAlg::initialize ( )
finaloverridevirtual

Definition at line 34 of file SegmentActsRefitAlg.cxx.

34  {
40  ATH_CHECK(m_surfKey.initialize());
42 
43  ATH_CHECK(m_idHelperSvc.retrieve());
44  ATH_CHECK(m_trackFitTool.retrieve());
46  ATH_CHECK(m_extrapolationTool.retrieve());
47  ATH_CHECK(m_segSelector.retrieve());
48 
49  return StatusCode::SUCCESS;
50  }

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

◆ smearSegment()

std::tuple< Amg::Vector3D, Amg::Vector3D > MuonR4::SegmentActsRefitAlg::smearSegment ( const ActsGeometryContext gctx,
const MuonR4::Segment segment,
CLHEP::HepRandomEngine *  engine 
) const
private

Smear the segment's position and direction by one sigma defined by the segment's covariance.

Returns a tuple of smeared position & direction.

Parameters
gctxGeometry context to fetch the alignment of the segment
segmentReference to the segment to smear
engineRandom engine to pass through the random number sequence

Smear the parameters

Definition at line 52 of file SegmentActsRefitAlg.cxx.

54  {
55  auto segPars = localSegmentPars(gctx, segment);
57  for (ParamDefs precPar : {ParamDefs::y0, ParamDefs::theta,
59  if (precPar == ParamDefs::x0 && !segment.summary().nPhiHits) {
60  break;
61  }
62  const unsigned idx = toInt(precPar);
63  segPars[idx] = CLHEP::RandGaussZiggurat::shoot(engine, segPars[idx],
64  m_smearRange*Amg::error(segment.covariance(), idx));
65  }
66  const auto [locPos, locDir] = makeLine(segPars);
67  const Amg::Transform3D& locToGlob{segment.msSector()->localToGlobalTrans(gctx)};
68  return std::make_tuple(locToGlob*locPos, locToGlob.linear() * locDir);
69  }

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

ActsTrk::AuxiliaryMeasurementHandler MuonR4::SegmentActsRefitAlg::m_auxMeasProv {this}
private

Definition at line 74 of file SegmentActsRefitAlg.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_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_extrapolationTool

ToolHandle<IActsExtrapolationTool> MuonR4::SegmentActsRefitAlg::m_extrapolationTool {this, "ExtrapolationTool" ,"" }
private

Track extrapolation tool.

Definition at line 64 of file SegmentActsRefitAlg.h.

◆ m_idHelperSvc

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

IdHelperSvc to decode the Identifiers.

Definition at line 58 of file SegmentActsRefitAlg.h.

◆ m_linkKey

SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer> MuonR4::SegmentActsRefitAlg::m_linkKey {this, "LinkKey", m_writeKey, "prefitSegmentLink"}
private

Construct a link from the refitted segment to the input segment.

Definition at line 51 of file SegmentActsRefitAlg.h.

◆ m_localParsKey

SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer> MuonR4::SegmentActsRefitAlg::m_localParsKey {this, "LocalParsKey", m_writeKey, "localSegPars"}
private

Decorate directly the local segment parameters on to the object.

Definition at line 53 of file SegmentActsRefitAlg.h.

◆ m_readKey

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MuonR4::SegmentActsRefitAlg::m_readKey {this, "SegmentContainer", "MuonSegmentsFromR4"}
private

Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.

Definition at line 47 of file SegmentActsRefitAlg.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> MuonR4::SegmentActsRefitAlg::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Range service to smear the segment parameters.

Definition at line 68 of file SegmentActsRefitAlg.h.

◆ m_seedParsKey

SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer> MuonR4::SegmentActsRefitAlg::m_seedParsKey {this, "SeedParsKey", m_writeKey, "seedSegPars"}
private

Decorate the seed parameters entering the fit.

Definition at line 55 of file SegmentActsRefitAlg.h.

◆ m_segSelector

ToolHandle<MuonR4::ISegmentSelectionTool> MuonR4::SegmentActsRefitAlg::m_segSelector {this, "SegmentSelectionTool" , "" }
private

Segment selection tool to pick the good quality segments.

Definition at line 66 of file SegmentActsRefitAlg.h.

◆ m_smearRange

Gaudi::Property<double> MuonR4::SegmentActsRefitAlg::m_smearRange {this, "SmearRange", 3.}
private

Smear interval in terms of standard deviations.

Definition at line 70 of file SegmentActsRefitAlg.h.

◆ m_surfKey

SG::WriteHandleKey<xAOD::TrackSurfaceContainer> MuonR4::SegmentActsRefitAlg::m_surfKey {this, "SurfaceKey", "RefitSegmentSurf"}
private

Key to setup a surface container for the external constraints.

Definition at line 72 of file SegmentActsRefitAlg.h.

◆ m_trackFitTool

ToolHandle<ActsTrk::IFitterTool> MuonR4::SegmentActsRefitAlg::m_trackFitTool {this, "FittingTool", ""}
private

Track fitting tool.

Definition at line 60 of file SegmentActsRefitAlg.h.

◆ m_trackingGeometryTool

PublicToolHandle<ActsTrk::ITrackingGeometryTool> MuonR4::SegmentActsRefitAlg::m_trackingGeometryTool {this, "TrackingGeometryTool", ""}
private

Tracking geometry tool.

Definition at line 62 of file SegmentActsRefitAlg.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_writeKey

SG::WriteHandleKey<xAOD::MuonSegmentContainer> MuonR4::SegmentActsRefitAlg::m_writeKey {this, "OutContainer", "ActsRefitSegments"}
private

Declare the key for the refitted segment container.

Definition at line 49 of file SegmentActsRefitAlg.h.


The documentation for this class was generated from the following files:
ActsTrk::AuxiliaryMeasurementHandler::makeHandle
MeasurementProvider makeHandle(const EventContext &ctx, xAOD::TrackSurfaceContainer &surfaceBackend) const
Creates a new MeasurementProvider and triggers the write of the container backend to StoreGate.
Definition: AuxiliaryMeasurementHandler.cxx:51
MuonR4::collectMeasurements
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements(const Segment &seg, bool skipOutlier=true)
Helper function to extract the measurements from the segment.
Definition: TrackingHelpers.cxx:18
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
ActsTrk::getCalibrationContext
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
Definition: CalibrationContext.h:15
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:82
MuonR4::SegmentFit::ParamDefs
ParamDefs
This file defines the parameter enums in the Trk namespace.
Definition: MuonHoughDefs.h:29
MuonR4::Segment::summary
const HitSummary & summary() const
Returns the hit summary.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:74
MuonR4::Segment
Placeholder for what will later be the muon segment EDM representation.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:19
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
MuonR4::Segment::measurements
const MeasVec & measurements() const
Returns the associated measurements.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:49
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
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MuonR4::SegmentActsRefitAlg::m_linkKey
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_linkKey
Construct a link from the refitted segment to the input segment.
Definition: SegmentActsRefitAlg.h:51
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
MuonR4::Segment::chi2
double chi2() const
Returns the chi2 of the segment fit.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:45
MuonR4::SegmentActsRefitAlg::m_localParsKey
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_localParsKey
Decorate directly the local segment parameters on to the object.
Definition: SegmentActsRefitAlg.h:53
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
MuonR4::SegmentFitHelpers::chiSqTerm
double chiSqTerm(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 measurement.
Definition: SegmentFitHelperFunctions.cxx:28
MuonR4::SegmentFit::makeLine
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
Definition: SegmentFitterEventData.cxx:26
MuonGMR4::SpectrometerSector::identString
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
Definition: SpectrometerSector.cxx:66
MuonR4::Segment::nDoF
unsigned int nDoF() const
Returns the number of degrees of freedom.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:47
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonR4::SegmentFit::ParamDefs::phi
@ phi
ActsTrk::detail::xAODUncalibMeasCalibrator::unpack
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
Definition: xAODUncalibMeasCalibrator.cxx:12
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:7
ActsTrk::AuxiliaryMeasurementHandler::initialize
StatusCode initialize(const std::string &preFix)
Initialize the write handle keys.
Definition: AuxiliaryMeasurementHandler.cxx:26
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
MuonR4::SegmentActsRefitAlg::m_readKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_readKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.
Definition: SegmentActsRefitAlg.h:47
MuonR4::SegmentActsRefitAlg::m_smearRange
Gaudi::Property< double > m_smearRange
Smear interval in terms of standard deviations.
Definition: SegmentActsRefitAlg.h:70
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
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
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonR4::SegmentActsRefitAlg::m_writeKey
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_writeKey
Declare the key for the refitted segment container.
Definition: SegmentActsRefitAlg.h:49
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
MuonR4::SegmentActsRefitAlg::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Range service to smear the segment parameters.
Definition: SegmentActsRefitAlg.h:68
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
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::SegmentActsRefitAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Definition: SegmentActsRefitAlg.h:58
xAOD::Other
@ Other
MuonR4::SegmentActsRefitAlg::m_trackFitTool
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
Definition: SegmentActsRefitAlg.h:60
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
MuonR4::SegmentFit::ParamDefs::x0
@ x0
MuonR4::Segment::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:39
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
xAOD::MuonSegmentContainer
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
Definition: MuonSegmentContainer.h:14
beamspotman.dir
string dir
Definition: beamspotman.py:621
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:53
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonR4::Segment::HitSummary::nPrecHits
unsigned nPrecHits
Number of good Mdt / Mm / sTgc eta hits.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:63
MuonR4::SegmentFit::ParamDefs::y0
@ y0
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
CalibDbCompareRT.calib_sp
calib_sp
Definition: CalibDbCompareRT.py:63
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:73
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:112
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
MuonR4::SegmentActsRefitAlg::smearSegment
std::tuple< Amg::Vector3D, Amg::Vector3D > smearSegment(const ActsGeometryContext &gctx, const MuonR4::Segment &segment, CLHEP::HepRandomEngine *engine) const
Smear the segment's position and direction by one sigma defined by the segment's covariance.
Definition: SegmentActsRefitAlg.cxx:52
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
h
MuonR4::Segment::HitSummary
Helper struct to summarize the hit count
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:61
MuonR4::SegmentActsRefitAlg::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Definition: SegmentActsRefitAlg.h:64
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGMR4::SpectrometerSector::localToGlobalTrans
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &gctx) const
Returns the local -> global tarnsformation from the sector.
Definition: SpectrometerSector.cxx:75
copySelective.target
string target
Definition: copySelective.py:36
MuonR4::SegmentActsRefitAlg::m_surfKey
SG::WriteHandleKey< xAOD::TrackSurfaceContainer > m_surfKey
Key to setup a surface container for the external constraints.
Definition: SegmentActsRefitAlg.h:72
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MuonR4::SegmentFit::localSegmentPars
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
Definition: SegmentFitterEventData.cxx:32
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
MuonR4::Segment::HitSummary::nPhiHits
unsigned nPhiHits
Number of good Rpc / Tgc / sTgc phi hits.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:67
ActsTrk::detail::xAODUncalibMeasSurfAcc
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
Definition: xAODUncalibMeasSurfAcc.h:22
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
CaloLCW_tf.trf
trf
Definition: CaloLCW_tf.py:20
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
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
MuonR4::SegmentFit::ParamDefs::nPars
@ nPars
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::SegmentFit::ParamDefs::theta
@ theta
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonR4::SegmentActsRefitAlg::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
Definition: SegmentActsRefitAlg.h:62
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
MuonR4::SegmentActsRefitAlg::m_segSelector
ToolHandle< MuonR4::ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
Definition: SegmentActsRefitAlg.h:66
ServiceHandle< ICondSvc >
MuonR4::SegmentActsRefitAlg::m_seedParsKey
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_seedParsKey
Decorate the seed parameters entering the fit.
Definition: SegmentActsRefitAlg.h:55
MuonR4::SegmentActsRefitAlg::m_auxMeasProv
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv
Definition: SegmentActsRefitAlg.h:74
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65