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

Februar 2007 (c) Atlas Detector Reconstruction Software. More...

#include <JetFitterRoutines.h>

Inheritance diagram for Trk::JetFitterRoutines:
Collaboration diagram for Trk::JetFitterRoutines:

Public Member Functions

virtual StatusCode initialize () override
 
 JetFitterRoutines (const std::string &t, const std::string &n, const IInterface *p)
 Constructor. More...
 
 ~JetFitterRoutines ()
 Destructor. More...
 
void initializeToMinDistancesToJetAxis (VxJetCandidate *) const
 This method provides the initialization of all the tracks in the fit to the position of minimum distance to the initial flight axis. More...
 
void performTheFit (VxJetCandidate *myJetCandidate, int num_maxiterations=30, bool treat_sign_flip=true, int num_signflip_maxiterations=30, double deltachi2_convergence=0.001) const
 This is the method where the fit is actually done. More...
 
void smoothAllVertices (VxJetCandidate *myJetCandidate) const
 triggers the smoothing of all vertices (the tracks in the fit are updated using the constraint provided by the vertices along the jet axis they were fitted to) More...
 
void updateAllVertices (VxJetCandidate *myJetCandidate) const
 One iteration of the Kalman Updated of all tracks to the actual fit is performed. More...
 
std::pair< double, bool > fastProbabilityOfMerging (const VxVertexOnJetAxis *, const VxVertexOnJetAxis *, const VxJetCandidate *) const
 Calculates in a very fast way the probability two vertices along the jet axis to be compatible with each other, taking the constraint to be compatible with the previous fitted flight axis into account. More...
 
double fullProbabilityOfMerging (const VxVertexOnJetAxis *firstVertex, const VxVertexOnJetAxis *secondVertex, const VxJetCandidate *myJetCandidate, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-2) const
 Calculates in a complete way the probability two vertices along the jet axis to be compatible with each other, taking the constraint to be compatible with the previous fitted flight axis into account. More...
 
void fillTableWithFullProbOfMerging (VxJetCandidate *myJetCandidate, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-3, double threshold_probability=1e-5) const
 The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed probabilities of merging between all the vertices two by two using a full probability estimation, with the complete fit performed with the options provided. More...
 
void fillTableWithFastProbOfMerging (VxJetCandidate *myJetCandidate) const
 The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed probabilities of merging between all the vertices two by two using the fast probability estimation (using for all combinations of vertices the fastProbabilityOfMerging method of the same class) More...
 
void deleteVertexFromJetCandidate (VxVertexOnJetAxis *vertexToDelete, VxJetCandidate *myJetCandidate) const
 Deltes a vertex from the VxJetCandidate, doing everything is needed to preserve the internal coherence of the VxJetCandidate object (e.g. 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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::pair< double, bool > fastProbabilityOfMergingWithPrimary (const VxVertexOnJetAxis *otherVertex, const VxJetCandidate *myJetCandidate) const
 Internal method to calculate fast probability of merging, for merging with primary vertex. More...
 
std::pair< double, bool > fastProbabilityOfMergingNoPrimary (const VxVertexOnJetAxis *, const VxVertexOnJetAxis *, const VxJetCandidate *myJetCandidate) const
 Internal method to calculate fast probability of merging, for merging with non primary vertex. More...
 
void fillTableWithProbOfMerging (VxJetCandidate *myJetCandidate, bool fullcomputation, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-2, double threshold_probability=1e-3) const
 Internal method to fill the VxClusteringTable of the VxJetCandidate object, independently on if the fullcomputation is requested or not. More...
 
bool checkJetCandidate (VxJetCandidate *) const
 Internal method to provide a check if the VxJetCandidate has been initialized in a consistent way. More...
 
void copyRecoPositionsToLinearizationPositions (VxJetCandidate &myJetCandidate) const
 Method to copy new reco positions to linearization positions after checking new positions are inside the ID. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
 
ToolHandle< JetFitterInitializationHelperm_initializationHelper
 
ToolHandle< JetFitterHelperm_helper
 
ToolHandle< KalmanVertexOnJetAxisUpdatorm_updator
 
ToolHandle< KalmanVertexOnJetAxisSmootherm_smoother
 
ToolHandle< TrkDistanceFinderNeutralChargedm_minDistanceFinder
 
ToolHandle< TrkDistanceFinderNeutralNeutralm_minDistanceFinderNeutral
 
bool m_fast
 
double m_maxDRshift
 
bool m_noPrimaryVertexRefit
 
double m_maxR
 
double m_maxZ
 
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

Februar 2007 (c) Atlas Detector Reconstruction Software.

Author
Giacinto Piacquadio (University of Freiburg),
Christian Weiser (University of Freiburg)

This class contains the core functions for the "JetFitter" algorithm.

This is a new algorithm which uses a "Kalman filter" based approach to implement the "ghost track method" used for the first time by SLD (reference to be inserted here).

All the tracks inside a jet can be fitted with the constraint of lying on the same 'flight axis' from the primary vertex towards the jet. This class provides all the methods which are necessary to perform this fit and to evaluate the probability of two or more tracks to build one cluster on the jet axis.

The real finding algorithm is then implemented in the "SV" finder algorithm. In this class only the methods for 'fitting' are implemented.

There is no clear input and clear output in a similar fit, so this works more like a continous interaction between the finder and the fitter, which is provided in the form in a set of routines to use.

Definition at line 56 of file JetFitterRoutines.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

◆ JetFitterRoutines()

Trk::JetFitterRoutines::JetFitterRoutines ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Constructor.

Definition at line 74 of file JetFitterRoutines.cxx.

93  {
94 
95  AthAlgTool::initialize().ignore();
97 
98  //retrieving the udator itself
99  ATH_CHECK( m_helper.retrieve() );
100 
101  ATH_CHECK( m_initializationHelper.retrieve() );

◆ ~JetFitterRoutines()

Trk::JetFitterRoutines::~JetFitterRoutines ( )
default

Destructor.

Member Function Documentation

◆ checkJetCandidate()

bool Trk::JetFitterRoutines::checkJetCandidate ( VxJetCandidate myJetCandidate) const
private

Internal method to provide a check if the VxJetCandidate has been initialized in a consistent way.

Definition at line 556 of file JetFitterRoutines.cxx.

571  {
572  return false;
573  }
574  // end if else rimary==0
575 
576  // check std::vector<VxVertexOnJetAxis*> (if pointers are not empty and if
577  // all associated tracks are not empty)
578  const std::vector<VxVertexOnJetAxis*>& tracksOfVertex =
579  myJetCandidate->getVerticesOnJetAxis();
580 
581  auto badVertex = [](VxVertexOnJetAxis* pVertex) {
582  return (pVertex == nullptr) or (pVertex->getNumVertex() < 0);
583  };
584  ok =
585  (std::find_if(tracksOfVertex.begin(), tracksOfVertex.end(), badVertex) ==
586  tracksOfVertex.end());
587  if (not ok) {
589  "One of the VxTrackAtVertex is a null pointer or uninitialized. Not "
590  "proceeding with the fit!"); // Two error messages combined into one
591  }
592  if (not ok) {
593  return false;
594  }
595 
596  //now check if there is some track at least to do the fit...
597 
598  if (tracksOfVertex.empty()&&sizeprimary==0) {
599  ATH_MSG_DEBUG( "No tracks at primary, no tracks on jet axis. Not proceeding with the fit!" );
600  return false;
601  }
602 
603  //now check if the number of tracks corrisponds to the number of components of the recVertexPositions
604  const Trk::RecVertexPositions & myRecVertexPositions=myJetCandidate->getRecVertexPositions();
605 
606  const Amg::VectorX& myPosition=myRecVertexPositions.position();
607 
608  if (static_cast<unsigned int>(tracksOfVertex.size()+5)!=static_cast<unsigned int>(myPosition.rows())) {
609  ATH_MSG_WARNING ( "The position matrix has " << myPosition.rows()
610  << " components while " << tracksOfVertex.size()+5
611  << " are expected. Not proceeding with the fit " );
612  }
613 
614  const Amg::MatrixX & myErrorMatrix=myRecVertexPositions.covariancePosition();
615 
616  //check if symMatrix and myPosition are compatible (size matches)
617  if (myPosition.rows()!=myErrorMatrix.rows()) {
618  ATH_MSG_WARNING ("The dimension of the position vector and the covariance matrix does not match. Not performing fit...");
619  return false;
620  }
621 
622  //check if all the diagonal values of the covariance matrix are not zero
623  for (int i=0;i<myPosition.rows();i++) {
624  if (std::abs(myErrorMatrix(i,i))<1e-20) {
625  ATH_MSG_WARNING ("Value of cov matrix component n. " << i << " has a value smaller than 1e-8. Not considered as possible. Not performing fit...");
626  return false;
627  }
628  }
629 
630  //well, more checks in the future!!!
631 
632  return true;
633 
634  }//end method
635 
636 
637  std::pair<double,bool> JetFitterRoutines::fastProbabilityOfMerging(const VxVertexOnJetAxis* firstVertex,
638  const VxVertexOnJetAxis* secondVertex,
639  const VxJetCandidate* myJetCandidate) const {
640  //this method is for evaluating the probability of merging in a very fast (and rough) way
641  //if above a threshold you should think about evaluating the "fullProbabilityOfMerging" :-)
642 
643  const VxVertexOnJetAxis * PrimaryVertex=myJetCandidate->getPrimaryVertex();
644 
645  if (firstVertex==PrimaryVertex) {
646  return fastProbabilityOfMergingWithPrimary(secondVertex,myJetCandidate);
647  }
648  if (secondVertex==PrimaryVertex) {
649  return fastProbabilityOfMergingWithPrimary(firstVertex,myJetCandidate);

◆ copyRecoPositionsToLinearizationPositions()

void Trk::JetFitterRoutines::copyRecoPositionsToLinearizationPositions ( VxJetCandidate myJetCandidate) const
private

Method to copy new reco positions to linearization positions after checking new positions are inside the ID.

Definition at line 1141 of file JetFitterRoutines.cxx.

1152  {
1153  if (absLinJetTheta>1e-8)
1154  {
1155  ATH_MSG_DEBUG (" Closest distance of track to jet axis is outside ID envelope, R=" << R << ", setting to R= " << m_maxR);
1156  distOnAxis=m_maxR / abssinLinJetTheta;
1157  }
1158  }
1159 
1160  Z=distOnAxis*cosLinJetTheta;
1161  if (std::abs(Z)>m_maxZ)
1162  {
1163  if (abscosLinJetTheta>1e-8)
1164  {
1165  ATH_MSG_DEBUG( " Closest distance of track to jet axis is outside ID envelope, Z=" << Z << ", setting to Z= " << m_maxZ );
1166  distOnAxis=m_maxZ / cosLinJetTheta;
1167  }
1168  }
1169 
1170  linPositions[numRow(myVertex->getNumVertex())]=distOnAxis;
1171  }
1172  }
1173 
1174  VertexPositions & linVertexPositions=myJetCandidate.getLinearizationVertexPositions();
1175  linVertexPositions.setPosition(linPositions);
1176  //now set the linearization position for the next step to the actual fitted vertex
1177  //OLD CODE BEFORE CHECKS
1178  //myJetCandidate->setLinearizationVertexPositions(myJetCandidate->getRecVertexPositions());
1179  }
1180 
1181 }//end namespace

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

