ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
InDet::TRT_SegmentToTrackTool Class Referencefinal

#include <TRT_SegmentToTrackTool.h>

Inheritance diagram for InDet::TRT_SegmentToTrackTool:
Collaboration diagram for InDet::TRT_SegmentToTrackTool:

Public Member Functions

 TRT_SegmentToTrackTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TRT_SegmentToTrackTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual Trk::TracksegToTrack (const EventContext &ctx, const Trk::TrackSegment &) const override
 
virtual bool segIsUsed (const Trk::TrackSegment &, const Trk::PRDtoTrackMap *prd_to_track_map) const override
 Check if the TRT segment has already been assigned a Si extension
More...
 
virtual bool toLower (const Trk::TrackSegment &) const override
 
virtual void addNewTrack (Trk::Track *, ITRT_SegmentToTrackTool::EventData &event_data) const override
 Add track into the track-score multimap. More...
 
virtual TrackCollectionresolveTracks (const Trk::PRDtoTrackMap *prd_to_track_map, ITRT_SegmentToTrackTool::EventData &event_data) const override
 Resolve the standalone TRT tracks based on the number of shared TRT hits. More...
 
virtual MsgStream & dump (MsgStream &out) const override
 
virtual std::ostream & dump (std::ostream &out) const override
 
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

MsgStream & dumpconditions (MsgStream &out) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static MsgStream & dumpevent (MsgStream &out)
 Tracks that will be passed out of AmbiProcessor. More...
 

Private Attributes

bool m_doRefit
 Do final careful refit of tracks. More...
 
double m_fieldUnitConversion
 
double m_sharedFrac
 Maximum fraction of shared TRT drift circles. More...
 
bool m_suppressHoleSearch
 Suppress hole search during the track summary creation. More...
 
ToolHandle< Trk::IExtrapolatorm_extrapolator
 Track extrapolator tool. More...
 
ToolHandle< Trk::ITrackFitterm_fitterTool { this, "RefitterTool", "" }
 
ToolHandle< Trk::IPRDtoTrackMapToolm_assoTool
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool
 
ToolHandle< Trk::ITrackScoringToolm_scoringTool
 Track scoring tool. More...
 
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCacheCondObjInputKey
 
const TRT_IDm_trtId
 ID TRT helper. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 58 of file TRT_SegmentToTrackTool.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

◆ TRT_SegmentToTrackTool()

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

Definition at line 30 of file TRT_SegmentToTrackTool.cxx.

32  :
34  m_fieldUnitConversion(1000.),
35  m_extrapolator("Trk::Extrapolator/InDetExtrapolator"),
36  m_scoringTool("Trk::TrackScoringTool/TrackScoringTool"),
37  m_trtId(nullptr)
38  {
39  declareInterface<InDet::ITRT_SegmentToTrackTool>( this );
40  m_doRefit = false ; //Do a final careful refit of tracks
41  m_suppressHoleSearch = false ; //Suppress hole search
42  m_sharedFrac = 0.3 ; //Maximum fraction of shared hits !!!!!!!!!!!!!!!!!!!!!! offline 0.3!!!!!!!!!!!!!!!!!!!!!!!
43  declareProperty("FinalRefit" ,m_doRefit ); //Do a final careful refit of tracks
44  declareProperty("SuppressHoleSearch" ,m_suppressHoleSearch); //Suppress hole search during the track summary creation
45  declareProperty("MaxSharedHitsFraction" ,m_sharedFrac ); //Maximum fraction of shared drift circles
46  declareProperty("Extrapolator" ,m_extrapolator ); //Extrapolator tool
47  declareProperty("ScoringTool" ,m_scoringTool ); //Track scoring tool
48  }

◆ ~TRT_SegmentToTrackTool()

InDet::TRT_SegmentToTrackTool::~TRT_SegmentToTrackTool ( )
virtualdefault

Member Function Documentation

◆ addNewTrack()

void InDet::TRT_SegmentToTrackTool::addNewTrack ( Trk::Track trk,
ITRT_SegmentToTrackTool::EventData event_data 
) const
overridevirtual

Add track into the track-score multimap.

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 847 of file TRT_SegmentToTrackTool.cxx.

