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

#include <AlignTrackPreProcessor.h>

Inheritance diagram for Trk::AlignTrackPreProcessor:
Collaboration diagram for Trk::AlignTrackPreProcessor:

Public Member Functions

 AlignTrackPreProcessor (const std::string &type, const std::string &name, const IInterface *parent)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
DataVector< Track > * processTrackCollection (const DataVector< Track > *trks)
 creates AlignTrack containing all TSOS on track More...
 
virtual void setLogStream (std::ostream *os)
 sets the output stream for the logfile More...
 
virtual void setNtuple (TFile *)
 Sets output ntuple file, to be implemented if needed for detector-specific implementation. More...
 
virtual StatusCode fillNtuple ()
 writes tree and histogrms to ntuple More...
 
virtual void accumulateVTX (AlignTrack *)
 methods added for the full VTX fit: More...
 
virtual void solveVTX ()
 
virtual void printSummary ()
 Print processing summary to logfile. 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, 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
 

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...
 

Protected Attributes

std::ostream * m_logStream = nullptr
 logfile output stream More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

TrackperformSiliconHitSelection (const Track *, const ToolHandle< Trk::IGlobalTrackFitter > &)
 select silicon hits by quality. 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

ToolHandle< IGlobalTrackFitterm_trackFitterTool
 
ToolHandle< IGlobalTrackFitterm_SLTrackFitterTool
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trackSelectorTool
 
ToolHandle< IInDetAlignHitQualSelToolm_hitQualityTool
 
BooleanProperty m_refitTracks {this, "RefitTracks", true, "flag to refit tracks"}
 
BooleanProperty m_storeFitMatricesAfterRefit
 
BooleanProperty m_runOutlierRemoval
 
IntegerProperty m_particleHypothesis
 
BooleanProperty m_useSingleFitter
 
BooleanProperty m_selectTracks
 
BooleanProperty m_selectHits
 
BooleanProperty m_fixMomentum
 
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 36 of file AlignTrackPreProcessor.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

◆ AlignTrackPreProcessor()

AlignTrackPreProcessor::AlignTrackPreProcessor ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 20 of file AlignTrackPreProcessor.cxx.

24  {
25  declareInterface<IAlignTrackPreProcessor>(this);
26  }

Member Function Documentation

◆ accumulateVTX()

virtual void Trk::IAlignTrackPreProcessor::accumulateVTX ( AlignTrack )
inlinevirtualinherited

methods added for the full VTX fit:

Reimplemented in Trk::BeamspotVertexPreProcessor.

Definition at line 57 of file IAlignTrackPreProcessor.h.

57 {}

◆ declareGaudiProperty() [1/4]

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

◆ fillNtuple()

virtual StatusCode Trk::IAlignTrackPreProcessor::fillNtuple ( )
inlinevirtualinherited

writes tree and histogrms to ntuple

Definition at line 54 of file IAlignTrackPreProcessor.h.

54 { return StatusCode::SUCCESS; }

◆ finalize()

StatusCode AlignTrackPreProcessor::finalize ( )

Definition at line 78 of file AlignTrackPreProcessor.cxx.

79  {
80  return StatusCode::SUCCESS;
81  }

◆ initialize()

StatusCode AlignTrackPreProcessor::initialize ( )

Definition at line 29 of file AlignTrackPreProcessor.cxx.

