ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::InDetJetFitterVxFinder Class Reference

#include <InDetJetFitterVxFinder.h>

Inheritance diagram for InDet::InDetJetFitterVxFinder:
Collaboration diagram for InDet::InDetJetFitterVxFinder:

Public Member Functions

virtual StatusCode initialize () override
 InDetJetFitterVxFinder (const std::string &t, const std::string &n, const IInterface *p)
 ~InDetJetFitterVxFinder ()
virtual Trk::VxSecVertexInfofindSecVertex (const EventContext &, const xAOD::Vertex &, const TLorentzVector &, const std::vector< const xAOD::IParticle * > &) const override
const Trk::VxSecVertexInfofindSecVertex (const Trk::RecVertex &primaryVertex, const TLorentzVector &jetMomentum, const std::vector< const Trk::TrackParticleBase * > &inputTracks) const
const Trk::VxSecVertexInfofindSecVertex (const Trk::RecVertex &primaryVertex, const TLorentzVector &jetMomentum, const std::vector< const Trk::TrackParticleBase * > &firstInputTracks, const std::vector< const Trk::TrackParticleBase * > &secondInputTracks, const Amg::Vector3D &vtxSeedDirection) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (ISecVertexInJetFinder, 1, 0)
virtual std::vector< std::string > trackDecorationNames () const
 Return a list of the names of track decorations created by this tool, in order to allow them to be locked when the calling algorithm completes.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void doTheFit (Trk::VxJetCandidate *myJetCandidate, bool performClustering=true) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::JetFitterInitializationHelperm_initializationHelper {this,"JetFitterInitializationHelper","Trk::JetFitterInitializationHelper",""}
ToolHandle< Trk::JetFitterHelperm_helper {this,"JetFitterHelper","Trk::JetFitterHelper",""}
ToolHandle< Trk::JetFitterRoutinesm_routines {this,"JetFitterRoutines","Trk::JetFitterRoutines",""}
ToolHandle< Trk::ITrackSelectorToolm_trkFilter {this,"TrackSelector","InDet::InDetDetailedTrackSelectorTool",""}
Gaudi::Property< int > m_maxNumDeleteIterations {this,"MaxNumDeleteIterations",30,""}
Gaudi::Property< float > m_vertexProbCut {this,"VertexProbCut",0.01,""}
Gaudi::Property< int > m_maxClusteringIterations {this,"MaxClusteringIterations",30,""}
Gaudi::Property< float > m_vertexClusteringProbabilityCut {this,"VertexClusteringProbabilityCut",0.01,""}
Gaudi::Property< bool > m_useFastClustering {this,"UseFastClustering",false,""}
Gaudi::Property< int > m_maxTracksToFitAtOnce {this,"MaxTracksToFitAtOnce",15,""}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 53 of file InDetJetFitterVxFinder.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

◆ InDetJetFitterVxFinder()

InDet::InDetJetFitterVxFinder::InDetJetFitterVxFinder ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 63 of file InDetJetFitterVxFinder.cxx.

63 :
64 AthAlgTool(t,n,p)
65 {
66 declareInterface< ISecVertexInJetFinder >(this) ;
67 }
AthAlgTool()
Default constructor:

◆ ~InDetJetFitterVxFinder()

InDet::InDetJetFitterVxFinder::~InDetJetFitterVxFinder ( )
default

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ DeclareInterfaceID()

InDet::ISecVertexInJetFinder::DeclareInterfaceID ( ISecVertexInJetFinder ,
1 ,
0  )
inherited

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ doTheFit()

void InDet::InDetJetFitterVxFinder::doTheFit ( Trk::VxJetCandidate * myJetCandidate,
bool performClustering = true ) const
private

Definition at line 267 of file InDetJetFitterVxFinder.cxx.

