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

#include <SingleTrackConversionTool.h>

Inheritance diagram for InDet::SingleTrackConversionTool:
Collaboration diagram for InDet::SingleTrackConversionTool:

Public Member Functions

 SingleTrackConversionTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SingleTrackConversionTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
xAOD::VertexbuildSingleTrackParticleConversion (const xAOD::TrackParticle *, xAOD::VertexContainer *container) const
 Build single track conversion candidate. More...
 
bool selectSingleTrackParticleConversion (const xAOD::TrackParticle *) const
 Select single track conversion candidates. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

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

Protected Attributes

double m_minInitR
 
double m_minInitR_noBLay
 Minimum initial hit radius in order to consider track as coming from photon conversion. More...
 
double m_singleThreshold
 Minimum initial hit radius in order to consider track as coming from photon conversion. More...
 
int m_maxBLhits
 Minimum ratio of HL hits for a track to be labeled as electron. More...
 
bool m_PIDonlyForXe
 Maximum number of blayer hits. 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

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

Helper tools to reconstruct single track conversions

Author
Tatjana Lenz , Thomas Koffas

Definition at line 29 of file SingleTrackConversionTool.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

◆ SingleTrackConversionTool()

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

Definition at line 42 of file SingleTrackConversionTool.cxx.

46  , m_minInitR(70.)
47  , m_minInitR_noBLay(120.)
48  , m_singleThreshold(0.1)
49  , m_maxBLhits(0)
50  // m_maxPhiVtxTrk(0.2)
51  {
52  declareInterface<SingleTrackConversionTool>(this);
53  declareProperty("MinInitialHitRadius" , m_minInitR);
54  declareProperty("MinInitialHitRadius_noBlay" , m_minInitR_noBLay);
55  declareProperty("MinRatioOfHLhits" , m_singleThreshold);
56  //declareProperty("MaxPhiVtxTrk" , m_maxPhiVtxTrk);
57  declareProperty("MaxBLayerHits" , m_maxBLhits);
58  declareProperty("PIDonlyForXe" , m_PIDonlyForXe = false,
59  "Only check TRT PID if all hits are Xe hits");
60  }

◆ ~SingleTrackConversionTool()

InDet::SingleTrackConversionTool::~SingleTrackConversionTool ( )
virtualdefault

Member Function Documentation

◆ buildSingleTrackParticleConversion()

xAOD::Vertex * InDet::SingleTrackConversionTool::buildSingleTrackParticleConversion ( const xAOD::TrackParticle track,
xAOD::VertexContainer container 
) const

Build single track conversion candidate.

xAOD::TrackParticle interface.

Create a RecVertex at the first measurement of the track.

Need to compute a global position covariance matrix as J.C.JT

The local position parameters covariance matrix C (2x2)

The Jacobian matrix J (3x2)

The A = J.C (3x2)

The A.JT = J.C.JT (3x3)

Construct the new covariance matrix (3x3)

The local position parameters covariance matrix C (2x2)

The straight line surface (wire) global directions

The particle global direction

The Jacobian matrix J (3x2)

The A = J.C (3x2)

The A.JT = J.C.JT (3x3)

Construct the new covariance matrix (3x3)

Definition at line 93 of file SingleTrackConversionTool.cxx.