30  {
31  // get track fitter tools
32  if (m_trackFitterTool.retrieve().isSuccess())
33  ATH_MSG_INFO("Retrieved " << m_trackFitterTool);
34  else{
35  ATH_MSG_FATAL("Could not get " << m_trackFitterTool);
36  return StatusCode::FAILURE;
37  }
38 
39  if (m_useSingleFitter) {
40 
41  if (m_SLTrackFitterTool.retrieve().isSuccess())
42  ATH_MSG_INFO("Retrieved " << m_SLTrackFitterTool);
43  else {
44  ATH_MSG_FATAL("Could not get " << m_SLTrackFitterTool);
45  return StatusCode::FAILURE;
46  }
47  }
48 
49  if(m_selectTracks) {
50  if(m_trackSelectorTool.empty()) {
51  ATH_MSG_FATAL("TrackSelectorTool not specified : " << m_trackSelectorTool);
52  return StatusCode::FAILURE;
53  }
54  else if(m_trackSelectorTool.retrieve().isFailure())
55  {
56  ATH_MSG_FATAL("Could not get " << m_trackSelectorTool);
57  return StatusCode::FAILURE;
58  }
59  ATH_MSG_INFO("Retrieved " << m_trackSelectorTool);
60  }
61 
62  if (m_selectHits) {
63  if(m_hitQualityTool.empty()) {
64  ATH_MSG_FATAL("HitQualityTool not specified : " << m_hitQualityTool);
65  return StatusCode::FAILURE;
66  }
67  else if(m_hitQualityTool.retrieve().isFailure()){
68  ATH_MSG_FATAL("Could not get " << m_trackSelectorTool);
69  return StatusCode::FAILURE;
70  }
71  ATH_MSG_INFO("Retrieved " << m_hitQualityTool);
72  }
73 
74  return StatusCode::SUCCESS;
75  }

◆ 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()

const InterfaceID & IAlignTrackPreProcessor::interfaceID ( )
inlinestaticinherited

Definition at line 70 of file IAlignTrackPreProcessor.h.

71  {
72  return IID_Trk_IAlignTrackPreProcessor;
73  }

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

◆ performSiliconHitSelection()

Track * AlignTrackPreProcessor::performSiliconHitSelection ( const Track inputTrack,
const ToolHandle< Trk::IGlobalTrackFitter > &  fitter 
)
private

select silicon hits by quality.

keep all the rest

select silicon hits by quality. keep all the rest

Definition at line 196 of file AlignTrackPreProcessor.cxx.

197  {
199  ATH_MSG_DEBUG(" -- performSiliconHitSelection -- before removing bad Silicon hits, this track has "<< inputTrack->trackStateOnSurfaces()->size()<< " tsos");
200  Track * newTrack;
201 
202  std::vector<const Trk::MeasurementBase*> selectedMeasurementSet;
203 
204  // loop on track hits
205  int nhits = 0;
206  for (const Trk::TrackStateOnSurface* tsos : *inputTrack->trackStateOnSurfaces())
207  {
208  nhits++;
209  if (m_hitQualityTool->isGoodSiHit(tsos)) {
210  selectedMeasurementSet.push_back( tsos->measurementOnTrack() );
211  }
212  else {
213  ATH_MSG_DEBUG(" -- performSiliconHitSelection -- hit # "<< nhits << " status = BAD HIT ");
214  }
215  }
216  ATH_MSG_DEBUG(" -- performSiliconHitSelection -- after removing bad Silicon hits, the selected measurement collection has "<< selectedMeasurementSet.size()<< " elements");
217 
218  newTrack = (fitter->fit(Gaudi::Hive::currentContext(),
219  selectedMeasurementSet,
220  *inputTrack->perigeeParameters(),
222  static_cast<ParticleHypothesis>(m_particleHypothesis.value()))).release();
223 
224  return newTrack;
225  }

◆ printSummary()

virtual void Trk::IAlignTrackPreProcessor::printSummary ( )
inlinevirtualinherited

Print processing summary to logfile.

Reimplemented in Trk::BeamspotVertexPreProcessor.

Definition at line 62 of file IAlignTrackPreProcessor.h.

62 {}

◆ processTrackCollection()

DataVector< Track > * AlignTrackPreProcessor::processTrackCollection ( const DataVector< Track > *  trks)
virtual

creates AlignTrack containing all TSOS on track

select silicon hits by quality. keep all the rest

Implements Trk::IAlignTrackPreProcessor.