268 {
269
270
271 int numClusteringLoops=0;
272 bool noMoreVerticesToCluster(false);
273
274 do {//reguards clustering
275
276 if (msgLvl(MSG::VERBOSE)) msg() << "InDetJetFitterVxFinder: ------>>>> new cycle of fit" << endmsg;
277
278 int numLoops=0;
279 bool noMoreTracksToDelete(false);
280 do {//reguards eliminating incompatible tracks...
281
282 m_routines->performTheFit(myJetCandidate,10,false,30,0.001);
283
284 const std::vector<Trk::VxVertexOnJetAxis*> & vertices=myJetCandidate->getVerticesOnJetAxis();
285
286 std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesBegin=vertices.begin();
287 std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesEnd=vertices.end();
288
289
290 //delete incompatible tracks...
291 float max_prob(1.);
292 Trk::VxVertexOnJetAxis* worseVertex(nullptr);
293 for (std::vector<Trk::VxVertexOnJetAxis*>::const_iterator verticesIter=verticesBegin;
294 verticesIter!=verticesEnd;++verticesIter) {
295 if (*verticesIter==nullptr) {
296 if (msgLvl(MSG::WARNING)) msg() << "One vertex is empy. Problem when trying to delete incompatible vertices. No further vertices deleted." << endmsg;
297 } else {
298 const Trk::FitQuality & fitQuality=(*verticesIter)->fitQuality();
299 if (TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5))<max_prob) {
300 max_prob=TMath::Prob(fitQuality.chiSquared(),(int)std::floor(fitQuality.numberDoF()+0.5));
301 worseVertex=*verticesIter;
302 }
303 }
304 }
305 if ((max_prob<m_vertexProbCut) && worseVertex) {
306 if (msgLvl(MSG::DEBUG)) msg() << "Deleted vertex " << worseVertex->getNumVertex() << " with probability " << max_prob << endmsg;
307 if (worseVertex==myJetCandidate->getPrimaryVertex()) {
308 if (msgLvl(MSG::INFO)) msg() << " The most incompatible vertex is the primary vertex. Please check..." << endmsg;
309 }
310
311 m_routines->deleteVertexFromJetCandidate(worseVertex,myJetCandidate);
312
313 } else {
314 noMoreTracksToDelete=true;
315 if (msgLvl(MSG::VERBOSE)) msg() << "No tracks to delete: maximum probability is " << max_prob << endmsg;
316 }
317
318 numLoops+=1;
319 } while (numLoops<m_maxNumDeleteIterations&&!(noMoreTracksToDelete));
320
321 if (!performClustering) break;
322
323 if (!m_useFastClustering) {
324 m_routines->fillTableWithFullProbOfMerging(myJetCandidate,5,false,10,0.01);
325 } else {
326 m_routines->fillTableWithFastProbOfMerging(myJetCandidate);
327 }
328 const Trk::VxClusteringTable* clusteringTablePtr(myJetCandidate->getClusteringTable());
329
330
331
332
333 if (clusteringTablePtr==nullptr) {
334 if (msgLvl(MSG::WARNING)) msg() << " No Clustering Table while it should have been calculated... no more clustering performed during vertexing " << endmsg;
335 noMoreVerticesToCluster=true;
336 } else {
337
338 if (msgLvl(MSG::VERBOSE)) msg() << " clustering table is " << *clusteringTablePtr << endmsg;
339
340 //now iterate over the full map and decide wether you want to do the clustering OR not...
341 float probVertex(0.);
342 Trk::PairOfVxVertexOnJetAxis pairOfVxVertexOnJetAxis=clusteringTablePtr->getMostCompatibleVertices(probVertex);
343 //a PairOfVxVertexOnJetAxis is a std::pair<VxVertexOnJetAxis*,VxVertexOnJetAxis*>
344
345 if (probVertex>0.&&probVertex>m_vertexClusteringProbabilityCut) {
346 if (msgLvl(MSG::VERBOSE)) msg() << " merging vtx number " << (*pairOfVxVertexOnJetAxis.first).getNumVertex() <<
347 " and " << (*pairOfVxVertexOnJetAxis.second).getNumVertex() << endmsg;
348 // const Trk::VxVertexOnJetAxis & mergedVertex=
349 m_helper->mergeVerticesInJetCandidate(*pairOfVxVertexOnJetAxis.first,
350 *pairOfVxVertexOnJetAxis.second,
351 *myJetCandidate);
352 //now you need to update the numbering scheme
353 Trk::JetFitterInitializationHelper::updateTrackNumbering(myJetCandidate);//maybe this should be moved to a lower level...
354
355 } else {
356 noMoreVerticesToCluster=true;
357 }
358 }
359 numClusteringLoops+=1;
360 } while (numClusteringLoops<m_maxClusteringIterations&&!(noMoreVerticesToCluster));
361
362 //now a section should follow where the "complicate" VxJetCandidate is transformed in a conventional "VxCandidate"
363 //so that it can be used also by the normal B-Tagging algorithms...
364 //TO BE COMPLETED
365
366 //return myJetCandidate;
367
368 }
#define endmsg
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
Gaudi::Property< float > m_vertexClusteringProbabilityCut
Gaudi::Property< int > m_maxClusteringIterations
Gaudi::Property< float > m_vertexProbCut
ToolHandle< Trk::JetFitterRoutines > m_routines
ToolHandle< Trk::JetFitterHelper > m_helper
Gaudi::Property< int > m_maxNumDeleteIterations
Gaudi::Property< bool > m_useFastClustering
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition FitQuality.h:60
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
static void updateTrackNumbering(VxJetCandidate *)
Does the update of the ordering of the vertices along the jetaxis.
Trk::VxClusteringTable *& getClusteringTable(void)
const std::vector< VxVertexOnJetAxis * > & getVerticesOnJetAxis(void) const
const VxVertexOnJetAxis * getPrimaryVertex(void) const
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.

