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

#include <RefitSiOnlyTool.h>

Inheritance diagram for InDetAlignment::RefitSiOnlyTool:
Collaboration diagram for InDetAlignment::RefitSiOnlyTool:

Public Member Functions

 RefitSiOnlyTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~RefitSiOnlyTool ()
 
virtual StatusCode initialize ()
 Athena Tool methods. More...
 
virtual StatusCode finalize ()
 Athena Tool methods. More...
 
virtual StatusCode configure ()
 does necessary configuration to the tool More...
 
virtual const DataVector< Trk::Track > * processTrackCollection (const DataVector< Trk::Track > *trks)
 main processing of track collection - refits a track using only filtered hits (e.g. More...
 
void dumpTrackCol (DataVector< Trk::Track > *tracks)
 
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 ()
 

Public Attributes

const AtlasDetectorIDm_idHelper
 

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

Trk::Trackrefit (const Trk::Track *tr) const
 refits a track not using non-silicon hits More...
 
bool filterHit (const Identifier &id) const
 determines from flags, if this hit should be included in the fit or not More...
 
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

ToolHandle< Trk::ITrackFitterm_ITrkFitter
 
Trk::TrkParametersComparisonFunctionm_comPar
 
bool m_doCosmic
 Flag for cosmics. More...
 
bool m_OutlierRemoval
 flag for outlier removal More...
 
bool m_stripSCTHits
 flag to not consider SCT hits in the refit More...
 
bool m_stripPixelHits
 flag to not consider Pixel hits in the refit More...
 
bool m_stripTRTHits
 flag to not consider TRT hits in the refit More...
 
int m_ParticleNumber
 
Trk::ParticleHypothesis m_ParticleHypothesis
 
int m_trkindex
 
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 35 of file RefitSiOnlyTool.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

◆ RefitSiOnlyTool()

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

Definition at line 37 of file RefitSiOnlyTool.cxx.

37  :
39  m_idHelper{},
40  m_ITrkFitter("Trk::KalmanFitter"),
41  m_comPar(nullptr),
43  m_trkindex{}
44  {
45  declareInterface<ICollectionProcessor>(this);
46  declareProperty("OutlierRemoval" , m_OutlierRemoval = true);
47  declareProperty("FitterTool" , m_ITrkFitter);
48  declareProperty("ParticleNumber" , m_ParticleNumber = 2);
49  declareProperty("Cosmic" , m_doCosmic = false);
50  declareProperty("StripPixelHits" , m_stripPixelHits = false);
51  declareProperty("StripSCTHits" , m_stripSCTHits = false);
52  declareProperty("StripTRTHits" , m_stripTRTHits = true);
53  }

◆ ~RefitSiOnlyTool()

InDetAlignment::RefitSiOnlyTool::~RefitSiOnlyTool ( )
virtual

Definition at line 57 of file RefitSiOnlyTool.cxx.

57 {}

Member Function Documentation

◆ configure()

StatusCode InDetAlignment::RefitSiOnlyTool::configure ( )
virtual

does necessary configuration to the tool

Implements InDetAlignment::ICollectionProcessor.

Definition at line 99 of file RefitSiOnlyTool.cxx.

100  {
101  ATH_MSG_DEBUG( "nothing to configure - everything has already been configured in initialize()" );
102  return StatusCode::SUCCESS;
103  }

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

◆ dumpTrackCol()

void InDetAlignment::RefitSiOnlyTool::dumpTrackCol ( DataVector< Trk::Track > *  tracks)

Definition at line 228 of file RefitSiOnlyTool.cxx.

228  {
229  ATH_MSG_DEBUG( "In dumpTrackCol() with size=" << tracks->size() );
230 
231  int itrk = 0;
233  it!=tracks->end();++it) {
234 
235  if(*it!=nullptr){
236 
237  const Trk::Perigee* aMeasPer = (*it)->perigeeParameters();
238  if (aMeasPer==nullptr){
239  ATH_MSG_ERROR( "Could not get Trk::MeasuredPerigee" );}
240  else {
241  double d0 = aMeasPer->parameters()[Trk::d0];
242  double z0 = aMeasPer->parameters()[Trk::z0];
243  double phi0 = aMeasPer->parameters()[Trk::phi0];
244  double theta = aMeasPer->parameters()[Trk::theta];
245  double qOverP = aMeasPer->parameters()[Trk::qOverP];
246  if (msgLvl(MSG::DEBUG)) {
247  msg(MSG::DEBUG) << itrk << ". Track Parameters (d0,z0,phi0,theta,qOverP)" << endmsg;
248  msg(MSG::DEBUG) << " " << d0 << ", " << z0 << ", "
249  << phi0 << ", " << theta << ", " << qOverP << endmsg;
250  msg(MSG::DEBUG) << " - momentum: "
251  << aMeasPer->momentum().mag() / CLHEP::GeV << " CLHEP::GeV/c" << endmsg;
252  }
253  }
254  }
255  itrk++;
256  }
257  }