Definition at line 84 of file AlignTrackPreProcessor.cxx.

85  {
86  ATH_MSG_DEBUG("AlignTrackPreProcessor::processTrackCollection()");
87 
88  if (!tracks || tracks->empty())
89  return nullptr;
90 
91  // the output collection of AlignTracks
92  // we define it as collection of Tracks but fill AlignTracks inside
93  DataVector<Track> * newTracks = new DataVector<Track>;
94 
95  int itrk(0);
96  // loop over tracks and create AlignTracks
97  TrackCollection::const_iterator it = tracks->begin();
98  TrackCollection::const_iterator it_end = tracks->end();
99 
100  for ( ; it != it_end ; ++it, ++itrk) {
101 
102  ATH_MSG_DEBUG(" ** processTrackCollection ** Processing track "<<itrk);
103  const Track * origTrack = *it;
104  const Track * newTrack = *it;
105  AlignTrack* at;
106 
107  // check whether the original track passes selection
108  if (m_selectTracks) {
109  if(!m_trackSelectorTool->accept(*origTrack)) {
110  ATH_MSG_VERBOSE(" ** processTrackCollection ** Original track did not pass the selection."<<itrk);
111  continue;
112  }
113 
114  ToolHandle<Trk::IGlobalTrackFitter> fitter=m_trackFitterTool;
115  if (!m_useSingleFitter && AlignTrack::isSLTrack(origTrack) )
117 
118  if (m_selectHits) {
120  ATH_MSG_DEBUG(" ** processTrackCollection ** entering the silicon hit selection ");
121  newTrack = performSiliconHitSelection(origTrack, fitter);
122 
123  if (!newTrack) {
124  ATH_MSG_DEBUG(" ** processTrackCollection ** Track refit yielded no track. Skipping the track.");
125  continue;
126  }
127 
128  // check whether the track passes selection
129  if(!m_trackSelectorTool->accept(*newTrack)) {
130  ATH_MSG_DEBUG(" ** processTrackCollection ** Track did not pass the selection.");
131  delete newTrack;
132  continue;
133  }
134  }
135 
136  IGlobalTrackFitter::AlignmentCache alignCache;
137  // refit track
138  if (m_refitTracks &!m_selectHits) {
139 
140  newTrack=fitter->alignmentFit(alignCache,*origTrack,m_runOutlierRemoval,
141  static_cast<ParticleHypothesis>(m_particleHypothesis.value()));
142  if (!newTrack) {
143  ATH_MSG_DEBUG("Track refit yielded no track. Skipping the track.");
144  continue;
145  }
146  // check that the refitted track satisfies the aligntrack selection
147  if(!m_trackSelectorTool->accept(*newTrack)) {
148  ATH_MSG_DEBUG("New track did not pass the selection.");
149  delete newTrack;
150  continue;
151  }
152  }
153 
154  at = new AlignTrack(*newTrack);
155 
156  if (msgLvl(MSG::DEBUG)) {
157  ATH_MSG_DEBUG("before refit: ");
159  ATH_MSG_DEBUG("after refit: ");
161  }
162 
163  // store fit matrices
165  at->setFullCovarianceMatrix(alignCache.m_fullCovarianceMatrix);
166  at->setDerivativeMatrix(alignCache.m_derivMatrix);
167  }
168  if (m_fixMomentum)
169  {
170  at->AlignTrack::setRefitQovP(false);
171  }
172  // delete newTrack since it's copied in AlignTrack
173  delete newTrack;
174  }
175  else { // in case no selection is performed, keep all tracks
176  at=new AlignTrack(*newTrack);
177  }
178  if (m_fixMomentum)
179  {
180  at->AlignTrack::setRefitQovP(false);
181  }
182 
183  newTracks->push_back(at);
184  }
185 
186 
187  if (newTracks->empty()) {
188  delete newTracks;
189  return nullptr;
190  }
191 
192  return newTracks;
193  }

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