847  {
848  // @TODO avoid non const member m_trackScoreTrackMap
849  ATH_MSG_DEBUG ("Add track to the scoring multimap...");
850  if (m_trackSummaryTool.isEnabled()) {
851  m_trackSummaryTool->computeAndReplaceTrackSummary(*trk,
853  }
854 
855  //Score the track under investigation
856  Trk::TrackScore score = m_scoringTool->score(*trk);
857  ATH_MSG_DEBUG ("TRT-only: score is " << score);
858 
859  if (score==0) {
860  // statistics...
861  ATH_MSG_DEBUG ("Track score is zero, reject it");
863  // clean up
864  delete trk;
865  } else {
866  // add track to map, map is sorted small to big !
867  event_data.m_trackScores.emplace_back(-score, trk );
868  }
869 
870 
871  }

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

◆ dump() [1/2]

MsgStream & InDet::TRT_SegmentToTrackTool::dump ( MsgStream &  out) const
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 89 of file TRT_SegmentToTrackTool.cxx.

89  {
90  out<<std::endl;
91  return dumpconditions(out);
92  }

◆ dump() [2/2]

std::ostream & InDet::TRT_SegmentToTrackTool::dump ( std::ostream &  out) const
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 131 of file TRT_SegmentToTrackTool.cxx.

132  {
133  return out;
134  }

◆ dumpconditions()

MsgStream & InDet::TRT_SegmentToTrackTool::dumpconditions ( MsgStream &  out) const
private

Definition at line 98 of file TRT_SegmentToTrackTool.cxx.

99  {
100  int n = 65-m_fitterTool.type().size();
101  std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
102  n = 65-m_assoTool.type().size();
103  std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
104  n = 65-m_scoringTool.type().size();
105  std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
106 
107 
108  out<<std::endl
109  <<"|----------------------------------------------------------------------"
110  <<"-------------------|"<<std::endl;
111  out<<"| Tool for final track refitting | "<<m_fitterTool.type() <<s1<<std::endl;
112  out<<"| Tool for track scoring | "<<m_scoringTool.type() <<s5<<std::endl;
113  out<<"| Association service | "<<m_assoTool.type() <<s2<<std::endl;
114  out<<"|----------------------------------------------------------------------"
115  <<"-------------------|";
116  return out;
117  }

◆ dumpevent()

MsgStream & InDet::TRT_SegmentToTrackTool::dumpevent ( MsgStream &  out)
staticprivate

Tracks that will be passed out of AmbiProcessor.

Recreated anew each time process() is called

Definition at line 123 of file TRT_SegmentToTrackTool.cxx.

123  {
124  return out;
125  }

◆ 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 InDet::TRT_SegmentToTrackTool::finalize ( )
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 80 of file TRT_SegmentToTrackTool.cxx.

80  {
82  return sc;
83  }

◆ initialize()

StatusCode InDet::TRT_SegmentToTrackTool::initialize ( )
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 54 of file TRT_SegmentToTrackTool.cxx.

54  {
55 
57 
58  ATH_CHECK(m_extrapolator.retrieve() );
59 
60  ATH_CHECK(m_fitterTool.retrieve(DisableTool{ !m_doRefit }));
61  ATH_CHECK(m_assoTool.retrieve( DisableTool{m_assoTool.name().empty()} ));
62  ATH_CHECK(m_trackSummaryTool.retrieve( DisableTool{m_trackSummaryTool.name().empty()} ));
63 
64  // Get the scoring tool
65  ATH_CHECK( m_scoringTool.retrieve() );
66 
67  ATH_CHECK( detStore()->retrieve(m_trtId, "TRT_ID") );
71 
72  // Get output print level
73  //
74  ATH_MSG_DEBUG( *this );
75 
76  return StatusCode::SUCCESS;
77 
78  }

◆ 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 & InDet::ITRT_SegmentToTrackTool::interfaceID ( )
inlinestaticinherited

Definition at line 88 of file ITRT_SegmentToTrackTool.h.

88  {
89  return IID_ITRT_SegmentToTrackTool;
90  }

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

◆ resolveTracks()

TrackCollection * InDet::TRT_SegmentToTrackTool::resolveTracks ( const Trk::PRDtoTrackMap prd_to_track_map,
ITRT_SegmentToTrackTool::EventData event_data 
) const
overridevirtual

Resolve the standalone TRT tracks based on the number of shared TRT hits.

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 874 of file TRT_SegmentToTrackTool.cxx.

875  {
876 
877  ATH_MSG_DEBUG ("Resolving the TRT tracks in score map...");
878 
879 
880  std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map;
881  if (m_assoTool.isEnabled()) {
882  prd_to_track_map=m_assoTool->createPRDtoTrackMap();
883  if (prd_to_track_map_in) {
884  *prd_to_track_map = *prd_to_track_map_in;
885  }
886  }
887 
888  //final copy - ownership is passed out of algorithm
889  std::unique_ptr<TrackCollection> final_tracks = std::make_unique<TrackCollection>();
890  final_tracks->reserve( event_data.m_trackScores.size());
891  std::stable_sort(event_data.m_trackScores.begin(),
892  event_data.m_trackScores.end(),
893  []( const std::pair< Trk::TrackScore, Trk::Track* > &a,
894  const std::pair< Trk::TrackScore, Trk::Track* > &b)
895  { return a.first < b.first; });
896 
897  for (std::pair< Trk::TrackScore, Trk::Track* > &track_score : event_data.m_trackScores) {
898 
899  ATH_MSG_DEBUG ("--- Trying next track "<<track_score.second<<"\t with score "<<-track_score.first);
900 
901  // some counters to be handled
902  int nShared = 0; // Shared drift circles in segment
903  int nHits = 0; // Number of TRT measurements
904 
905  // get vector of TSOS
906  const Trk::TrackStates* tsos = (track_score.second)->trackStateOnSurfaces();
907 
908  // loop over vector of TSOS
909  for ( const Trk::TrackStateOnSurface *a_tsos : *tsos) {
910 
911  // get measurment from TSOS
912  const Trk::MeasurementBase* meas = a_tsos->measurementOnTrack();
913  if (!meas)
914  continue;
915 
916  // make sure it is a TRT_DC and not a pseudo measurement
917  const InDet::TRT_DriftCircleOnTrack* rot =
918  dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(meas);
919  if (!rot)
920  continue;
921 
922  // get to the PRD object
923  const InDet::TRT_DriftCircle* RawDataClus =
924  dynamic_cast<const InDet::TRT_DriftCircle*>(rot->prepRawData());
925  if (!RawDataClus)
926  continue;
927 
928  // count up number of hits
929  nHits++;
930 
931  // count up number of shared hits
932  if (m_assoTool.isEnabled() && prd_to_track_map->isUsed(*RawDataClus))
933  nShared++;
934  }
935 
936  ATH_MSG_DEBUG ("TRT-only has " << nHits << " hits and " << nShared << " of them are shared");
937 
938  // cut on the number of shared hits with the max fraction
939  if(nShared >= int(m_sharedFrac * nHits)) {
940  // statistics
941  event_data.m_counter[ITRT_SegmentToTrackTool::EventData::knTrkSegUsed]++;
942  ATH_MSG_DEBUG ("Too many shared hits, remove it !");
943  delete track_score.second;
944  continue;
945  }
946 
947  // ok, this seems like a useful track
948  final_tracks->push_back(track_score.second);
949 
950  event_data.m_counter[ITRT_SegmentToTrackTool::EventData::knTRTTrk]++;
951  ATH_MSG_DEBUG ("TRT-only is accepted");
952 
953  //Register the track with the association tool
954  if(m_assoTool.isEnabled()) {
955  if(m_assoTool->addPRDs(*prd_to_track_map,*(track_score.second)).isFailure()) {
956  ATH_MSG_WARNING ("addPRDs() failed!");
957  }
958  }
959 
960  }
961 
962  return final_tracks.release();
963 
964  }

◆ segIsUsed()

bool InDet::TRT_SegmentToTrackTool::segIsUsed ( const Trk::TrackSegment tS,
const Trk::PRDtoTrackMap prd_to_track_map 
) const
overridevirtual

Check if the TRT segment has already been assigned a Si extension

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 763 of file TRT_SegmentToTrackTool.cxx.

764  {
765 
766  ATH_MSG_DEBUG ("Checking whether the TRT segment has already been used...");
767 
768  // some counters to be handled
769  int nShared = 0; // Shared drift circles in segment
770  int nHits = 0; // Number of TRT measurements
771 
772  if (m_assoTool.isEnabled()&& !prd_to_track_map) ATH_MSG_ERROR("PRDtoTrackMap to be used but not provided by the client");
773  // loop over the track states
774  for(int it=0; it<int(tS.numberOfMeasurementBases()); ++it){
775 
776  // remove pseudo measurements
777  if ( dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(tS.measurement(it)) )
778  continue;
779 
780  // get the measurment
781  const InDet::TRT_DriftCircleOnTrack* trtcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(tS.measurement(it));
782  if (!trtcircle) continue;
783 
784  // get PRD measurement
785  const InDet::TRT_DriftCircle* RawDataClus=dynamic_cast<const InDet::TRT_DriftCircle*>(trtcircle->prepRawData());
786  if(!RawDataClus) continue;
787 
788  // count up number of hits
789  nHits++;
790 
791  if(m_assoTool.isEnabled() && prd_to_track_map && prd_to_track_map->isUsed(*RawDataClus)) nShared++;
792  }
793 
794  if(nShared >= int(m_sharedFrac * nHits)) {
795  ATH_MSG_DEBUG ("Too many shared hits.Will drop the TRT segment");
796  return true;
797  } else {
798  return false;
799  }
800 
801 
802  }

◆ segToTrack()

Trk::Track * InDet::TRT_SegmentToTrackTool::segToTrack ( const EventContext &  ctx,
const Trk::TrackSegment tS 
) const
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 137 of file TRT_SegmentToTrackTool.cxx.

137  {
138 
139  ATH_MSG_DEBUG("Transforming the TRT segment into a track...");
140 
141  //
142  // Get the track segment fit quality. If not there drop segment
143  //
144  if (!tS.fitQuality()) {
145  ATH_MSG_DEBUG("Segment has no fit quality ! Discard...");
146  return nullptr;
147  }
148  auto fq = tS.fitQuality()->uniqueClone();
149 
150  //
151  // Get the track segment information about the initial track parameters
152  //
153  const AmgVector(5)& par = tS.localParameters();
154  AmgSymMatrix(5) ep = AmgSymMatrix(5)(tS.localCovariance());
155  const Trk::TrackParameters* segPar =
156  tS.associatedSurface()
157  .createUniqueTrackParameters(par[Trk::loc1],
158  par[Trk::loc2],
159  par[Trk::phi],
160  par[Trk::theta],
161  par[Trk::qOverP],
162  std::move(ep))
163  .release();
164 
165  if (segPar) {
166  ATH_MSG_VERBOSE("Initial TRT Segment Parameters : " << (*segPar));
167  } else {
168  ATH_MSG_DEBUG("Could not get initial TRT segment parameters! ");
169  // clean up
170  return nullptr;
171  }
172 
173  // --- create new track state on surface vector
174  auto ntsos = std::make_unique<Trk::TrackStates>();
175 
176  //
177  // if no refit, make it a perigee
178  //
179  if (!m_doRefit) {
180 
181  const Trk::TrackStateOnSurface* par_tsos = nullptr;
182 
183  // --- create surface at perigee
184  Amg::Vector3D perigeePosition(0., 0., 0.);
185  Trk::PerigeeSurface perigeeSurface(perigeePosition);
186  // --- turn parameters into perigee...
187  std::unique_ptr<Trk::TrackParameters> tmp =
188  m_extrapolator->extrapolate(ctx, *segPar, perigeeSurface);
189  std::unique_ptr<Trk::Perigee> perParm = nullptr;
190  //pass ownership if of the right type
191  if (tmp && tmp->associatedSurface().type() == Trk::SurfaceType::Perigee) {
192  perParm.reset(static_cast<Trk::Perigee*>(tmp.release()));
193  }
194  if (perParm) {
195  ATH_MSG_VERBOSE("Perigee version of Parameters : " << (*segPar));
196  } else {
197  ATH_MSG_DEBUG("Failed to build perigee parameters.Discard...");
198  ntsos->clear();
199  delete segPar;
200  segPar = nullptr;
201  return nullptr;
202  }
203 
204  // now create a perigee TSOS
205  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
206  typePattern;
207  typePattern.set(Trk::TrackStateOnSurface::Perigee);
208  par_tsos = new Trk::TrackStateOnSurface(
209  nullptr, std::move(perParm), nullptr, typePattern);
210  // push new TSOS into the list
211  ntsos->push_back(par_tsos);
212  }
213 
214  //
215  // now loop over the TSOS and copy them in
216  //
217 
218  // psuedo measurement information
219  int npseudo = 0;
220  double pseudotheta = 0;
221  const Trk::MeasurementBase* pseudo = nullptr;
222  // other measurement information
223  const Trk::Surface *firstsurf = nullptr, *firstecsurf = nullptr,
224  *lastsurf = nullptr;
225  const Trk::MeasurementBase* firstmeas = nullptr;
226  // counters for barrel and endcap
227  int nbarrel = 0, nendcap = 0;
228  // some variables for endcaps
229  std::vector<std::pair<double, double>> points;
230  points.reserve(40);
231  double oldphi = 0;
232 
233  const Trk::Surface *surf_zmin=nullptr;
234  const Trk::Surface *surf_zmax=nullptr;
235  int meas_zmin_i=int(tS.numberOfMeasurementBases());
236  int meas_zmax_i=int(tS.numberOfMeasurementBases());
237 
238  // loop over the measurements in track segment (tS)
239  for (int it = 0; it < int(tS.numberOfMeasurementBases()); it++) {
240 
241  // the track state on service we like to constuct ...
242  const Trk::TrackStateOnSurface* seg_tsos = nullptr;
243 
244  // is this ROT a psuedo-measurement ?
245  if (dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(
246  tS.measurement(it))) {
247  // did we have a speudo-measurement before ?
248  if (pseudo) {
249  // get theta from pseudo measurements
250  pseudotheta =
251  std::atan2(tS.measurement(it)->associatedSurface().center().perp(),
252  tS.measurement(it)->associatedSurface().center().z());
253  }
254  // keep this pseudo measurement
255  pseudo = tS.measurement(it);
256  // update counter
257  npseudo++;
258 
259  if (m_doRefit) {
260  // refit means we can simply copy the state, otherwise we skip it
261  seg_tsos =
262  new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), nullptr);
263  }
264 
265  } else {
266  //
267  // normal measurement, not a pseudo measurement
268  //
269  // copy measurement
270  seg_tsos =
271  new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), nullptr);
272  //
273  // --- following is for the hack below
274  //
275 
276  // remember first measurement
277  if (!firstmeas)
278  firstmeas = tS.measurement(it);
279  if (!firstsurf)
280  firstsurf = &tS.measurement(it)->associatedSurface();
281  // it is always the last one
282  lastsurf = &tS.measurement(it)->associatedSurface();
283 
284  // detect endcap elemeents
286  // increase counter and keep some information
287  nendcap++;
288  if (!firstecsurf)
289  firstecsurf = &tS.measurement(it)->associatedSurface();
290 
291  double tmpphi =
292  tS.measurement(it)->associatedSurface().center().phi();
293  if (!points.empty() &&
294  std::abs(tmpphi - oldphi) > M_PI) { // correct for boundary at +/- pi
295  if (tmpphi < 0)
296  tmpphi += 2 * M_PI;
297  else
298  tmpphi -= 2 * M_PI;
299  }
300  // remember oldphi
301  oldphi = tmpphi;
302 
303  if (!surf_zmax || std::abs(tS.measurement(it)->associatedSurface().center().z())>std::abs(surf_zmax->center().z())) {
304  surf_zmax = &tS.measurement(it)->associatedSurface();
305  meas_zmax_i = it;
306  }
307  if (!surf_zmin || std::abs(tS.measurement(it)->associatedSurface().center().z())<std::abs(surf_zmin->center().z())) {
308  surf_zmin = &tS.measurement(it)->associatedSurface();
309  meas_zmin_i = it;
310  }
311  // copy the points
312  points.emplace_back(
313  tS.measurement(it)->associatedSurface().center().z(), tmpphi);
314 
315  } else
316  nbarrel++;
317 
318  //
319  // --- end of hack stuff
320  //
321  }
322 
323  // push new TSOS into the list
324  if (seg_tsos)
325  ntsos->push_back(seg_tsos);
326  }
327 
328  // Construct the new track
330  info.setPatternRecognitionInfo(Trk::TrackInfo::TRTStandalone);
331 
332  // create new track candidate
333  if (!m_doRefit) {
334  return new Trk::Track(info, std::move(ntsos), std::move(fq));
335  } else {
336  //
337  // ----------------------------- this is a horrible hack to make the
338  // segments fittable
339  //
340 
341  // in case of only 1 pseudo measurement, use the theta from it.
342  if (npseudo == 1)
343  pseudotheta = pseudo->localParameters()[Trk::theta];
344 
345  // we need new perigee parameters
346  double myqoverp = 0, myphi = 0, myd0 = 0, myz0 = 0, mytheta = pseudotheta;
347 
348  if (nendcap < 4) {
349  //
350  // --- are we in the barrel mostly
351  //
352 
353  // momentum
354  myqoverp = par[4] * std::sin(pseudotheta) / std::sin(par[3]);
355 
356  // --- create surface at perigee
357  Amg::Vector3D perigeePosition(0., 0., 0.);
358  Trk::PerigeeSurface perigeeSurface(perigeePosition);
359  // -- get perigee
360  std::unique_ptr<const Trk::TrackParameters> tmp =
361  m_extrapolator->extrapolate(ctx, *segPar, perigeeSurface);
362  std::unique_ptr<const Trk::Perigee> tempper = nullptr;
363  if (tmp && tmp->associatedSurface().type() == Trk::SurfaceType::Perigee) {
364  tempper.reset(static_cast<const Trk::Perigee*>(tmp.release()));
365  }
366  if (!tempper) {
367  ATH_MSG_DEBUG("Could not produce perigee");
368  delete segPar;
369  segPar = nullptr;
370  return nullptr;
371  }
372 
373  // keep some values
374  myd0 = tempper->parameters()[Trk::d0];
375  myphi = tempper->parameters()[Trk::phi0];
376 
377  } else {
378  //
379  // --- endcap or transition track
380  //
381 
382  // get estimate of parameters
383  double sx = 0, sy = 0, sxx = 0, sxy = 0, d = 0;
384  float zmin = points.empty() ? 0 : points.begin()->first, zmax = 0;
385  // loop over all points
386 
387  for (auto & point : points) {
388  sx += point.first;
389  sy += point.second;
390  sxy += point.first * point.second;
391  sxx += point.first * point.first;
392  if (std::abs(point.first) > std::abs(zmax)) {
393  zmax = point.first;
394  }
395  if (std::abs(point.first) < std::abs(zmin)) {
396  zmin = point.first;
397  }
398  }
399 
400  if (std::abs(pseudotheta) < 1.e-6) {
401  ATH_MSG_DEBUG("pseudomeasurements missing on the segment?");
402 
403  if ( meas_zmin_i < int(tS.numberOfMeasurementBases())
404  && meas_zmax_i < int(tS.numberOfMeasurementBases())) {
405  Amg::Vector3D meas_zmin = tS.measurement(meas_zmin_i)->globalPosition();
406  Amg::Vector3D meas_zmax = tS.measurement(meas_zmax_i)->globalPosition();
407  double diff_z (meas_zmax.z() - meas_zmin.z());
408  if (std::abs(diff_z)>1e-6) {
409  double diff_r( meas_zmax.perp() - meas_zmin.perp());
410  pseudotheta = std::atan2(diff_r, diff_z);
411  ATH_MSG_DEBUG("Initial pseudo theta is zero. Compute pseudo from inner- and outermost endcap measurements. delta R: " <<
412  meas_zmax.perp() << " - " << meas_zmin.perp() << " = " << diff_r
413  << " , diff Z: " << meas_zmax.z() << " - " << meas_zmin.z()
414  << " = " << diff_z
415  << " " << pseudotheta);
416  }
417  }
418 
419  if (std::abs(pseudotheta) < 1.e-6) {
420  constexpr std::array<float,2> boundary_r {644., 1004.};
421  // true if track extends from endcap A to endcap C:
422  bool is_across_sides=std::signbit(zmin)!=std::signbit(zmax);
423  double r_path=is_across_sides ? 2 * boundary_r[1] : boundary_r[1]-boundary_r[0];
424  double r1 =0.;
425  double r2 =0.;
426  if (surf_zmin && surf_zmax) {
427  bool is_reverse=std::abs(surf_zmin->center().z())>std::abs(surf_zmax->center().z());
428  // use the innermost and outermost surfaces (defined by z-coordinate) to compute the
429  // travel distance in R-direction assume that the outermost surface is always crossed
430  // at the outermost radial position assume more over that the the innermost surface
431  // is either crossed at the innermost or outermost position what ever leads to the
432  // largest travel distance in r.
433 
434  std::array<const Trk::Surface *,2> boundary_surface{
435  is_reverse ? surf_zmax : surf_zmin,
436  is_reverse ? surf_zmin : surf_zmax};
437  // true if track goes from the outside to the insde :
438  std::array<Amg::Vector2D,2> translation;
439  std::array<Amg::Vector2D,2> height;
440  for (unsigned int boundary_i=boundary_surface.size(); boundary_i-->0;) {
441  if ( boundary_surface[boundary_i]->type() == Trk::SurfaceType::Line
442  && boundary_surface[boundary_i]->bounds().type() == Trk::SurfaceBounds::Cylinder) {
443  const Trk::CylinderBounds &
444  cylinder_bounds = dynamic_cast<const Trk::CylinderBounds &>(boundary_surface[boundary_i]->bounds());
445  height[boundary_i]= project2D( boundary_surface[boundary_i]->transform().rotation()
446  * Amg::Vector3D(0,0, cylinder_bounds.halflengthZ()) );
447  translation[boundary_i]=project2D( boundary_surface[boundary_i]->transform().translation() );
448  }
449  }
450  r1 = (translation[1] + height[1] - ( translation[0] + height[0])).perp();
451  r2 = (translation[1] + height[1] - ( translation[0] - height[0])).perp();
452  r_path=std::max(r1,r2);
453 
454  }
455  pseudotheta = std::atan2(r_path, zmax - zmin);
456  ATH_MSG_DEBUG("Initial pseudo theta is zero. Pseudo theta from inner- and outermost surfaces. Deleta r " << r2 << " - " << r1 << " -> " << r_path
457  << " , delta Z " << zmax << " - " << zmin << " -> " << (zmax-zmin)
458  << " " << pseudotheta);
459  }
460  }
461 
462  // get q/p
463  d = (points.size() * sxx - sx * sx);
464  double dphidz = ((points.size() * sxy - sy * sx) / d);
465  myqoverp = (std::abs(pseudotheta) > 1e-6)
466  ? -dphidz / (0.6 * std::tan(pseudotheta))
467  : 1000.;
468 
469  // some geometry stuff to estimate further paramters...
470  double halfz = 200.;
471  const Trk::CylinderBounds* cylb =
472  dynamic_cast<const Trk::CylinderBounds*>(&firstsurf->bounds());
473  if (!cylb)
474  ATH_MSG_ERROR("Cast of bounds failed, should never happen");
475  else
476  halfz = cylb->halflengthZ();
477  const Trk::CylinderBounds* cylb2 =
478  dynamic_cast<const Trk::CylinderBounds*>(&lastsurf->bounds());
479  double halfz2 = 200.;
480  if (!cylb2)
481  ATH_MSG_ERROR("Cast of bounds failed, should never happen");
482  else
483  halfz2 = cylb2->halflengthZ();
484  Amg::Vector3D strawdir1 = -firstsurf->transform().rotation().col(2);
485  Amg::Vector3D strawdir2 = -lastsurf->transform().rotation().col(2);
486  Amg::Vector3D pos1;
487  Amg::Vector3D pos2;
488 
489  // ME: this is hardcoding, not nice and should be fixed
490  if (std::abs(lastsurf->center().z()) < 2650 * mm) {
491  pos2 = lastsurf->center() + halfz2 * strawdir2;
492  if (nbarrel == 0) {
493  double dr = std::abs(std::tan(pseudotheta) * (lastsurf->center().z() -
494  firstsurf->center().z()));
495  pos1 = firstsurf->center() + (halfz - dr) * strawdir1;
496  } else {
497  double dz = std::abs((pos2.perp() - firstsurf->center().perp()) /
498  std::tan(pseudotheta));
499  if (pos2.z() > 0)
500  dz = -dz;
501  double z1 = pos2.z() + dz;
502  pos1 = Amg::Vector3D(
503  firstsurf->center().x(), firstsurf->center().y(), z1);
504  }
505  } else {
506  double dr = std::abs(std::tan(pseudotheta) *
507  (lastsurf->center().z() - firstsurf->center().z()));
508  pos2 = lastsurf->center() + (dr - halfz2) * strawdir2;
509  pos1 = firstsurf->center() - halfz * strawdir1;
510  }
511 
512  // ME: I don't understand this yet, why is this done only if barrel ==
513  // 0, while above this nendcap < 4 ?
514  if (nbarrel == 0 &&
515  std::abs(std::tan(pseudotheta) * (firstsurf->center().z() -
516  lastsurf->center().z())) < 250 * mm &&
517  std::abs(firstsurf->center().z()) > 1000 * mm) {
518 
519  // ME: wow this is hacking the vector ...
520  const Trk::MeasurementBase* firstmeas =
521  (**ntsos->begin()).measurementOnTrack();
522  Amg::MatrixX newcov(2, 2);
523  newcov.setZero();
524  newcov(0, 0) = (firstmeas->localCovariance())(0, 0);
525  newcov(1, 1) = (myqoverp != 0) ? .0001 * myqoverp * myqoverp : 1.e-8;
526  Trk::LocalParameters newpar(std::make_pair(0, Trk::locZ),
527  std::make_pair(myqoverp, Trk::qOverP));
528  auto newpseudo =
529  std::make_unique<Trk::PseudoMeasurementOnTrack>(
530  std::move(newpar),
531  std::move(newcov),
532  firstmeas->associatedSurface());
533  // hack replace first measurement with pseudomeasurement
534  ntsos->erase(ntsos->begin());
535  ntsos->insert(ntsos->begin(),
536  new Trk::TrackStateOnSurface(std::move(newpseudo), nullptr));
537  }
538 
539  Amg::Vector3D field1;
540 
541  MagField::AtlasFieldCache fieldCache;
542 
543  // Get field cache object
546  };
547  const AtlasFieldCacheCondObj* fieldCondObj{ *readHandle };
548  if (fieldCondObj == nullptr) {
550  "segToTrack: Failed to retrieve AtlasFieldCacheCondObj with key "
552  return nullptr;
553  }
554  fieldCondObj->getInitializedCache(fieldCache);
555 
556  // MT version uses cache
557  fieldCache.getField(Amg::Vector3D(.5 * (pos1 + pos2)).data(),
558  field1.data());
559 
560  field1 *= m_fieldUnitConversion; // field in Tesla
561 
562  double phideflection =
563  -.3 * (pos2 - pos1).perp() * field1.z() * myqoverp / std::sin(pseudotheta);
564  double precisephi = (nbarrel == 0)
565  ? (pos2 - pos1).phi() - .5 * phideflection
566  : (pos2 - pos1).phi() + .5 * phideflection;
567  double radius = (myqoverp != 0. && field1.z() != 0.)
568  ? -std::sin(pseudotheta) / (.3 * field1.z() * myqoverp)
569  : 1.e6;
570  double precisetheta =
571  (myqoverp != 0.)
572  ? std::atan2(std::abs(radius * phideflection), pos2.z() - pos1.z())
573  : pseudotheta;
574  if (precisetheta < 0)
575  precisetheta += M_PI;
576  if (precisephi < -M_PI)
577  precisephi += 2 * M_PI;
578  if (precisephi > M_PI)
579  precisephi -= 2 * M_PI;
580 
581  // now extrapolate backwards from the first surface to get starting
582  // parameters
583  const Trk::StraightLineSurface* surfforpar = nullptr;
584  if (nbarrel == 0)
585  surfforpar = dynamic_cast<const Trk::StraightLineSurface*>(firstsurf);
586  else
587  surfforpar = dynamic_cast<const Trk::StraightLineSurface*>(lastsurf);
588  if (!surfforpar)
589  ATH_MSG_ERROR("Cast of surface failed, should never happen");
590 
591  Trk::AtaStraightLine ataline(((nbarrel == 0) ? pos1 : pos2),
592  precisephi,
593  precisetheta,
594  myqoverp,
595  *surfforpar);
596  Trk::PerigeeSurface persurf;
597  const Trk::TrackParameters* extrappar =
598  m_extrapolator->extrapolateDirectly(ctx, ataline, persurf).release();
599 
600  // now get parameters
601  if (extrappar) {
602  if (nendcap >= 4) {
603  myphi = extrappar->parameters()[Trk::phi0];
604  myd0 = extrappar->parameters()[Trk::d0];
605  }
606 
607  // construct theta again
608  double z0 = extrappar->parameters()[Trk::z0];
609  if (nbarrel == 0)
610  mytheta = std::atan(std::tan(extrappar->parameters()[Trk::theta]) *
611  std::abs((z0 - pos1.z()) / pos1.z()));
612  else
613  mytheta = std::atan(std::tan(extrappar->parameters()[Trk::theta]) *
614  std::abs((z0 - pos2.z()) / pos2.z()));
615 
616  if (mytheta < 0)
617  mytheta += M_PI;
618 
619  delete extrappar;
620  extrappar = nullptr;
621  }
622  }
623  while (myphi > M_PI)
624  myphi -= 2 * M_PI;
625  while (myphi < -M_PI)
626  myphi += 2 * M_PI;
627 
628  double P[5] = { myd0, myz0, myphi, mytheta, myqoverp };
629 
630  // create perigee TSOS and add as first (!) TSOS
631 
632  auto per =
633  std::make_unique<Trk::Perigee>(P[0], P[1], P[2], P[3], P[4], Trk::PerigeeSurface());
634  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
635  typePattern;
636  typePattern.set(Trk::TrackStateOnSurface::Perigee);
638  nullptr, std::move(per), nullptr, typePattern);
639  ntsos->insert(ntsos->begin(), seg_tsos);
640 
641  //
642  // ------------------------------------------------------- now refit the
643  // track
644  //
645 
646  Trk::Track newTrack (info, std::move(ntsos), std::move(fq));
647  Trk::Track* fitTrack =
648  m_fitterTool->fit(ctx,newTrack, true, Trk::nonInteracting).release();
649 
650  // cleanup
651  if (segPar) {
652  delete segPar;
653  segPar = nullptr;
654  }
655 
656  if (!fitTrack) {
657  ATH_MSG_DEBUG("Refit of TRT track segment failed!");
658  return nullptr;
659  }
660 
661  //
662  // -------------------------------------- hack the covarinace back to
663  // something reasonable
664  //
665  const Trk::TrackParameters* firstmeaspar = nullptr;
667  fitTrack->trackParameters()->begin();
668  do {
669  // skip pesudo measurements on perigee
670  if ((*parit)->covariance() &&
671  ((*parit)->associatedSurface() == tS.associatedSurface()))
672  firstmeaspar = *parit;
673  ++parit;
674  } while (firstmeaspar == nullptr &&
675  parit != fitTrack->trackParameters()->end());
676 
677  // Create new perigee starting from the modified first measurement that
678  // has a more reasonable covariance matrix
679  // const Trk::Perigee* perTrack=dynamic_cast<const
680  // Trk::Perigee*>(fitTrack->perigeeParameters());
681  const Trk::Perigee* perTrack = fitTrack->perigeeParameters();
682 
683  if (!perTrack || !perTrack->covariance()) {
684  ATH_MSG_ERROR("Cast of perigee fails, should never happen !");
685  return nullptr;
686  } else {
687  ATH_MSG_VERBOSE ("Perigee after refit with fudges to make it converge : " << (*perTrack) );
688 
689  if(firstmeaspar && firstmeaspar->position().perp()<2000*mm && std::abs(firstmeaspar->position().z())<3000*mm){
690 
691  // Modify first measurement so that it has reasonable errors on z and theta
692  AmgSymMatrix(5) fcovmat = AmgSymMatrix(5)(*(firstmeaspar->covariance()));
693  // factors by which we like to scale the cov, this takes the original segment errors into account
694  double scaleZ = std::sqrt(tS.localCovariance()(1,1))/std::sqrt( (fcovmat)(1,1));
695  double scaleTheta = std::sqrt(tS.localCovariance()(3,3))/std::sqrt( (fcovmat)(3,3));
696  // now do it
697  fcovmat(1,0)=scaleZ*((fcovmat)(1,0));
698  fcovmat(0,1) = (fcovmat)(1,0);
699  fcovmat(1,1)=tS.localCovariance()(1,1);
700  fcovmat(2,1)=scaleZ*((fcovmat)(2,1));
701  fcovmat(1,2) = (fcovmat)(2,1);
702  fcovmat(3,1)=scaleZ*scaleTheta*((fcovmat)(3,1));
703  fcovmat(1,3) = (fcovmat)(3,1);
704  fcovmat(4,1)=scaleZ*((fcovmat)(4,1));
705  fcovmat(1,4) = (fcovmat)(4,1);
706  fcovmat(3,0)=scaleTheta*((fcovmat)(3,0));
707  fcovmat(0,3) = (fcovmat)(3,0);
708  fcovmat(3,2)=scaleTheta*((fcovmat)(3,2));
709  fcovmat(2,3) = (fcovmat)(3,2);
710  fcovmat(3,3)=tS.localCovariance()(3,3);
711  fcovmat(4,3)=scaleTheta*((fcovmat)(4,3));
712  fcovmat(3,4) = (fcovmat)(4,3);
713 
714  // const Amg::VectorX& par = firstmeaspar->parameters();
715  const AmgVector(5)& par = firstmeaspar->parameters();
716  const Trk::TrackParameters* updatedPars =
717  firstmeaspar->associatedSurface().createUniqueTrackParameters(
718  par[Trk::loc1],
719  par[Trk::loc2],
720  par[Trk::phi],
721  par[Trk::theta],
722  par[Trk::qOverP],
723  std::move(fcovmat)).release();
724 
725  // now take parameters at first measurement and exptrapolate to perigee
726  const Trk::TrackParameters* newperpar =
728  *updatedPars,
729  perTrack->associatedSurface(),
730  Trk::anyDirection,
731  false,
733  delete updatedPars; updatedPars = nullptr;
734 
735  if (!newperpar || !newperpar->covariance()) {
736  ATH_MSG_WARNING ("Can not hack perigee parameters, extrapolation failed");
737  delete newperpar; newperpar = nullptr;
738  } else {
739  // this is a HACK !!!
740  // perTrack is owned by fitTrack which is not const here
741  // thus the const-ness is only removed from somthting which is not strictly const here.
742  AmgSymMatrix(5)& errmat ATLAS_THREAD_SAFE = const_cast<AmgSymMatrix(5)&>(*perTrack->covariance());
743  // overwrite cov in perTrack
744  errmat = *newperpar->covariance();
745  delete newperpar; newperpar = nullptr;
746  // check that new cov makes sense !
747  const AmgSymMatrix(5)& CM = *perTrack->covariance();
748  if( CM(1,1)==0.||CM(3,3)==0. ) {
749  ATH_MSG_DEBUG ("Hacked perigee covariance is CRAP, reject track");
750  delete fitTrack; return nullptr;
751  } else {
752  ATH_MSG_VERBOSE ("Perigee after fit with scaled covariance matrix : " << *perTrack);
753  }
754  }
755  }
756  }
757  // return fitted track
758  return fitTrack;
759  }
760  }

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

