|
ATLAS Offline Software
|
Februar 2007 (c) Atlas Detector Reconstruction Software.
More...
#include <JetFitterRoutines.h>
|
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 |
|
|
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...
|
|
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.
◆ StoreGateSvc_t
◆ JetFitterRoutines()
Trk::JetFitterRoutines::JetFitterRoutines |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~JetFitterRoutines()
Trk::JetFitterRoutines::~JetFitterRoutines |
( |
| ) |
|
|
default |
◆ 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.
578 const std::vector<VxVertexOnJetAxis*>& tracksOfVertex =
579 myJetCandidate->getVerticesOnJetAxis();
581 auto badVertex = [](VxVertexOnJetAxis* pVertex) {
582 return (pVertex ==
nullptr) or (pVertex->getNumVertex() < 0);
585 (std::find_if(tracksOfVertex.begin(), tracksOfVertex.end(), badVertex) ==
586 tracksOfVertex.end());
589 "One of the VxTrackAtVertex is a null pointer or uninitialized. Not "
590 "proceeding with the fit!");
598 if (tracksOfVertex.empty()&&sizeprimary==0) {
599 ATH_MSG_DEBUG(
"No tracks at primary, no tracks on jet axis. Not proceeding with the fit!" );
608 if (
static_cast<unsigned int>(tracksOfVertex.size()+5)!=
static_cast<unsigned int>(myPosition.rows())) {
610 <<
" components while " << tracksOfVertex.size()+5
611 <<
" are expected. Not proceeding with the fit " );
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...");
623 for (
int i=0;
i<myPosition.rows();
i++) {
624 if (std::abs(myErrorMatrix(
i,
i))<1
e-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...");
638 const VxVertexOnJetAxis* secondVertex,
639 const VxJetCandidate* myJetCandidate)
const {
643 const VxVertexOnJetAxis * PrimaryVertex=myJetCandidate->getPrimaryVertex();
645 if (firstVertex==PrimaryVertex) {
648 if (secondVertex==PrimaryVertex) {
◆ 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.
1153 if (absLinJetTheta>1
e-8)
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;
1160 Z=distOnAxis*cosLinJetTheta;
1163 if (abscosLinJetTheta>1
e-8)
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;
1170 linPositions[numRow(myVertex->getNumVertex())]=distOnAxis;
1174 VertexPositions & linVertexPositions=myJetCandidate.getLinearizationVertexPositions();
1175 linVertexPositions.setPosition(linPositions);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ deleteVertexFromJetCandidate()
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.
1071 if (*TracksIter==*TracksAtVtxIter) {
1073 TracksIter=tracksAtJetCandidate->erase(TracksIter);
1076 TracksEnd=tracksAtJetCandidate->end();
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! " );
1092 std::vector<VxVertexOnJetAxis*> copyOfVerticesAtJetCandidate=myJetCandidate->getVerticesOnJetAxis();
1103 if ((*VerticesIter)==vertexToDelete) {
1104 delete *VerticesIter;
1105 VerticesIter=copyOfVerticesAtJetCandidate.erase(VerticesIter);
1106 VerticesEnd=copyOfVerticesAtJetCandidate.end();
1115 ATH_MSG_WARNING(
"Could not find the vertex to delete... Very strange... Check!!! " );
1119 myJetCandidate->setVerticesOnJetAxis(copyOfVerticesAtJetCandidate);
1129 const VertexPositions & newLinVertexPositions=myJetCandidate.getRecVertexPositions();
1130 Amg::VectorX linPositions=newLinVertexPositions.position();
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();
1136 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
1137 VxVertexOnJetAxis* myVertex=(*VtxIter);
1138 if (myVertex!=
nullptr) {
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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()
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.
662 RecVertexPositions copyOfRecVertexPositions(myJetCandidate->getRecVertexPositions());
665 double oldchi2=copyOfRecVertexPositions.fitQuality().chiSquared();
666 double oldndf=copyOfRecVertexPositions.fitQuality().numberDoF();
669 const Amg::VectorX & positionVector=copyOfRecVertexPositions.position();
◆ fastProbabilityOfMergingNoPrimary()
Internal method to calculate fast probability of merging, for merging with non primary vertex.
Definition at line 717 of file JetFitterRoutines.cxx.
741 ATH_MSG_WARNING (
"In the compatibility estimation chi2: " <<
chi2 <<
" ndf " <<
ndf <<
" giving back 0 prob");
742 return std::pair<double,bool>(0,isshifted);
745 return std::pair<double,bool>(TMath::Prob(
chi2,(
int)std::floor(
ndf+0.5)),isshifted);
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 {
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 ");
◆ fastProbabilityOfMergingWithPrimary()
Internal method to calculate fast probability of merging, for merging with primary vertex.
Definition at line 672 of file JetFitterRoutines.cxx.
694 ATH_MSG_WARNING (
" In the compatibility estimation chi2: " <<
chi2 <<
" ndf " <<
ndf <<
" giving back 0 prob ");
695 return std::pair<double,bool>(0,isshifted);
698 return std::pair<double,bool>(TMath::Prob(
chi2,(
int)std::floor(
ndf+0.5)),isshifted);
703 const VxVertexOnJetAxis* secondVertex,
704 const VxJetCandidate* myJetCandidate)
const {
707 RecVertexPositions copyOfRecVertexPositions(myJetCandidate->getRecVertexPositions());
708 const FitQuality & copyOfRecVertexQuality=copyOfRecVertexPositions.fitQuality();
710 double oldchi2=copyOfRecVertexQuality.chiSquared();
711 double oldndf=copyOfRecVertexQuality.numberDoF();
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.
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 {
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.
870 delete clusteringTablePtr;
874 double highestprobability(0.);
876 VxVertexOnJetAxis* primaryVertex=myJetCandidate->getPrimaryVertex();
878 if (primaryVertex==
nullptr) {
879 ATH_MSG_WARNING(
"VxJetCandidate provided has no primary vertex. No compatibility table calculated." );
883 primaryVertex->setCompatibilityToPrimaryVtx(1);
885 const std::vector<VxVertexOnJetAxis*> & tracksOnJetAxis=myJetCandidate->getVerticesOnJetAxis();
888 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=tracksOnJetAxis.begin();
889 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=tracksOnJetAxis.end();
891 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;
892 VtxIter!=VtxEnd;++VtxIter) {
900 (*VtxIter)->getNumVertex() <<
" is " << fastProbabilityAndNonLinearity.first);
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 );
908 if (fullcomputation) {
909 if (fastProbabilityAndNonLinearity.first>threshold_probability) {
910 if (fastProbabilityAndNonLinearity.first>highestprobability/100.&&fastProbabilityAndNonLinearity.second) {
913 myJetCandidate,num_maxiterations,
915 num_signflip_maxiterations,
916 deltachi2_convergence);
919 #ifdef JetFitterRoutines_DEBUG2
920 ATH_MSG_DEBUG(
"Full probability of merging with primary is " << fullProbability );
923 ATH_MSG_DEBUG (
"Full probability of merging with primary is " << fullProbability);
927 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fullProbability);
928 if (fullProbability>highestprobability) {
929 highestprobability=fullProbability;
931 (*VtxIter)->setCompatibilityToPrimaryVtx(fullProbability);
933 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fastProbabilityAndNonLinearity.first);
934 (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
937 (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
940 if (fastProbabilityAndNonLinearity.first>threshold_probability) {
941 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(primaryVertex,*VtxIter),fastProbabilityAndNonLinearity.first);
942 if (fastProbabilityAndNonLinearity.first>highestprobability) {
943 highestprobability=fastProbabilityAndNonLinearity.first;
946 (*VtxIter)->setCompatibilityToPrimaryVtx(fastProbabilityAndNonLinearity.first);
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) {
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);
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 );
973 if (fullcomputation) {
974 if (fastProbabilityAndNonLinearity.first>threshold_probability) {
975 if (fastProbabilityAndNonLinearity.first>highestprobability/100.&&fastProbabilityAndNonLinearity.second) {
977 myJetCandidate,num_maxiterations,
979 num_signflip_maxiterations,
980 deltachi2_convergence);
983 #ifdef JetFitterRoutines_DEBUG2
984 ATH_MSG_DEBUG(
"Full probability of merging is " << fullProbability );
987 ATH_MSG_VERBOSE (
"Full probability of merging is " << fullProbability);
991 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fullProbability);
992 if (fullProbability>highestprobability) {
993 highestprobability=fullProbability;
996 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fastProbabilityAndNonLinearity.first);
1000 if (fastProbabilityAndNonLinearity.first>threshold_probability) {
1001 clusteringTablePtr->setCompatibilityOfTo(PairOfVxVertexOnJetAxis(*VtxIter1,*VtxIter2),fastProbabilityAndNonLinearity.first);
1002 if (fastProbabilityAndNonLinearity.first>highestprobability) {
1003 highestprobability=fastProbabilityAndNonLinearity.first;
1013 VxJetCandidate* myJetCandidate)
const {
1014 if (vertexToDelete==myJetCandidate->getPrimaryVertex()) {
1015 ATH_MSG_WARNING (
"YOU ARE deleting the primary vertex. This is not possible... ");
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()
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.
780 ATH_MSG_WARNING (
"Empty primary vertex found when estimating fullProbOfMerging. 0 prob returned.");
784 oldToNewVtxPointers[primaryOfFirst]=primaryOfSecond;
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.");
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...");
798 oldToNewVtxPointers[pointer1]=pointer2;
803 VxVertexOnJetAxis* newFirstVertex=oldToNewVtxPointers[firstVertex];
804 VxVertexOnJetAxis* newSecondVertex=oldToNewVtxPointers[secondVertex];
806 if (newFirstVertex==
nullptr||newSecondVertex==
nullptr) {
807 ATH_MSG_WARNING (
"No correspondence to the given firstVertex or secondVertex in fullProbOfMerging. Returning 0 prob.");
811 VxVertexOnJetAxis & commonVertex=
m_helper->mergeVerticesInJetCandidate(*newFirstVertex,
820 num_signflip_maxiterations,
821 deltachi2_convergence);
825 #ifdef JetFitterRoutines_DEBUG
826 ATH_MSG_DEBUG(
" End estimating full prob of merging... chi2 " << commonVertex.fitQuality().chiSquared() <<
" ndf " << commonVertex.fitQuality().numberDoF() );
829 return (
double)TMath::Prob(commonVertex.fitQuality().chiSquared(),
830 (
int)std::floor(commonVertex.fitQuality().numberDoF()+0.5));
835 int num_maxiterations,
836 bool treat_sign_flip,
837 int num_signflip_maxiterations,
838 double deltachi2_convergence,
839 double threshold_probability)
const {
844 num_signflip_maxiterations,
845 deltachi2_convergence,
846 threshold_probability);
◆ initialize()
StatusCode Trk::JetFitterRoutines::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 108 of file JetFitterRoutines.cxx.
117 ATH_MSG_DEBUG (
"initializingToMinDistancesToJetAxis is now implemented! Will converge faster!!! Neutrals are fully supported...");
119 VertexPositions & linVertexPositions=myJetCandidate->getLinearizationVertexPositions();
120 Amg::VectorX linPositions=linVertexPositions.position();
◆ 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.
154 if (!readHandle.isValid()) {
155 std::stringstream
msg;
157 throw std::runtime_error(
msg.str());
160 fieldCondObj->getInitializedCache (fieldCache);
161 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
162 VxVertexOnJetAxis* myVertex=(*VtxIter);
163 if (myVertex!=
nullptr) {
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)..." );
170 else if (tracksAtVertex.empty())
172 ATH_MSG_WARNING(
"No track at vertex. Internal fitter error. Contact author (GP) ... " );
178 ATH_MSG_VERBOSE(
" pointer to initialPerigee: " << tracksAtVertex[0]->initialPerigee() );
185 double distOnAxis=-999.;
186 std::pair<Amg::Vector3D,double>
result;
190 double R=distOnAxis*sinRecJetTheta;
191 double Z=distOnAxis*cosRecJetTheta;
196 if (absRecJetTheta>1
e-8)
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;
203 Z=distOnAxis*cosRecJetTheta;
206 if (abscosRecJetTheta>1
e-8)
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;
213 linPositions[numRow(myVertex->getNumVertex())]=distOnAxis;
216 }
catch (Error::NewtonProblem
e) {
221 ATH_MSG_DEBUG (
"initializingToMinDistancesToJetAxis for vertex number... " <<
222 myVertex->getNumVertex() <<
" to distance " << distOnAxis <<
223 " distance to axis " <<
result.second);
226 else if (
dynamic_cast<const Trk::NeutralPerigee*
>((tracksAtVertex[0]->initialPerigee()))!=
nullptr)
228 double distOnAxis=-999.;
229 std::pair<Amg::Vector3D,double>
result;
234 NeutralTrack myNeutralTrack(neutralTrack->position(),neutralTrack->momentum());
238 double R=distOnAxis*sinRecJetTheta;
239 double Z=distOnAxis*cosRecJetTheta;
244 if (absRecJetTheta>1
e-8)
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;
251 Z=distOnAxis*cosRecJetTheta;
254 if (abscosRecJetTheta>1
e-8)
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;
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 );
269 ATH_MSG_WARNING(
"Could not cast to neither CHARGED or NEUTRAL! This error is not FATAL" );
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...");
278 linVertexPositions.setPosition(linPositions);
281 ATH_MSG_DEBUG (
"No Associated Vertices found! no initialization to minimum distance is possible.");
286 int num_maxiterations,
287 bool treat_sign_flip,
288 int num_signflip_maxiterations,
289 double deltachi2_convergence)
const {
293 if (!isInitialized) {
294 ATH_MSG_DEBUG (
"JetFitter found the candidate was not correctly initialized. Not proceeding with the fitt...");
◆ inputHandles()
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 |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
309 myJetCandidate->setRecVertexPositions(RecVertexPositions(myJetCandidate->getConstraintVertexPositions()));
323 num_iteration_signflip+=1;
325 const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
327 const FitQuality & myFitQuality=myRecPosition.fitQuality();
329 double actualchi2=myFitQuality.chiSquared();
331 auto const absActLastChi2 = std::abs(actualchi2-lastchi2);
333 #ifdef JetFitterRoutines_DEBUG
334 ATH_MSG_DEBUG(
" last chi2 " << lastchi2 <<
" actual chi2 " << actualchi2 <<
" difference " <<
335 absActLastChi2<<
" < " << deltachi2_convergence <<
" ? " <<
" ndf " << myFitQuality.numberDoF() );
338 if (absActLastChi2<deltachi2_convergence) {
349 }
while ((!converged)&&num_iteration_signflip<num_signflip_maxiterations);
353 ATH_MSG_VERBOSE(
" For sign flip treatment there was convergence after " << num_iteration_signflip );
358 #ifdef JetFitterRoutines_DEBUG
359 ATH_MSG_DEBUG(
"JetFitterRoutines: after convergence with sign flip treatment: " << myJetCandidate->getRecVertexPositions() );
370 myJetCandidate->setRecVertexPositions(RecVertexPositions(myJetCandidate->getConstraintVertexPositions()));
385 const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
387 ATH_MSG_VERBOSE(
" num_iteration (full fit): " << num_iteration <<
" det " << myRecPosition.covariancePosition().determinant() <<
" recVertex " << myJetCandidate->getRecVertexPositions() );
389 const FitQuality & myFitQuality=myRecPosition.fitQuality();
390 double actualchi2=myFitQuality.chiSquared();
392 auto const absActLastChi2 = std::abs(actualchi2-lastchi2);
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() );
401 if (absActLastChi2<deltachi2_convergence) {
411 }
while ((!converged)&&num_iteration<num_maxiterations);
414 ATH_MSG_VERBOSE(
" Fit without sign flip treatment there was convergence after " << num_iteration );
418 #ifdef JetFitterRoutines_DEBUG
419 ATH_MSG_DEBUG(
"JetFitterRoutines: after convergence without sign flip treatment: " << myJetCandidate->getRecVertexPositions() );
422 if (num_iteration>=num_maxiterations)
424 ATH_MSG_DEBUG(
"There wasn't convergence in JetFitter after: " << num_maxiterations );
432 if (myDebugInfo!=
nullptr) {
435 myDebugInfo=
new VxJetFitterDebugInfo();
451 VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
452 const std::vector<VxTrackAtVertex*> & primaryVectorTracks=myPrimary->getTracksAtVertex();
454 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
◆ renounce()
◆ renounceArray()
◆ 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.
533 m_smoother->fastUpdate(*VtxIter,myJetCandidate);
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..." );
◆ sysInitialize()
◆ sysStart()
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.
460 ATH_MSG_VERBOSE(
" RecVertexPositions before update " << myJetCandidate->getRecVertexPositions() );
463 m_updator->add(*primaryVectorIter,myPrimary,myJetCandidate);
465 m_updator->addWithFastUpdate(*primaryVectorIter,myPrimary,myJetCandidate);
468 const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
470 ATH_MSG_VERBOSE(
" Determinant after PRIMARY VTX update: " << n_iteration <<
" det: " << myRecPosition.covariancePosition().determinant() <<
" recVertex " << myJetCandidate->getRecVertexPositions() );
478 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
480 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
481 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
483 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
487 const std::vector<VxTrackAtVertex*> & tracksAtVertex=(*VtxIter)->getTracksAtVertex();
489 const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=tracksAtVertex.begin();
490 const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=tracksAtVertex.end();
492 for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
493 TrackVectorIter!=TracksEnd;++TrackVectorIter) {
495 ATH_MSG_VERBOSE(
" RecVertexPositions before update " << myJetCandidate->getRecVertexPositions() );
498 m_updator->add(*TrackVectorIter,*VtxIter,myJetCandidate);
500 m_updator->addWithFastUpdate(*TrackVectorIter,*VtxIter,myJetCandidate);
505 const RecVertexPositions & myRecPosition=myJetCandidate->getRecVertexPositions();
507 ATH_MSG_VERBOSE(
" Determinant after sec update: " << n_iteration <<
" det: " << myRecPosition.covariancePosition().determinant() <<
" recVertex " << myJetCandidate->getRecVertexPositions() );
511 myJetCandidate->getRecVertexPositions().finalizePosition();
516 VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
521 m_smoother->fastUpdate(myPrimary,myJetCandidate);
524 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
526 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
527 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_fast
bool Trk::JetFitterRoutines::m_fast |
|
private |
◆ m_fieldCacheCondObjInputKey
◆ m_helper
◆ m_initializationHelper
◆ m_maxDRshift
double Trk::JetFitterRoutines::m_maxDRshift |
|
private |
◆ m_maxR
double Trk::JetFitterRoutines::m_maxR |
|
private |
◆ m_maxZ
double Trk::JetFitterRoutines::m_maxZ |
|
private |
◆ m_minDistanceFinder
◆ m_minDistanceFinderNeutral
◆ m_noPrimaryVertexRefit
bool Trk::JetFitterRoutines::m_noPrimaryVertexRefit |
|
private |
◆ m_smoother
◆ m_updator
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void smoothAllVertices(VxJetCandidate *myJetCandidate) const
triggers the smoothing of all vertices (the tracks in the fit are updated using the constraint provid...
JetConstituentVector::iterator iterator
const Amg::VectorX & position() const
return position of vertex
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
void setSignFlipNumFitIterations(int num)
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
ToolHandle< JetFitterHelper > m_helper
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
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...
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.
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...
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool checkJetCandidate(VxJetCandidate *) const
Internal method to provide a check if the VxJetCandidate has been initialized in a consistent way.
virtual void setOwner(IDataHandleHolder *o)=0
void setNumFitIterations(int num)
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.
double chi2(TH1 *h0, TH1 *h1)
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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...
ToolHandle< KalmanVertexOnJetAxisSmoother > m_smoother
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.
StatusCode initialize(bool used=true)
ToolHandle< JetFitterInitializationHelper > m_initializationHelper
Eigen::Matrix< double, 3, 1 > Vector3D
void copyRecoPositionsToLinearizationPositions(VxJetCandidate &myJetCandidate) const
Method to copy new reco positions to linearization positions after checking new positions are inside ...
ToolHandle< KalmanVertexOnJetAxisUpdator > m_updator
ToolHandle< TrkDistanceFinderNeutralNeutral > m_minDistanceFinderNeutral
Amg::MatrixX const & covariancePosition() const
return the covDeltaV matrix of the vertex fit
#define ATH_MSG_WARNING(x)
void deleteVertexFromJetCandidate(VxVertexOnJetAxis *vertexToDelete, VxJetCandidate *myJetCandidate) const
Deltes a vertex from the VxJetCandidate, doing everything is needed to preserve the internal coherenc...
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool m_noPrimaryVertexRefit
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...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void updateAllVertices(VxJetCandidate *myJetCandidate) const
One iteration of the Kalman Updated of all tracks to the actual fit is performed.
ToolHandle< TrkDistanceFinderNeutralCharged > m_minDistanceFinder