◆ setLogStream()

virtual void Trk::IAlignTrackPreProcessor::setLogStream ( std::ostream *  os)
inlinevirtualinherited

sets the output stream for the logfile

Definition at line 48 of file IAlignTrackPreProcessor.h.

48 { m_logStream = os; }

◆ setNtuple()

virtual void Trk::IAlignTrackPreProcessor::setNtuple ( TFile *  )
inlinevirtualinherited

Sets output ntuple file, to be implemented if needed for detector-specific implementation.

Definition at line 51 of file IAlignTrackPreProcessor.h.

51 {}

◆ solveVTX()

virtual void Trk::IAlignTrackPreProcessor::solveVTX ( )
inlinevirtualinherited

Reimplemented in Trk::BeamspotVertexPreProcessor.

Definition at line 59 of file IAlignTrackPreProcessor.h.

59 {}

◆ 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_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_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_fixMomentum

BooleanProperty Trk::AlignTrackPreProcessor::m_fixMomentum
private
Initial value:
{this, "FixMomentum", false,
"Fix the momentum of the track so it is not refitted"}

Definition at line 81 of file AlignTrackPreProcessor.h.

◆ m_hitQualityTool

ToolHandle<IInDetAlignHitQualSelTool> Trk::AlignTrackPreProcessor::m_hitQualityTool
private
Initial value:
{
this, "HitQualityTool", ""}

Definition at line 57 of file AlignTrackPreProcessor.h.

◆ m_logStream

std::ostream* Trk::IAlignTrackPreProcessor::m_logStream = nullptr
protectedinherited

logfile output stream

Definition at line 66 of file IAlignTrackPreProcessor.h.

◆ m_particleHypothesis

IntegerProperty Trk::AlignTrackPreProcessor::m_particleHypothesis
private
Initial value:
{
this, "ParticleHypothesis", Trk::nonInteracting,
"particle hypothesis in track refit"}

Definition at line 70 of file AlignTrackPreProcessor.h.

◆ m_refitTracks

BooleanProperty Trk::AlignTrackPreProcessor::m_refitTracks {this, "RefitTracks", true, "flag to refit tracks"}
private

Definition at line 63 of file AlignTrackPreProcessor.h.

◆ m_runOutlierRemoval

BooleanProperty Trk::AlignTrackPreProcessor::m_runOutlierRemoval
private
Initial value:
{this, "RunOutlierRemoval", false,
"run outlier removal in track refit"}

Definition at line 68 of file AlignTrackPreProcessor.h.

◆ m_selectHits

BooleanProperty Trk::AlignTrackPreProcessor::m_selectHits
private
Initial value:
{this, "SelectHits", false,
"perform the hit InnerDetector selection"}

Definition at line 79 of file AlignTrackPreProcessor.h.

◆ m_selectTracks

BooleanProperty Trk::AlignTrackPreProcessor::m_selectTracks
private
Initial value:
{this, "SelectTracks", false,
"do the track selection"}

Definition at line 77 of file AlignTrackPreProcessor.h.

◆ m_SLTrackFitterTool

ToolHandle<IGlobalTrackFitter> Trk::AlignTrackPreProcessor::m_SLTrackFitterTool
private
Initial value:
{
this, "SLTrackFitterTool", ""}

Definition at line 52 of file AlignTrackPreProcessor.h.

◆ m_storeFitMatricesAfterRefit

BooleanProperty Trk::AlignTrackPreProcessor::m_storeFitMatricesAfterRefit
private
Initial value:
{
this, "StoreFitMatricesAfterRefit", true,
"flag to store derivative and covariance matrices after refit"}

Definition at line 64 of file AlignTrackPreProcessor.h.

◆ m_trackFitterTool

ToolHandle<IGlobalTrackFitter> Trk::AlignTrackPreProcessor::m_trackFitterTool
private
Initial value:
{
this, "TrackFitterTool", "Trk::GlobalChi2Fitter/InDetTrackFitter"}