◆ toLower()

bool InDet::TRT_SegmentToTrackTool::toLower ( const Trk::TrackSegment tS) const
overridevirtual

Implements InDet::ITRT_SegmentToTrackTool.

Definition at line 804 of file TRT_SegmentToTrackTool.cxx.

804  {
805 
806  ATH_MSG_DEBUG ("Try to recover low TRT DC segments in crack...");
807 
808  // counters
809  int nEC = 0; int nBRL = 0; int firstWheel = -999; int lastLayer = -999;
810 
811  // loop over the track states
812  for(int it=0; it<int(tS.numberOfMeasurementBases()); ++it){
813 
814  //test if it is a pseudo measurement
815  if ( dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(tS.measurement(it)) )
816  continue;
817 
818  // get measurement
819  const InDet::TRT_DriftCircleOnTrack* trtcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(tS.measurement(it));
820  if(!trtcircle) continue;
821 
822  // get identifier
823  Identifier id = trtcircle->detectorElement()->identify();
824  // barrel or endcap
825  int isB = m_trtId->barrel_ec(id);
826  if (isB==2 || isB==-2) {
827  nEC++;
828  if(nEC == 1)
829  firstWheel = m_trtId->layer_or_wheel(id);
830  }
831  else if (isB==1 || isB==-1) {
832  nBRL++;
833  lastLayer = m_trtId->layer_or_wheel(id);
834  }
835 
836  }
837 
838  // now the logic
839  return (nEC>0 && nBRL>0) ||
840 
841  (nEC==0 && nBRL>0 && lastLayer<2) ||
842 
843  (nEC>0 && nBRL==0 && (firstWheel>10 || firstWheel<2));
844 
845  }

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

