ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::TrackPairsSelector Class Reference

#include <TrackPairsSelector.h>

Inheritance diagram for InDet::TrackPairsSelector:
Collaboration diagram for InDet::TrackPairsSelector:

Classes

struct  Cache
 

Public Member Functions

 TrackPairsSelector (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TrackPairsSelector ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
bool selectTrackParticlePair (const xAOD::TrackParticle *trkPpos, const xAOD::TrackParticle *trkPneg, Cache &cache) const
 Track pair selectors.Return true if the argument track fulfills the selection. More...
 
bool selectTrackPair (const Trk::Track *trkpos, const Trk::Track *trkneg) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode 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 ()
 
static std::map< std::string, float > getLastValues (const Cache &cache)
 Return a map with the values calculated for the last pair to decorate the vertex once it is created. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

Private Attributes

ToolHandle< InDet::ConversionFinderUtilsm_helpertool
 Conversion helper tool. More...
 
ToolHandle< Trk::ITrkDistanceFinderm_distanceTool
 Distance of minimum approach tool
More...
 
DoubleProperty m_maxR
 Properties for track selection: all cuts are ANDed. More...
 
DoubleProperty m_MinTrkAngle
 
DoubleArrayProperty m_maxDist
 
DoubleArrayProperty m_etaCut
 
DoubleArrayProperty m_initCut
 
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

This class selects track pairs for conversion finder

Author
Tatjana Lenz, Thomas Koffas

Definition at line 26 of file TrackPairsSelector.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

◆ TrackPairsSelector()

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

Definition at line 40 of file TrackPairsSelector.cxx.

44  {
45  declareInterface<TrackPairsSelector>(this);
46  }

◆ ~TrackPairsSelector()

virtual InDet::TrackPairsSelector::~TrackPairsSelector ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::TrackPairsSelector::finalize ( )
overridevirtual

Definition at line 75 of file TrackPairsSelector.cxx.

75  {
76  return StatusCode::SUCCESS;
77  }

◆ getLastValues()

std::map< std::string, float > InDet::TrackPairsSelector::getLastValues ( const Cache cache)
static

Return a map with the values calculated for the last pair to decorate the vertex once it is created.

Definition at line 291 of file TrackPairsSelector.cxx.

293  {
294  return {{"minimumDistanceTrk", cache.m_distance},
295  {"deltaCotThetaTrk", cache.m_deltaCotTheta},
296  {"deltaInitRadius", cache.m_deltaInit} };
297  }

◆ initialize()

StatusCode InDet::TrackPairsSelector::initialize ( )
overridevirtual

Definition at line 54 of file TrackPairsSelector.cxx.

54  {
55 
56  /* Get the track selector tool from ToolSvc */
57  if ( m_helpertool.retrieve().isFailure() ) {
58  ATH_MSG_ERROR("Failed to retrieve tool " << m_helpertool);
59  return StatusCode::FAILURE;
60  }
61  ATH_MSG_DEBUG("Retrieved tool " << m_helpertool);
62 
63  /* Get the distance tool from ToolsSvc */
64  if(m_distanceTool.retrieve().isFailure()) {
65  ATH_MSG_ERROR("Could not get " << m_distanceTool);
66  return StatusCode::FAILURE;
67  }
68  ATH_MSG_DEBUG("Got the distance tool " << m_distanceTool);
69 
70  ATH_MSG_DEBUG("Initialization successful");
71  return StatusCode::SUCCESS;
72  }

◆ 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::TrackPairsSelector::interfaceID ( )
static

Definition at line 49 of file TrackPairsSelector.cxx.

49  {
50  return IID_ITrackPairsSelector;
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.

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

◆ selectTrackPair()

bool InDet::TrackPairsSelector::selectTrackPair ( const Trk::Track trkpos,
const Trk::Track trkneg 
) const

Getting the track perigee parameters

Position of initial hit of the two tracks

Definition at line 211 of file TrackPairsSelector.cxx.

213  {
214 
215  bool pass = true;
217  const Trk::Perigee* perPos = trkpos->perigeeParameters();
218  const Trk::Perigee* perNeg = trkneg->perigeeParameters();
219  if (!(m_helpertool->momFraction(perPos, perNeg))) pass = false;
220 
222  double init_pos = 0.; double init_neg = 0.;
225  if(!mb_pos || !mb_neg) {pass = false; return pass;}
227  init_pos = (*itp_pos)->globalPosition().perp();
229  init_neg = (*itp_neg)->globalPosition().perp();
230  int sCase = 100;
231  if (init_neg<=m_maxR && init_pos<=m_maxR) sCase = 0;
232  if ((init_neg<=m_maxR && init_pos>m_maxR) || (init_neg>m_maxR && init_pos<=m_maxR)) sCase = 1;
233  if (init_neg>m_maxR && init_pos>m_maxR) sCase = 2;
234 
235  //Cut on Deta
236  double detaCut = 0.0;
237  if(sCase == 0) {
238  detaCut = m_etaCut[0];
239  } else if(sCase == 1) {
240  detaCut = m_etaCut[1];
241  } else if(sCase == 2) {
242  detaCut = m_etaCut[2];
243  }
244 
245  if (fabs(1. / tan(perPos->parameters()[Trk::theta]) -
246  1. / tan(perNeg->parameters()[Trk::theta])) > detaCut)
247  pass = false;
248 
249  //Cut on distance between the initial hit position of the two tracks.
250  double dinit = 1000.;
251  if(sCase == 0) {
252  dinit = m_initCut[0];
253  } else if(sCase == 1) {
254  dinit = m_initCut[1];
255  } else if(sCase == 2) {
256  dinit = m_initCut[2];
257  }
258  if(fabs(init_pos - init_neg) > dinit) pass = false;
259 
260  //Cut on distance of minimum approach between the two tracks.
261  double maxDist = 1000.;
262  if(sCase == 0) {
263  maxDist = m_maxDist[0];
264  } else if(sCase == 1) {
265  maxDist = m_maxDist[1];
266  } else if(sCase == 2) {
267  maxDist = m_maxDist[2];
268  }
269 
270  double newDistance = 1000000.;
271  std::optional<Trk::ITrkDistanceFinder::TwoPoints> result
272  = m_distanceTool->CalculateMinimumDistance(*trkpos, *trkneg);
273  if (!result) {
274  pass = false;
275  }
276  else {
277  newDistance = dist (result.value());
278  if (newDistance>maxDist) pass = false;
279  }
280 
281  //3D angle cut in the case of V0s, not used in the case of conversions
282  double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
283  (perPos->momentum().mag() * perNeg->momentum().mag());
284  if(d_beta <m_MinTrkAngle) pass = false;
285 
286  return pass;
287  }

◆ selectTrackParticlePair()

bool InDet::TrackPairsSelector::selectTrackParticlePair ( const xAOD::TrackParticle trkPpos,
const xAOD::TrackParticle trkPneg,
TrackPairsSelector::Cache cache 
) const

Track pair selectors.Return true if the argument track fulfills the selection.

Definition at line 81 of file TrackPairsSelector.cxx.

85  {
86 
87  bool pass = true;
88  //Getting the track perigee parameters
89  const Trk::TrackParameters* perPos = &(trkPpos->perigeeParameters());
90  const Trk::TrackParameters* perNeg = &(trkPneg->perigeeParameters());
91  if (!(m_helpertool->momFraction(perPos, perNeg))) pass = false;
92 
93  //Track summary information
94 
95 
96  uint8_t nclusPos(0);
97  uint8_t dummy(0);
99  nclusPos += dummy;
100  }
102  nclusPos += dummy;
103  }
104 
105  uint8_t nclusNeg(0);
107  nclusNeg += dummy;
108  }
110  nclusNeg += dummy;
111  }
112 
113 
114  int sCase = 100;
115  if(nclusNeg>0 && nclusPos>0) sCase = 0;
116  if((nclusNeg>0 && nclusPos==0) || (nclusNeg==0 && nclusPos>0)) sCase = 1;
117  if(nclusNeg==0 && nclusPos==0) sCase = 2;
118 
119  //Position of first hit in track particle
122 
123  int index(-1);
124  for(unsigned int i(0); i< trkPpos->numberOfParameters() ; ++i ){
125  if( xAOD::FirstMeasurement == trkPpos->parameterPosition(i) ){
126  index = i;
127  break;
128  }
129  }
130  if(index!=-1){
131  parPos = trkPpos->curvilinearParameters(index);
132  } else {
133  ATH_MSG_WARNING("Track Particle does not contain first Measurement track parameters");
134  return false;
135  }
136 
137  index = -1;
138  for(unsigned int i(0); i< trkPneg->numberOfParameters() ; ++i ){
139  if( xAOD::FirstMeasurement == trkPneg->parameterPosition(i) ){
140  index = i;
141  break;
142  }
143  }
144  if(index!=-1){
145  parNeg = trkPneg->curvilinearParameters(index);
146  } else {
147  ATH_MSG_WARNING("Track Particle does not contain first Measurement track parameters");
148  return false;
149  }
150 
151  double firstRpos = parPos.position().perp();
152  double firstRneg = parNeg.position().perp();
153 
154  //Cut on Deta
155  double detaCut = 0.0;
156  if(sCase == 0) {
157  detaCut = m_etaCut[0];
158  } else if(sCase == 1) {
159  detaCut = m_etaCut[1];
160  } else if(sCase == 2) {
161  if(fabs(perPos->eta())<0.6 && fabs(perNeg->eta())<0.6) detaCut = 10000.; // No eta cut for barrel TRT tracks
162  else detaCut = m_etaCut[2];
163  }
164 
165  cache.m_deltaCotTheta = fabs(1. / tan(perPos->parameters()[Trk::theta]) -
166  1. / tan(perNeg->parameters()[Trk::theta]));
167  if (cache.m_deltaCotTheta > detaCut)
168  return false;
169 
170  //Cut on distance between the initial hit position of the two tracks.
171  double dinit = 1000.;
172  if(sCase == 0) {
173  dinit = m_initCut[0];
174  } else if(sCase == 1) {
175  dinit = m_initCut[1];
176  } else if(sCase == 2) {
177  dinit = m_initCut[2];
178  }
179 
180  cache.m_deltaInit = fabs(firstRpos - firstRneg);
181  if (cache.m_deltaInit > dinit) return false;
182 
183  //Cut on distance of minimum approach between the two tracks.
184  double maxDist = 1000.;
185  if(sCase == 0) {
186  maxDist = m_maxDist[0];
187  } else if(sCase == 1) {
188  maxDist = m_maxDist[1];
189  } else if(sCase == 2) {
190  maxDist = m_maxDist[2];
191  }
192 
193  cache.m_distance = 1000000.;
194  std::optional<Trk::ITrkDistanceFinder::TwoPoints> result
195  = m_distanceTool->CalculateMinimumDistance(trkPneg->perigeeParameters(),
196  trkPpos->perigeeParameters() );
197  if (!result) return false;
198  cache.m_distance = dist (result.value());
199  if (cache.m_distance>maxDist) return false;
200 
201  //3D angle cut in the case of V0s, not used in the case of conversions
202  double d_beta = (perPos->momentum().dot(perNeg->momentum())) /
203  (perPos->momentum().mag() * perNeg->momentum().mag());
204  if(d_beta <m_MinTrkAngle) pass = false;
205 
206  return pass;
207  }

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_distanceTool