Definition at line 50 of file AlignTrackPreProcessor.h.

◆ m_trackSelectorTool

ToolHandle<InDet::IInDetTrackSelectionTool> Trk::AlignTrackPreProcessor::m_trackSelectorTool
private
Initial value:
{
this, "TrackSelectorTool", ""}

Definition at line 55 of file AlignTrackPreProcessor.h.

◆ m_useSingleFitter

BooleanProperty Trk::AlignTrackPreProcessor::m_useSingleFitter
private
Initial value:
{this, "UseSingleFitter", false,
"only use 1 fitter for refitting track"}

Definition at line 74 of file AlignTrackPreProcessor.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:
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::AlignTrackPreProcessor::m_refitTracks
BooleanProperty m_refitTracks
Definition: AlignTrackPreProcessor.h:63
Trk::AlignTrackPreProcessor::m_selectTracks
BooleanProperty m_selectTracks
Definition: AlignTrackPreProcessor.h:77
skel.it
it
Definition: skel.GENtoEVGEN.py:407
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
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::IAlignTrackPreProcessor::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IAlignTrackPreProcessor.h:66
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::AlignTrack::isSLTrack
bool isSLTrack() const
method to determine whether a straight line track or not
Definition: AlignTrack.cxx:263
LArSamples::ShapeFitter::fit
bool fit(const LArSamples::AbsShape &data, const AbsShape &reference, double &k, double &deltaT, double &chi2, const ScaledErrorData *sed=0) const
Definition: ShapeFitter.cxx:32
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::AlignTrackPreProcessor::m_selectHits
BooleanProperty m_selectHits
Definition: AlignTrackPreProcessor.h:79
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:28
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
Trk::AlignTrackPreProcessor::performSiliconHitSelection
Track * performSiliconHitSelection(const Track *, const ToolHandle< Trk::IGlobalTrackFitter > &)
select silicon hits by quality.
Definition: AlignTrackPreProcessor.cxx:196
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
Trk::AlignTrackPreProcessor::m_useSingleFitter
BooleanProperty m_useSingleFitter
Definition: AlignTrackPreProcessor.h:74
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::AlignTrackPreProcessor::m_trackSelectorTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectorTool
Definition: AlignTrackPreProcessor.h:55
Trk::AlignTrackPreProcessor::m_trackFitterTool
ToolHandle< IGlobalTrackFitter > m_trackFitterTool
Definition: AlignTrackPreProcessor.h:50
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::AlignTrackPreProcessor::m_particleHypothesis
IntegerProperty m_particleHypothesis
Definition: AlignTrackPreProcessor.h:70
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
Trk::AlignTrackPreProcessor::m_runOutlierRemoval
BooleanProperty m_runOutlierRemoval
Definition: AlignTrackPreProcessor.h:68
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:28
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Trk::AlignTrackPreProcessor::m_storeFitMatricesAfterRefit
BooleanProperty m_storeFitMatricesAfterRefit
Definition: AlignTrackPreProcessor.h:64
Trk::AlignTrackPreProcessor::m_fixMomentum
BooleanProperty m_fixMomentum
Definition: AlignTrackPreProcessor.h:81
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Trk::AlignTrackPreProcessor::m_hitQualityTool
ToolHandle< IInDetAlignHitQualSelTool > m_hitQualityTool
Definition: AlignTrackPreProcessor.h:57
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
Trk::AlignTrackPreProcessor::m_SLTrackFitterTool
ToolHandle< IGlobalTrackFitter > m_SLTrackFitterTool
Definition: AlignTrackPreProcessor.h:52
Trk::AlignTrack::dumpLessTrackInfo
static void dumpLessTrackInfo(const Track &track, MsgStream &msg)
dump less track information
Definition: AlignTrack.cxx:276
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
fitman.k
k
Definition: fitman.py:528
AlignTrack
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...