ToolHandle<Trk::IPRDtoTrackMapTool> InDet::TRT_SegmentToTrackTool::m_assoTool
private
Initial value:
{
this,
"AssociationTool",
"InDet::InDetPRDtoTrackMapToolGangedPixels"
}

Definition at line 100 of file TRT_SegmentToTrackTool.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_doRefit

bool InDet::TRT_SegmentToTrackTool::m_doRefit
private

Do final careful refit of tracks.

Definition at line 92 of file TRT_SegmentToTrackTool.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_extrapolator

ToolHandle<Trk::IExtrapolator> InDet::TRT_SegmentToTrackTool::m_extrapolator
private

Track extrapolator tool.

Definition at line 97 of file TRT_SegmentToTrackTool.h.

◆ m_fieldCacheCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> InDet::TRT_SegmentToTrackTool::m_fieldCacheCondObjInputKey
private
Initial value:
{this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}

Definition at line 115 of file TRT_SegmentToTrackTool.h.

◆ m_fieldUnitConversion

double InDet::TRT_SegmentToTrackTool::m_fieldUnitConversion
private

Definition at line 93 of file TRT_SegmentToTrackTool.h.

◆ m_fitterTool

ToolHandle<Trk::ITrackFitter> InDet::TRT_SegmentToTrackTool::m_fitterTool { this, "RefitterTool", "" }
private

