ATLAS Offline Software
Loading...
Searching...
No Matches
JetFitterRoutines.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
33
34#ifndef TrkJetFitter_JetFitterRoutines_H
35#define TrkJetFitter_JetFitterRoutines_H
36
38#include "GaudiKernel/ToolHandle.h"
40
42
43namespace Trk {
44
46 class VxJetCandidate;
48 class JetFitterHelper;
53
54 static const InterfaceID IID_JetFitterRoutines("Trk::JetFitterRoutines", 1, 0);
55
57 {
58
59 public:
60
61 static const InterfaceID& interfaceID() {
63 }
64
65
66 virtual StatusCode initialize() override;
67
71
72 JetFitterRoutines(const std::string& t, const std::string& n, const IInterface* p);
73
77
79
85
87
103
104 void performTheFit(VxJetCandidate* myJetCandidate,
105 int num_maxiterations=30,
106 bool treat_sign_flip=true,
107 int num_signflip_maxiterations=30,
108 double deltachi2_convergence=0.001) const;
109
115
116 void smoothAllVertices(VxJetCandidate* myJetCandidate) const;
117
124
125 void updateAllVertices(VxJetCandidate* myJetCandidate) const ;
126
127 // void updateChi2AllVertices(VxJetCandidate* myJetCandidate) const ;
128
149
150 std::pair<double,bool> fastProbabilityOfMerging(const VxVertexOnJetAxis*,const VxVertexOnJetAxis*,
151 const VxJetCandidate*) const;
152
173
174
175 double fullProbabilityOfMerging(const VxVertexOnJetAxis* firstVertex,
176 const VxVertexOnJetAxis* secondVertex,
177 const VxJetCandidate* myJetCandidate,
178 int num_maxiterations=20,
179 bool treat_sign_flip=true,
180 int num_signflip_maxiterations=10,
181 double deltachi2_convergence=1e-2) const;
193
195 int num_maxiterations=20,
196 bool treat_sign_flip=true,
197 int num_signflip_maxiterations=10,
198 double deltachi2_convergence=1e-3,
199 double threshold_probability=1e-5) const;
200
201
212
213
214 void fillTableWithFastProbOfMerging(VxJetCandidate* myJetCandidate) const;
215 //please note that in the case of FastProbOfMerging the threshold_probability is always 1e-3
216 //(the default one for the FullProb - see three lines above)
217
223
225 VxJetCandidate* myJetCandidate) const;
226
227 private:
228
232
233 std::pair<double,bool> fastProbabilityOfMergingWithPrimary(const VxVertexOnJetAxis* otherVertex,
234 const VxJetCandidate* myJetCandidate) const;
235
239
240 std::pair<double,bool> fastProbabilityOfMergingNoPrimary(const VxVertexOnJetAxis*,
241 const VxVertexOnJetAxis*,
242 const VxJetCandidate* myJetCandidate) const;
243
248
249 void fillTableWithProbOfMerging(VxJetCandidate* myJetCandidate,
250 bool fullcomputation,
251 int num_maxiterations=20,
252 bool treat_sign_flip=true,
253 int num_signflip_maxiterations=10,
254 double deltachi2_convergence=1e-2,
255 double threshold_probability=1e-3) const;
260
262
268
270 {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
271
272 ToolHandle<JetFitterInitializationHelper> m_initializationHelper;
273 ToolHandle<JetFitterHelper> m_helper;
274 ToolHandle<KalmanVertexOnJetAxisUpdator> m_updator;
275 ToolHandle<KalmanVertexOnJetAxisSmoother> m_smoother;
276 ToolHandle<TrkDistanceFinderNeutralCharged> m_minDistanceFinder;
277 ToolHandle<TrkDistanceFinderNeutralNeutral> m_minDistanceFinderNeutral;
278
279
280 /*
281 * Old option: please do not switch to true.
282 * Will be deleted in future releases.
283 */
284
285 bool m_fast;
286
287 /*
288 * Provides a limit to the DR shifht of the direction of the flight axis during
289 * the fast estimation procedure for the probability of merging between to vertices.
290 * If the shift is higher than that, the fastProbabilityOfMerging method informs
291 * the user that the estimation could not be reliable.
292 */
293
295
296 /*
297 * If true, the assumption is made that, whenever tracks are merged to the primary vertex, they were already
298 * contained in the primary vertex fit, for which the prior information about the position and covariance matrix
299 * was already used in initializing the fit.
300 *
301 * This has the problem that if this was not the case and smoothing of the tracks at the primary vertex is requested,
302 * sometimes a negative weight can come out of the removal of the track (is this is particularly affecting the fit).
303 *
304 * Unless you know what you are doing, put this to false.
305 *
306 * Also in this case there is a disadvantage: tracks are refit again into the primary vertex, even if they were
307 * already partecipating in the prior information of the vertex. This will be resolved only when the primary and
308 * secondary vertex fit will be related the one to the other.
309 */
310
312
313 /*
314 * Avoid vertex to be initialize outside ID envelope given bu m_maxR and m_maxZ
315 */
316
317 double m_maxR;
318 double m_maxZ;
319
320 };//end class declaration
321
322}//end namespace Trk
323
324
325#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Februar 2007 (c) Atlas Detector Reconstruction Software.
Februar 2007 (c) Atlas Detector Reconstruction Software.
ToolHandle< TrkDistanceFinderNeutralNeutral > m_minDistanceFinderNeutral
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...
ToolHandle< KalmanVertexOnJetAxisUpdator > m_updator
ToolHandle< TrkDistanceFinderNeutralCharged > m_minDistanceFinder
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.
ToolHandle< KalmanVertexOnJetAxisSmoother > m_smoother
JetFitterRoutines(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
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.
static const InterfaceID & interfaceID()
void smoothAllVertices(VxJetCandidate *myJetCandidate) const
triggers the smoothing of all vertices (the tracks in the fit are updated using the constraint provid...
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
virtual StatusCode initialize() override
void fillTableWithFastProbOfMerging(VxJetCandidate *myJetCandidate) const
The VxClusteringTable of the VxJetCandidate provided in input is created, computing all the needed pr...
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...
void updateAllVertices(VxJetCandidate *myJetCandidate) const
One iteration of the Kalman Updated of all tracks to the actual fit is performed.
~JetFitterRoutines()
Destructor.
bool checkJetCandidate(VxJetCandidate *) const
Internal method to provide a check if the VxJetCandidate has been initialized in a consistent way.
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...
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...
void initializeToMinDistancesToJetAxis(VxJetCandidate *) const
This method provides the initialization of all the tracks in the fit to the position of minimum dista...
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.
void deleteVertexFromJetCandidate(VxVertexOnJetAxis *vertexToDelete, VxJetCandidate *myJetCandidate) const
Deltes a vertex from the VxJetCandidate, doing everything is needed to preserve the internal coherenc...
ToolHandle< JetFitterInitializationHelper > m_initializationHelper
void copyRecoPositionsToLinearizationPositions(VxJetCandidate &myJetCandidate) const
Method to copy new reco positions to linearization positions after checking new positions are inside ...
ToolHandle< JetFitterHelper > m_helper
ATLAS Reconstruction Software - (C) 2005 - 2007.
ATLAS Reconstruction Software - (C) 2005 - 2007.
VxVertexOnJetAxis inherits from Vertex.
Ensure that the ATLAS eigen extensions are properly loaded.
static const InterfaceID IID_JetFitterRoutines("Trk::JetFitterRoutines", 1, 0)