96  {
98 
99  unsigned int index(0);
100  if (!track->indexOfParameterAtPosition(index, xAOD::FirstMeasurement)) {
101  ATH_MSG_WARNING("TrackParticle has no first measurement");
102  return nullptr;
103  }
104 
105  const Trk::CurvilinearParameters trkPar =
106  track->curvilinearParameters(index);
107 
108  const Amg::Vector3D& gp = trkPar.position();
109  const AmgSymMatrix(5) em = *(trkPar.covariance());
110 
111  // ME: this is nuts, those values are 0, 0
112  // double chi2 = track->fitQuality()->chiSquared();
113  // int Ndf = track->fitQuality()->numberDoF();
114 
116  const Amg::Transform3D& T = trkPar.associatedSurface().transform();
117  AmgSymMatrix(3) nCovVtx;
118 
119  // Should use eigen to do all of this
120 
121  // ME: use the surface to find out what we do, do not hardcode the geoemtry
122  if (Trk::SurfaceType::Plane == trkPar.associatedSurface().type()) {
123 
125  double p11 = em(Trk::locX, Trk::locX);
126  double p12 = em(Trk::locX, Trk::locY);
127  double p21 = em(Trk::locY, Trk::locX);
128  double p22 = em(Trk::locY, Trk::locY);
129 
131  double Ax[3] = { T(0, 0), T(1, 0), T(2, 0) };
132  double Ay[3] = { T(0, 1), T(1, 1), T(2, 1) };
133  double a11 = Ax[0];
134  double a12 = Ay[0];
135  double a21 = Ax[1];
136  double a22 = Ay[1];
137  double a31 = Ax[2];
138  double a32 = Ay[2];
139 
141  double A11 = a11 * p11 + a12 * p21;
142  double A12 = a11 * p12 + a12 * p22;
143  double A21 = a21 * p11 + a22 * p21;
144  double A22 = a21 * p12 + a22 * p22;
145  double A31 = a31 * p11 + a32 * p21;
146  double A32 = a31 * p12 + a32 * p22;
147 
149  double P11 = a11 * A11 + A12 * a12;
150  double P12 = A11 * a21 + A12 * a22;
151  double P13 = A11 * a31 + A12 * a32;
152  double P21 = A21 * a11 + A22 * a12;
153  double P22 = A21 * a21 + A22 * a22;
154  double P23 = A21 * a31 + A22 * a32;
155  double P31 = A31 * a11 + A32 * a12;
156  double P32 = A31 * a21 + A32 * a22;
157  double P33 = A31 * a31 + A32 * a32;
158 
160  nCovVtx(0, 0) = P11;
161  nCovVtx(0, 1) = P12;
162  nCovVtx(0, 2) = P13;
163  nCovVtx(1, 0) = P21;
164  nCovVtx(1, 1) = P22;
165  nCovVtx(1, 2) = P23;
166  nCovVtx(2, 0) = P31;
167  nCovVtx(2, 1) = P32;
168  nCovVtx(2, 2) = P33;
169 
170  } else if (Trk::SurfaceType::Line == trkPar.associatedSurface().type()) {
171 
173  double p11 = em(Trk::locR, Trk::locR);
174  double p12 = em(Trk::locR, Trk::locZ);
175  double p21 = em(Trk::locZ, Trk::locR);
176  double p22 = em(Trk::locZ, Trk::locZ);
177 
179  double A[3] = {T(0,2),T(1,2),T(2,2)};
180 
182  double Px = trkPar.momentum().x();
183  double Py = trkPar.momentum().y();
184  double Pz = trkPar.momentum().z();
185 
187  double Bx = A[1]*Pz-A[2]*Py;
188  double By = A[2]*Px-A[0]*Pz;
189  double Bz = A[0]*Py-A[1]*Px;
190  double Bn = 1./sqrt(Bx*Bx+By*By+Bz*Bz); Bx*=Bn; By*=Bn; Bz*=Bn;
191  double a11 = Bx; double a12 = A[0];
192  double a21 = By; double a22 = A[1];
193  double a31 = Bz; double a32 = A[2];
194 
196  double A11 = a11*p11 + a12*p21; double A12 = a11*p12 + a12*p22;
197  double A21 = a21*p11 + a22*p21; double A22 = a21*p12 + a22*p22;
198  double A31 = a31*p11 + a32*p21; double A32 = a31*p12 + a32*p22;
199 
201  double P11 = a11*A11 + A12*a12; double P12 = A11*a21 + A12*a22; double P13 = A11*a31 + A12*a32;
202  double P21 = A21*a11 + A22*a12; double P22 = A21*a21 + A22*a22; double P23 = A21*a31 + A22*a32;
203  double P31 = A31*a11 + A32*a12; double P32 = A31*a21 + A32*a22; double P33 = A31*a31 + A32*a32;
204 
206  nCovVtx(0,0) = P11; nCovVtx(0,1) = P12; nCovVtx(0,2) = P13;
207  nCovVtx(1,0) = P21; nCovVtx(1,1) = P22; nCovVtx(1,2) = P23;
208  nCovVtx(2,0) = P31; nCovVtx(2,1) = P32; nCovVtx(2,2) = P33;
209  }
210 
211  // now construct the vertex from the global position, cov. put NdF and chi2 to zero (Markus)
212 
213 
215  container->push_back( vertex );
216 
217  vertex->setPosition(gp);
218  vertex->setCovariancePosition(nCovVtx);
219  vertex->setVertexType(xAOD::VxType::ConvVtx);
220  vertex->setFitQuality( 0, 0);
221 
222  return vertex;
223  }

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

