ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TrkDriftCircleMath::MdtSegmentT0Fitter Class Reference

#include <MdtSegmentT0Fitter.h>

Inheritance diagram for TrkDriftCircleMath::MdtSegmentT0Fitter:
Collaboration diagram for TrkDriftCircleMath::MdtSegmentT0Fitter:

Public Member Functions

 MdtSegmentT0Fitter (const std::string &, const std::string &, const IInterface *)
 
virtual ~MdtSegmentT0Fitter ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual bool fit (Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed) const override
 
virtual bool fit (Segment &result, const Line &line, const DCOnTrackVec &dcs, const HitSelection &selection, double t0Seed) const override
 
virtual const DCSLFittergetFitter () const override
 fitter factory More...
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

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::ReadCondHandleKey< MuonCalib::MdtCalibDataContainerm_calibDbKey
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
Gaudi::Property< bool > m_rejectWeakTopologies {this,"RejectWeakTopologies",true,"reject topolgies that do not have at least one +- combination in one multilayer"}
 
Gaudi::Property< bool > m_scaleErrors {this,"RescaleErrors",true,"rescale errors in fit"}
 
Gaudi::Property< bool > m_propagateErrors {this,"PropagateErrors",true,"propagate errors"}
 
Gaudi::Property< int > m_minHits {this,"MinimumHits",4,"minimum number of selected hits for t0 fit. Otherwise use default"}
 
Gaudi::Property< float > m_dRTol {this,"dRTolerance",0.1}
 
Gaudi::Property< bool > m_floatDir
 
std::atomic_uint m_ntotalCalls {0}
 
std::atomic_uint m_npassedNHits {0}
 
std::atomic_uint m_npassedSelectionConsistency {0}
 
std::atomic_uint m_npassedNSelectedHits {0}
 
std::atomic_uint m_npassedMinHits {0}
 
std::atomic_uint m_npassedMinuitFit {0}
 
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 25 of file MdtSegmentT0Fitter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MdtSegmentT0Fitter()

TrkDriftCircleMath::MdtSegmentT0Fitter::MdtSegmentT0Fitter ( const std::string &  ty,
const std::string &  na,
const IInterface *  pa 
)

Definition at line 168 of file MdtSegmentT0Fitter.cxx.

169  : AthAlgTool(ty,na,pa),
170  DCSLFitter() {
171  declareInterface <IDCSLFitProvider> (this);
172  }

◆ ~MdtSegmentT0Fitter()

virtual TrkDriftCircleMath::MdtSegmentT0Fitter::~MdtSegmentT0Fitter ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ finalize()

StatusCode TrkDriftCircleMath::MdtSegmentT0Fitter::finalize ( )
overridevirtual

Definition at line 179 of file MdtSegmentT0Fitter.cxx.

179  {
180 
181  double scaleFactor = m_ntotalCalls != 0 ? 1./(double)m_ntotalCalls : 1.;
182 
183  ATH_MSG_INFO( "Summarizing fitter statistics " << "\n"
184  << " Total fits " << std::setw(10) << m_ntotalCalls << " " << scaleFactor*m_ntotalCalls << "\n"
185  << " hits > 2 " << std::setw(10) << m_npassedNHits << " " << scaleFactor*m_npassedNHits << "\n"
186  << " hit consis. " << std::setw(10) << m_npassedSelectionConsistency << " " << scaleFactor*m_npassedSelectionConsistency << "\n"
187  << " sel. hits > 2 " << std::setw(10) << m_npassedNSelectedHits << " " << scaleFactor*m_npassedNSelectedHits << "\n"
188  << " Hits > min hits " << std::setw(10) << m_npassedMinHits << " " << scaleFactor*m_npassedMinHits << "\n"
189  << " Passed Fit " << std::setw(10) << m_npassedMinuitFit << " " << scaleFactor*m_npassedMinuitFit );
190  return StatusCode::SUCCESS;
191  }

◆ fit() [1/2]

bool TrkDriftCircleMath::MdtSegmentT0Fitter::fit ( Segment result,
const Line line,
const DCOnTrackVec dcs,
const HitSelection selection,
double  t0Seed 
) const
overridevirtual

Normalize the mean positions

go to coordinates centered at the average of the hits

Reimplemented from TrkDriftCircleMath::DCSLFitter.

Definition at line 193 of file MdtSegmentT0Fitter.cxx.