◆ deleteVertexFromJetCandidate()

void Trk::JetFitterRoutines::deleteVertexFromJetCandidate ( VxVertexOnJetAxis vertexToDelete,
VxJetCandidate myJetCandidate 
) const

Deltes a vertex from the VxJetCandidate, doing everything is needed to preserve the internal coherence of the VxJetCandidate object (e.g.

track numbering, list of tracks at vertices along the jet axis and so on)

Definition at line 1027 of file JetFitterRoutines.cxx.

1064  {
1065 
1066  // RS 19.04.2011 attempt to fix coverity defect 22750
1067  std::vector<VxTrackAtVertex*>::iterator TracksBegin=tracksAtJetCandidate->begin();
1068  std::vector<VxTrackAtVertex*>::iterator TracksEnd=tracksAtJetCandidate->end();
1069  for (std::vector<VxTrackAtVertex*>::iterator TracksIter=TracksBegin;TracksIter!=TracksEnd;) {
1070 
1071  if (*TracksIter==*TracksAtVtxIter) {
1072  Trk::VxTrackAtVertex* oldPointer=*TracksIter;
1073  TracksIter=tracksAtJetCandidate->erase(TracksIter);
1074  delete oldPointer;
1075  oldPointer=nullptr;
1076  TracksEnd=tracksAtJetCandidate->end();
1077  break;
1078  }
1079  ++TracksIter;
1080 
1081  }
1082  }
1083 
1084  if (numberOfTracksBefore-numberOfTracksToDelete!=(int)myJetCandidate->vxTrackAtVertex()->size()) {
1085  ATH_MSG_DEBUG( " MISMATCH in JetFitterRoutines: the jetcandidate had: " << numberOfTracksBefore << " tracks " <<
1086  " and " << numberOfTracksToDelete << " to delete = " << myJetCandidate->vxTrackAtVertex()->size() << " tracks left! " );
1087  }
1088 
1089 
1090  //now as a last step you need to delete the vertex you're not using anymore...
1091 
1092  std::vector<VxVertexOnJetAxis*> copyOfVerticesAtJetCandidate=myJetCandidate->getVerticesOnJetAxis();
1093 
1094  const std::vector<VxVertexOnJetAxis*>::iterator VerticesBegin=copyOfVerticesAtJetCandidate.begin();
1095  std::vector<VxVertexOnJetAxis*>::iterator VerticesEnd=copyOfVerticesAtJetCandidate.end();
1096 
1097  bool found=false;
1098 
1099  //have a variable to store the vector of tracks which then need to be removed (copy)...
1100  // std::vector<VxTrackAtVertex*> tracksToRemove=vertexToDelete->getTracksAtVertex();
1101 
1102  for (std::vector<VxVertexOnJetAxis*>::iterator VerticesIter=VerticesBegin;VerticesIter!=VerticesEnd;) {
1103  if ((*VerticesIter)==vertexToDelete) {
1104  delete *VerticesIter;
1105  VerticesIter=copyOfVerticesAtJetCandidate.erase(VerticesIter);
1106  VerticesEnd=copyOfVerticesAtJetCandidate.end();
1107  found=true;
1108  break;
1109  }
1110  ++VerticesIter;
1111 
1112  }
1113 
1114  if (!found) {
1115  ATH_MSG_WARNING( "Could not find the vertex to delete... Very strange... Check!!! " );
1116  }
1117 
1118  //update myJetCandidate with the new vector of tracks
1119  myJetCandidate->setVerticesOnJetAxis(copyOfVerticesAtJetCandidate);
1120 
1121  //update the numbering scheme
1122  m_initializationHelper->updateTrackNumbering(myJetCandidate);
1123 
1124  }
1125 
1126  void JetFitterRoutines::copyRecoPositionsToLinearizationPositions(VxJetCandidate & myJetCandidate) const
1127  {
1128 
1129  const VertexPositions & newLinVertexPositions=myJetCandidate.getRecVertexPositions();
1130  Amg::VectorX linPositions=newLinVertexPositions.position();
1131 
1132  const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate.getVerticesOnJetAxis();
1133  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
1134  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
1135 
1136  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
1137  VxVertexOnJetAxis* myVertex=(*VtxIter);
1138  if (myVertex!=nullptr) {
1139 

◆ 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

◆ fastProbabilityOfMerging()

std::pair< double, bool > Trk::JetFitterRoutines::fastProbabilityOfMerging ( const VxVertexOnJetAxis firstVertex,
const VxVertexOnJetAxis secondVertex,
const VxJetCandidate myJetCandidate 
) const

Calculates in a very fast way the probability two vertices along the jet axis to be compatible with each other, taking the constraint to be compatible with the previous fitted flight axis into account.

As a result a pair is provided:

  • first member: probability of the two vertices to be compatible with a single vertex
  • second vertex: if true, constraining the two vertices to be a single vertex moves the flight axis direction in DeltaR by more than the variable m_maxDRshift, which is set by the jobOption property maxDRshift. (the idea is that the bigger this shift is, the worse the approximation given by the previous linearization of these two vertices is and so the fast estimation of the compatibility between the two vertices).

If not needed the second member can just be ignored.

Description of the algorithmic procedure: a single Kalman Update step is performed on top of the previous fit, just constraining the two vertices to lie on the same position on the flight axis (this is done using a measurement equation with zero associated error). This is very fast.

Definition at line 652 of file JetFitterRoutines.cxx.

658  {
659 
660 
661  //first get a copy of all vertex positions (this you can't avoid I fear...)
662  RecVertexPositions copyOfRecVertexPositions(myJetCandidate->getRecVertexPositions());
663 
664 
665  double oldchi2=copyOfRecVertexPositions.fitQuality().chiSquared();
666  double oldndf=copyOfRecVertexPositions.fitQuality().numberDoF();
667 
668  //#ifdef JetFitterRoutines_DEBUG2
669  const Amg::VectorX & positionVector=copyOfRecVertexPositions.position();

◆ fastProbabilityOfMergingNoPrimary()

std::pair< double, bool > Trk::JetFitterRoutines::fastProbabilityOfMergingNoPrimary ( const VxVertexOnJetAxis firstVertex,
const VxVertexOnJetAxis secondVertex,
const VxJetCandidate myJetCandidate 
) const
private

Internal method to calculate fast probability of merging, for merging with non primary vertex.

Definition at line 717 of file JetFitterRoutines.cxx.

740  {
741  ATH_MSG_WARNING ("In the compatibility estimation chi2: " << chi2 << " ndf " << ndf << " giving back 0 prob");
742  return std::pair<double,bool>(0,isshifted);
743  }
744 
745  return std::pair<double,bool>(TMath::Prob(chi2,(int)std::floor(ndf+0.5)),isshifted);
746 
747 
748  }
749 
750  double JetFitterRoutines::fullProbabilityOfMerging(const VxVertexOnJetAxis* firstVertex,
751  const VxVertexOnJetAxis* secondVertex,
752  const VxJetCandidate* myJetCandidate,
753  int num_maxiterations,
754  bool treat_sign_flip,
755  int num_signflip_maxiterations,
756  double deltachi2_convergence) const {
757 
758 
759  if (firstVertex==nullptr||secondVertex==nullptr||myJetCandidate==nullptr) {
760  ATH_MSG_WARNING ("zero pointer given to the full probability estimation. No estimation performed, zero prob returned ");
761  return 0;
762  }
763 

◆ fastProbabilityOfMergingWithPrimary()

std::pair< double, bool > Trk::JetFitterRoutines::fastProbabilityOfMergingWithPrimary ( const VxVertexOnJetAxis otherVertex,
const VxJetCandidate myJetCandidate 
) const
private

Internal method to calculate fast probability of merging, for merging with primary vertex.

Definition at line 672 of file JetFitterRoutines.cxx.

693  {
694  ATH_MSG_WARNING (" In the compatibility estimation chi2: " << chi2 << " ndf " << ndf << " giving back 0 prob ");
695  return std::pair<double,bool>(0,isshifted);
696  }
697 
698  return std::pair<double,bool>(TMath::Prob(chi2,(int)std::floor(ndf+0.5)),isshifted);
699 
700  }
701 
702  std::pair<double,bool> JetFitterRoutines::fastProbabilityOfMergingNoPrimary(const VxVertexOnJetAxis* firstVertex,
703  const VxVertexOnJetAxis* secondVertex,
704  const VxJetCandidate* myJetCandidate) const {
705 
706  //first get a copy of all vertex positions (this you can't avoid I fear...)
707  RecVertexPositions copyOfRecVertexPositions(myJetCandidate->getRecVertexPositions());
708  const FitQuality & copyOfRecVertexQuality=copyOfRecVertexPositions.fitQuality();
709 
710  double oldchi2=copyOfRecVertexQuality.chiSquared();
711  double oldndf=copyOfRecVertexQuality.numberDoF();
712 
713  //#ifdef JetFitterRoutines_DEBUG2
714  const Amg::VectorX & positionVector=copyOfRecVertexPositions.position();
715  const Amg::MatrixX & positionCov=copyOfRecVertexPositions.covariancePosition();

◆ fillTableWithFastProbOfMerging()

void Trk::JetFitterRoutines::fillTableWithFastProbOfMerging ( VxJetCandidate myJetCandidate) const

The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed probabilities of merging between all the vertices two by two using the fast probability estimation (using for all combinations of vertices the fastProbabilityOfMerging method of the same class)

This is very fast and gives reasonably good results in all the cases where the fit is not too much affected by non-linearities.

Definition at line 864 of file JetFitterRoutines.cxx.

◆ fillTableWithFullProbOfMerging()

void Trk::JetFitterRoutines::fillTableWithFullProbOfMerging ( VxJetCandidate myJetCandidate,
int  num_maxiterations = 20,
bool  treat_sign_flip = true,
int  num_signflip_maxiterations = 10,
double  deltachi2_convergence = 1e-3,
double  threshold_probability = 1e-5 
) const

The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed probabilities of merging between all the vertices two by two using a full probability estimation, with the complete fit performed with the options provided.

To increase the speed, before using the full estimation of merging probability a fast merging is done (fastProbabilityOfMerging method) and only if the fastprobability of merging is higher than the threshold_probability provided, the full probability is computed.

Definition at line 849 of file JetFitterRoutines.cxx.

849  {
850  fillTableWithProbOfMerging(myJetCandidate,false);
851  }
852 
853 
854  void JetFitterRoutines::fillTableWithProbOfMerging(VxJetCandidate* myJetCandidate,
855  bool fullcomputation,
856  int num_maxiterations,
857  bool treat_sign_flip,
858  int num_signflip_maxiterations,
859  double deltachi2_convergence,
860  double threshold_probability) const {
861 
862  if (myJetCandidate==nullptr) {

◆ fillTableWithProbOfMerging()

void Trk::JetFitterRoutines::fillTableWithProbOfMerging ( VxJetCandidate myJetCandidate,
bool  fullcomputation,
int  num_maxiterations = 20,
bool  treat_sign_flip = true,
int  num_signflip_maxiterations = 10,
double  deltachi2_convergence = 1e-2,
double  threshold_probability = 1e-3 
) const
private

Internal method to fill the VxClusteringTable of the VxJetCandidate object, independently on if the fullcomputation is requested or not.

Definition at line 869 of file JetFitterRoutines.cxx.

869  {
870  delete clusteringTablePtr;
871  }
872  clusteringTablePtr=new Trk::VxClusteringTable();
873 
874  double highestprobability(0.);
875 
876  VxVertexOnJetAxis* primaryVertex=myJetCandidate->getPrimaryVertex();
877 
878  if (primaryVertex==nullptr) {
879  ATH_MSG_WARNING( "VxJetCandidate provided has no primary vertex. No compatibility table calculated." );
880  return;
881  }
882 
883  primaryVertex->setCompatibilityToPrimaryVtx(1);//stupid but assign prob 1 to primary vtx for consistency
884 
885  const std::vector<VxVertexOnJetAxis*> & tracksOnJetAxis=myJetCandidate->getVerticesOnJetAxis();
886 
887  //now evaluate probability of cluster forming with primary vertex
888  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=tracksOnJetAxis.begin();
889  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=tracksOnJetAxis.end();
890 
891  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;
892  VtxIter!=VtxEnd;++VtxIter) {
893 
894  std::pair<double,bool> fastProbabilityAndNonLinearity=fastProbabilityOfMerging(primaryVertex,
895  *VtxIter,
896  myJetCandidate);
897 
898 
899  ATH_MSG_VERBOSE ("Fast probability of merging between primary and " <<
900  (*VtxIter)->getNumVertex() << " is " << fastProbabilityAndNonLinearity.first);
901 
902 #ifdef JetFitterRoutines_DEBUG2
903  ATH_MSG_DEBUG( "Fast probability of merging between primary and " <<
904  (*VtxIter)->getNumVertex() << " is " << fastProbabilityAndNonLinearity.first << " and is max DR " <<
905  fastProbabilityAndNonLinearity.second );
906 #endif
907 
908  if (fullcomputation) {
909  if (fastProbabilityAndNonLinearity.first>threshold_probability) {
910  if (fastProbabilityAndNonLinearity.first>highestprobability/100.&&fastProbabilityAndNonLinearity.second) {
911 
912  double fullProbability=fullProbabilityOfMerging(primaryVertex,*VtxIter,
913  myJetCandidate,num_maxiterations,
914  treat_sign_flip,
915  num_signflip_maxiterations,
916  deltachi2_convergence);
917 
918 
919 #ifdef JetFitterRoutines_DEBUG2
920  ATH_MSG_DEBUG( "Full probability of merging with primary is " << fullProbability );
921 #endif
922 
923  ATH_MSG_DEBUG ("Full probability of merging with primary is " << fullProbability);
924 
925  //store this fullProbability into the VxClusteringTable of myJetCandidate
926 
927  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fullProbability);
928  if (fullProbability>highestprobability) {
929  highestprobability=fullProbability;
930  }
931  (*VtxIter)->setCompatibilityToPrimaryVtx(fullProbability);
932  } else {
933  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fastProbabilityAndNonLinearity.first);
934  (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
935  }
936  } else {
937  (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
938  }
939  } else {
940  if (fastProbabilityAndNonLinearity.first>threshold_probability) {
941  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fastProbabilityAndNonLinearity.first);
942  if (fastProbabilityAndNonLinearity.first>highestprobability) {
943  highestprobability=fastProbabilityAndNonLinearity.first;
944  }
945  }
946  (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
947  }
948  }//end first iteration over tracks for compatibility with primary vertex
949 
950  //now all the remaining combination have to be tested...
951 
952  for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator VtxIter2=VtxBegin;
953  VtxIter2!=VtxEnd;++VtxIter2) {
954  for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator VtxIter1=VtxBegin;
955  VtxIter1!=VtxIter2;++VtxIter1) {
956 
957  std::pair<double,bool> fastProbabilityAndNonLinearity=fastProbabilityOfMerging(*VtxIter1,
958  *VtxIter2,
959  myJetCandidate);
960 
961 
962 
963  ATH_MSG_VERBOSE ("Fast probability of merging between vtx n " << (*VtxIter1)->getNumVertex()<<
964  " and " << (*VtxIter2)->getNumVertex() << " is " <<
965  fastProbabilityAndNonLinearity.first << " and is max DR " <<
966  fastProbabilityAndNonLinearity.second);
967 
968 #ifdef JetFitterRoutines_DEBUG2
969  ATH_MSG_DEBUG( "Fast probability of merging between vtx n " << (*VtxIter1)->getNumVertex() << " and " <<
970  (*VtxIter2)->getNumVertex() << " is " << fastProbabilityAndNonLinearity.first << " and is max DR " <<
971  fastProbabilityAndNonLinearity.second );
972 #endif
973  if (fullcomputation) {
974  if (fastProbabilityAndNonLinearity.first>threshold_probability) {
975  if (fastProbabilityAndNonLinearity.first>highestprobability/100.&&fastProbabilityAndNonLinearity.second) {
976  double fullProbability=fullProbabilityOfMerging(*VtxIter1,*VtxIter2,
977  myJetCandidate,num_maxiterations,
978  treat_sign_flip,
979  num_signflip_maxiterations,
980  deltachi2_convergence);
981 
982 
983 #ifdef JetFitterRoutines_DEBUG2
984  ATH_MSG_DEBUG( "Full probability of merging is " << fullProbability );
985 #endif
986 
987  ATH_MSG_VERBOSE ("Full probability of merging is " << fullProbability);
988 
989  //store this fullProbability into the VxClusteringTable of myJetCandidate
990 
991  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fullProbability);
992  if (fullProbability>highestprobability) {
993  highestprobability=fullProbability;
994  }
995  } else {
996  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fastProbabilityAndNonLinearity.first);
997  }
998  }
999  } else {
1000  if (fastProbabilityAndNonLinearity.first>threshold_probability) {
1001  clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fastProbabilityAndNonLinearity.first);
1002  if (fastProbabilityAndNonLinearity.first>highestprobability) {
1003  highestprobability=fastProbabilityAndNonLinearity.first;
1004  }
1005  }
1006  }
1007  }//end first vtx loop
1008  }//end second vtx loop
1009 
1010  }//end fillTableWithFullProbOfMerging() method
1011 
1012  void JetFitterRoutines::deleteVertexFromJetCandidate(VxVertexOnJetAxis* vertexToDelete,
1013  VxJetCandidate* myJetCandidate) const {
1014  if (vertexToDelete==myJetCandidate->getPrimaryVertex()) {
1015  ATH_MSG_WARNING ("YOU ARE deleting the primary vertex. This is not possible... ");
1016  return;
1017  }
1018 
1019  // now you need to *delete* the second vertex in copyOfRecVertexPositions and
1020  // in copyOfLinearizationPositions
1021  const Amg::VectorX & recPosition=myJetCandidate->getRecVertexPositions().position();
1022  const Amg::VectorX & linPosition=myJetCandidate->getLinearizationVertexPositions().position();
1023  const Amg::VectorX & constraintPosition=myJetCandidate->getConstraintVertexPositions().position();
1024  const Amg::MatrixX & covPosition=myJetCandidate->getRecVertexPositions().covariancePosition();
1025  const Amg::MatrixX & covConstraintPosition=myJetCandidate->getConstraintVertexPositions().covariancePosition();

◆ fullProbabilityOfMerging()

double Trk::JetFitterRoutines::fullProbabilityOfMerging ( const VxVertexOnJetAxis firstVertex,
const VxVertexOnJetAxis secondVertex,
const VxJetCandidate myJetCandidate,
int  num_maxiterations = 20,
bool  treat_sign_flip = true,
int  num_signflip_maxiterations = 10,
double  deltachi2_convergence = 1e-2 
) const

Calculates in a complete way the probability two vertices along the jet axis to be compatible with each other, taking the constraint to be compatible with the previous fitted flight axis into account.

Contrary to the fast estimation method, here the complete fit is repeated and so the flight axis direction is corrected according to the new constraint taking all non linearities into account (because relinearization of the tracks partecipating in the fit is performed).

The following steps are done: 1) a temporary copy of the full VxJetCandidate has to be created 2) the copies of the vertices to join have to be found 3) the two copied vertices are merged in the new VxJetCandidate, using the mergeVerticesInJetCandidate function of the JetFitterHelper class 4) the track Number is updated, using the updateTrackNumbering function of the JetFitterInitializationHelper class 5) the full fit is performed on the new VxJetCandidate object