Definition at line 99 of file TRT_SegmentToTrackTool.h.

◆ m_scoringTool

ToolHandle<Trk::ITrackScoringTool> InDet::TRT_SegmentToTrackTool::m_scoringTool
private

Track scoring tool.

Definition at line 111 of file TRT_SegmentToTrackTool.h.

◆ m_sharedFrac

double InDet::TRT_SegmentToTrackTool::m_sharedFrac
private

Maximum fraction of shared TRT drift circles.

Definition at line 94 of file TRT_SegmentToTrackTool.h.

◆ m_suppressHoleSearch

bool InDet::TRT_SegmentToTrackTool::m_suppressHoleSearch
private

Suppress hole search during the track summary creation.

Definition at line 95 of file TRT_SegmentToTrackTool.h.

◆ m_trackSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> InDet::TRT_SegmentToTrackTool::m_trackSummaryTool
private
Initial value:
{
this,
"TrackSummaryTool",
"InDetTrackSummaryToolNoHoleSearch"
}

Definition at line 105 of file TRT_SegmentToTrackTool.h.

◆ m_trtId

const TRT_ID* InDet::TRT_SegmentToTrackTool::m_trtId
private

ID TRT helper.

Definition at line 121 of file TRT_SegmentToTrackTool.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:
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
grepfile.info
info
Definition: grepfile.py:38
InDet::TRT_SegmentToTrackTool::m_fitterTool
ToolHandle< Trk::ITrackFitter > m_fitterTool
Definition: TRT_SegmentToTrackTool.h:99
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDet::TRT_SegmentToTrackTool::m_suppressHoleSearch
bool m_suppressHoleSearch
Suppress hole search during the track summary creation.
Definition: TRT_SegmentToTrackTool.h:95
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
Trk::LocalParameters
Definition: LocalParameters.h:98
InDet::TRT_SegmentToTrackTool::m_assoTool
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
Definition: TRT_SegmentToTrackTool.h:100
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
fitman.sy
sy
Definition: fitman.py:524
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
InDet::TRT_DriftCircleOnTrack::prepRawData
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
Definition: TRT_DriftCircleOnTrack.h:202
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
InDet::ITRT_SegmentToTrackTool::EventData::knTrkScoreZero
@ knTrkScoreZero
Number of tracks rejected by score zero.
Definition: ITRT_SegmentToTrackTool.h:52
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:35
InDet::TRT_SegmentToTrackTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: TRT_SegmentToTrackTool.h:115
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:176
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
initialize
void initialize()
Definition: run_EoverP.cxx:894
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
python.compressB64.sx
string sx
Definition: compressB64.py:96
skel.it
it
Definition: skel.GENtoEVGEN.py:423
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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:70
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:41
InDet::TRT_SegmentToTrackTool::m_fieldUnitConversion
double m_fieldUnitConversion
Definition: TRT_SegmentToTrackTool.h:93
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
MCP::ScaleSmearParam::r2
@ r2
InDet::TRT_DriftCircleOnTrack
Definition: TRT_DriftCircleOnTrack.h:53
InDet::TRT_DriftCircleOnTrack::detectorElement
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
Definition: TRT_DriftCircleOnTrack.h:224
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
InDet::TRT_DriftCircle
Definition: TRT_DriftCircle.h:32
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::Segment::numberOfMeasurementBases
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s)
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:193
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
xAOD::TrackParameters
TrackParameters_v1 TrackParameters
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParameters.h:11
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::PseudoMeasurementOnTrack
Class to handle pseudo-measurements in fitters and on track objects.
Definition: PseudoMeasurementOnTrack.h:44
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:48
lumiFormat.i
int i
Definition: lumiFormat.py:92
InDet::TRT_SegmentToTrackTool::dumpconditions
MsgStream & dumpconditions(MsgStream &out) const
Definition: TRT_SegmentToTrackTool.cxx:98
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:72
Trk::MeasurementBase::uniqueClone
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
Definition: MeasurementBase.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Trk::CylinderBounds
Definition: CylinderBounds.h:46
InDet::TRT_SegmentToTrackTool::m_trtId
const TRT_ID * m_trtId
ID TRT helper.
Definition: TRT_SegmentToTrackTool.h:121
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:176
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::TrackScore
float TrackScore
Definition: TrackScore.h:10
Trk::Segment::measurement
const MeasurementBase * measurement(unsigned int) const
returns the Trk::MeasurementBase objects depending on the integer
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:184
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDetDD::TRT_BaseElement::identify
virtual Identifier identify() const override final
identifier of this detector element:
Trk::TrackSegment::associatedSurface
const Surface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: TrackSegment.h:112
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
InDet::TRT_SegmentToTrackTool::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: TRT_SegmentToTrackTool.h:105
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DataVector< const Trk::TrackStateOnSurface >
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
Trk::PRDtoTrackMap::isUsed
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
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::MeasurementBase
Definition: MeasurementBase.h:58
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
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::SurfaceType::Perigee
@ Perigee
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:24
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
Trk::d0
@ d0
Definition: ParamDefs.h:69
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
Trk::FitQuality::uniqueClone
std::unique_ptr< FitQuality > uniqueClone() const
NVI uniqueClone.
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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.
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDet::TRT_SegmentToTrackTool::m_scoringTool
ToolHandle< Trk::ITrackScoringTool > m_scoringTool
Track scoring tool.
Definition: TRT_SegmentToTrackTool.h:111
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::TRT_SegmentToTrackTool::m_doRefit
bool m_doRefit
Do final careful refit of tracks.
Definition: TRT_SegmentToTrackTool.h:92
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
calibdata.delete
list delete
Definition: calibdata.py:46
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:857
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::nonInteracting
@ nonInteracting
Definition: TrackingPrimitives.h:192
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
InDet::ITRT_SegmentToTrackTool::EventData::knTRTTrk
@ knTRTTrk
Number of TRT-only tracks on output.
Definition: ITRT_SegmentToTrackTool.h:54
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
MagField::AtlasFieldCache::getField
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
Definition: AtlasFieldCache.cxx:42
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
MuonHough::extrapolate
float extrapolate(const MuonLayerHough::Maximum &ref, const MuonLayerHough::Maximum &ex, bool doparabolic=false)
Definition: MuonLayerHough.cxx:519
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDet::ITRT_SegmentToTrackTool::EventData::knTrkSegUsed
@ knTrkSegUsed
Number of excluded segments by other TRT segments.
Definition: ITRT_SegmentToTrackTool.h:53
Trk::SurfaceType::Line
@ Line
MCP::ScaleSmearParam::r1
@ r1
InDet::TRT_SegmentToTrackTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Track extrapolator tool.
Definition: TRT_SegmentToTrackTool.h:97
Trk::Segment::fitQuality
const FitQuality * fitQuality() const
return the FitQuality object, returns NULL if no FitQuality is defined
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:160
Trk::loc1
@ loc1
Definition: ParamDefs.h:40
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::phi0
@ phi0
Definition: ParamDefs.h:71
Trk::StraightLineSurface
Definition: StraightLineSurface.h:51
fitman.k
k
Definition: fitman.py:528
Trk::CylinderBounds::halflengthZ
double halflengthZ() const
This method returns the halflengthZ.
Trk::SurfaceBounds::Cylinder
@ Cylinder
Definition: SurfaceBounds.h:61
InDet::TRT_SegmentToTrackTool::m_sharedFrac
double m_sharedFrac
Maximum fraction of shared TRT drift circles.
Definition: TRT_SegmentToTrackTool.h:94
Trk::TrackInfo::TRTStandalone
@ TRTStandalone
TRT Standalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:162