◆ 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

◆ filterHit()

bool InDetAlignment::RefitSiOnlyTool::filterHit ( const Identifier id) const
private

determines from flags, if this hit should be included in the fit or not

Definition at line 218 of file RefitSiOnlyTool.cxx.

219  {
220  if (m_idHelper->is_sct(id) && m_stripSCTHits) {return true;}
221  else if (m_idHelper->is_pixel(id) && m_stripPixelHits) {return true;}
222  else if (m_idHelper->is_trt(id) && m_stripTRTHits) {return true;}
223  else {return false;}
224  }

◆ finalize()

StatusCode InDetAlignment::RefitSiOnlyTool::finalize ( )
virtual

Athena Tool methods.

Definition at line 93 of file RefitSiOnlyTool.cxx.

94  {
95  ATH_MSG_DEBUG("Finalize() of RefitSiOnlyTool" );
96  return StatusCode::SUCCESS;
97  }

◆ initialize()

StatusCode InDetAlignment::RefitSiOnlyTool::initialize ( )
virtual

Athena Tool methods.

Definition at line 60 of file RefitSiOnlyTool.cxx.

61  {
62  StatusCode sc;
63  ATH_MSG_DEBUG( "Initialize() of RefitSiOnlyTool" );
64 
65  // make for cosmic tracks new reference point
66  Amg::Vector3D refGP(0.,15000.,0.);
68 
69  //ID Helper
70  ATH_CHECK (detStore()->retrieve(m_idHelper,"AtlasID"));
71 
72  //Fitter
73  ATH_CHECK(m_ITrkFitter.retrieve());
74 
82 
83  if (msgLvl(MSG::DEBUG)) {
84  msg(MSG::DEBUG) << "ParticleNumber: " << m_ParticleNumber << endmsg;
85  msg(MSG::DEBUG) << "ParticleHypothesis: " << m_ParticleHypothesis << endmsg;
86  msg(MSG::DEBUG) << "Initialize() of RefitSiOnlyTool successful" << endmsg;
87  }
88 
89  return StatusCode::SUCCESS;
90  }

◆ 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 & InDetAlignment::ICollectionProcessor::interfaceID ( )
inlinestaticinherited

Definition at line 46 of file ICollectionProcessor.h.

47  {
48  static const InterfaceID s_myID("ICollectionProcessor", 1 , 0);
49  return s_myID;
50  //return IID_InDetAlignment_ICollectionProcessor;
51  }

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

◆ processTrackCollection()

const DataVector< Trk::Track > * InDetAlignment::RefitSiOnlyTool::processTrackCollection ( const DataVector< Trk::Track > *  trks)
virtual

main processing of track collection - refits a track using only filtered hits (e.g.

only silicon hits)

Implements InDetAlignment::ICollectionProcessor.

Definition at line 105 of file RefitSiOnlyTool.cxx.

105  {
106  ATH_MSG_DEBUG( "processTrackCollection() of RefitSiOnlyTool" );
107 
108  m_trkindex=0;
110 
111  for (DataVector<Trk::Track>::const_iterator t=trks->begin(); t!=trks->end();++t) {
112  if (*t) {
113  Trk::Track* refittedTrack = refit(*t);
114 
115  if (refittedTrack==nullptr)
116  ATH_MSG_DEBUG( " Refit of the track " << m_trkindex << " did not work. Track skipped." );
117 
118  newTrks->push_back(refittedTrack);
119  } else {
120  newTrks->push_back(nullptr);
121  ATH_MSG_DEBUG( " Track " << m_trkindex << " is empty." );
122  }
123 
124  m_trkindex++;
125  }
126 
127  if (msgLvl(MSG::DEBUG)) {
128  dumpTrackCol(newTrks);
129  }
130 
131  return newTrks;
132  }

◆ refit()

Trk::Track * InDetAlignment::RefitSiOnlyTool::refit ( const Trk::Track tr) const
private

refits a track not using non-silicon hits