As a result the only full probability of merging is provided as a double.

Definition at line 765 of file JetFitterRoutines.cxx.

779  {
780  ATH_MSG_WARNING ("Empty primary vertex found when estimating fullProbOfMerging. 0 prob returned.");
781  return 0;
782  }
783 
784  oldToNewVtxPointers[primaryOfFirst]=primaryOfSecond;
785 
786  unsigned int sizeOfVertices=vectorOfOldJetCand.size();
787  if (vectorOfNewJetCand.size()!=sizeOfVertices) {
788  ATH_MSG_WARNING ("Old and new track of vertices do not match during fullProbOfMerging. 0 prob returned.");
789  return 0;
790  }
791 
792  for (unsigned int s=0;s<sizeOfVertices;s++) {
793  const VxVertexOnJetAxis* pointer1=vectorOfOldJetCand[s];
794  VxVertexOnJetAxis* pointer2=vectorOfNewJetCand[s];
795  if (pointer1==nullptr||pointer2==nullptr) {
796  ATH_MSG_WARNING ("One of the pointers of the original or copied vector of vertices is empty during fullProbOfMerging. Skipping it...");
797  } else {
798  oldToNewVtxPointers[pointer1]=pointer2;
799  }
800  }
801 
802  //now merge firstVertex and secondVertex
803  VxVertexOnJetAxis* newFirstVertex=oldToNewVtxPointers[firstVertex];
804  VxVertexOnJetAxis* newSecondVertex=oldToNewVtxPointers[secondVertex];
805 
806  if (newFirstVertex==nullptr||newSecondVertex==nullptr) {
807  ATH_MSG_WARNING ("No correspondence to the given firstVertex or secondVertex in fullProbOfMerging. Returning 0 prob.");
808  return 0.;
809  }
810 
811  VxVertexOnJetAxis & commonVertex=m_helper->mergeVerticesInJetCandidate(*newFirstVertex,
812  *newSecondVertex,
813  newJetCandidate);
814 
815  //now you need to update the numbering scheme
816  m_initializationHelper->updateTrackNumbering(&newJetCandidate);
817 
818  performTheFit(&newJetCandidate,num_maxiterations,
819  treat_sign_flip,
820  num_signflip_maxiterations,
821  deltachi2_convergence);
822 
823  // const FitQuality & qualityOfMergedVertex=commonVertex.fitQuality();
824 
825 #ifdef JetFitterRoutines_DEBUG
826  ATH_MSG_DEBUG( " End estimating full prob of merging... chi2 " << commonVertex.fitQuality().chiSquared() << " ndf " << commonVertex.fitQuality().numberDoF() );
827 #endif
828 
829  return (double)TMath::Prob(commonVertex.fitQuality().chiSquared(),
830  (int)std::floor(commonVertex.fitQuality().numberDoF()+0.5));
831 
832  }
833 
834  void JetFitterRoutines::fillTableWithFullProbOfMerging(VxJetCandidate* myJetCandidate,
835  int num_maxiterations,
836  bool treat_sign_flip,
837  int num_signflip_maxiterations,
838  double deltachi2_convergence,
839  double threshold_probability) const {
840  fillTableWithProbOfMerging(myJetCandidate,
841  true,
842  num_maxiterations,
843  treat_sign_flip,
844  num_signflip_maxiterations,
845  deltachi2_convergence,
846  threshold_probability);
847  }