◆ evtStore()

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.

◆ 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

◆ findSecVertex() [1/3]

virtual Trk::VxSecVertexInfo * InDet::InDetJetFitterVxFinder::findSecVertex ( const EventContext & ,
const xAOD::Vertex & ,
const TLorentzVector & ,
const std::vector< const xAOD::IParticle * > &  ) const
inlineoverridevirtual

Implements InDet::ISecVertexInJetFinder.

Definition at line 66 of file InDetJetFitterVxFinder.h.

70 {
71 /* not implemented */
72 return 0;
73 }

◆ findSecVertex() [2/3]

const Trk::VxSecVertexInfo * InDet::InDetJetFitterVxFinder::findSecVertex ( const Trk::RecVertex & primaryVertex,
const TLorentzVector & jetMomentum,
const std::vector< const Trk::TrackParticleBase * > & firstInputTracks,
const std::vector< const Trk::TrackParticleBase * > & secondInputTracks,
const Amg::Vector3D & vtxSeedDirection ) const

Definition at line 171 of file InDetJetFitterVxFinder.cxx.

176 {
177
178 Amg::Vector3D myDirection(jetMomentum.Vect().X(),jetMomentum.Vect().Y(),jetMomentum.Vect().Z());
179
180 std::vector<std::vector<const Trk::TrackParticleBase*> > bunchesOfTracks;
181
182 std::vector<const Trk::TrackParticleBase*> tracksToAdd;
183
184 std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2Begin=firstInputTracks.begin();
185 std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2End=firstInputTracks.end();
186 for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracks2Iter=tracks2Begin;
187 tracks2Iter!=tracks2End;++tracks2Iter) {
188 if (msgLvl(MSG::VERBOSE)) msg() << " adding track to fit " << endmsg;
189 tracksToAdd.push_back(*tracks2Iter);
190 }
191
192 bunchesOfTracks.push_back(tracksToAdd);
193 tracksToAdd.clear();
194
195 std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3Begin=secondInputTracks.begin();
196 std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3End=secondInputTracks.end();
197 for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracks3Iter=tracks3Begin;
198 tracks3Iter!=tracks3End;++tracks3Iter) {
199 if (msgLvl(MSG::VERBOSE)) msg() << " adding track to fit " << endmsg;
200 tracksToAdd.push_back(*tracks3Iter);
201 }
202
203 if (!tracksToAdd.empty())
204 {
205 bunchesOfTracks.push_back(tracksToAdd);
206 }
207 tracksToAdd.clear();
208
209
210 //now it just uses these bunches...
211 //now I have just to make sure that no clustering is done at first iteration
212 //while it needs to be done at second iteration (there will be only two iterations)
213
214
215 std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesBegin=bunchesOfTracks.begin();
216 std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesEnd=bunchesOfTracks.end();
217
218 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddBegin;
219 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddEnd;
220 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddIter;
221
222
223 std::unique_ptr<Trk::VxJetCandidate> myJetCandidate;
224
225 for (std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesIter=BunchesBegin;
226 BunchesIter!=BunchesEnd;++BunchesIter) {
227
228 if (BunchesIter==BunchesBegin) {
229 if (msgLvl(MSG::VERBOSE)) msg() << " initial fit with " << (*BunchesIter).size() << " tracks " << endmsg;
230 myJetCandidate.reset(m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection,&vtxSeedDirection));
231 m_routines->initializeToMinDistancesToJetAxis(myJetCandidate.get());
232 if (!(*BunchesIter).empty())
233 {
234 doTheFit(myJetCandidate.get(),true); //will not delete myJetCandidate
235 }
236 } else if (myJetCandidate){
237 if (msgLvl(MSG::VERBOSE)) msg() << " other fit with " << (*BunchesIter).size() << " tracks " << endmsg;
238 std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis();
239 std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex();
240 tracksToAddBegin=(*BunchesIter).begin();
241 tracksToAddEnd=(*BunchesIter).end();
242 for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) {
243 std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex;
245 link.setElement(*tracksToAddIter);
246 Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link);
247 Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT);
248 temp_vector_tracksAtVertex.push_back(newVxTrack);
249 setOfTracks->push_back(newVxTrack);
250 setOfVertices.push_back(new Trk::VxVertexOnJetAxis(std::move(temp_vector_tracksAtVertex)));
251 }
252 if (msgLvl(MSG::VERBOSE)) msg() << " new overall number of tracks to fit : " << setOfVertices.size() << endmsg;
253 myJetCandidate->setVerticesOnJetAxis(setOfVertices);
255 m_routines->initializeToMinDistancesToJetAxis(myJetCandidate.get());
256 doTheFit(myJetCandidate.get());
257 }
258 }
259
260 std::vector<Trk::VxCandidate*> myCandidates;
261 myCandidates.push_back(myJetCandidate.release());//pass ownership to myCandidates
262 //this function, finally, has no useful output?
263 return nullptr;
264
265 }
void doTheFit(Trk::VxJetCandidate *myJetCandidate, bool performClustering=true) const
ToolHandle< Trk::JetFitterInitializationHelper > m_initializationHelper
Eigen::Matrix< double, 3, 1 > Vector3D
pointer & link(pointer p) const
Return a reference to the link for an element.