containsGangedPixels

Definition at line 135 of file RefitSiOnlyTool.cxx.

135  {
136  // Step through all hits on a Trk::Track, pushback SiliconHits into RIO_Collection
137  // and Refit Track with SiliconHits
138  ATH_MSG_DEBUG( "Entering RefitSiOnlyTool::refit() for track #" << m_trkindex );
139 
140  const Trk::Perigee* initialPerigee = tr->perigeeParameters();
141  if (initialPerigee) {
142  ATH_MSG_DEBUG( "Track # " << m_trkindex << " has momentum before refit: "
143  << initialPerigee->momentum().mag() / CLHEP::GeV << " CLHEP::GeV/c" );
144  }
145  else { ATH_MSG_WARNING( "Track # " << m_trkindex << " without perigee" ); }
146 
147  Trk::Track* SiOnlyTrack = nullptr;
148  bool containsGangedPixels = false;
149  std::vector<const Trk::MeasurementBase*> MeasurementBase_Collection;
150 
151  ATH_MSG_DEBUG( "Building stripped RIO_Collection" );
153  measBase !=tr->measurementsOnTrack()->end(); ++measBase) {
154 
155  const Trk::RIO_OnTrack* rio = dynamic_cast <const Trk::RIO_OnTrack*>(*measBase);
156  if (rio != nullptr) {
157  const Identifier& surfaceID = (rio->identify());
158  if(filterHit(surfaceID)==false) {
159  MeasurementBase_Collection.push_back(*measBase);
160 
161  // protect against ganged Pixel Hits
162  if (rio->prepRawData()) {
163  const InDet::SiCluster* siHit = dynamic_cast <const InDet::SiCluster*>(rio->prepRawData());
164  if (siHit) {
165  if (siHit->gangedPixel()) {
166  containsGangedPixels = true;
167  ATH_MSG_DEBUG( " Reject track # " << m_trkindex
168  << " because it contains ganged pixel hits" );
169  }
170  }
171  }
172 
173  }
174  }
175  }
176 
177  // Do Silicon only Refit with Silicon only HitCollection and TrackParameters
178  // at StartingPoint of track
179  if (!containsGangedPixels) {
180  if (m_doCosmic) {
181  ATH_MSG_DEBUG("Refitting using Cosmic reference point");
182 
183  // order the parameters according to the Cosmics reference points
184  // works only for Si, not for TRT!
185  const Trk::TrackParameters* minPar =
186  *(std::min_element(tr->trackParameters()->begin(),
187  tr->trackParameters()->end(),
188  *m_comPar));
189 
190  SiOnlyTrack = m_ITrkFitter
191  ->fit(Gaudi::Hive::currentContext(),
192  MeasurementBase_Collection,
193  *minPar,
196  .release();
197  } // m_doCosmic
198  else {
199  SiOnlyTrack = m_ITrkFitter
200  ->fit(Gaudi::Hive::currentContext(),
201  MeasurementBase_Collection,
202  *(tr->trackParameters()->front()),
205  .release();
206  }
207  }
208  else {
209  ATH_MSG_DEBUG(" No refit was done for track # " << m_trkindex);
210  return nullptr;
211  }
212 
213  return SiOnlyTrack;
214  }

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

Trk::TrkParametersComparisonFunction* InDetAlignment::RefitSiOnlyTool::m_comPar
private

Definition at line 63 of file RefitSiOnlyTool.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_doCosmic

bool InDetAlignment::RefitSiOnlyTool::m_doCosmic
private

Flag for cosmics.

Definition at line 65 of file RefitSiOnlyTool.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_idHelper

const AtlasDetectorID* InDetAlignment::RefitSiOnlyTool::m_idHelper

Definition at line 49 of file RefitSiOnlyTool.h.

◆ m_ITrkFitter

ToolHandle<Trk::ITrackFitter> InDetAlignment::RefitSiOnlyTool::m_ITrkFitter
private

Definition at line 61 of file RefitSiOnlyTool.h.

◆ m_OutlierRemoval

bool InDetAlignment::RefitSiOnlyTool::m_OutlierRemoval
private

flag for outlier removal

Definition at line 66 of file RefitSiOnlyTool.h.

◆ m_ParticleHypothesis

Trk::ParticleHypothesis InDetAlignment::RefitSiOnlyTool::m_ParticleHypothesis
private

Definition at line 73 of file RefitSiOnlyTool.h.

◆ m_ParticleNumber

int InDetAlignment::RefitSiOnlyTool::m_ParticleNumber
private

Definition at line 72 of file RefitSiOnlyTool.h.

◆ m_stripPixelHits

bool InDetAlignment::RefitSiOnlyTool::m_stripPixelHits
private

flag to not consider Pixel hits in the refit

Definition at line 69 of file RefitSiOnlyTool.h.

◆ m_stripSCTHits

bool InDetAlignment::RefitSiOnlyTool::m_stripSCTHits
private

flag to not consider SCT hits in the refit

Definition at line 68 of file RefitSiOnlyTool.h.

◆ m_stripTRTHits

bool InDetAlignment::RefitSiOnlyTool::m_stripTRTHits
private

flag to not consider TRT hits in the refit

Definition at line 70 of file RefitSiOnlyTool.h.

◆ m_trkindex

int InDetAlignment::RefitSiOnlyTool::m_trkindex
private

Definition at line 74 of file RefitSiOnlyTool.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDetAlignment::RefitSiOnlyTool::dumpTrackCol
void dumpTrackCol(DataVector< Trk::Track > *tracks)
Definition: RefitSiOnlyTool.cxx:228
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
Trk::noHypothesis
@ noHypothesis
Definition: ParticleHypothesis.h:37
InDetAlignment::RefitSiOnlyTool::filterHit
bool filterHit(const Identifier &id) const
determines from flags, if this hit should be included in the fit or not
Definition: RefitSiOnlyTool.cxx:218
Trk::proton
@ proton
Definition: ParticleHypothesis.h:31
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
InDetAlignment::RefitSiOnlyTool::m_ParticleHypothesis
Trk::ParticleHypothesis m_ParticleHypothesis
Definition: RefitSiOnlyTool.h:73
InDetAlignment::RefitSiOnlyTool::refit
Trk::Track * refit(const Trk::Track *tr) const
refits a track not using non-silicon hits
Definition: RefitSiOnlyTool.cxx:135
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDetAlignment::RefitSiOnlyTool::m_stripSCTHits
bool m_stripSCTHits
flag to not consider SCT hits in the refit
Definition: RefitSiOnlyTool.h:68
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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
Trk::z0
@ z0
Definition: ParamDefs.h:64
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
InDetAlignment::RefitSiOnlyTool::m_ParticleNumber
int m_ParticleNumber
Definition: RefitSiOnlyTool.h:72
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
InDetAlignment::RefitSiOnlyTool::m_comPar
Trk::TrkParametersComparisonFunction * m_comPar
Definition: RefitSiOnlyTool.h:63
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
InDetAlignment::RefitSiOnlyTool::m_stripTRTHits
bool m_stripTRTHits
flag to not consider TRT hits in the refit
Definition: RefitSiOnlyTool.h:70
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDetAlignment::RefitSiOnlyTool::m_OutlierRemoval
bool m_OutlierRemoval
flag for outlier removal
Definition: RefitSiOnlyTool.h:66
Trk::theta
@ theta
Definition: ParamDefs.h:66
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::electron
@ electron
Definition: ParticleHypothesis.h:27
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDetAlignment::RefitSiOnlyTool::m_doCosmic
bool m_doCosmic
Flag for cosmics.
Definition: RefitSiOnlyTool.h:65
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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::Track::trackParameters
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:97
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
InDet::SiCluster::gangedPixel
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::d0
@ d0
Definition: ParamDefs.h:63
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:25
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
InDetAlignment::RefitSiOnlyTool::m_stripPixelHits
bool m_stripPixelHits
flag to not consider Pixel hits in the refit
Definition: RefitSiOnlyTool.h:69
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Trk::kaon
@ kaon
Definition: ParticleHypothesis.h:30
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
InDetAlignment::RefitSiOnlyTool::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: RefitSiOnlyTool.h:49
a
TList * a
Definition: liststreamerinfos.cxx:10
h
InDetAlignment::RefitSiOnlyTool::m_ITrkFitter
ToolHandle< Trk::ITrackFitter > m_ITrkFitter
Definition: RefitSiOnlyTool.h:61
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::TrkParametersComparisonFunction
ComparisonFunction< TrackParameters > TrkParametersComparisonFunction
Definition: TrkParametersComparisonFunction.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
InDetAlignment::RefitSiOnlyTool::m_trkindex
int m_trkindex
Definition: RefitSiOnlyTool.h:74
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
Identifier
Definition: IdentifierFieldParser.cxx:14