◆ initialize()

StatusCode Trk::JetFitterRoutines::initialize ( )
overridevirtual

Definition at line 108 of file JetFitterRoutines.cxx.

115  {
116 
117  ATH_MSG_DEBUG ("initializingToMinDistancesToJetAxis is now implemented! Will converge faster!!! Neutrals are fully supported...");
118 
119  VertexPositions & linVertexPositions=myJetCandidate->getLinearizationVertexPositions();
120  Amg::VectorX linPositions=linVertexPositions.position();
121 
122 
123  const Trk::RecVertexPositions & recVtxPosition=myJetCandidate->getRecVertexPositions();
124  const Amg::VectorX & recPosition=recVtxPosition.position();
125 
126  Amg::Vector3D a(recPosition[Trk::jet_xv],
127  recPosition[Trk::jet_yv],

◆ initializeToMinDistancesToJetAxis()

void Trk::JetFitterRoutines::initializeToMinDistancesToJetAxis ( VxJetCandidate myJetCandidate) const

This method provides the initialization of all the tracks in the fit to the position of minimum distance to the initial flight axis.

This should considerably improve the speed of convergence. It is still not implemented in the first version of the fit.

Definition at line 130 of file JetFitterRoutines.cxx.

151  {//Was that your intention? to be checked... 15.03.2007
153  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
154  if (!readHandle.isValid()) {
155  std::stringstream msg;
156  msg << "Failed to retrieve magmnetic field conditions data " << m_fieldCacheCondObjInputKey.key() << ".";
157  throw std::runtime_error(msg.str());
158  }
159  MagField::AtlasFieldCache fieldCache;
160  fieldCondObj->getInitializedCache (fieldCache);
161  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
162  VxVertexOnJetAxis* myVertex=(*VtxIter);
163  if (myVertex!=nullptr) {
164 
165  const std::vector<VxTrackAtVertex*> & tracksAtVertex=myVertex->getTracksAtVertex();
166  if (tracksAtVertex.size()>1) {
167  ATH_MSG_DEBUG( "Warning in JetFitterInitializationHelper.Number of tracks at vertex is bigger than one, "
168  << "even during initialization phase. Skipping this vertex (already initialized)..." );
169  }
170  else if (tracksAtVertex.empty())
171  {
172  ATH_MSG_WARNING( "No track at vertex. Internal fitter error. Contact author (GP) ... " );
173  }
174  else
175  {
176  ATH_MSG_VERBOSE( " TrackAtVertexSize is: " << tracksAtVertex.size() );
177  ATH_MSG_VERBOSE( " pointer to first element: " << tracksAtVertex[0] );
178  ATH_MSG_VERBOSE( " pointer to initialPerigee: " << tracksAtVertex[0]->initialPerigee() );
179 
180  // RS 19.04.2011 try to fix coverity defect 22750
181  const Trk::Perigee* ptr = dynamic_cast<const Trk::Perigee*>((tracksAtVertex[0]->initialPerigee()));
182  if (ptr)
183  {
184 
185  double distOnAxis=-999.;
186  std::pair<Amg::Vector3D,double> result;
187  try {
188  result=m_minDistanceFinder->getPointAndDistance(myJetAxis,*ptr,distOnAxis, fieldCache);
189 
190  double R=distOnAxis*sinRecJetTheta;
191  double Z=distOnAxis*cosRecJetTheta;
192 
193  if (std::abs(R)>m_maxR)
194  {
195 
196  if (absRecJetTheta>1e-8)
197  {
198  ATH_MSG_DEBUG( " Closest distance of track to jet axis is outside ID envelope, R=" << R << ", setting to R= " << m_maxR );
199  distOnAxis=m_maxR /abssinRecJetTheta;
200  }
201  }
202 
203  Z=distOnAxis*cosRecJetTheta;
204  if (std::abs(Z)>m_maxZ)
205  {
206  if (abscosRecJetTheta>1e-8)
207  {
208  ATH_MSG_DEBUG( " Closest distance of track to jet axis is outside ID envelope, Z=" << Z << ", setting to Z= " << m_maxZ );
209  distOnAxis=m_maxZ / cosRecJetTheta;
210  }
211  }
212 
213  linPositions[numRow(myVertex->getNumVertex())]=distOnAxis;
214 
215 
216  } catch (Error::NewtonProblem e) {
217  ATH_MSG_WARNING( "Problem with Newton finder " << e.p );
218  } catch (...) {
219  ATH_MSG_ERROR( "Could not catch error " );
220  }
221  ATH_MSG_DEBUG ("initializingToMinDistancesToJetAxis for vertex number... " <<
222  myVertex->getNumVertex() << " to distance " << distOnAxis <<
223  " distance to axis " << result.second);
224  }
225  // FIXME THIS PART IS DEAD IN NEW TRACKING EDM:
226  else if (dynamic_cast<const Trk::NeutralPerigee*>((tracksAtVertex[0]->initialPerigee()))!=nullptr)
227  {
228  double distOnAxis=-999.;
229  std::pair<Amg::Vector3D,double> result;
230 
231  const Trk::NeutralPerigee * neutralTrack =
232  dynamic_cast<const Trk::NeutralPerigee*>((tracksAtVertex[0]->initialPerigee()));
233 
234  NeutralTrack myNeutralTrack(neutralTrack->position(),neutralTrack->momentum());
235 
236  result=m_minDistanceFinderNeutral->getPointAndDistance(myJetAxis,myNeutralTrack,distOnAxis);
237 
238  double R=distOnAxis*sinRecJetTheta;
239  double Z=distOnAxis*cosRecJetTheta;
240 
241  if (std::abs(R)>m_maxR)
242  {
243 
244  if (absRecJetTheta>1e-8)
245  {
246  ATH_MSG_DEBUG( " Closest distance of track to jet axis is outside ID envelope, R=" << R << ", setting to R= " << m_maxR );
247  distOnAxis=m_maxR / abssinRecJetTheta;
248  }
249  }
250 
251  Z=distOnAxis*cosRecJetTheta;
252  if (std::abs(Z)>m_maxZ)
253  {
254  if (abscosRecJetTheta>1e-8)
255  {
256  ATH_MSG_DEBUG( " Closest distance of track to jet axis is outside ID envelope, Z=" << Z << ", setting to Z= " << m_maxZ );
257  distOnAxis=m_maxZ / cosRecJetTheta;
258  }
259  }
260 
261  linPositions[numRow(myVertex->getNumVertex())]=distOnAxis;
262  ATH_MSG_DEBUG( "initializingToMinDistancesToJetAxis for vertex from NEUTRAL number... " <<
263  myVertex->getNumVertex() << " to distance " <<
264  distOnAxis << " distance to axis " << result.second );
265 
266  }
267  else
268  {
269  ATH_MSG_WARNING( "Could not cast to neither CHARGED or NEUTRAL! This error is not FATAL" );
270  }
271  }
272  } else {
273  ATH_MSG_WARNING( "Warning in JetFitterInitializationHelper.Inconsistency found. Pointer to VxVertexOnJetAxis should be different from zero. Skipping track..." );
274  throw ("Warning in JetFitterInitializationHelper.Inconsistency found. Pointer to VxVertexOnJetAxis should be different from zero. Skipping track...");
275  }
276  }
277 
278  linVertexPositions.setPosition(linPositions);
279 
280  } else {
281  ATH_MSG_DEBUG ("No Associated Vertices found! no initialization to minimum distance is possible.");
282  }
283  }
284 
285  void JetFitterRoutines::performTheFit(VxJetCandidate* myJetCandidate,
286  int num_maxiterations,//default 20
287  bool treat_sign_flip,//default true
288  int num_signflip_maxiterations,//default 10
289  double deltachi2_convergence) const {//default 0.001
290 
291  bool isInitialized=this->checkJetCandidate(myJetCandidate);
292 
293  if (!isInitialized) {
294  ATH_MSG_DEBUG ("JetFitter found the candidate was not correctly initialized. Not proceeding with the fitt...");
295  return;
296  }
297 
298 

◆ 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()

static const InterfaceID& Trk::JetFitterRoutines::interfaceID ( )
inlinestatic

Definition at line 61 of file JetFitterRoutines.h.

61  {
62  return IID_JetFitterRoutines;
63  }

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

◆ performTheFit()

void Trk::JetFitterRoutines::performTheFit ( VxJetCandidate myJetCandidate,
int  num_maxiterations = 30,
bool  treat_sign_flip = true,
int  num_signflip_maxiterations = 30,
double  deltachi2_convergence = 0.001 
) const

This is the method where the fit is actually done.

The VxJetCandidate in input must be properly initialized (initial positions + proper initial covariance matrix for primary vertex, direction + all the tracks along the jet axis).

To initialized the VxJetCandidate properly please use the methods provided by the JetFitterInitializationHelper class.

The parameters to be provided are:

  • num_maxiterations: the number of maximal iterations (in case of no convergence),
  • treat_sign_flip: true if the special procedure for avoding flips to negative flightlengths has to be used
  • deltachi2_convergence: if the difference in fit chi2 to the previous iteration is smaller than the value provided convergence is reached

Definition at line 300 of file JetFitterRoutines.cxx.

306  {
307  do {
308 
309  myJetCandidate->setRecVertexPositions(RecVertexPositions(myJetCandidate->getConstraintVertexPositions()));
310 
311  ATH_MSG_DEBUG( myJetCandidate->getRecVertexPositions() );
312 
313  //linearization position is now stored in a different VertexPositions attached to the VxJetCandidate...
314  m_initializationHelper->linearizeAllTracks(myJetCandidate,true);
315 
316  //now update all vertices with the new information
317  updateAllVertices(myJetCandidate);
318 
319  //now do the chi2 update of all tracks after end of fit iterations
320  //(this permits to invert the big weight matrix only once at the end!!)
321  // updateChi2AllVertices(myJetCandidate);
322 
323  num_iteration_signflip+=1;
324 
325  const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
326 
327  const FitQuality & myFitQuality=myRecPosition.fitQuality();
328 
329  double actualchi2=myFitQuality.chiSquared();
330 
331  auto const absActLastChi2 = std::abs(actualchi2-lastchi2);
332 
333 #ifdef JetFitterRoutines_DEBUG
334  ATH_MSG_DEBUG( " last chi2 " << lastchi2 << " actual chi2 " << actualchi2 << " difference " <<
335  absActLastChi2<< " < " << deltachi2_convergence << " ? " << " ndf " << myFitQuality.numberDoF() );
336 #endif
337 
338  if (absActLastChi2<deltachi2_convergence) {
339  converged=true;
340  } else {
341 
342  //GP 12.3.2012 Check that no vertex is outside the ID acceptance
344 
345  }
346 
347  lastchi2=actualchi2;
348 
349  } while ((!converged)&&num_iteration_signflip<num_signflip_maxiterations);
350 
351 
352  if (converged) {
353  ATH_MSG_VERBOSE( " For sign flip treatment there was convergence after " << num_iteration_signflip );
354  }
355  }
356 
357  // if (msgSvc()->outputLevel()== MSG::DEBUG||msgSvc()->outputLevel()== MSG::VERBOSE) {
358 #ifdef JetFitterRoutines_DEBUG
359  ATH_MSG_DEBUG( "JetFitterRoutines: after convergence with sign flip treatment: " << myJetCandidate->getRecVertexPositions() );
360 #endif
361  // }
362 
363  int num_iteration=0;
364  lastchi2=-99.;
365  converged=false;
366 
367  do {
368 
369 
370  myJetCandidate->setRecVertexPositions(RecVertexPositions(myJetCandidate->getConstraintVertexPositions()));
371 
372 
373  //linearization position is now stored in a different VertexPositions attached to the VxJetCandidate...
374  m_initializationHelper->linearizeAllTracks(myJetCandidate,false);
375 
376  //now update all vertices with the new information
377  updateAllVertices(myJetCandidate);
378 
379  //now do the chi2 update of all tracks after end of fit iterations
380  //(this permits to invert the big weight matrix only once at the end!!)
381  // updateChi2AllVertices(myJetCandidate);
382 
383  num_iteration+=1;
384 
385  const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
386 
387  ATH_MSG_VERBOSE( " num_iteration (full fit): " << num_iteration << " det " << myRecPosition.covariancePosition().determinant() << " recVertex " << myJetCandidate->getRecVertexPositions() );
388 
389  const FitQuality & myFitQuality=myRecPosition.fitQuality();
390  double actualchi2=myFitQuality.chiSquared();
391 
392  auto const absActLastChi2 = std::abs(actualchi2-lastchi2);
393 
394  // if (msgSvc()->outputLevel()== MSG::VERBOSE) {
395 #ifdef JetFitterRoutines_DEBUG
396  ATH_MSG_DEBUG( " without sign flip: last chi2 " << lastchi2 << " actual chi2 " << actualchi2 << " difference " <<
397  absActLastChi2 << " < " << deltachi2_convergence << " ? " << " ndf " << myFitQuality.numberDoF() );
398 #endif
399  // }
400 
401  if (absActLastChi2<deltachi2_convergence) {
402  converged=true;
403  } else {
404  //now set the linearization position for the next step to the actual fitted vertex
405  //GP 12.3.2012 Check that no vertex is outside the ID acceptance
407  //OLD myJetCandidate->setLinearizationVertexPositions(myJetCandidate->getRecVertexPositions());
408  }
409  lastchi2=actualchi2;
410 
411  } while ((!converged)&&num_iteration<num_maxiterations);
412 
413  if (converged) {
414  ATH_MSG_VERBOSE( " Fit without sign flip treatment there was convergence after " << num_iteration );
415  }
416 
417  // if (msgSvc()->outputLevel()== MSG::VERBOSE) {
418  #ifdef JetFitterRoutines_DEBUG
419  ATH_MSG_DEBUG( "JetFitterRoutines: after convergence without sign flip treatment: " << myJetCandidate->getRecVertexPositions() );
420  #endif
421  // }
422  if (num_iteration>=num_maxiterations)
423  {
424  ATH_MSG_DEBUG( "There wasn't convergence in JetFitter after: " << num_maxiterations );
425  }
426 
427  //now only the smoothing is missing as a last step... (updated momenta, chi2 + ndf of clusters,...)
428 
429  smoothAllVertices(myJetCandidate);
430 
431  Trk::VxJetFitterDebugInfo * & myDebugInfo=myJetCandidate->getDebugInfo();
432  if (myDebugInfo!=nullptr) {
433  delete myDebugInfo;
434  }
435  myDebugInfo=new VxJetFitterDebugInfo();
436  myDebugInfo->setNumFitIterations(num_iteration);
437  myDebugInfo->setSignFlipNumFitIterations(num_iteration_signflip);
438 
439  }
440 
441 
442  void JetFitterRoutines::updateAllVertices(VxJetCandidate* myJetCandidate) const {
443 
444 // ATH_MSG_DEBUG( " Updating PV " );
445 
446  int n_iteration=0;
447 
448 
449  if (!m_noPrimaryVertexRefit) {
450  //new iteration
451  VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
452  const std::vector<VxTrackAtVertex*> & primaryVectorTracks=myPrimary->getTracksAtVertex();
453 
454  const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();

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

◆ smoothAllVertices()

void Trk::JetFitterRoutines::smoothAllVertices ( VxJetCandidate myJetCandidate) const

triggers the smoothing of all vertices (the tracks in the fit are updated using the constraint provided by the vertices along the jet axis they were fitted to)

Definition at line 529 of file JetFitterRoutines.cxx.

529  {
530  if (!m_fast) {
531  m_smoother->update(*VtxIter,myJetCandidate);
532  } else {
533  m_smoother->fastUpdate(*VtxIter,myJetCandidate);
534  }
535  }
536  }
537 
538 
539 
540 
541  bool JetFitterRoutines::checkJetCandidate(VxJetCandidate* myJetCandidate) const {
542 
543  int sizeprimary(0);
544 
545  //check if primaryvertex exists
546  const VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
547  if (myPrimary==nullptr) {
548  ATH_MSG_WARNING( "No primary vertex found in VxJetCandidate class. Initialization was not done correctly..." );
549  return false;
550  }
551 

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

◆ updateAllVertices()

void Trk::JetFitterRoutines::updateAllVertices ( VxJetCandidate myJetCandidate) const

One iteration of the Kalman Updated of all tracks to the actual fit is performed.

Difference between fitting to primary vertex or to a vertex along the flight axis is taken into account.

Definition at line 457 of file JetFitterRoutines.cxx.

458  {
459 
460  ATH_MSG_VERBOSE( " RecVertexPositions before update " << myJetCandidate->getRecVertexPositions() );
461 
462  if ((!m_fast)) {
463  m_updator->add(*primaryVectorIter,myPrimary,myJetCandidate);
464  } else {
465  m_updator->addWithFastUpdate(*primaryVectorIter,myPrimary,myJetCandidate);
466  }
467 
468  const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
469 
470  ATH_MSG_VERBOSE( " Determinant after PRIMARY VTX update: " << n_iteration << " det: " << myRecPosition.covariancePosition().determinant() << " recVertex " << myJetCandidate->getRecVertexPositions() );
471  }
472  }
473 
474  n_iteration=0;
475 
476  // const RecVertexPositions & myRecPositionBeg=myJetCandidate->getRecVertexPositions();
477 
478  const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
479 
480  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
481  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
482 
483  for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
484 
485 // ATH_MSG_DEBUG( " Updating an SV along jet axis " );
486 
487  const std::vector<VxTrackAtVertex*> & tracksAtVertex=(*VtxIter)->getTracksAtVertex();
488 
489  const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=tracksAtVertex.begin();
490  const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=tracksAtVertex.end();
491 
492  for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
493  TrackVectorIter!=TracksEnd;++TrackVectorIter) {
494 
495  ATH_MSG_VERBOSE( " RecVertexPositions before update " << myJetCandidate->getRecVertexPositions() );
496 
497  if (!m_fast) {
498  m_updator->add(*TrackVectorIter,*VtxIter,myJetCandidate);
499  } else {
500  m_updator->addWithFastUpdate(*TrackVectorIter,*VtxIter,myJetCandidate);
501  }
502 
503  n_iteration+=1;
504 
505  const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
506 
507  ATH_MSG_VERBOSE( " Determinant after sec update: " << n_iteration << " det: " << myRecPosition.covariancePosition().determinant() << " recVertex " << myJetCandidate->getRecVertexPositions() );
508  }
509  }
510 
511  myJetCandidate->getRecVertexPositions().finalizePosition();
512  }
513 
514  void JetFitterRoutines::smoothAllVertices(VxJetCandidate* myJetCandidate) const {
515  //new iteration
516  VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
517 
518  if (!m_fast) {
519  m_smoother->update(myPrimary,myJetCandidate);
520  } else {
521  m_smoother->fastUpdate(myPrimary,myJetCandidate);
522  }
523 
524  const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
525 
526  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
527  const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();

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

bool Trk::JetFitterRoutines::m_fast
private

Definition at line 285 of file JetFitterRoutines.h.

◆ m_fieldCacheCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> Trk::JetFitterRoutines::m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
private

Definition at line 269 of file JetFitterRoutines.h.

◆ m_helper

ToolHandle<JetFitterHelper> Trk::JetFitterRoutines::m_helper
private

Definition at line 273 of file JetFitterRoutines.h.

◆ m_initializationHelper

ToolHandle<JetFitterInitializationHelper> Trk::JetFitterRoutines::m_initializationHelper
private

Definition at line 272 of file JetFitterRoutines.h.

◆ m_maxDRshift

double Trk::JetFitterRoutines::m_maxDRshift
private

Definition at line 294 of file JetFitterRoutines.h.

◆ m_maxR

double Trk::JetFitterRoutines::m_maxR
private

Definition at line 317 of file JetFitterRoutines.h.

◆ m_maxZ

double Trk::JetFitterRoutines::m_maxZ
private

Definition at line 318 of file JetFitterRoutines.h.

◆ m_minDistanceFinder

ToolHandle<TrkDistanceFinderNeutralCharged> Trk::JetFitterRoutines::m_minDistanceFinder
private

Definition at line 276 of file JetFitterRoutines.h.

◆ m_minDistanceFinderNeutral

ToolHandle<TrkDistanceFinderNeutralNeutral> Trk::JetFitterRoutines::m_minDistanceFinderNeutral
private

Definition at line 277 of file JetFitterRoutines.h.

◆ m_noPrimaryVertexRefit

bool Trk::JetFitterRoutines::m_noPrimaryVertexRefit
private

Definition at line 311 of file JetFitterRoutines.h.

◆ m_smoother

ToolHandle<KalmanVertexOnJetAxisSmoother> Trk::JetFitterRoutines::m_smoother
private

Definition at line 275 of file JetFitterRoutines.h.

◆ m_updator

ToolHandle<KalmanVertexOnJetAxisUpdator> Trk::JetFitterRoutines::m_updator
private

Definition at line 274 of file JetFitterRoutines.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:
Trk::JetFitterRoutines::smoothAllVertices
void smoothAllVertices(VxJetCandidate *myJetCandidate) const
triggers the smoothing of all vertices (the tracks in the fit are updated using the constraint provid...
Definition: JetFitterRoutines.cxx:529
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::VertexPositions::position
const Amg::VectorX & position() const
return position of vertex
Definition: VertexPositions.cxx:95
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
get_generator_info.result
result
Definition: get_generator_info.py:21
Trk::VxJetFitterDebugInfo::setSignFlipNumFitIterations
void setSignFlipNumFitIterations(int num)
Definition: VxJetFitterDebugInfo.h:88
Trk::VxTrackAtVertex
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Definition: VxTrackAtVertex.h:77
Trk::JetFitterRoutines::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: JetFitterRoutines.h:270
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
initialize
void initialize()
Definition: run_EoverP.cxx:894
Trk::JetFitterRoutines::m_helper
ToolHandle< JetFitterHelper > m_helper
Definition: JetFitterRoutines.h:273
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::JetFitterRoutines::fillTableWithProbOfMerging
void fillTableWithProbOfMerging(VxJetCandidate *myJetCandidate, bool fullcomputation, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-2, double threshold_probability=1e-3) const
Internal method to fill the VxClusteringTable of the VxJetCandidate object, independently on if the f...
Definition: JetFitterRoutines.cxx:869
Trk::jet_xv
@ jet_xv
Definition: JetVtxParamDefs.h:27
Trk::JetFitterRoutines::m_maxR
double m_maxR
Definition: JetFitterRoutines.h:317
Trk::JetFitterRoutines::fastProbabilityOfMergingWithPrimary
std::pair< double, bool > fastProbabilityOfMergingWithPrimary(const VxVertexOnJetAxis *otherVertex, const VxJetCandidate *myJetCandidate) const
Internal method to calculate fast probability of merging, for merging with primary vertex.
Definition: JetFitterRoutines.cxx:672
Trk::JetFitterRoutines::fullProbabilityOfMerging
double fullProbabilityOfMerging(const VxVertexOnJetAxis *firstVertex, const VxVertexOnJetAxis *secondVertex, const VxJetCandidate *myJetCandidate, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-2) const
Calculates in a complete way the probability two vertices along the jet axis to be compatible with ea...
Definition: JetFitterRoutines.cxx:765
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
Trk::JetFitterRoutines::checkJetCandidate
bool checkJetCandidate(VxJetCandidate *) const
Internal method to provide a check if the VxJetCandidate has been initialized in a consistent way.
Definition: JetFitterRoutines.cxx:556
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Trk::VxJetFitterDebugInfo::setNumFitIterations
void setNumFitIterations(int num)
Definition: VxJetFitterDebugInfo.h:80
Trk::JetFitterRoutines::performTheFit
void performTheFit(VxJetCandidate *myJetCandidate, int num_maxiterations=30, bool treat_sign_flip=true, int num_signflip_maxiterations=30, double deltachi2_convergence=0.001) const
This is the method where the fit is actually done.
Definition: JetFitterRoutines.cxx:300
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::jet_yv
@ jet_yv
Definition: JetVtxParamDefs.h:27
Trk::VxClusteringTable
Definition: VxClusteringTable.h:71
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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::JetFitterRoutines::fillTableWithFullProbOfMerging
void fillTableWithFullProbOfMerging(VxJetCandidate *myJetCandidate, int num_maxiterations=20, bool treat_sign_flip=true, int num_signflip_maxiterations=10, double deltachi2_convergence=1e-3, double threshold_probability=1e-5) const
The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed pr...
Definition: JetFitterRoutines.cxx:849
Trk::JetFitterRoutines::m_smoother
ToolHandle< KalmanVertexOnJetAxisSmoother > m_smoother
Definition: JetFitterRoutines.h:275
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::JetFitterRoutines::fastProbabilityOfMergingNoPrimary
std::pair< double, bool > fastProbabilityOfMergingNoPrimary(const VxVertexOnJetAxis *, const VxVertexOnJetAxis *, const VxJetCandidate *myJetCandidate) const
Internal method to calculate fast probability of merging, for merging with non primary vertex.
Definition: JetFitterRoutines.cxx:717
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Trk::JetFitterRoutines::m_initializationHelper
ToolHandle< JetFitterInitializationHelper > m_initializationHelper
Definition: JetFitterRoutines.h:272
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RecVertexPositions
Definition: RecVertexPositions.h:34
Trk::JetFitterRoutines::copyRecoPositionsToLinearizationPositions
void copyRecoPositionsToLinearizationPositions(VxJetCandidate &myJetCandidate) const
Method to copy new reco positions to linearization positions after checking new positions are inside ...
Definition: JetFitterRoutines.cxx:1141
Trk::JetFitterRoutines::m_updator
ToolHandle< KalmanVertexOnJetAxisUpdator > m_updator
Definition: JetFitterRoutines.h:274
Trk::JetFitterRoutines::m_minDistanceFinderNeutral
ToolHandle< TrkDistanceFinderNeutralNeutral > m_minDistanceFinderNeutral
Definition: JetFitterRoutines.h:277
Trk::RecVertexPositions::covariancePosition
Amg::MatrixX const & covariancePosition() const
return the covDeltaV matrix of the vertex fit
Definition: RecVertexPositions.cxx:171
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::JetFitterRoutines::m_maxZ
double m_maxZ
Definition: JetFitterRoutines.h:318
h
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::JetFitterRoutines::deleteVertexFromJetCandidate
void deleteVertexFromJetCandidate(VxVertexOnJetAxis *vertexToDelete, VxJetCandidate *myJetCandidate) const
Deltes a vertex from the VxJetCandidate, doing everything is needed to preserve the internal coherenc...
Definition: JetFitterRoutines.cxx:1027
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::JetFitterRoutines::m_fast
bool m_fast
Definition: JetFitterRoutines.h:285
Trk::JetFitterRoutines::m_noPrimaryVertexRefit
bool m_noPrimaryVertexRefit
Definition: JetFitterRoutines.h:311
Trk::JetFitterRoutines::fastProbabilityOfMerging
std::pair< double, bool > fastProbabilityOfMerging(const VxVertexOnJetAxis *, const VxVertexOnJetAxis *, const VxJetCandidate *) const
Calculates in a very fast way the probability two vertices along the jet axis to be compatible with e...
Definition: JetFitterRoutines.cxx:652
Trk::VxJetFitterDebugInfo
Definition: VxJetFitterDebugInfo.h:44
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::JetFitterRoutines::updateAllVertices
void updateAllVertices(VxJetCandidate *myJetCandidate) const
One iteration of the Kalman Updated of all tracks to the actual fit is performed.
Definition: JetFitterRoutines.cxx:457
python.Dumpers.FitQuality
FitQuality
Definition: Dumpers.py:63
fitman.k
k
Definition: fitman.py:528
Trk::JetFitterRoutines::m_minDistanceFinder
ToolHandle< TrkDistanceFinderNeutralCharged > m_minDistanceFinder
Definition: JetFitterRoutines.h:276