193  {
194  ++m_ntotalCalls;
195  const MdtIdHelper& id_helper{m_idHelperSvc->mdtIdHelper()};
196  ATH_MSG_DEBUG("New seg: ");
197  const EventContext& ctx{Gaudi::Hive::currentContext()};
199  if (!calibData.isValid()) {
200  ATH_MSG_FATAL("Failed to retrieve Mdt calibration object "<<m_calibDbKey.fullKey());
201  return false;
202  }
203  std::array<const MuonCalib::MdtRtRelation*, 2> rtRelations{};
204  {
205  unsigned int nRel{0};
206  for (unsigned int i = 0; i < dcs.size() ; ++i) {
207  const Identifier id = dcs[i].rot()->identify();
208  const int mlIdx = id_helper.multilayer(id) -1;
209  if (rtRelations[mlIdx]) continue;
210  rtRelations[mlIdx] = calibData->getCalibData(id, msgStream())->rtRelation.get();
211  ++nRel;
212  if (nRel == 2) break;
213  }
214  }
215  const DCOnTrackVec& dcs_keep = dcs;
216 
217  unsigned int N = dcs_keep.size();
218 
219  result.setT0Shift(-99999,-99999);
220 
221  if(N<2) {
222  return false;
223  }
224  ++m_npassedNHits;
225  if( selection.size() != N ) {
226  ATH_MSG_ERROR("MdtSegmentT0Fitter.cxx:fit with t0 <bad HitSelection>");
227  return false;
228  }
230  int used=0;
231  for(unsigned int i=0;i<N;++i){
232  if( selection[i] == 0 ) ++used;
233  }
234  if(used < 2){
235  ATH_MSG_DEBUG("TOO FEW HITS SELECTED");
236  return false;
237  }
239 
240  if(used < m_minHits) {
241  ATH_MSG_DEBUG("FEWER THAN Minimum HITS N " << m_minHits << " total hits " <<N<<" used " << used);
242 
243  //
244  // Copy driftcircles and reset the drift radii as they might have been overwritten
245  // after a succesfull t0 fit
246  //
247 
248  DCOnTrackVec dcs_new;
249  dcs_new.reserve(dcs.size());
250 
251  double chi2p = 0.;
252  int n_elements = dcs.size();
253  for(int i=0; i< n_elements; ++i ){
254  const DriftCircle* ds = & dcs[i];
255  if(std::abs(ds->r()-ds->rot()->driftRadius())>m_dRTol) ATH_MSG_DEBUG("Different radii on dc " << ds->r() << " rot " << ds->rot()->driftRadius());
256 
257  DriftCircle dc_keep(ds->position(), ds->rot()->driftRadius(), ds->dr(), ds->drPrecise(), ds->driftState(), ds->id(), ds->rot(), ds->index());
258  DCOnTrack dc_new(dc_keep, 0., 0.);
259 
260  dc_new.state(dcs[i].state());
261  dcs_new.push_back( dc_new );
262  if( selection[i] == 0 ){
263  double t = ds->rot()->driftTime();
264  const unsigned int mlIdx = id_helper.multilayer(ds->rot()->identify()) - 1;
265  const MuonCalib::MdtRtRelation *rtInfo = rtRelations[mlIdx];
266 
267  double tUp = rtInfo->rt()->tUpper();
268  double tLow = rtInfo->rt()->tLower();
269 
270  if(t<tLow) chi2p += sq(t-tLow)*0.1;
271  else if(t>tUp) chi2p += sq(t-tUp)*0.1;
272  }
273  }
274 
275  if(chi2p>0) ATH_MSG_DEBUG("NO Minuit Fit TOO few hits Chi2 penalty " << chi2p);
276 
277  bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection );
278 
279  chi2p += result.chi2();
280  // add chi2 penalty for too large or too small driftTimes t < 0 or t> t upper
281  result.set(chi2p, result.ndof(), result.dtheta(), result.dy0());
282  int iok = 0;
283  if(oldrefit) iok = 1;
284  ATH_MSG_DEBUG(" chi2 total " << result.chi2() << " angle " << result.line().phi() << " y0 " << result.line().y0() << " nhits "<< selection.size() << " refit ok " << iok);
285  return oldrefit;
286 
287  }
288 
289  ATH_MSG_DEBUG("FITTING FOR T0 N "<<N<<" used " << used);
290 
291 
293 
294 
295  ATH_MSG_DEBUG(" in MdtSegmentT0Fitter::fit with N dcs "<< N << " hit selection size " << selection.size());
296  ATH_MSG_DEBUG("in fit "<<result.hasT0Shift()<< " " <<result.t0Shift());
297 
298 
299  double Zc{0.}, Yc{0.}, S{0.}, Sz{0.}, Sy{0};
300 
301  std::vector<HitCoords> hits{};
302  hits.reserve(N);
303  FunctionToMinimize minFunct(used);
304 
305  {
306  unsigned int ii{0};
307  for(const DCOnTrack& keep_me : dcs_keep ){
308  const Muon::MdtDriftCircleOnTrack *roto = keep_me.rot();
309  const unsigned int mlIdx = id_helper.multilayer(roto->identify()) - 1;
310  const MuonCalib::MdtRtRelation *rtInfo = rtRelations[mlIdx];
311 
312  const double newerror = m_scaleErrors ? keep_me.drPrecise() : keep_me.dr();
313  const double w = newerror >0. ? sq(1./newerror) : 0.;
314  hits.emplace_back(keep_me.x(), roto->driftTime(), keep_me.y(), w, std::abs(roto->driftRadius()), rtInfo->rt());
315  HitCoords& coords = hits.back();
316  coords.dr = keep_me.dr();
317  coords.rejected = selection[ii];
318  ATH_MSG_DEBUG("DC: (" << coords.y << "," << coords.z << ") R = " << coords.r << " W " << coords.w
319  <<" t " <<coords.t<< " id: "<<keep_me.id()<<" sel " <<coords.rejected);
320  if (!coords.rejected) {
321  S += coords.w;
322  Sz+= coords.z* coords.w;
323  Sy+= coords.y * coords.w;
324  }
325  ++ii;
326  }
327  }
328 
330  const double inv_S = 1. / S;
331  Zc = Sz*inv_S;
332  Yc = Sy*inv_S;
333 
334  ATH_MSG_DEBUG("Yc " << Yc << " Zc " << Zc);
335 
337  for(HitCoords& coords : hits) {
338  coords.y -= Yc;
339  coords.z -= Zc;
340  }
341 
342  int selcount{0};
343 
344  // replicate for the case where the external rt is used...
345  // each hit has an rt function with some range...we want to fit such that
346  // tlower_i < ti - t0 < tupper_i
347  double min_tlower{std::numeric_limits<float>::max()}, max_tupper{-std::numeric_limits<float>::max()};
348 
349  double t0seed=0; // the average t0 of the hit
350  double st0 = 0; // the std deviation of the hit t0s
351  double min_t0 = 1e10; // the smallest t0 seen
352 
353  for(HitCoords& coords : hits) {
354  if(coords.rejected) continue;
355 
356  double r2tval = r2t_ext(coords.rt, coords.r) ;
357  const double tl = coords.rt->tLower();
358  const double th = coords.rt->tUpper();
359  const double tee0 = coords.t - r2tval;
360 
361  min_tlower = std::min(min_tlower, coords.t - tl);
362  max_tupper = std::max(max_tupper, coords.t - th);
363 
364 
365  ATH_MSG_DEBUG(" z "<<coords.z <<" y "<<coords.y<<" r "<<coords.r
366  <<" t "<<coords.t<<" t0 "<<tee0<<" tLower "<<tl<<" tUpper "<<th);
367  t0seed += tee0;
368  st0 += sq(tee0);
369  if(tee0 < min_t0 && std::abs(r2tval) < R2TSPURIOUS) min_t0 = tee0;
370 
371  minFunct.addCoords(coords);
372 
373  selcount++;
374 
375  }
376  t0seed /= selcount;
377  st0 = st0/selcount - t0seed*t0seed;
378  st0 = st0 > 0. ? std::sqrt(st0) : 0.;
379 
380  ATH_MSG_DEBUG(" t0seed "<<t0seed<<" sigma "<<st0<< " min_t0 "<<min_t0);
381 
382  // ************************* seed the parameters
383  const double theta = line.phi();
384  double cosin = std::cos(theta);
385  double sinus = std::sin(theta);
386 
387  if ( sinus < 0.0 ) {
388  sinus = -sinus;
389  cosin = -cosin;
390  } else if ( sinus == 0.0 && cosin < 0.0 ) {
391  cosin = -cosin;
392  }
393 
394  ATH_MSG_DEBUG("before fit theta "<<theta<<" sinus "<<sinus<< " cosin "<< cosin);
395 
396  double d = line.y0() + Zc*sinus-Yc*cosin;
397 
398 
399  ATH_MSG_DEBUG(" line x y "<<line.position().x()<<" "<<line.position().y());
400  ATH_MSG_DEBUG(" Zc Yc "<< Zc <<" "<<Yc);
401  ATH_MSG_DEBUG(" line x0 y0 "<<line.x0()<<" "<<line.y0());
402  ATH_MSG_DEBUG(" hit shift " << -Zc*sinus+Yc*cosin);
403 
404 // Calculate signed radii
405 
406  int nml1p{0}, nml2p{0}, nml1n{0}, nml2n{0};
407  int ii{-1};
408  for(const DCOnTrack& keep_me : dcs_keep){
409  ++ii;
410  const HitCoords& coords = hits[ii];
411  if(coords.rejected) continue;
412  const double sdist = d*cosin + coords.z*sinus - coords.y*cosin; // same thing as |a*z - y + b|/sqrt(1. + a*a);
413  nml1p+=(keep_me.id().ml()==0&&sdist > 0);
414  nml1n+=(keep_me.id().ml()==0&&sdist < 0);
415  nml2p+=(keep_me.id().ml()==1&&sdist > 0);
416  nml2n+=(keep_me.id().ml()==1&&sdist < 0);
417  }
418 
419 // Define t0 constraint in Minuit
420  int t0Error = STRONG_TOPO_T0ERROR;
421  if (nml1p+nml2p < 2 || nml1n+nml2n < 2) t0Error = WEAK_TOPO_T0ERROR;
422 
423  minFunct.setT0Error(t0Error);
424 
425 // Reject topologies where in one of the Multilayers no +- combination is present
426  if((nml1p<1||nml1n<1)&&(nml2p<1||nml2n<1)&&m_rejectWeakTopologies) {
427  ATH_MSG_DEBUG("Combination rejected for positive radii ML1 " << nml1p << " ML2 " << nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
428  DCOnTrackVec::const_iterator it = dcs.begin();
429  DCOnTrackVec::const_iterator it_end = dcs.end();
430  double chi2p = 0.;
431  DCOnTrackVec dcs_new;
432  dcs_new.reserve(dcs.size());
433  for(int i=0; it!=it_end; ++it, ++i ){
434  const DriftCircle* ds = & dcs[i];
435  if(std::abs(ds->r()-ds->rot()->driftRadius())>m_dRTol) ATH_MSG_DEBUG("Different radii on dc " << ds->r() << " rot " << ds->rot()->driftRadius());
436  DriftCircle dc_keep(ds->position(), ds->rot()->driftRadius(), ds->dr(), ds->drPrecise(), ds->driftState(), ds->id(), ds->rot(), ds->index() );
437  DCOnTrack dc_new(dc_keep, 0., 0.);
438  dc_new.state(dcs[i].state());
439  dcs_new.push_back( std::move(dc_new) );
440  if( selection[i] == 0 ){
441  double t = ds->rot()->driftTime();
442  const unsigned int mlIdx = id_helper.multilayer(ds->rot()->identify()) - 1;
443  const MuonCalib::MdtRtRelation *rtInfo = rtRelations[mlIdx];
444  double tUp = rtInfo->rt()->tUpper();
445  double tLow = rtInfo->rt()->tLower();
446  if(t<tLow) chi2p += sq(t-tLow)*0.1;
447  if(t>tUp) chi2p += sq(t-tUp)*0.1;
448  }
449  }
450  if(chi2p>0) ATH_MSG_DEBUG(" Rejected weak topology Chi2 penalty " << chi2p);
451  bool oldrefit = DCSLFitter::fit( result, line, dcs_new, selection );
452  chi2p += result.chi2();
453 // add chi2 penalty for too large or too small driftTimes t < 0 or t> t upper
454  result.set( chi2p, result.ndof(), result.dtheta(), result.dy0() );
455  return oldrefit;
456  } // end rejection of weak topologies
457 
458  ATH_MSG_DEBUG("positive radii ML1 " << nml1p << " ML2 " << nml2p << " negative radii ML1 " << nml1n << " ML " << nml2n << " used hits " << used << " t0 Error " << t0Error);
459 
460  constexpr std::array<Double_t,3> step{0.01 , 0.01 , 0.1 };
461  // starting point
462  std::array<Double_t,3> variable{theta,d,0};
463  // if t0Seed value from outside use this
464  if(t0Seed > -999.) variable[2] = t0Seed;
465 
466  ROOT::Minuit2::Minuit2Minimizer minimum("algoName");
467  minimum.SetMaxFunctionCalls(10000);
468  minimum.SetTolerance(0.001);
469  minimum.SetPrintLevel(-1);
470  if(msgLvl(MSG::VERBOSE)) minimum.SetPrintLevel(1);
471 
472  if (m_floatDir){
473  minimum.SetVariable(0,"a",variable[0], step[0]);
474  minimum.SetVariable(1,"b",variable[1], step[1]);
475  } else {
476  minimum.SetFixedVariable(0,"a", variable[0]);
477  minimum.SetFixedVariable(1,"b", variable[1]);
478  }
479 
480  minimum.SetVariable(2,"t0",variable[2], step[2]);
481 
482  minimum.SetFunction(minFunct);
483 
484  // do the minimization
485  minimum.Minimize();
486 
487  const double *results = minimum.X();
488  const double *errors = minimum.Errors();
489  ATH_MSG_DEBUG("Minimum: f(" << results[0] << "+-" << errors[0] << "," << results[1]<< "+-" << errors[1]<< "," << results[2] << "+-" << errors[2]<< "): " << minimum.MinValue());
490 
492 
493  // Get the fit values
494  double aret=results[0];
495  double aErr=errors[0];
496  double dtheta = aErr;
497  double tana = std::tan(aret); // tangent of angle
498  double ang = aret; // between zero and pi
499  cosin = std::cos(ang);
500  sinus = std::sin(ang);
501  if ( sinus < 0.0 ) {
502  sinus = -sinus;
503  cosin = -cosin;
504  } else if ( sinus == 0.0 && cosin < 0.0 ) {
505  cosin = -cosin;
506  }
507  ang = std::atan2(sinus, cosin);
508  double b=results[1];
509  double bErr=errors[1];
510  double t0=results[2];
511  double t0Err=errors[2];
512  double dy0 = cosin * bErr - b * sinus * aErr;
513 
514  const double del_t = std::abs(hits[0].rt->radius((t0+t0Err)) - hits[0].rt->radius(t0)) ;
515 
516 
517  ATH_MSG_DEBUG("____________FINAL VALUES________________" );
518  ATH_MSG_DEBUG("Values: a "<<tana<<" d "<<b * cosin <<" t0 "<<t0);
519  ATH_MSG_DEBUG("Errors: a "<<aErr<<" b "<<dy0 <<" t0 "<<t0Err);
520 
521  d = b * cosin;
522  if(msg().level() <=MSG::DEBUG) {
523  msg() << MSG::DEBUG <<"COVAR ";
524  for(int it1=0; it1<3; it1++) {
525  for(int it2=0; it2<3; it2++) {
526  msg() << MSG::DEBUG <<minimum.CovMatrix(it1,it2)<<" ";
527  }
528  msg() << MSG::DEBUG << endmsg;
529  }
530  }
531 
532  result.dcs().clear();
533  result.clusters().clear();
534  result.emptyTubes().clear();
535 
536  ATH_MSG_DEBUG("after fit theta "<<ang<<" sinus "<<sinus<< " cosin "<< cosin);
537 
538  double chi2 = 0;
539  unsigned int nhits(0);
540 
541  // calculate predicted hit positions from track parameters
542 
543  ATH_MSG_DEBUG("------NEW HITS------");
544  int i{-1};
545  for(const HitCoords& coords : hits){
546  ++i;
547  const DCOnTrack& keep_me{dcs_keep[i]};
548  const double uppercut = coords.rt->tUpper();
549  const double lowercut = coords.rt->tLower();
550 
551  double rad = coords.rt->radius(coords.t-t0);
552  if(coords.t-t0<lowercut) rad = coords.rt->radius(lowercut);
553  if(coords.t-t0>uppercut) rad = coords.rt->radius(uppercut);
554  if (coords.w==0) {
555  ATH_MSG_WARNING("coords.w==0, continuing");
556  continue;
557  }
558  double drad = 1.0/std::sqrt(coords.w) ;
559 
560  double yl = (coords.y - tana*coords.z - b);
561 
562  ATH_MSG_DEBUG("i "<<i<<" ");
563 
564 
565  double dth = -(sinus*coords.y + cosin*coords.z)*dtheta;
566  double residuals = std::abs(yl)/std::sqrt(1+tana*tana) - rad;
567 
568  ATH_MSG_DEBUG(" dth "<<dth<<" dy0 "<<dy0<<" del_t "<<del_t);
569 
570 
571  double errorResiduals = std::hypot(dth, dy0, del_t);
572 
573  // derivatives of the residual 'R'
574  std::array<double,3> deriv{};
575  // del R/del theta
576  double dd = coords.z * sinus + b *cosin - coords.y * cosin;
577  deriv[0] = sign(dd) * (coords.z * cosin - b * sinus + coords.y * sinus);
578  // del R / del b
579  deriv[1] = sign(dd) * cosin ;
580  // del R / del t0
581 
582  deriv[2] = -1* coords.rt->driftvelocity(coords.t-t0);
583 
584  double covsq=0;
585  for(int rr=0; rr<3; rr++) {
586  for(int cc=0; cc<3; cc++) {
587  covsq += deriv[rr]*minimum.CovMatrix(rr,cc)* deriv[cc];
588  }
589  }
590  ATH_MSG_DEBUG(" covsquared " << covsq);
591  if( covsq < 0. && msgLvl(MSG::DEBUG)){
592  for(int rr=0; rr<3; rr++) {
593  for(int cc=0; cc<3; cc++) {
594  double dot = deriv[rr]*minimum.CovMatrix(rr,cc)* deriv[cc];
595  ATH_MSG_DEBUG(" adding term " << dot << " dev1 " << deriv[rr] << " cov " << minimum.CovMatrix(rr,cc) << " dev2 " << deriv[cc]);
596  }
597  }
598  }
599 
600  covsq = covsq > 0. ? std::sqrt(covsq) : 0.;
601  const DriftCircle* ds = & keep_me;
602  if (m_propagateErrors) drad = coords.dr;
603 
604  DriftCircle dc_newrad(keep_me.position(), rad, drad, ds->driftState(), keep_me.id(), ds->rot(), keep_me.index() );
605  DCOnTrack dc_new(dc_newrad, residuals, covsq);
606  dc_new.state(keep_me.state());
607 
608  ATH_MSG_DEBUG("T0 Segment hit res "<<residuals<<" eres "<<errorResiduals<<" covsq "<<covsq<<" ri " << coords.r<<" ro "<<rad<<" drad "<<drad << " sel "<<selection[i]<< " inv error " << coords.w);
609 
610  if(!coords.rejected) {
611  ++nhits;
612  if (!m_propagateErrors) {
613  chi2 += sq(residuals)*coords.w;
614  } else {
615  chi2 += sq(residuals)/sq(drad);
616  }
617  ATH_MSG_DEBUG("T0 Segment hit res "<<residuals<<" eres "<<errorResiduals<<" covsq "<<covsq<<" ri " << coords.r<<" radius after t0 "<<rad<<" radius error "<< drad << " original error " << coords.dr);
618 // Put chi2 penalty for drift times outside window
619  if (coords.t-t0> uppercut ) { // too large
620  chi2 += sq(coords.t-t0-uppercut)*0.1;
621  }else if (coords.t-t0 < lowercut ) {// too small
622  chi2 += sq(coords.t-t0-lowercut)*0.1;
623  }
624  }
625  result.dcs().push_back( dc_new );
626  }
627 
628  double oldshift = result.t0Shift();
629  ATH_MSG_DEBUG("end fit old "<<oldshift<< " new " <<t0);
630  // Final Minuit Fit result
631  if(nhits==NUMPAR) {
632  nhits++;
633  chi2 += 1.;
634  }
635  result.set( chi2, nhits-NUMPAR, dtheta, -1.*dy0 );
636  result.line().set( LocVec2D( Zc - sinus*d, Yc + cosin*d ), ang );
637  if(t0==0.) t0=0.00001;
638  result.setT0Shift(t0,t0Err);
639 
640  ATH_MSG_DEBUG("Minuit Fit complete: Chi2 " << chi2 << " angle " << result.line().phi() << " nhits "<< nhits << " t0result " << t0);
641  ATH_MSG_DEBUG("Minuit Fit complete: Chi2 " << chi2 << " angle " << result.line().phi() << " nhits "<<nhits<<" numpar "<<NUMPAR << " per dof " << chi2/(nhits-NUMPAR));
642  ATH_MSG_DEBUG("Fit complete: Chi2 " << chi2 <<" nhits "<<nhits<<" numpar "<<NUMPAR << " per dof " << chi2/(nhits-NUMPAR)<<(chi2/(nhits-NUMPAR) > 5 ? " NOT ":" ")<< "GOOD");
643  ATH_MSG_DEBUG("chi2 "<<chi2<<" per dof "<<chi2/(nhits-NUMPAR));
644 
645  return true;
646  }

