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 ()=default
 
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

DoubleProperty m_minInitR
 
DoubleProperty m_minInitR_noBLay
 
DoubleProperty m_singleThreshold
 
IntegerProperty m_maxBLhits {this, "MaxBLayerHits", 0, "Maximum number of blayer hits"}
 
BooleanProperty m_PIDonlyForXe {this, "PIDonlyForXe", false, "Only check TRT PID if all hits are Xe hits"}
 

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  {
47  declareInterface<SingleTrackConversionTool>(this);
48  }

◆ ~SingleTrackConversionTool()

virtual 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 76 of file SingleTrackConversionTool.cxx.

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

◆ 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 67 of file SingleTrackConversionTool.cxx.

67  {
68  return StatusCode::SUCCESS;
69  }

◆ initialize()

StatusCode InDet::SingleTrackConversionTool::initialize ( )
overridevirtual

Definition at line 60 of file SingleTrackConversionTool.cxx.

60  {
61  return StatusCode::SUCCESS;
62  }

◆ 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 53 of file SingleTrackConversionTool.cxx.

53  {
54  return IID_ISingleTrackConversionTool;
55  }

◆ 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 211 of file SingleTrackConversionTool.cxx.

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

◆ 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

IntegerProperty InDet::SingleTrackConversionTool::m_maxBLhits {this, "MaxBLayerHits", 0, "Maximum number of blayer hits"}
protected

Definition at line 59 of file SingleTrackConversionTool.h.

◆ m_minInitR

DoubleProperty InDet::SingleTrackConversionTool::m_minInitR
protected
Initial value:
{this, "MinInitialHitRadius", 70.,
"Minimum initial hit radius in order to consider track as coming from photon conversion"}

Definition at line 50 of file SingleTrackConversionTool.h.

◆ m_minInitR_noBLay

DoubleProperty InDet::SingleTrackConversionTool::m_minInitR_noBLay
protected
Initial value:
{this, "MinInitialHitRadius_noBlay", 120.,
"Minimum initial hit radius in order to consider track as coming from photon conversion"}

Definition at line 53 of file SingleTrackConversionTool.h.

◆ m_PIDonlyForXe

BooleanProperty InDet::SingleTrackConversionTool::m_PIDonlyForXe {this, "PIDonlyForXe", false, "Only check TRT PID if all hits are Xe hits"}
protected

Definition at line 61 of file SingleTrackConversionTool.h.

◆ m_singleThreshold

DoubleProperty InDet::SingleTrackConversionTool::m_singleThreshold
protected
Initial value:
{this, "MinRatioOfHLhits", 0.1,
"Minimum ratio of HL hits for a track to be labeled as electron"}

Definition at line 56 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:
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:557
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
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
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_minInitR_noBLay
DoubleProperty m_minInitR_noBLay
Definition: SingleTrackConversionTool.h:54
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:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
covarianceTool.prob
prob
Definition: covarianceTool.py:678
InDet::SingleTrackConversionTool::m_maxBLhits
IntegerProperty m_maxBLhits
Definition: SingleTrackConversionTool.h:60
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::numberOfInnermostPixelLayerOutliers
@ numberOfInnermostPixelLayerOutliers
number of 0th layer barrel outliers
Definition: TrackingPrimitives.h:238
A
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::SingleTrackConversionTool::m_minInitR
DoubleProperty m_minInitR
Definition: SingleTrackConversionTool.h:51
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
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:364
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:567
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:623
InDet::SingleTrackConversionTool::m_singleThreshold
DoubleProperty m_singleThreshold
Definition: SingleTrackConversionTool.h:57
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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
InDet::SingleTrackConversionTool::m_PIDonlyForXe
BooleanProperty m_PIDonlyForXe
Definition: SingleTrackConversionTool.h:62
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