ToolHandle<Trk::ITrkDistanceFinder> InDet::TrackPairsSelector::m_distanceTool
private
Initial value:
{
this,
"DistanceTool",
"Trk::SeedNewtonTrkDistanceFinder",
"Distance of minimum approach tool"
}

Distance of minimum approach tool

Definition at line 73 of file TrackPairsSelector.h.

◆ m_etaCut

DoubleArrayProperty InDet::TrackPairsSelector::m_etaCut
private
Initial value:
{this, "MaxEta", {0.8, 1.2, 1.2},
"Maximum eta difference between tracks in pair"}

Definition at line 90 of file TrackPairsSelector.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_helpertool

ToolHandle<InDet::ConversionFinderUtils> InDet::TrackPairsSelector::m_helpertool
private
Initial value:
{
this,
"ConversionFinderHelperTool",
"InDet::ConversionFinderUtils",
"Conversion helper tool"
}

Conversion helper tool.


Definition at line 66 of file TrackPairsSelector.h.

◆ m_initCut

DoubleArrayProperty InDet::TrackPairsSelector::m_initCut
private
Initial value:
{this, "MaxInitDistance", {10000., 10000., 10000.},
"Maximum distance difference between initial hits of tracks in pair"}

Definition at line 93 of file TrackPairsSelector.h.