◆ fit() [2/2]

bool TrkDriftCircleMath::MdtSegmentT0Fitter::fit ( Segment result,
const Line line,
const DCOnTrackVec dcs,
double  t0Seed 
) const
inlineoverridevirtual

Reimplemented from TrkDriftCircleMath::DCSLFitter.

Definition at line 63 of file MdtSegmentT0Fitter.h.

63  {
64  HitSelection selection(dcs.size(),0);
65  return fit( result, line, dcs, selection, t0Seed );
66  }

◆ getFitter()

virtual const DCSLFitter* TrkDriftCircleMath::MdtSegmentT0Fitter::getFitter ( ) const
inlineoverridevirtual

fitter factory

Returns
provides pointer to fitter, ownsership not passed to client

Implements Muon::IDCSLFitProvider.

Definition at line 36 of file MdtSegmentT0Fitter.h.

36 { return this; }

◆ initialize()

StatusCode TrkDriftCircleMath::MdtSegmentT0Fitter::initialize ( )
overridevirtual

Definition at line 174 of file MdtSegmentT0Fitter.cxx.

174  {
176  return StatusCode::SUCCESS;
177  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

static const InterfaceID& Muon::IDCSLFitProvider::interfaceID ( )
inlinestaticinherited

Definition at line 21 of file IDCSLFitProvider.h.

21  {
22  static const InterfaceID IID_IDCSLFitProvider("Muon::IDCSLFitProvider",1,0);
23  return IID_IDCSLFitProvider;
24  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_calibDbKey

SG::ReadCondHandleKey<MuonCalib::MdtCalibDataContainer> TrkDriftCircleMath::MdtSegmentT0Fitter::m_calibDbKey
private
Initial value:
{this, "CalibDataKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}

Definition at line 40 of file MdtSegmentT0Fitter.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dRTol

Gaudi::Property<float> TrkDriftCircleMath::MdtSegmentT0Fitter::m_dRTol {this,"dRTolerance",0.1}
private

Definition at line 49 of file MdtSegmentT0Fitter.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_floatDir

Gaudi::Property<bool> TrkDriftCircleMath::MdtSegmentT0Fitter::m_floatDir
private
Initial value:
{this, "FloatSegDirection", false,
"If set to true, the line of the segment is simultaenously fitted with t0"}

Definition at line 51 of file MdtSegmentT0Fitter.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> TrkDriftCircleMath::MdtSegmentT0Fitter::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 43 of file MdtSegmentT0Fitter.h.

◆ m_minHits

Gaudi::Property<int> TrkDriftCircleMath::MdtSegmentT0Fitter::m_minHits {this,"MinimumHits",4,"minimum number of selected hits for t0 fit. Otherwise use default"}
private

Definition at line 48 of file MdtSegmentT0Fitter.h.

◆ m_npassedMinHits

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedMinHits {0}
mutableprivate

Definition at line 58 of file MdtSegmentT0Fitter.h.

◆ m_npassedMinuitFit

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedMinuitFit {0}
mutableprivate

Definition at line 59 of file MdtSegmentT0Fitter.h.

◆ m_npassedNHits

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedNHits {0}
mutableprivate

Definition at line 55 of file MdtSegmentT0Fitter.h.

◆ m_npassedNSelectedHits

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedNSelectedHits {0}
mutableprivate

Definition at line 57 of file MdtSegmentT0Fitter.h.

◆ m_npassedSelectionConsistency

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedSelectionConsistency {0}
mutableprivate

Definition at line 56 of file MdtSegmentT0Fitter.h.

◆ m_ntotalCalls

std::atomic_uint TrkDriftCircleMath::MdtSegmentT0Fitter::m_ntotalCalls {0}
mutableprivate

Definition at line 54 of file MdtSegmentT0Fitter.h.

◆ m_propagateErrors

Gaudi::Property<bool> TrkDriftCircleMath::MdtSegmentT0Fitter::m_propagateErrors {this,"PropagateErrors",true,"propagate errors"}
private

Definition at line 47 of file MdtSegmentT0Fitter.h.

◆ m_rejectWeakTopologies

Gaudi::Property<bool> TrkDriftCircleMath::MdtSegmentT0Fitter::m_rejectWeakTopologies {this,"RejectWeakTopologies",true,"reject topolgies that do not have at least one +- combination in one multilayer"}
private

Definition at line 45 of file MdtSegmentT0Fitter.h.

◆ m_scaleErrors

Gaudi::Property<bool> TrkDriftCircleMath::MdtSegmentT0Fitter::m_scaleErrors {this,"RescaleErrors",true,"rescale errors in fit"}
private

Definition at line 46 of file MdtSegmentT0Fitter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
used
TrkDriftCircleMath::MdtSegmentT0Fitter::m_ntotalCalls
std::atomic_uint m_ntotalCalls
Definition: MdtSegmentT0Fitter.h:54
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
MuonCalib::IRtRelation::tUpper
virtual double tUpper(void) const =0
get_generator_info.result
result
Definition: get_generator_info.py:21
TrkDriftCircleMath::DCOnTrackVec
std::vector< DCOnTrack > DCOnTrackVec
Definition: DCOnTrack.h:59
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedNSelectedHits
std::atomic_uint m_npassedNSelectedHits
Definition: MdtSegmentT0Fitter.h:57
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrkDriftCircleMath::DCSLFitter::fit
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed=-99999.) const
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/DCSLFitter.h:38
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedMinuitFit
std::atomic_uint m_npassedMinuitFit
Definition: MdtSegmentT0Fitter.h:59
hist_file_dump.d
d
Definition: hist_file_dump.py:137
TrkDriftCircleMath::MdtSegmentT0Fitter::m_dRTol
Gaudi::Property< float > m_dRTol
Definition: MdtSegmentT0Fitter.h:49
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
TrkDriftCircleMath::HitSelection
std::vector< bool > HitSelection
Definition: HitSelection.h:9
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
TrkDriftCircleMath::MdtSegmentT0Fitter::m_scaleErrors
Gaudi::Property< bool > m_scaleErrors
Definition: MdtSegmentT0Fitter.h:46
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrkDriftCircleMath::MdtSegmentT0Fitter::m_rejectWeakTopologies
Gaudi::Property< bool > m_rejectWeakTopologies
Definition: MdtSegmentT0Fitter.h:45
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
TrkDriftCircleMath::DCSLFitter::DCSLFitter
DCSLFitter()=default
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
MuonCalib::MdtRtRelation
class which holds calibration constants per rt-region
Definition: MdtRtRelation.h:18
Muon::MdtDriftCircleOnTrack::driftTime
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
Definition: MdtDriftCircleOnTrack.h:280
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedNHits
std::atomic_uint m_npassedNHits
Definition: MdtSegmentT0Fitter.h:55
TrkDriftCircleMath::MdtSegmentT0Fitter::m_minHits
Gaudi::Property< int > m_minHits
Definition: MdtSegmentT0Fitter.h:48
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
sq
#define sq(x)
Definition: CurvedSegmentFinder.cxx:6
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedMinHits
std::atomic_uint m_npassedMinHits
Definition: MdtSegmentT0Fitter.h:58
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
MuonCalib::IRtRelation::tLower
virtual double tLower(void) const =0
MdtIdHelper
Definition: MdtIdHelper.h:61
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:127
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.selection.variable
variable
Definition: selection.py:33
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::MdtDriftCircleOnTrack::driftRadius
double driftRadius() const
Returns the value of the drift radius.
Definition: MdtDriftCircleOnTrack.h:277
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
selection
std::string selection
Definition: fbtTestBasics.cxx:73
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
min
#define min(a, b)
Definition: cfImp.cxx:40
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
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
python.ami.results
def results
Definition: ami.py:386
TrkDriftCircleMath::MdtSegmentT0Fitter::m_propagateErrors
Gaudi::Property< bool > m_propagateErrors
Definition: MdtSegmentT0Fitter.h:47
library_scraper.dd
list dd
Definition: library_scraper.py:46
MuonCalib::MdtRtRelation::rt
const IRtRelation * rt() const
rt relation
Definition: MdtRtRelation.h:23
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TrkDriftCircleMath::MdtSegmentT0Fitter::m_floatDir
Gaudi::Property< bool > m_floatDir
Definition: MdtSegmentT0Fitter.h:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
LArCellBinning.step
step
Definition: LArCellBinning.py:158
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
dot
Definition: dot.py:1
TrkDriftCircleMath::MdtSegmentT0Fitter::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtSegmentT0Fitter.h:43
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
rr
const boost::regex rr(r_r)
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TrkDriftCircleMath::MdtSegmentT0Fitter::m_npassedSelectionConsistency
std::atomic_uint m_npassedSelectionConsistency
Definition: MdtSegmentT0Fitter.h:56
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
TrkDriftCircleMath::MdtSegmentT0Fitter::m_calibDbKey
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_calibDbKey
Definition: MdtSegmentT0Fitter.h:40
TrkDriftCircleMath::MdtSegmentT0Fitter::fit
virtual bool fit(Segment &result, const Line &line, const DCOnTrackVec &dcs, double t0Seed) const override
Definition: MdtSegmentT0Fitter.h:63
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.SystemOfUnits.rad
int rad
Definition: SystemOfUnits.py:111
fitman.k
k
Definition: fitman.py:528
python.handimod.cc
int cc
Definition: handimod.py:523