Definition at line 84 of file SingleTrackConversionTool.cxx.

84  {
85  return StatusCode::SUCCESS;
86  }

◆ initialize()

StatusCode InDet::SingleTrackConversionTool::initialize ( )
overridevirtual

Definition at line 77 of file SingleTrackConversionTool.cxx.

77  {
78  return StatusCode::SUCCESS;
79  }

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

Definition at line 70 of file SingleTrackConversionTool.cxx.

70  {
71  return IID_ISingleTrackConversionTool;
72  }

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

◆ selectSingleTrackParticleConversion()

bool InDet::SingleTrackConversionTool::selectSingleTrackParticleConversion ( const xAOD::TrackParticle track) const

Select single track conversion candidates.

xAOD::TrackParticle.

Definition at line 228 of file SingleTrackConversionTool.cxx.

228  {
229 
230  //Position of first hit in track particle
231 
232  int index(-1);
233  for(unsigned int i(0); i< track->numberOfParameters() ; ++i ){
234  if( xAOD::FirstMeasurement == track->parameterPosition(i) ){
235  index = i;
236  break;
237  }
238  }
239  if(index ==-1){
240  ATH_MSG_WARNING("Track Particle does not contain first Measurement track parameters");
241  return false;
242  }
243 
244  const Trk::CurvilinearParameters trk_meas = track->curvilinearParameters(index);
245 
246  uint8_t dummy;
247 
248  uint8_t expectedHitInBLayer(0);
249  if( track->summaryValue(dummy,xAOD::expectInnermostPixelLayerHit) )
250  expectedHitInBLayer = dummy;
251 
252  float Rfirst = trk_meas.position().perp();
253  if (expectedHitInBLayer)
254  {
255  // ME: cut on minInitR if blayer is ok
256  if (Rfirst < m_minInitR)
257  {
258  ATH_MSG_DEBUG("BLayer hit expected. Radius of first hit (" <<
259  Rfirst << ") below minimum: " << m_minInitR);
260  return false;
261  }
262  }
263  else
264  {
265  // ME: cut on minInitR_NBLay if blayer is off
266  if(Rfirst < m_minInitR_noBLay)
267  {
268  ATH_MSG_DEBUG("No BLayer hit expected. Radius of first hit (" <<
269  Rfirst << ") below minimum: " << m_minInitR_noBLay);
270  return false;
271  }
272  }
273 
274 
275  uint8_t nTrtHits(0);
276  if( track->summaryValue(dummy, xAOD::numberOfTRTHits))
277  nTrtHits = dummy;
278 
279  uint8_t nTrtOutliers(0);
280  if(track->summaryValue(dummy, xAOD::numberOfTRTOutliers))
281  nTrtOutliers = dummy;
282 
283  uint8_t ntrt = nTrtHits + nTrtOutliers;
284 
285  uint8_t nTrtXenonHits(0);
286  if( track->summaryValue(dummy, xAOD::numberOfTRTXenonHits) )
287  nTrtXenonHits = dummy;
288 
289 
290 
291  if(ntrt > 0 && (!m_PIDonlyForXe || nTrtXenonHits==ntrt) ) {
292  // only check TRT PID if m_PIDonlyForXe is false or all TRT hits are Xenon hits
293  float prob = 1.0;
294  if( !track->summaryValue(prob,xAOD::eProbabilityHT) )
295  {
296  ATH_MSG_WARNING("Could not retrieve TR probability");
297  return false;
298  }
299  if (prob < m_singleThreshold)
300  {
301  ATH_MSG_DEBUG("Probability (" << prob << ") below threshold: "
302  << m_singleThreshold);
303  return false;
304  }
305  }
306 
307  uint8_t nBLHits(0);
309  nBLHits += dummy;
311  nBLHits += dummy;
312  if(nBLHits > m_maxBLhits)
313  {
314  ATH_MSG_DEBUG("BLayer hits (" << nBLHits << ") above maximum: " << m_maxBLhits);
315  return false;
316  }
317 
318  return true;
319  }

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_maxBLhits