◆ findSecVertex() [3/3]

const Trk::VxSecVertexInfo * InDet::InDetJetFitterVxFinder::findSecVertex ( const Trk::RecVertex & primaryVertex,
const TLorentzVector & jetMomentum,
const std::vector< const Trk::TrackParticleBase * > & inputTracks ) const

Definition at line 85 of file InDetJetFitterVxFinder.cxx.

87 {
88 Amg::Vector3D myDirection(jetMomentum.Vect().X(),jetMomentum.Vect().Y(),jetMomentum.Vect().Z());
89
90 std::vector<TrackParticle_pair> tracks;
91
92 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksBegin=myTracks.begin();
93 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksEnd=myTracks.end();
94 for (std::vector<const Trk::TrackParticleBase*>::const_iterator tracksIter=tracksBegin;
95 tracksIter!=tracksEnd;++tracksIter) {
96 if (m_trkFilter->decision(**tracksIter,&primaryVertex)) {
97 tracks.emplace_back((*tracksIter)->perigee()->momentum().perp(),*tracksIter);
98 }
99 }
100
101 std::vector<std::vector<const Trk::TrackParticleBase*> > bunchesOfTracks;
102
103 std::sort(tracks.begin(),tracks.end());
104
105 std::vector<const Trk::TrackParticleBase*> tracksToAdd;
106
107 std::vector<TrackParticle_pair>::const_iterator tracks2Begin=tracks.begin();
108 std::vector<TrackParticle_pair>::const_iterator tracks2End=tracks.end();
109 for (std::vector<TrackParticle_pair>::const_iterator tracks2Iter=tracks2Begin;
110 tracks2Iter!=tracks2End;++tracks2Iter) {
111 if (msgLvl(MSG::VERBOSE)) msg() << " track: " << (*tracks2Iter).first << " and : " << (*tracks2Iter).second << endmsg;
112
113 tracksToAdd.push_back((*tracks2Iter).second);
114 if (tracksToAdd.size() % m_maxTracksToFitAtOnce == 0) {
115 if (msgLvl(MSG::VERBOSE)) msg() << " new bunch " << endmsg;
116 bunchesOfTracks.push_back(tracksToAdd);
117 tracksToAdd.clear();
118 }
119 }
120
121 bunchesOfTracks.push_back(std::move(tracksToAdd));
122
123 std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesBegin=bunchesOfTracks.begin();
124 std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesEnd=bunchesOfTracks.end();
125
126 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddBegin;
127 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddEnd;
128 std::vector<const Trk::TrackParticleBase*>::const_iterator tracksToAddIter;
129
130
131 std::unique_ptr<Trk::VxJetCandidate> myJetCandidate;
132
133 for (std::vector<std::vector<const Trk::TrackParticleBase*> >::const_iterator BunchesIter=BunchesBegin;
134 BunchesIter!=BunchesEnd;++BunchesIter) {
135
136 if (BunchesIter==BunchesBegin) {
137 if (msgLvl(MSG::VERBOSE)) msg() << " initial fit with " << (*BunchesIter).size() << " tracks " << endmsg;
138 myJetCandidate.reset(m_initializationHelper->initializeJetCandidate(*BunchesIter,&primaryVertex,&myDirection));
139 m_routines->initializeToMinDistancesToJetAxis(myJetCandidate.get());
140 doTheFit(myJetCandidate.get());
141 } else if (myJetCandidate){
142 if (msgLvl(MSG::VERBOSE)) msg() << " other fit with " << (*BunchesIter).size() << " tracks " << endmsg;
143 std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis();
144 std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex();
145 tracksToAddBegin=(*BunchesIter).begin();
146 tracksToAddEnd=(*BunchesIter).end();
147 for (tracksToAddIter=tracksToAddBegin;tracksToAddIter!=tracksToAddEnd;++tracksToAddIter) {
148 std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex;
150 link.setElement(*tracksToAddIter);
151 Trk::LinkToTrackParticleBase * linkTT = new Trk::LinkToTrackParticleBase(link);
152 Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex(linkTT);
153 temp_vector_tracksAtVertex.push_back(newVxTrack);
154 setOfTracks->push_back(std::move(newVxTrack));
155 setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex));
156 }
157 if (msgLvl(MSG::VERBOSE)) msg() << " new overall number of tracks to fit : " << setOfVertices.size() << endmsg;
158 myJetCandidate->setVerticesOnJetAxis(setOfVertices);
160 doTheFit(myJetCandidate.get());
161 }
162 }
163
164 std::vector<Trk::VxCandidate*> myCandidates;
165 myCandidates.push_back(myJetCandidate.get());
166 //this function has no useful output?
167 return nullptr;
168
169 }
ToolHandle< Trk::ITrackSelectorTool > m_trkFilter
Gaudi::Property< int > m_maxTracksToFitAtOnce
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ initialize()

