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 //__________________________________________________________________________
315 {
316 const EventContext& ctx = Gaudi::Hive::currentContext();
317
318 //
319 ATH_MSG_DEBUG("VrtSecInclusive execute()");
320
321 // Reset values
322 for (auto& [key, val] : m_vertexCollectionsDefinitions) {
323 val = false;
324 }
325
327
329 if (!eventInfo.isValid()) {
330 ATH_MSG_ERROR ("Could not retrieve EventInfo");
331 return StatusCode::FAILURE;
332 }
333
335
336 // clear ntuple variables
337 StatusCode sc = this->initEvent();
338 if(sc.isFailure()) {
339 ATH_MSG_WARNING("Problem in initEvent ");
340 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
342 return StatusCode::SUCCESS;
343 }
344
345 // add event level info to ntuple
346 if( m_FillNtuple ) sc = addEventInfo();
347
348 if (sc.isFailure() ) {
349 ATH_MSG_WARNING("Failure in getEventInfo() ");
350 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
352 return StatusCode::SUCCESS;
353 }
354
355
357 //
358 // Setup StoreGate Variables
359 //
360
361 // Check Return StatusCode::Failure if the user-specified container names have duplication.
362 {
363 std::vector<std::string> userContainerNames { m_secondaryVerticesContainerName, m_all2trksVerticesContainerName };
364 std::set<std::string> userContainerNamesSet;
365 for( auto& name : userContainerNames ) userContainerNamesSet.insert( name );
366 if( userContainerNamesSet.size() != userContainerNames.size() ) {
367 ATH_MSG_ERROR( " > " << __FUNCTION__ << ": detected duplicated user-specified container name. Please check your job property" );
368 return StatusCode::FAILURE;
369 }
370 }
371
372
374
375
376 // Later use elsewhere in the algorithm
377 m_selectedTracks.clear();
378 m_associatedTracks.clear();
379 m_leptonicTracks.clear();
380
382
384 //
385 // now start algorithm
386 //
387
388 //--------------------------------------------------------
389 // Primary vertex processing
390 //
391 sc = this->processPrimaryVertices(); // fetch the 1st primary reconstructed vertex
392
393 if( sc.isFailure() or !m_thePV ) {
394
395 ATH_MSG_WARNING("processPrimaryVertices() failed");
396 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
398 return StatusCode::SUCCESS;
399 }
400
401 // Perform track selection and store it to selectedBaseTracks
402 for( auto alg : m_trackSelectionAlgs ) {
403 ATH_CHECK( (this->*alg)(ctx) );
404 }
405
406 if( m_FillNtuple )
407 m_ntupleVars->get<unsigned int>( "NumSelTrks" ) = static_cast<int>( m_selectedTracks.size() );
408
409 // fill information about selected tracks in AANT
411
412 //-------------------------------------------------------
413 // Skip the event if the number of selected tracks is more than m_SelTrkMaxCutoff
414 if( m_selectedTracks.size() < 2 ) {
415 ATH_MSG_DEBUG( "execute: Too few (<2) selected reco tracks. Terminated reconstruction." );
417 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
418 ATH_CHECK( lockTrackDecorations( true, ctx ) );
420 return StatusCode::SUCCESS;
421 }
422
423 if( m_selectedTracks.size() > m_SelTrkMaxCutoff ) {
424 ATH_MSG_INFO( "execute: Too many selected reco tracks. Terminated reconstruction." );
426 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
427 ATH_CHECK( lockTrackDecorations( true, ctx ) );
429 return StatusCode::SUCCESS;
430 }
431
432 //-------------------------------------------------------
433 // Core part of Vertexing
434 //
435
436 {
437
439
440 // set of vertices created in the following while loop.
441 std::vector<WrkVrt> workVerticesContainer;
442
443 // the main sequence of the main vertexing algorithms
444 // see initialize() what kind of algorithms exist.
445 for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
446
447 auto& name = itr->first;
448 auto alg = itr->second;
449
450 auto t_start = std::chrono::system_clock::now();
451
452 ATH_CHECK( (this->*alg)( ctx, &workVerticesContainer ) );
453
454 auto t_end = std::chrono::system_clock::now();
455
456 if( m_FillHist ) {
457 auto sec = std::chrono::duration_cast<std::chrono::microseconds>( t_end - t_start ).count();
458 m_hists["CPUTime"]->Fill( m_vertexingAlgorithmStep, sec/1.e6 );
459 }
460
461 std::erase_if( workVerticesContainer,
462 []( WrkVrt& wrkvrt ) {
463 return ( !wrkvrt.isGood || wrkvrt.nTracksTotal() < 2 ); }
464 );
465
466 ATH_CHECK( monitorVertexingAlgorithmStep( ctx, &workVerticesContainer, name, std::next( itr ) == m_vertexingAlgorithms.end() ) );
467
469
470 }
471 }
472
474 vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
475
476 // Fill AANT
477 if( m_FillNtuple ) {
478 m_tree_Vert->Fill();
480 }
481
482 ATH_CHECK( lockTrackDecorations( false, ctx ) );
483
484 ATH_MSG_VERBOSE( "execute: process done." );
485 // end
487 return StatusCode::SUCCESS;
488
489 }
490
491 void VrtSecInclusive::lockTrackDecorations( const xAOD::TrackParticle* trk, bool onlySelection ) const {
493 const_cast<SG::AuxVectorData*> (trk->container());
494 cont_nc->lockDecoration (m_decor_isSelected->auxid());
495
496 if (onlySelection) return;
497
498 if (m_decor_isAssociated && m_decor_isAssociated->isAvailable (*cont_nc)) {
499 cont_nc->lockDecoration (m_decor_isAssociated->auxid());
500 }
501 if (m_decor_is_svtrk_final && m_decor_is_svtrk_final->isAvailable (*cont_nc)) {
502 cont_nc->lockDecoration (m_decor_is_svtrk_final->auxid());
503 }
504
505 for (const auto& p : m_trkDecors) {
506 cont_nc->lockDecoration (p.second.auxid());
507 }
508 }
509
512 const_cast<SG::AuxVectorData*> (cont);
513 for (const IPDecoratorType& dec : m_ipDecors) {
514 if (dec.isAvailable (*cont)) {
515 cont_nc->lockDecoration (dec.auxid());
516 }
517 }
518
519 if (m_decor_svLink) {
520 if (m_decor_svLink->isAvailable (*cont)) {
521 cont_nc->lockDecoration (m_decor_svLink->auxid());
522 }
523 }
524 }
525
526 StatusCode VrtSecInclusive::lockTrackDecorations( bool onlySelection,
527 const EventContext& ctx ) const
528 {
530 ATH_CHECK( trackParticleHandle.isValid() );
531 const xAOD::TrackParticleContainer* trackParticleContainer = trackParticleHandle.cptr();
532 for( const xAOD::TrackParticle* trk : *trackParticleContainer ) {
533 lockTrackDecorations( trk, onlySelection );
534 }
535
537 ATH_CHECK( muonsHandle.isValid() );
538 const xAOD::MuonContainer* muons = muonsHandle.cptr();
539 if (muons->ownPolicy() != SG::VIEW_ELEMENTS) {
540 lockLeptonDecorations (muons);
541 }
542 for( const xAOD::Muon* muon : *muons ) {
543 if (muons->ownPolicy() == SG::VIEW_ELEMENTS) {
544 lockLeptonDecorations (muon->container());
545 }
546 if ( const xAOD::TrackParticle* trk = muon->trackParticle( xAOD::Muon::InnerDetectorTrackParticle ) ) {
547 lockTrackDecorations( trk, onlySelection );
548 }
549 }
550
552 ATH_CHECK( electronsHandle.isValid() );
553 const xAOD::ElectronContainer *electrons = electronsHandle.cptr();
554 if (electrons->ownPolicy() != SG::VIEW_ELEMENTS) {
555 lockLeptonDecorations (electrons);
556 }
557 for( const xAOD::Electron* electron : *electrons ) {
558 if (electrons->ownPolicy() == SG::VIEW_ELEMENTS) {
559 lockLeptonDecorations (electron->container());
560 }
561 if( electron->nTrackParticles() > 0 ) {
562 if (const xAOD::TrackParticle* trk = electron->trackParticle(0)) {
563 lockTrackDecorations( trk, onlySelection );
564 }
565 }
566 }
567
569 ATH_CHECK( IDtracksHandle.isValid() );
570 const xAOD::TrackParticleContainer* IDtracks = IDtracksHandle.cptr();
571 for( const auto *trk : *IDtracks ) {
572 lockTrackDecorations( trk, onlySelection );
573 }
574
575 return StatusCode::SUCCESS;
576 }
577
578} // 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 with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
const SG::AuxVectorData * container() const
Return the container holding this element.
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 execute() override
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.
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".