int InDet::SingleTrackConversionTool::m_maxBLhits
protected

Minimum ratio of HL hits for a track to be labeled as electron.

Definition at line 56 of file SingleTrackConversionTool.h.

◆ m_minInitR

double InDet::SingleTrackConversionTool::m_minInitR
protected

Definition at line 50 of file SingleTrackConversionTool.h.

◆ m_minInitR_noBLay

double InDet::SingleTrackConversionTool::m_minInitR_noBLay
protected

Minimum initial hit radius in order to consider track as coming from photon conversion.

Definition at line 52 of file SingleTrackConversionTool.h.

◆ m_PIDonlyForXe

bool InDet::SingleTrackConversionTool::m_PIDonlyForXe
protected

Maximum number of blayer hits.

Definition at line 58 of file SingleTrackConversionTool.h.

◆ m_singleThreshold

double InDet::SingleTrackConversionTool::m_singleThreshold
protected

Minimum initial hit radius in order to consider track as coming from photon conversion.

Definition at line 54 of file SingleTrackConversionTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
Trk::locX
@ locX
Definition: ParamDefs.h:43
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:44
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::SurfaceType
SurfaceType
Definition: TrackingPrimitives.h:551
xAOD::numberOfTRTXenonHits
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
Definition: TrackingPrimitives.h:284
InDet::SingleTrackConversionTool::m_PIDonlyForXe
bool m_PIDonlyForXe
Maximum number of blayer hits.
Definition: SingleTrackConversionTool.h:58
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::expectInnermostPixelLayerHit
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Definition: TrackingPrimitives.h:236
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
Trk::locR
@ locR
Definition: ParamDefs.h:50
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
covarianceTool.prob
prob
Definition: covarianceTool.py:678
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
xAOD::numberOfInnermostPixelLayerOutliers
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
Definition: TrackingPrimitives.h:238
InDet::SingleTrackConversionTool::m_maxBLhits
int m_maxBLhits
Minimum ratio of HL hits for a track to be labeled as electron.
Definition: SingleTrackConversionTool.h:56
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
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
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
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
InDet::SingleTrackConversionTool::m_singleThreshold
double m_singleThreshold
Minimum initial hit radius in order to consider track as coming from photon conversion.
Definition: SingleTrackConversionTool.h:54
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::CurvilinearParametersT::associatedSurface
virtual const S & associatedSurface() const override final
Access to the Surface method.
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Py
Definition: PyDataStore.h:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDet::SingleTrackConversionTool::m_minInitR
double m_minInitR
Definition: SingleTrackConversionTool.h:50
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
InDet::SingleTrackConversionTool::m_minInitR_noBLay
double m_minInitR_noBLay
Minimum initial hit radius in order to consider track as coming from photon conversion.
Definition: SingleTrackConversionTool.h:52
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
xAOD::eProbabilityHT
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
Definition: TrackingPrimitives.h:301
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::VxType::ConvVtx
@ ConvVtx
Conversion vertex.
Definition: TrackingPrimitives.h:574
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::Plane
@ Plane
Definition: TrackingPrimitives.h:556
Trk::SurfaceType::Line
@ Line
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237