StatusCode InDet::InDetJetFitterVxFinder::initialize ( )
overridevirtual

Definition at line 73 of file InDetJetFitterVxFinder.cxx.

73 {
74
75 //retrieving the udator itself
76 ATH_CHECK( m_helper.retrieve() );
78 ATH_CHECK( m_routines.retrieve() );
79 ATH_CHECK( m_trkFilter.retrieve() );
80
81 return StatusCode::SUCCESS;
82 }
#define ATH_CHECK
Evaluate an expression and check for errors.

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

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

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

◆ 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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

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

◆ trackDecorationNames()

virtual std::vector< std::string > InDet::ISecVertexInJetFinder::trackDecorationNames ( ) const
inlinevirtualinherited

Return a list of the names of track decorations created by this tool, in order to allow them to be locked when the calling algorithm completes.

Return an empty list by default.

Reimplemented in InDet::InDetImprovedJetFitterVxFinder.

Definition at line 69 of file ISecVertexInJetFinder.h.

70 {
71 return std::vector<std::string>();
72 }

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

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_helper

ToolHandle< Trk::JetFitterHelper > InDet::InDetJetFitterVxFinder::m_helper {this,"JetFitterHelper","Trk::JetFitterHelper",""}
private

Definition at line 91 of file InDetJetFitterVxFinder.h.