◆ m_maxDist

DoubleArrayProperty InDet::TrackPairsSelector::m_maxDist
private
Initial value:
{this, "MaxDistBetweenTracks", {8., 80., 45.},
"Maximum allowed distance of minimum approach"}

Definition at line 87 of file TrackPairsSelector.h.

◆ m_maxR

DoubleProperty InDet::TrackPairsSelector::m_maxR
private
Initial value:
{this, "MaxFirstHitRadius", 500.,
"Maximum initial hit radius in order to apply the impact point cut"}

Properties for track selection: all cuts are ANDed.

Definition at line 81 of file TrackPairsSelector.h.

◆ m_MinTrkAngle

DoubleProperty InDet::TrackPairsSelector::m_MinTrkAngle
private
Initial value:
{this, "MinTrackAngle", 0.,
"Minimum allowed angle between decay tracks. Used only in V0 reconstruction."}

Definition at line 84 of file TrackPairsSelector.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:
xAOD::TrackParticle_v1::curvilinearParameters
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:673
InDet::TrackPairsSelector::m_initCut
DoubleArrayProperty m_initCut
Definition: TrackPairsSelector.h:94
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
index
Definition: index.py:1
AthCommonDataStore::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
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition: TrackParticle_v1.cxx:736
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
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::TrackPairsSelector::m_maxR
DoubleProperty m_maxR
Properties for track selection: all cuts are ANDed.
Definition: TrackPairsSelector.h:82
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
InDet::TrackPairsSelector::m_etaCut
DoubleArrayProperty m_etaCut
Definition: TrackPairsSelector.h:91
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
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
InDet::TrackPairsSelector::m_MinTrkAngle
DoubleProperty m_MinTrkAngle
Definition: TrackPairsSelector.h:85
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::theta
@ theta
Definition: ParamDefs.h:66
xAOD::FirstMeasurement
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Definition: TrackingPrimitives.h:213
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
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
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
xAOD::TrackParticle_v1::parameterPosition
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:647
DataVector< const Trk::MeasurementBase >
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::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::TrackParticle_v1::numberOfParameters
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Definition: TrackParticle_v1.cxx:553
InDet::TrackPairsSelector::m_helpertool
ToolHandle< InDet::ConversionFinderUtils > m_helpertool
Conversion helper tool.
Definition: TrackPairsSelector.h:66
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
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
DeMoScan.index
string index
Definition: DeMoScan.py:364
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
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
Trk::ParametersBase::eta
double eta() const
Access method for pseudorapidity - from momentum.
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
InDet::TrackPairsSelector::m_distanceTool
ToolHandle< Trk::ITrkDistanceFinder > m_distanceTool
Distance of minimum approach tool
Definition: TrackPairsSelector.h:73
InDet::TrackPairsSelector::m_maxDist
DoubleArrayProperty m_maxDist
Definition: TrackPairsSelector.h:88
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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