ATLAS Offline Software
Loading...
Searching...
No Matches
VrtSecInclusive.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Header include
8
11
12// FrameWork include(s):
14
15// ROOT Classes
16#include "TMath.h"
17#include "TH1F.h"
18#include "TH2F.h"
19#include "TNtuple.h"
20#include "TTree.h"
21#include "TROOT.h"
22
23#include <chrono>
24#include <exception>
25#include <functional>
26#include <iostream>
27#include <memory>
28#include <new>
29#include <string>
30#include <tuple>
31
32using namespace std;
33
34
35namespace VKalVrtAthena {
36
37 //Constructor and destructor
38 //__________________________________________________________________________
39 VrtSecInclusive::VrtSecInclusive(const std::string& name, ISvcLocator* pSvcLocator):
40 AthAlgorithm (name,pSvcLocator),
41 m_ntupleVars ( nullptr )
42 {
47
48 if( m_FillNtuple ) {
49 m_ntupleVars = std::make_unique<NtupleVars>( );
50 }
51 }
52
53
54 //__________________________________________________________________________
58
59 //__________________________________________________________________________
61 {
62 ATH_MSG_INFO("initialize: begin");
63 //
64 // first instantiate tools
65
66 // VKalVrt vertex fitter
67 if (m_fitSvc.retrieve().isFailure()) {
68 ATH_MSG_ERROR("initialize: Can't find Trk::TrkVKalVrtFitter");
69 return StatusCode::SUCCESS;
70 } else {
71 ATH_MSG_INFO("initialize: Trk::TrkVKalVrtFitter found");
72 }
73
74 //
75 // retreive tool to get trackParameters of generated Particles
76 if(m_truthToTrack.retrieve().isFailure()) {
77 ATH_MSG_INFO("initialize: Cannot retrieve Trk::TruthToTrack Tool!");
78 return StatusCode::FAILURE;
79 }
80 else {
81 ATH_MSG_INFO("initialize: Retrieved Trk::TruthToTrack Tool" << m_truthToTrack);
82
83 }
84 // extract TrackToVertex extrapolator tool
85 if ( m_trackToVertexTool.retrieve().isFailure() ) {
86 ATH_MSG_ERROR("initialize: failed to retrieve trackToVertex tool ");
87 return StatusCode::SUCCESS;
88 }
89 else {
90 ATH_MSG_INFO("initialize: Retrieved Reco::TrackToVertex Tool" << m_trackToVertexTool);
91 }
92 // extract TrackToVertexIPEstimator extrapolator tool
93 if ( m_trackToVertexIPEstimatorTool.retrieve().isFailure() ) {
94 ATH_MSG_ERROR("initialize: failed to retrieve trackToVertexIPEstimator tool ");
95 return StatusCode::SUCCESS;
96 }
97 else {
98 ATH_MSG_INFO("initialize: Retrieved Trk::TrackToVertexIPEstimator Tool" << m_trackToVertexIPEstimatorTool);
99 }
100
101 if( detStore()->retrieve(m_atlasId, "AtlasID").isFailure() ) return StatusCode::FAILURE;
102 if( detStore()->retrieve(m_pixelId, "PixelID").isFailure() ) return StatusCode::FAILURE;
103 if( detStore()->retrieve(m_sctId, "SCT_ID") .isFailure() ) return StatusCode::FAILURE;
104
105 if ( m_pixelCondSummaryTool.retrieve().isFailure() ) {
106 ATH_MSG_ERROR("initialize: failed to retrieve PixelConditionsSummaryTool");
107 return StatusCode::SUCCESS;
108 }
109 else {
110 ATH_MSG_INFO("initialize: Retrieved PixelConditionsSummaryTool" << m_pixelCondSummaryTool);
111 }
112 if ( m_sctCondSummaryTool.retrieve().isFailure() ) {
113 ATH_MSG_ERROR("initialize: failed to retrieve SCTConditionsSummaryTool");
114 return StatusCode::SUCCESS;
115 }
116 else {
117 ATH_MSG_INFO("initialize: Retrieved SCTConditionsSummaryTool" << m_sctCondSummaryTool);
118 }
119
120 ATH_CHECK( m_extrapolator.retrieve() );
121
122 // extract VertexMapper
123 if( m_doMapToLocal ) {
124 ATH_CHECK( m_vertexMapper.retrieve() );
125 }
126
127 // Track selection algorithm configuration
131
132 // if none of the above two flags are activated, use ID tracks (default)
134
136
137 }
138
139
140 // Vertexing algorithm configuration
141 m_vertexingAlgorithms.emplace_back( "extractIncompatibleTrackPairs", &VrtSecInclusive::extractIncompatibleTrackPairs );
142 m_vertexingAlgorithms.emplace_back( "findNtrackVertices", &VrtSecInclusive::findNtrackVertices );
143 m_vertexingAlgorithms.emplace_back( "rearrangeTracks", &VrtSecInclusive::rearrangeTracks );
144
146 m_vertexingAlgorithms.emplace_back( "reassembleVertices", &VrtSecInclusive::reassembleVertices );
147 }
148
150 m_vertexingAlgorithms.emplace_back( "mergeByShuffling", &VrtSecInclusive::mergeByShuffling );
151 }
152
154 m_vertexingAlgorithms.emplace_back( "mergeFinalVertices", &VrtSecInclusive::mergeFinalVertices );
155 }
156
158 m_vertexingAlgorithms.emplace_back( "associateNonSelectedTracks", &VrtSecInclusive::associateNonSelectedTracks );
159 }
160
162
163
164 // now make histograms/ntuples
165
166 ServiceHandle<ITHistSvc> hist_root("THistSvc", name());
167 ATH_CHECK( hist_root.retrieve() );
168
169 if( m_FillHist ) {
170
171 std::vector<double> rbins = { 0.1, 0.3, 0.5, 1, 2, 3, 5, 7, 10, 14, 20, 28, 38, 50, 64, 80, 100, 130, 170, 220, 280, 350, 450, 600 };
172 std::vector<double> nbins = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 20, 24, 28, 38, 50, 70, 100, 150 };
173
174 const size_t& nAlgs = m_vertexingAlgorithms.size();
175
176 ATH_MSG_INFO("initialize: Filling Histograms");
177 //
178 m_hists["trkSelCuts"] = new TH1F("trkSelCuts", ";Cut Order;Tracks", 10, -0.5, 10-0.5 );
179 m_hists["selTracksDist"] = new TH1F("selTracksDist", ";Selected Tracks;Events", 2000, -0.5, 2000-0.5 );
180 m_hists["initVertexDispD0"] = new TH2F("initVertexDispD0", ";Rough d0 wrt init [mm];r [mm];Vertices", 1000, -100, 100, rbins.size()-1, &(rbins[0]) );
181 m_hists["initVertexDispZ0"] = new TH2F("initVertexDispZ0", ";Rough z0 wrt init [mm];z [mm];Vertices", 1000, -100, 100, 100, -1000, 1000 );
182 m_hists["incompMonitor"] = new TH1F("incompMonitor", ";Setp;Track Pairs", 10, -0.5, 10-0.5 );
183 m_hists["2trkVerticesDist"] = new TH1F("2trkVerticesDist", ";2-track Vertices;Events", 1000, -0.5, 1000-0.5 );
184 m_hists["2trkChi2Dist"] = new TH1F("2trkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
185 m_hists["NtrkChi2Dist"] = new TH1F("NtrkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
186 m_hists["vPosDist"] = new TH2F("vPosDist", ";r;#vec{x}*#vec{p}/p_{T} [mm]", rbins.size()-1, &(rbins[0]), 200, -1000, 1000 );
187 m_hists["vPosMomAngTDist"] = new TH2F("vPosMomAngDistT", ";r;cos(#vec{r},#vec{p}_{T})", rbins.size()-1, &(rbins[0]), 200, -1.0, 1.0 );
188 m_hists["disabledCount"] = new TH1F("disabledCount", ";N_{modules};Tracks", 20, -0.5, 10-0.5 );
189 m_hists["vertexYield"] = new TH1F("vertexYield", ";Algorithm Step;Vertices", nAlgs, -0.5, nAlgs-0.5 );
190 m_hists["vertexYieldNtrk"] = new TH2F("vertexYieldNtrk", ";Ntrk;Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
191 m_hists["vertexYieldChi2"] = new TH2F("vertexYieldChi2", ";#chi^{2}/N_{dof};Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
192 m_hists["mergeType"] = new TH1F("mergeType", ";Merge Algorithm Type;Entries", 10, -0.5, 10-0.5 );
193 m_hists["associateMonitor"] = new TH1F("associateMonitor", ";Step;Vertices", 10, -0.5, 10-0.5 );
194 m_hists["shuffleMinSignif1"] = new TH1F("shuffleMinSignif1", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
195 m_hists["shuffleMinSignif2"] = new TH1F("shuffleMinSignif2", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
196 m_hists["shuffleMinSignif3"] = new TH1F("shuffleMinSignif3", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
197 m_hists["finalCutMonitor"] = new TH1F("finalCutMonitor", ";Step;Vertices", 6, -0.5, 6-0.5 );
198 m_hists["finalVtxNtrk"] = new TH1F("finalVtxNtrk", ";N_{trk};Vertices", nbins.size()-1, &(nbins[0]) );
199 m_hists["finalVtxR"] = new TH1F("finalVtxR", ";r [mm];Vertices", 600, 0, 600 );
200 m_hists["finalVtxNtrkR"] = new TH2F("finalVtxNtrkR", ";N_{trk};r [mm];Vertices", nbins.size()-1, &(nbins[0]), rbins.size()-1, &(rbins[0]) );
201 m_hists["CPUTime"] = new TH1F("CPUTime", ";Step;Accum. CPU Time [s]", 10, -0.5, 10-0.5 );
202 m_hists["nMatchedTruths"] = new TH2F("nMatchedTruths", ";Step;;r [mm];Matched truth vertices", 11, -0.5, 11-0.5, rbins.size()-1, &(rbins[0]) );
203 m_hists["vPosMomAngT"] = new TH1F("vPosMomAngT", ";cos(#vec{r},#vec{p}_{T}", 200, -1.0, 1.0 );
204 m_hists["vPosMomAng3D"] = new TH1F("vPosMomAng3D", ";cos(#vec{r},#vec{p})", 200, -1.0, 1.0 );
205 m_hists["2trkVtxDistFromPV"] = new TH1F("2trkVtDistFromPV", ";2tr vertex distance from PV;Events", 100, 0, 3 );
206
207
208 std::string histDir("/AANT/VrtSecInclusive" + m_augVerString + "/");
209
210 for( auto& pair : m_hists ) {
211 ATH_CHECK( hist_root->regHist( histDir + pair.first, pair.second ) );
212 }
213 }
214
215
216 if( m_FillNtuple ) {
217
219
220 m_tree_Vert = new TTree("tree_VrtSecInclusive","TTree of VrtSecInclusive");
221 ATH_CHECK( hist_root->regTree("/AANT/tree_VrtSecInclusive", m_tree_Vert) );
222
224
225 }
226
227 // initialize keys
228 ATH_CHECK(m_eventInfoKey.initialize());
229
230 // Instantiate and initialize our event info decorator write
231 m_vertexingStatusKey = "VrtSecInclusive_" + m_secondaryVerticesContainerName + m_augVerString + "_status";
232 ATH_CHECK( m_vertexingStatusKey.initialize() );
233
236 ATH_CHECK( m_vertexKey.initialize() );
240
242 for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
243 const std::string& nameAlgo = itr->first;
244 std::string fullName = "VrtSecInclusive_IntermediateVertices_" + nameAlgo + m_augVerString;
245 m_intermediateVertexKey[nameAlgo] = SG::WriteHandleKey<xAOD::VertexContainer>( this, nameAlgo, fullName );
248 }
249 }
250
251
252 ATH_CHECK( m_TrackLocation.initialize() );
253 ATH_CHECK( m_MuonLocation.initialize() );
254 ATH_CHECK( m_ElectronLocation.initialize() );
255 ATH_CHECK( m_PrimVrtLocation.initialize() );
256
257 //
258 ATH_MSG_INFO("initialize: Exit VrtSecInclusive::initialize()");
259 return StatusCode::SUCCESS;
260 }
261
262
263 StatusCode VrtSecInclusive::dummyVertexContainer(const EventContext& ctx,
265 {
266 SG::WriteHandle<xAOD::VertexContainer> vHandle = SG::makeHandle( handleKey, ctx );
267 ATH_CHECK( vHandle.record( std::make_unique<xAOD::VertexContainer>(),
268 std::make_unique<xAOD::VertexAuxContainer>() ) );
269 m_vertexCollectionsDefinitions.at(handleKey.key()) = true;
270 return StatusCode::SUCCESS;
271 }
272
273 StatusCode VrtSecInclusive::defineDummyCollections(const EventContext& ctx)
274 {
275 if ( not m_vertexCollectionsDefinitions.at(m_vertexKey.key()) ) {
277 }
278
282 }
283
284 for (const auto& [nameAlgo, handleKey] : m_intermediateVertexKey) {
285 if (not m_vertexCollectionsDefinitions.at( handleKey.key() )) {
286 ATH_CHECK( dummyVertexContainer(ctx, handleKey) );
287 }
288 }
289 }
290
291 return StatusCode::SUCCESS;
292 }
293
294
295 //__________________________________________________________________________
297 {
298
299 ATH_MSG_DEBUG("initEvent: begin");
300
301 // Clear all variables to be stored to the AANT
302 if( m_FillNtuple ) {
304 }
305
306
307 ATH_MSG_DEBUG("initEvent: from initEvent ");
308 return StatusCode::SUCCESS;
309
310 }
311
312
313 //__________________________________________________________________________
314 StatusCode VrtSecInclusive::execute(const EventContext& ctx)
315 {
316
317 //
318 ATH_MSG_DEBUG("VrtSecInclusive execute()");
319
320 // Reset values
321 for (auto& [key, val] : m_vertexCollectionsDefinitions) {
322 val = false;
323 }
324
326
328 if (!eventInfo.isValid()) {
329 ATH_MSG_ERROR ("Could not retrieve EventInfo");
330 return StatusCode::FAILURE;
331 }
332
334
335 // clear ntuple variables
336 StatusCode sc = this->initEvent();
337 if(sc.isFailure()) {
338 ATH_MSG_WARNING("Problem in initEvent ");
339 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
341 return StatusCode::SUCCESS;
342 }
343
344 // add event level info to ntuple
345 if( m_FillNtuple ) sc = addEventInfo();
346
347 if (sc.isFailure() ) {
348 ATH_MSG_WARNING("Failure in getEventInfo() ");
349 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
351 return StatusCode::SUCCESS;
352 }
353
354
356 //
357 // Setup StoreGate Variables
358 //
359
360 // Check Return StatusCode::Failure if the user-specified container names have duplication.
361 {
362 std::vector<std::string> userContainerNames { m_secondaryVerticesContainerName, m_all2trksVerticesContainerName };
363 std::set<std::string> userContainerNamesSet;
364 for( auto& name : userContainerNames ) userContainerNamesSet.insert( name );
365 if( userContainerNamesSet.size() != userContainerNames.size() ) {
366 ATH_MSG_ERROR( " > " << __FUNCTION__ << ": detected duplicated user-specified container name. Please check your job property" );
367 return StatusCode::FAILURE;
368 }
369 }
370
371
373
374
375 // Later use elsewhere in the algorithm
376 m_selectedTracks.clear();
377 m_associatedTracks.clear();
378 m_leptonicTracks.clear();
379
381
383 //
384 // now start algorithm
385 //
386
387 //--------------------------------------------------------
388 // Primary vertex processing
389 //
390 sc = this->processPrimaryVertices(); // fetch the 1st primary reconstructed vertex
391
392 if( sc.isFailure() or !m_thePV ) {
393
394 ATH_MSG_WARNING("processPrimaryVertices() failed");
395 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
397 return StatusCode::SUCCESS;
398 }
399
400 // Perform track selection and store it to selectedBaseTracks
401 for( auto alg : m_trackSelectionAlgs ) {
402 ATH_CHECK( (this->*alg)(ctx) );
403 }
404
405 if( m_FillNtuple )
406 m_ntupleVars->get<unsigned int>( "NumSelTrks" ) = static_cast<int>( m_selectedTracks.size() );
407
408 // fill information about selected tracks in AANT
410
411 //-------------------------------------------------------
412 // Skip the event if the number of selected tracks is more than m_SelTrkMaxCutoff
413 if( m_selectedTracks.size() < 2 ) {
414 ATH_MSG_DEBUG( "execute: Too few (<2) selected reco tracks. Terminated reconstruction." );
416 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
417 ATH_CHECK( lockTrackDecorations( true, ctx ) );
419 return StatusCode::SUCCESS;
420 }
421
422 if( m_selectedTracks.size() > m_SelTrkMaxCutoff ) {
423 ATH_MSG_INFO( "execute: Too many selected reco tracks. Terminated reconstruction." );
425 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
426 ATH_CHECK( lockTrackDecorations( true, ctx ) );
428 return StatusCode::SUCCESS;
429 }
430
431 //-------------------------------------------------------
432 // Core part of Vertexing
433 //
434
435 {
436
438
439 // set of vertices created in the following while loop.
440 std::vector<WrkVrt> workVerticesContainer;
441
442 // the main sequence of the main vertexing algorithms
443 // see initialize() what kind of algorithms exist.
444 for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
445
446 auto& name = itr->first;
447 auto alg = itr->second;
448
449 auto t_start = std::chrono::system_clock::now();
450
451 ATH_CHECK( (this->*alg)( ctx, &workVerticesContainer ) );
452
453 auto t_end = std::chrono::system_clock::now();
454
455 if( m_FillHist ) {
456 auto sec = std::chrono::duration_cast<std::chrono::microseconds>( t_end - t_start ).count();
457 m_hists["CPUTime"]->Fill( m_vertexingAlgorithmStep, sec/1.e6 );
458 }
459
460 std::erase_if( workVerticesContainer,
461 []( WrkVrt& wrkvrt ) {
462 return ( !wrkvrt.isGood || wrkvrt.nTracksTotal() < 2 ); }
463 );
464
465 ATH_CHECK( monitorVertexingAlgorithmStep( ctx, &workVerticesContainer, name, std::next( itr ) == m_vertexingAlgorithms.end() ) );
466
468
469 }
470 }
471
473 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
474
475 // Fill AANT
476 if( m_FillNtuple ) {
477 m_tree_Vert->Fill();
479 }
480
481 ATH_CHECK( lockTrackDecorations( false, ctx ) );
482
483 ATH_MSG_VERBOSE( "execute: process done." );
484 // end
486 return StatusCode::SUCCESS;
487
488 }
489
490 void VrtSecInclusive::lockTrackDecorations( const xAOD::TrackParticle* trk, bool onlySelection ) const {
492 const_cast<SG::AuxVectorData*> (trk->container());
493 cont_nc->lockDecoration (m_decor_isSelected->auxid());
494
495 if (onlySelection) return;
496
497 if (m_decor_isAssociated && m_decor_isAssociated->isAvailable (*cont_nc)) {
498 cont_nc->lockDecoration (m_decor_isAssociated->auxid());
499 }
500 if (m_decor_is_svtrk_final && m_decor_is_svtrk_final->isAvailable (*cont_nc)) {
501 cont_nc->lockDecoration (m_decor_is_svtrk_final->auxid());
502 }
503
504 for (const auto& p : m_trkDecors) {
505 cont_nc->lockDecoration (p.second.auxid());
506 }
507 }
508
511 const_cast<SG::AuxVectorData*> (cont);
512 for (const IPDecoratorType& dec : m_ipDecors) {
513 if (dec.isAvailable (*cont)) {
514 cont_nc->lockDecoration (dec.auxid());
515 }
516 }
517
518 if (m_decor_svLink) {
519 if (m_decor_svLink->isAvailable (*cont)) {
520 cont_nc->lockDecoration (m_decor_svLink->auxid());
521 }
522 }
523 }
524
525 StatusCode VrtSecInclusive::lockTrackDecorations( bool onlySelection,
526 const EventContext& ctx ) const
527 {
529 ATH_CHECK( trackParticleHandle.isValid() );
530 const xAOD::TrackParticleContainer* trackParticleContainer = trackParticleHandle.cptr();
531 for( const xAOD::TrackParticle* trk : *trackParticleContainer ) {
532 lockTrackDecorations( trk, onlySelection );
533 }
534
536 ATH_CHECK( muonsHandle.isValid() );
537 const xAOD::MuonContainer* muons = muonsHandle.cptr();
538 if (muons->ownPolicy() != SG::VIEW_ELEMENTS) {
539 lockLeptonDecorations (muons);
540 }
541 for( const xAOD::Muon* muon : *muons ) {
542 if (muons->ownPolicy() == SG::VIEW_ELEMENTS) {
543 lockLeptonDecorations (muon->container());
544 }
545 if ( const xAOD::TrackParticle* trk = muon->trackParticle( xAOD::Muon::InnerDetectorTrackParticle ) ) {
546 lockTrackDecorations( trk, onlySelection );
547 }
548 }
549
551 ATH_CHECK( electronsHandle.isValid() );
552 const xAOD::ElectronContainer *electrons = electronsHandle.cptr();
553 if (electrons->ownPolicy() != SG::VIEW_ELEMENTS) {
554 lockLeptonDecorations (electrons);
555 }
556 for( const xAOD::Electron* electron : *electrons ) {
557 if (electrons->ownPolicy() == SG::VIEW_ELEMENTS) {
558 lockLeptonDecorations (electron->container());
559 }
560 if( electron->nTrackParticles() > 0 ) {
561 if (const xAOD::TrackParticle* trk = electron->trackParticle(0)) {
562 lockTrackDecorations( trk, onlySelection );
563 }
564 }
565 }
566
568 ATH_CHECK( IDtracksHandle.isValid() );
569 const xAOD::TrackParticleContainer* IDtracks = IDtracksHandle.cptr();
570 for( const auto *trk : *IDtracks ) {
571 lockTrackDecorations( trk, onlySelection );
572 }
573
574 return StatusCode::SUCCESS;
575 }
576
577} // end of namespace bracket
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
Handle class for adding a decoration to an object.
#define ATLAS_THREAD_SAFE
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
const ServiceHandle< StoreGateSvc > & detStore() const
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
Manage lookup of vectors of auxiliary data.
void lockDecoration(SG::auxid_t auxid)
Explicitly lock a decoration.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Gaudi::Property< bool > m_doSelectIDAndGSFTracks
SG::AuxElement::Decorator< std::vector< std::vector< float > > > IPDecoratorType
VrtSecInclusive(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
std::map< std::string, PatternStrategyFunc > m_patternStrategyFuncs
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonLocation
bool checkTrackHitPatternToVertex(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
A classical method with hard-coded geometry.
bool checkTrackHitPatternToVertexByExtrapolationAssist(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
New method with track extrapolation.
Gaudi::Property< bool > m_doMergeFinalVerticesDistance
bool checkTrackHitPatternToVertexByExtrapolation(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
New method with track extrapolation.
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
Condition service.
SG::WriteHandleKey< xAOD::VertexContainer > m_vertexKey
Gaudi::Property< bool > m_doReassembleVertices
void lockTrackDecorations(const xAOD::TrackParticle *trk, bool onlySelection) const
lock decorations at the end of the algorithm
StatusCode selectTracksFromElectrons(const EventContext &ctx)
StatusCode selectTracksFromMuons(const EventContext &ctx)
std::map< unsigned, SG::Decorator< float > > m_trkDecors
void lockLeptonDecorations(const SG::AuxVectorData *cont) const
PublicToolHandle< Trk::IVertexMapper > m_vertexMapper
Gaudi::Property< unsigned int > m_SelTrkMaxCutoff
Gaudi::Property< bool > m_doMergeByShuffling
std::unique_ptr< NtupleVars > m_ntupleVars
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronLocation
std::unordered_map< std::string, bool > m_vertexCollectionsDefinitions
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
StatusCode associateNonSelectedTracks(const EventContext &ctx, std::vector< WrkVrt > *)
in addition to selected tracks, associate as much tracks as possible
PublicToolHandle< Trk::ITruthToTrack > m_truthToTrack
Gaudi::Property< bool > m_doSelectTracksFromElectrons
Gaudi::Property< std::string > m_all2trksVerticesContainerName
Gaudi::Property< bool > m_FillHist
bool checkTrackHitPatternToVertexOuterOnly(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
A classical method with hard-coded geometry.
std::optional< SG::Decorator< char > > m_decor_isSelected
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackLocation
std::map< std::string, TH1 * > m_hists
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Read/Write Handle Keys.
Gaudi::Property< std::string > m_secondaryVerticesContainerName
StatusCode reassembleVertices(const EventContext &ctx, std::vector< WrkVrt > *)
attempt to merge vertices when all tracks of a vertex A is close to vertex B in terms of impact param...
StatusCode mergeFinalVertices(const EventContext &ctx, std::vector< WrkVrt > *)
attempt to merge vertices by lookng at the distance between two vertices
Gaudi::Property< bool > m_FillNtuple
std::optional< SG::Decorator< char > > m_decor_is_svtrk_final
std::optional< VertexELType > m_decor_svLink
const AtlasDetectorID * m_atlasId
virtual StatusCode initialize() override
PublicToolHandle< Trk::IExtrapolator > m_extrapolator
StatusCode defineDummyCollections(const EventContext &ctx)
std::vector< IPDecoratorType > m_ipDecors
StatusCode refitAndSelectGoodQualityVertices(const EventContext &ctx, std::vector< WrkVrt > *)
finalization of the vertex and store to xAOD::VertexContainer
std::vector< const xAOD::TrackParticle * > m_associatedTracks
PublicToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
get a handle on the Track to Vertex tool
ToolHandle< Trk::ITrkVKalVrtFitter > m_fitSvc
SG::ReadHandleKey< xAOD::VertexContainer > m_PrimVrtLocation
std::vector< const xAOD::TrackParticle * > m_selectedTracks
StatusCode rearrangeTracks(const EventContext &ctx, std::vector< WrkVrt > *)
Gaudi::Property< bool > m_doMapToLocal
StatusCode dummyVertexContainer(const EventContext &ctx, const SG::WriteHandleKey< xAOD::VertexContainer > &handleKey)
std::vector< std::pair< std::string, vertexingAlg > > m_vertexingAlgorithms
Gaudi::Property< std::string > m_augVerString
PublicToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimatorTool
SG::WriteDecorHandleKey< xAOD::EventInfo > m_vertexingStatusKey
StatusCode selectTracksInDet(const EventContext &ctx)
std::vector< const xAOD::TrackParticle * > m_leptonicTracks
StatusCode monitorVertexingAlgorithmStep(const EventContext &ctx, std::vector< WrkVrt > *, const std::string &name, bool final=false)
monitor the intermediate status of vertexing
Gaudi::Property< bool > m_doAssociateNonSelectedTracks
Gaudi::Property< bool > m_FillIntermediateVertices
virtual ~VrtSecInclusive() override
Default Destructor.
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
StatusCode mergeByShuffling(const EventContext &ctx, std::vector< WrkVrt > *)
attempt to merge splitted vertices when they are significantly distant due to the long-tail behavior ...
std::map< std::string, SG::WriteHandleKey< xAOD::VertexContainer > > m_intermediateVertexKey
std::optional< SG::Decorator< char > > m_decor_isAssociated
StatusCode extractIncompatibleTrackPairs(const EventContext &ctx, std::vector< WrkVrt > *)
related to the graph method and verte finding
SG::WriteHandleKey< xAOD::VertexContainer > m_twoTrksVertexKey
StatusCode findNtrackVertices(const EventContext &ctx, std::vector< WrkVrt > *)
Gaudi::Property< bool > m_doSelectTracksFromMuons
StatusCode selectInDetAndGSFTracks(const EventContext &ctx)
std::vector< TrackSelectionAlg > m_trackSelectionAlgs
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
STL namespace.
std::size_t erase_if(T_container &container, T_Func pred)
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Electron_v1 Electron
Definition of the current "egamma version".