91{this,"JetFitterHelper","Trk::JetFitterHelper",""};

◆ m_initializationHelper

ToolHandle< Trk::JetFitterInitializationHelper > InDet::InDetJetFitterVxFinder::m_initializationHelper {this,"JetFitterInitializationHelper","Trk::JetFitterInitializationHelper",""}
private

Definition at line 90 of file InDetJetFitterVxFinder.h.

90{this,"JetFitterInitializationHelper","Trk::JetFitterInitializationHelper",""};

◆ m_maxClusteringIterations

Gaudi::Property< int > InDet::InDetJetFitterVxFinder::m_maxClusteringIterations {this,"MaxClusteringIterations",30,""}
private

Definition at line 98 of file InDetJetFitterVxFinder.h.

98{this,"MaxClusteringIterations",30,""};

◆ m_maxNumDeleteIterations

Gaudi::Property< int > InDet::InDetJetFitterVxFinder::m_maxNumDeleteIterations {this,"MaxNumDeleteIterations",30,""}
private

Definition at line 96 of file InDetJetFitterVxFinder.h.

96{this,"MaxNumDeleteIterations",30,""};

◆ m_maxTracksToFitAtOnce

Gaudi::Property< int > InDet::InDetJetFitterVxFinder::m_maxTracksToFitAtOnce {this,"MaxTracksToFitAtOnce",15,""}
private

Definition at line 102 of file InDetJetFitterVxFinder.h.

102{this,"MaxTracksToFitAtOnce",15,""};

◆ m_routines

ToolHandle< Trk::JetFitterRoutines > InDet::InDetJetFitterVxFinder::m_routines {this,"JetFitterRoutines","Trk::JetFitterRoutines",""}
private

Definition at line 92 of file InDetJetFitterVxFinder.h.

92{this,"JetFitterRoutines","Trk::JetFitterRoutines",""};

◆ m_trkFilter

ToolHandle< Trk::ITrackSelectorTool > InDet::InDetJetFitterVxFinder::m_trkFilter {this,"TrackSelector","InDet::InDetDetailedTrackSelectorTool",""}
private

Definition at line 93 of file InDetJetFitterVxFinder.h.

93{this,"TrackSelector","InDet::InDetDetailedTrackSelectorTool",""};

◆ m_useFastClustering

Gaudi::Property< bool > InDet::InDetJetFitterVxFinder::m_useFastClustering {this,"UseFastClustering",false,""}
private

Definition at line 100 of file InDetJetFitterVxFinder.h.

100{this,"UseFastClustering",false,""};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexClusteringProbabilityCut

Gaudi::Property< float > InDet::InDetJetFitterVxFinder::m_vertexClusteringProbabilityCut {this,"VertexClusteringProbabilityCut",0.01,""}
private

Definition at line 99 of file InDetJetFitterVxFinder.h.

99{this,"VertexClusteringProbabilityCut",0.01,""};

◆ m_vertexProbCut

Gaudi::Property< float > InDet::InDetJetFitterVxFinder::m_vertexProbCut {this,"VertexProbCut",0.01,""}
private

Definition at line 97 of file InDetJetFitterVxFinder.h.

97{this,"VertexProbCut",0.01,""};

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