ATLAS Offline Software
VrtSecInclusive.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
32 using namespace std;
33 
34 
35 namespace VKalVrtAthena {
36 
37  //Constructor and destructor
38  //__________________________________________________________________________
39  VrtSecInclusive::VrtSecInclusive(const std::string& name, ISvcLocator* pSvcLocator):
40  AthAlgorithm (name,pSvcLocator),
41 
42  m_primaryVertices ( nullptr ),
43  m_thePV ( nullptr ),
44 
45  // ToolsHandles
46  m_fitSvc ( "Trk::TrkVKalVrtFitter", this ),
47  m_truthToTrack ( "Trk::TruthToTrack/InDetTruthToTrack" ),
48  m_trackToVertexTool ( "Reco::TrackToVertex" ),
49  m_trackToVertexIPEstimatorTool ( "Trk::TrackToVertexIPEstimator/TrackToVertexIPEstimator" ),
50  m_extrapolator ( "Trk::Extrapolator/AtlasExtrapolator" ),
51  m_vertexMapper ( "" ),
52 
53  m_checkPatternStrategy ( "Classical" ),
54 
55  // Pointers of Ntuple variable vectors
56  m_tree_Vert ( nullptr ),
57  m_ntupleVars ( nullptr )
58 
59  {
60 
65 
66  this->declareProperties();
67 
68  if( m_jp.FillNtuple ) {
69  m_ntupleVars = std::make_unique<NtupleVars>( );
70  }
71 
72  }
73 
74 
75 
76  //__________________________________________________________________________
78  {
79  ATH_MSG_DEBUG("destructor called");
80  }
81 
82 
83  //__________________________________________________________________________
85  {
86  ATH_MSG_INFO("initialize: begin");
87  //
88  // first instantiate tools
89 
90  // VKalVrt vertex fitter
91  if (m_fitSvc.retrieve().isFailure()) {
92  ATH_MSG_ERROR("initialize: Can't find Trk::TrkVKalVrtFitter");
93  return StatusCode::SUCCESS;
94  } else {
95  ATH_MSG_INFO("initialize: Trk::TrkVKalVrtFitter found");
96  }
97 
98  //
99  // retreive tool to get trackParameters of generated Particles
100  if(m_truthToTrack.retrieve().isFailure()) {
101  ATH_MSG_INFO("initialize: Cannot retrieve Trk::TruthToTrack Tool!");
102  return StatusCode::FAILURE;
103  }
104  else {
105  ATH_MSG_INFO("initialize: Retrieved Trk::TruthToTrack Tool" << m_truthToTrack);
106 
107  }
108  // extract TrackToVertex extrapolator tool
109  if ( m_trackToVertexTool.retrieve().isFailure() ) {
110  ATH_MSG_ERROR("initialize: failed to retrieve trackToVertex tool ");
111  return StatusCode::SUCCESS;
112  }
113  else {
114  ATH_MSG_INFO("initialize: Retrieved Reco::TrackToVertex Tool" << m_trackToVertexTool);
115  }
116  // extract TrackToVertexIPEstimator extrapolator tool
117  if ( m_trackToVertexIPEstimatorTool.retrieve().isFailure() ) {
118  ATH_MSG_ERROR("initialize: failed to retrieve trackToVertexIPEstimator tool ");
119  return StatusCode::SUCCESS;
120  }
121  else {
122  ATH_MSG_INFO("initialize: Retrieved Trk::TrackToVertexIPEstimator Tool" << m_trackToVertexIPEstimatorTool);
123  }
124 
125  if( detStore()->retrieve(m_atlasId, "AtlasID").isFailure() ) return StatusCode::FAILURE;
126  if( detStore()->retrieve(m_pixelId, "PixelID").isFailure() ) return StatusCode::FAILURE;
127  if( detStore()->retrieve(m_sctId, "SCT_ID") .isFailure() ) return StatusCode::FAILURE;
128 
129  if ( m_pixelCondSummaryTool.retrieve().isFailure() ) {
130  ATH_MSG_ERROR("initialize: failed to retrieve PixelConditionsSummaryTool");
131  return StatusCode::SUCCESS;
132  }
133  else {
134  ATH_MSG_INFO("initialize: Retrieved PixelConditionsSummaryTool" << m_pixelCondSummaryTool);
135  }
136  if ( m_sctCondSummaryTool.retrieve().isFailure() ) {
137  ATH_MSG_ERROR("initialize: failed to retrieve SCTConditionsSummaryTool");
138  return StatusCode::SUCCESS;
139  }
140  else {
141  ATH_MSG_INFO("initialize: Retrieved SCTConditionsSummaryTool" << m_sctCondSummaryTool);
142  }
143 
144  ATH_CHECK( m_extrapolator.retrieve() );
145 
146  // extract VertexMapper
147  if( m_jp.doMapToLocal ) {
148  ATH_CHECK( m_vertexMapper.retrieve() );
149  }
150 
151  // Track selection algorithm configuration
155 
156  // if none of the above two flags are activated, use ID tracks (default)
158 
160 
161  }
162 
163 
164  // Vertexing algorithm configuration
165  m_vertexingAlgorithms.emplace_back( "extractIncompatibleTrackPairs", &VrtSecInclusive::extractIncompatibleTrackPairs );
166  m_vertexingAlgorithms.emplace_back( "findNtrackVertices", &VrtSecInclusive::findNtrackVertices );
167  m_vertexingAlgorithms.emplace_back( "rearrangeTracks", &VrtSecInclusive::rearrangeTracks );
168 
169  if( m_jp.doReassembleVertices ) {
170  m_vertexingAlgorithms.emplace_back( "reassembleVertices", &VrtSecInclusive::reassembleVertices );
171  }
172 
173  if( m_jp.doMergeByShuffling ) {
174  m_vertexingAlgorithms.emplace_back( "mergeByShuffling", &VrtSecInclusive::mergeByShuffling );
175  }
176 
178  m_vertexingAlgorithms.emplace_back( "mergeFinalVertices", &VrtSecInclusive::mergeFinalVertices );
179  }
180 
182  m_vertexingAlgorithms.emplace_back( "associateNonSelectedTracks", &VrtSecInclusive::associateNonSelectedTracks );
183  }
184 
186 
187 
188  // now make histograms/ntuples
189 
190  ServiceHandle<ITHistSvc> hist_root("THistSvc", name());
191  ATH_CHECK( hist_root.retrieve() );
192 
193  if( m_jp.FillHist ) {
194 
195  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 };
196  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 };
197 
198  const size_t& nAlgs = m_vertexingAlgorithms.size();
199 
200  ATH_MSG_INFO("initialize: Filling Histograms");
201  //
202  m_hists["trkSelCuts"] = new TH1F("trkSelCuts", ";Cut Order;Tracks", 10, -0.5, 10-0.5 );
203  m_hists["selTracksDist"] = new TH1F("selTracksDist", ";Selected Tracks;Events", 2000, -0.5, 2000-0.5 );
204  m_hists["initVertexDispD0"] = new TH2F("initVertexDispD0", ";Rough d0 wrt init [mm];r [mm];Vertices", 1000, -100, 100, rbins.size()-1, &(rbins[0]) );
205  m_hists["initVertexDispZ0"] = new TH2F("initVertexDispZ0", ";Rough z0 wrt init [mm];z [mm];Vertices", 1000, -100, 100, 100, -1000, 1000 );
206  m_hists["incompMonitor"] = new TH1F("incompMonitor", ";Setp;Track Pairs", 10, -0.5, 10-0.5 );
207  m_hists["2trkVerticesDist"] = new TH1F("2trkVerticesDist", ";2-track Vertices;Events", 1000, -0.5, 1000-0.5 );
208  m_hists["2trkChi2Dist"] = new TH1F("2trkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
209  m_hists["NtrkChi2Dist"] = new TH1F("NtrkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
210  m_hists["vPosDist"] = new TH2F("vPosDist", ";r;#vec{x}*#vec{p}/p_{T} [mm]", rbins.size()-1, &(rbins[0]), 200, -1000, 1000 );
211  m_hists["vPosMomAngTDist"] = new TH2F("vPosMomAngDistT", ";r;cos(#vec{r},#vec{p}_{T})", rbins.size()-1, &(rbins[0]), 200, -1.0, 1.0 );
212  m_hists["disabledCount"] = new TH1F("disabledCount", ";N_{modules};Tracks", 20, -0.5, 10-0.5 );
213  m_hists["vertexYield"] = new TH1F("vertexYield", ";Algorithm Step;Vertices", nAlgs, -0.5, nAlgs-0.5 );
214  m_hists["vertexYieldNtrk"] = new TH2F("vertexYieldNtrk", ";Ntrk;Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
215  m_hists["vertexYieldChi2"] = new TH2F("vertexYieldChi2", ";#chi^{2}/N_{dof};Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
216  m_hists["mergeType"] = new TH1F("mergeType", ";Merge Algorithm Type;Entries", 10, -0.5, 10-0.5 );
217  m_hists["associateMonitor"] = new TH1F("associateMonitor", ";Step;Vertices", 10, -0.5, 10-0.5 );
218  m_hists["shuffleMinSignif1"] = new TH1F("shuffleMinSignif1", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
219  m_hists["shuffleMinSignif2"] = new TH1F("shuffleMinSignif2", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
220  m_hists["shuffleMinSignif3"] = new TH1F("shuffleMinSignif3", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
221  m_hists["finalCutMonitor"] = new TH1F("finalCutMonitor", ";Step;Vertices", 6, -0.5, 6-0.5 );
222  m_hists["finalVtxNtrk"] = new TH1F("finalVtxNtrk", ";N_{trk};Vertices", nbins.size()-1, &(nbins[0]) );
223  m_hists["finalVtxR"] = new TH1F("finalVtxR", ";r [mm];Vertices", 600, 0, 600 );
224  m_hists["finalVtxNtrkR"] = new TH2F("finalVtxNtrkR", ";N_{trk};r [mm];Vertices", nbins.size()-1, &(nbins[0]), rbins.size()-1, &(rbins[0]) );
225  m_hists["CPUTime"] = new TH1F("CPUTime", ";Step;Accum. CPU Time [s]", 10, -0.5, 10-0.5 );
226  m_hists["nMatchedTruths"] = new TH2F("nMatchedTruths", ";Step;;r [mm];Matched truth vertices", 11, -0.5, 11-0.5, rbins.size()-1, &(rbins[0]) );
227  m_hists["vPosMomAngT"] = new TH1F("vPosMomAngT", ";cos(#vec{r},#vec{p}_{T}", 200, -1.0, 1.0 );
228  m_hists["vPosMomAng3D"] = new TH1F("vPosMomAng3D", ";cos(#vec{r},#vec{p})", 200, -1.0, 1.0 );
229  m_hists["2trkVtxDistFromPV"] = new TH1F("2trkVtDistFromPV", ";2tr vertex distance from PV;Events", 100, 0, 3 );
230 
231 
232  std::string histDir("/AANT/VrtSecInclusive" + m_jp.augVerString + "/");
233 
234  for( auto& pair : m_hists ) {
235  ATH_CHECK( hist_root->regHist( histDir + pair.first, pair.second ) );
236  }
237  }
238 
239 
240  if( m_jp.FillNtuple ) {
241 
243 
244  m_tree_Vert = new TTree("tree_VrtSecInclusive","TTree of VrtSecInclusive");
245  ATH_CHECK( hist_root->regTree("/AANT/tree_VrtSecInclusive", m_tree_Vert) );
246 
247  ATH_CHECK( setupNtuple() );
248 
249  }
250 
251  // initialize keys
253 
254  // Instantiate and initialize our event info decorator write
256  this->declare(m_vertexingStatusKey);
257  m_vertexingStatusKey.setOwner(&(*this));
259 
260  //
261  ATH_MSG_INFO("initialize: Exit VrtSecInclusive::initialize()");
262  return StatusCode::SUCCESS;
263  }
264 
265 
266 
267  //__________________________________________________________________________
269  {
270 
271  ATH_MSG_INFO("finalize: VrtSecInclusive finalize()");
272  return StatusCode::SUCCESS;
273  }
274 
275  //__________________________________________________________________________
277  {
278 
279  ATH_MSG_DEBUG("initEvent: begin");
280 
281  // Clear all variables to be stored to the AANT
282  if( m_jp.FillNtuple ) {
284  }
285 
286 
287  ATH_MSG_DEBUG("initEvent: from initEvent ");
288  return StatusCode::SUCCESS;
289 
290  }
291 
292 
293  //__________________________________________________________________________
295  {
296  //
297  ATH_MSG_DEBUG("VrtSecInclusive execute()");
298 
299  m_vertexingStatus = -1;
300 
302  if (!eventInfo.isValid()) {
303  ATH_MSG_ERROR ("Could not retrieve EventInfo");
304  return StatusCode::FAILURE;
305  }
306 
308 
309  // clear ntuple variables
310  StatusCode sc = this->initEvent();
311  if(sc.isFailure()) {
312  ATH_MSG_WARNING("Problem in initEvent ");
313  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
314  return StatusCode::SUCCESS;
315  }
316 
317  // add event level info to ntuple
318  if( m_jp.FillNtuple ) sc = addEventInfo();
319 
320  if (sc.isFailure() ) {
321  ATH_MSG_WARNING("Failure in getEventInfo() ");
322  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
323  return StatusCode::SUCCESS;
324  }
325 
326 
328  //
329  // Setup StoreGate Variables
330  //
331 
332  // Check Return StatusCode::Failure if the user-specified container names have duplication.
333  {
334  std::vector<std::string> userContainerNames { m_jp.secondaryVerticesContainerName, m_jp.all2trksVerticesContainerName };
335  std::set<std::string> userContainerNamesSet;
336  for( auto& name : userContainerNames ) userContainerNamesSet.insert( name );
337  if( userContainerNamesSet.size() != userContainerNames.size() ) {
338  ATH_MSG_ERROR( " > " << __FUNCTION__ << ": detected duplicated user-specified container name. Please check your job property" );
339  return StatusCode::FAILURE;
340  }
341  }
342 
343  auto *secondaryVertexContainer = new xAOD::VertexContainer;
344  auto *secondaryVertexAuxContainer = new xAOD::VertexAuxContainer;
345 
346  secondaryVertexContainer ->setStore( secondaryVertexAuxContainer );
347 
348  ATH_CHECK( evtStore()->record( secondaryVertexContainer, "VrtSecInclusive_" + m_jp.secondaryVerticesContainerName + m_jp.augVerString ) );
349  ATH_CHECK( evtStore()->record( secondaryVertexAuxContainer, "VrtSecInclusive_" + m_jp.secondaryVerticesContainerName + m_jp.augVerString + "Aux." ) );
350 
352  auto *twoTrksVertexContainer = new xAOD::VertexContainer;
353  auto *twoTrksVertexAuxContainer = new xAOD::VertexAuxContainer;
354 
355  twoTrksVertexContainer ->setStore( twoTrksVertexAuxContainer );
356 
357  ATH_CHECK( evtStore()->record( twoTrksVertexContainer, "VrtSecInclusive_" + m_jp.all2trksVerticesContainerName + m_jp.augVerString ) );
358  ATH_CHECK( evtStore()->record( twoTrksVertexAuxContainer, "VrtSecInclusive_" + m_jp.all2trksVerticesContainerName + m_jp.augVerString + "Aux." ) );
359 
360  for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
361 
362  auto& name = itr->first;
363 
364  auto *intermediateVertexContainer = new xAOD::VertexContainer;
365  auto *intermediateVertexAuxContainer = new xAOD::VertexAuxContainer;
366 
367  intermediateVertexContainer ->setStore( intermediateVertexAuxContainer );
368 
369  ATH_CHECK( evtStore()->record( intermediateVertexContainer, "VrtSecInclusive_IntermediateVertices_" + name + m_jp.augVerString ) );
370  ATH_CHECK( evtStore()->record( intermediateVertexAuxContainer, "VrtSecInclusive_IntermediateVertices_" + name + m_jp.augVerString + "Aux." ) );
371  }
372 
373  }
374 
376 
377 
378  // Later use elsewhere in the algorithm
379  m_selectedTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>> ( );
380  m_associatedTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>>( );
381  m_leptonicTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>> ( );
382 
384 
386  //
387  // now start algorithm
388  //
389 
390  //--------------------------------------------------------
391  // Primary vertex processing
392  //
393  sc = this->processPrimaryVertices(); // fetch the 1st primary reconstructed vertex
394 
395  if( sc.isFailure() or !m_thePV ) {
396 
397  ATH_MSG_WARNING("processPrimaryVertices() failed");
398  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
399  return StatusCode::SUCCESS;
400  }
401 
402  // Perform track selection and store it to selectedBaseTracks
403  try {
404 
405  for( auto alg : m_trackSelectionAlgs ) {
406  ATH_CHECK( (this->*alg)() );
407  }
408 
409  } catch( ... ) {
410 
411  ATH_MSG_WARNING( " > " << __FUNCTION__ << ": some other error is detected in the track selection scope." );
412 
413  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
414  return StatusCode::SUCCESS;
415 
416  }
417 
418 
419  if( m_jp.FillNtuple )
420  m_ntupleVars->get<unsigned int>( "NumSelTrks" ) = static_cast<int>( m_selectedTracks->size() );
421 
422  // fill information about selected tracks in AANT
424 
425  //-------------------------------------------------------
426  // Skip the event if the number of selected tracks is more than m_jp.SelTrkMaxCutoff
427  if( m_selectedTracks->size() < 2 ) {
428  ATH_MSG_DEBUG( "execute: Too few (<2) selected reco tracks. Terminated reconstruction." );
429  m_vertexingStatus = 1;
430  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
431  return StatusCode::SUCCESS;
432  }
433 
434  if( m_selectedTracks->size() > m_jp.SelTrkMaxCutoff ) {
435  ATH_MSG_INFO( "execute: Too many selected reco tracks. Terminated reconstruction." );
436  m_vertexingStatus = 2;
437  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
438  return StatusCode::SUCCESS;
439  }
440 
441  //-------------------------------------------------------
442  // Core part of Vertexing
443  //
444 
445  try {
446 
448 
449  // set of vertices created in the following while loop.
450  auto* workVerticesContainer = new std::vector<WrkVrt>;
451 
452  // the main sequence of the main vertexing algorithms
453  // see initialize() what kind of algorithms exist.
454  for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
455 
456  auto& name = itr->first;
457  auto alg = itr->second;
458 
459  auto t_start = std::chrono::system_clock::now();
460 
461  ATH_CHECK( (this->*alg)( workVerticesContainer ) );
462 
463  auto t_end = std::chrono::system_clock::now();
464 
465  if( m_jp.FillHist ) {
466  auto sec = std::chrono::duration_cast<std::chrono::microseconds>( t_end - t_start ).count();
467  m_hists["CPUTime"]->Fill( m_vertexingAlgorithmStep, sec/1.e6 );
468  }
469 
470  auto end = std::remove_if( workVerticesContainer->begin(), workVerticesContainer->end(),
471  []( WrkVrt& wrkvrt ) {
472  return ( !wrkvrt.isGood || wrkvrt.nTracksTotal() < 2 ); }
473  );
474 
475  workVerticesContainer->erase( end, workVerticesContainer->end() );
476 
477  ATH_CHECK( monitorVertexingAlgorithmStep( workVerticesContainer, name, std::next( itr ) == m_vertexingAlgorithms.end() ) );
478 
480 
481  }
482 
483  delete workVerticesContainer;
484 
485  } catch(std::exception& e) {
486 
487  ATH_MSG_WARNING( " > " << __FUNCTION__ << ": exception detected in the vertexing scope: " << e.what() );
488  m_vertexingStatus = 4;
489 
490  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
491  return StatusCode::SUCCESS;
492 
493  }
494 
495  m_vertexingStatus = 0;
496  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
497 
498  // Fill AANT
499  if( m_jp.FillNtuple ) {
500  m_tree_Vert->Fill();
502  }
503 
504 
505  ATH_MSG_VERBOSE( "execute: process done." );
506  // end
507  return StatusCode::SUCCESS;
508 
509  }
510 
511 } // end of namespace bracket
VKalVrtAthena::VrtSecInclusive::JobProperties::doSelectTracksFromMuons
bool doSelectTracksFromMuons
Definition: VrtSecInclusive.h:220
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
SG::WriteDecorHandleKey< xAOD::EventInfo >
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::AuxContainerBase::setStore
virtual void setStore(SG::IAuxStore *store) override
Set a different internal store object.
Definition: AuxContainerBase.cxx:194
VKalVrtAthena::VrtSecInclusive::m_hists
std::map< std::string, TH1 * > m_hists
Definition: VrtSecInclusive.h:318
VKalVrtAthena::VrtSecInclusive::m_pixelCondSummaryTool
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
Condition service.
Definition: VrtSecInclusive.h:275
VKalVrtAthena::VrtSecInclusive::checkTrackHitPatternToVertexOuterOnly
bool checkTrackHitPatternToVertexOuterOnly(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
A classical method with hard-coded geometry.
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:2189
SGout2dot.alg
alg
Definition: SGout2dot.py:243
VKalVrtAthena::VrtSecInclusive::m_vertexMapper
ToolHandle< Trk::IVertexMapper > m_vertexMapper
Definition: VrtSecInclusive.h:272
VKalVrtAthena::VrtSecInclusive::m_vertexingAlgorithmStep
unsigned m_vertexingAlgorithmStep
Definition: VrtSecInclusive.h:438
VKalVrtAthena::VrtSecInclusive::dumpTruthInformation
void dumpTruthInformation()
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:2359
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
VKalVrtAthena::VrtSecInclusive::JobProperties::doSelectIDAndGSFTracks
bool doSelectIDAndGSFTracks
Definition: VrtSecInclusive.h:223
VKalVrtAthena::VrtSecInclusive::setupNtupleVariables
StatusCode setupNtupleVariables()
Definition: AANT_Tools.cxx:28
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
VKalVrtAthena::VrtSecInclusive::m_thePV
const xAOD::Vertex * m_thePV
Definition: VrtSecInclusive.h:254
VKalVrtAthena::VrtSecInclusive::JobProperties::secondaryVerticesContainerName
std::string secondaryVerticesContainerName
Definition: VrtSecInclusive.h:118
VKalVrtAthena::VrtSecInclusive::m_vertexingAlgorithms
std::vector< std::pair< std::string, vertexingAlg > > m_vertexingAlgorithms
Definition: VrtSecInclusive.h:437
VKalVrtAthena::VrtSecInclusive::checkTrackHitPatternToVertexByExtrapolationAssist
bool checkTrackHitPatternToVertexByExtrapolationAssist(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
New method with track extrapolation.
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:2200
VKalVrtAthena::VrtSecInclusive::m_extrapolatedPatternBank
PatternBank m_extrapolatedPatternBank
Definition: VrtSecInclusive.h:369
VKalVrtAthena::VrtSecInclusive::m_ntupleVars
std::unique_ptr< NtupleVars > m_ntupleVars
Definition: VrtSecInclusive.h:315
checkFileSG.nAlgs
nAlgs
Definition: checkFileSG.py:77
VKalVrtAthena::VrtSecInclusive::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: VrtSecInclusive.h:271
VKalVrtAthena::VrtSecInclusive::associateNonSelectedTracks
StatusCode associateNonSelectedTracks(std::vector< WrkVrt > *)
in addition to selected tracks, associate as much tracks as possible
Definition: VertexingAlgs.cxx:1061
VKalVrtAthena::VrtSecInclusive::m_pixelId
const PixelID * m_pixelId
Definition: VrtSecInclusive.h:279
VKalVrtAthena::VrtSecInclusive::m_associatedTracks
std::unique_ptr< std::vector< const xAOD::TrackParticle * > > m_associatedTracks
Definition: VrtSecInclusive.h:256
VKalVrtAthena::VrtSecInclusive::JobProperties::augVerString
std::string augVerString
Definition: VrtSecInclusive.h:114
VKalVrtAthena::VrtSecInclusive::reassembleVertices
StatusCode reassembleVertices(std::vector< WrkVrt > *)
attempt to merge vertices when all tracks of a vertex A is close to vertex B in terms of impact param...
Definition: VertexingAlgs.cxx:940
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
NtupleVars.h
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
xAOD::VertexContainer
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Definition: VertexContainer.h:14
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
VKalVrtAthena::VrtSecInclusive::rearrangeTracks
StatusCode rearrangeTracks(std::vector< WrkVrt > *)
Definition: VertexingAlgs.cxx:717
VKalVrtAthena::VrtSecInclusive::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Read/Write Handle Keys.
Definition: VrtSecInclusive.h:293
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
VKalVrtAthena::VrtSecInclusive::JobProperties::FillIntermediateVertices
bool FillIntermediateVertices
Definition: VrtSecInclusive.h:124
VKalVrtAthena::VrtSecInclusive::~VrtSecInclusive
~VrtSecInclusive()
Default Destructor.
Definition: VrtSecInclusive.cxx:77
VKalVrtAthena::VrtSecInclusive::m_truthToTrack
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Definition: VrtSecInclusive.h:266
VrtSecInclusive.h
VKalVrtAthena
Definition: AANT_Tools.cxx:25
VKalVrtAthena::VrtSecInclusive::JobProperties::doMergeByShuffling
bool doMergeByShuffling
Definition: VrtSecInclusive.h:181
VKalVrtAthena::VrtSecInclusive::selectInDetAndGSFTracks
StatusCode selectInDetAndGSFTracks()
Definition: TrackSelectionAlgs.cxx:302
VKalVrtAthena::VrtSecInclusive::m_sctCondSummaryTool
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
Definition: VrtSecInclusive.h:276
VKalVrtAthena::VrtSecInclusive::setupNtuple
StatusCode setupNtuple()
Definition: AANT_Tools.cxx:218
VKalVrtAthena::VrtSecInclusive::m_trackToVertexIPEstimatorTool
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimatorTool
Definition: VrtSecInclusive.h:270
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
VKalVrtAthena::VrtSecInclusive::JobProperties::FillHist
bool FillHist
Definition: VrtSecInclusive.h:122
python.handimod.now
now
Definition: handimod.py:675
VKalVrtAthena::VrtSecInclusive::m_fitSvc
ToolHandle< Trk::ITrkVKalVrtFitter > m_fitSvc
Definition: VrtSecInclusive.h:265
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
VKalVrtAthena::VrtSecInclusive::extractIncompatibleTrackPairs
StatusCode extractIncompatibleTrackPairs(std::vector< WrkVrt > *)
related to the graph method and verte finding
Definition: VertexingAlgs.cxx:39
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
xAOD::VertexAuxContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
Definition: VertexAuxContainer.h:19
VKalVrtAthena::VrtSecInclusive::mergeByShuffling
StatusCode mergeByShuffling(std::vector< WrkVrt > *)
attempt to merge splitted vertices when they are significantly distant due to the long-tail behavior ...
Definition: VertexingAlgs.cxx:1267
VKalVrtAthena::VrtSecInclusive::finalize
virtual StatusCode finalize()
Definition: VrtSecInclusive.cxx:268
VKalVrtAthena::VrtSecInclusive::JobProperties::all2trksVerticesContainerName
std::string all2trksVerticesContainerName
Definition: VrtSecInclusive.h:117
VKalVrtAthena::VrtSecInclusive::JobProperties::SelTrkMaxCutoff
unsigned int SelTrkMaxCutoff
Definition: VrtSecInclusive.h:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
VKalVrtAthena::VrtSecInclusive::processPrimaryVertices
StatusCode processPrimaryVertices()
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:818
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
VKalVrtAthena::VrtSecInclusive::JobProperties::doAssociateNonSelectedTracks
bool doAssociateNonSelectedTracks
Definition: VrtSecInclusive.h:186
calibdata.exception
exception
Definition: calibdata.py:496
WriteDecorHandle.h
Handle class for adding a decoration to an object.
VxTrackAtVertex.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
VKalVrtAthena::VrtSecInclusive::m_trackSelectionAlgs
std::vector< TrackSelectionAlg > m_trackSelectionAlgs
Definition: VrtSecInclusive.h:389
std::remove_if
std::reverse_iterator< DataModel_detail::iterator< DVL > > remove_if(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Predicate pred)
Specialization of remove_if for DataVector/List.
Definition: DVL_algorithms.h:114
VKalVrtAthena::VrtSecInclusive::m_vertexingStatus
int m_vertexingStatus
Definition: VrtSecInclusive.h:250
VKalVrtAthena::VrtSecInclusive::execute
virtual StatusCode execute()
Definition: VrtSecInclusive.cxx:294
VKalVrtAthena::VrtSecInclusive::selectTracksInDet
StatusCode selectTracksInDet()
Definition: TrackSelectionAlgs.cxx:225
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
VKalVrtAthena::VrtSecInclusive::refitAndSelectGoodQualityVertices
StatusCode refitAndSelectGoodQualityVertices(std::vector< WrkVrt > *)
finalization of the vertex and store to xAOD::VertexContainer
Definition: VertexingAlgs.cxx:1472
VKalVrtAthena::VrtSecInclusive::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: VrtSecInclusive.h:278
VKalVrtAthena::VrtSecInclusive::m_patternStrategyFuncs
std::map< std::string, PatternStrategyFunc > m_patternStrategyFuncs
Definition: VrtSecInclusive.h:284
VKalVrtAthena::VrtSecInclusive::m_trackToVertexTool
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
get a handle on the Track to Vertex tool
Definition: VrtSecInclusive.h:269
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
VKalVrtAthena::VrtSecInclusive::JobProperties::doSelectTracksFromElectrons
bool doSelectTracksFromElectrons
Definition: VrtSecInclusive.h:222
VKalVrtAthena::VrtSecInclusive::m_vertexingStatusKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_vertexingStatusKey
Definition: VrtSecInclusive.h:294
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VKalVrtAthena::VrtSecInclusive::fillAANT_SelectedBaseTracks
StatusCode fillAANT_SelectedBaseTracks()
Definition: AANT_Tools.cxx:263
VKalVrtAthena::VrtSecInclusive::JobProperties::doMapToLocal
bool doMapToLocal
Definition: VrtSecInclusive.h:126
VKalVrtAthena::VrtSecInclusive::JobProperties::doMergeFinalVerticesDistance
bool doMergeFinalVerticesDistance
Definition: VrtSecInclusive.h:185
VKalVrtAthena::VrtSecInclusive::JobProperties::doReassembleVertices
bool doReassembleVertices
Definition: VrtSecInclusive.h:180
VKalVrtAthena::VrtSecInclusive::WrkVrt
Definition: VrtSecInclusive.h:339
VKalVrtAthena::VrtSecInclusive::m_selectedTracks
std::unique_ptr< std::vector< const xAOD::TrackParticle * > > m_selectedTracks
Definition: VrtSecInclusive.h:255
VKalVrtAthena::VrtSecInclusive::selectTracksFromMuons
StatusCode selectTracksFromMuons()
Definition: TrackSelectionAlgs.cxx:253
VKalVrtAthena::VrtSecInclusive::selectTracksFromElectrons
StatusCode selectTracksFromElectrons()
Definition: TrackSelectionAlgs.cxx:279
VKalVrtAthena::VrtSecInclusive::checkTrackHitPatternToVertex
bool checkTrackHitPatternToVertex(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
A classical method with hard-coded geometry.
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:2178
VKalVrtAthena::VrtSecInclusive::m_leptonicTracks
std::unique_ptr< std::vector< const xAOD::TrackParticle * > > m_leptonicTracks
Definition: VrtSecInclusive.h:257
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
VKalVrtAthena::VrtSecInclusive::declareProperties
void declareProperties()
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:686
VKalVrtAthena::VrtSecInclusive::JobProperties::FillNtuple
bool FillNtuple
Definition: VrtSecInclusive.h:123
VKalVrtAthena::VrtSecInclusive::initEvent
virtual StatusCode initEvent()
Definition: VrtSecInclusive.cxx:276
VKalVrtAthena::VrtSecInclusive::m_jp
struct JobProperties m_jp
Definition: VrtSecInclusive.h:242
VKalVrtAthena::VrtSecInclusive::m_sctId
const SCT_ID * m_sctId
Definition: VrtSecInclusive.h:280
VKalVrtAthena::VrtSecInclusive::monitorVertexingAlgorithmStep
StatusCode monitorVertexingAlgorithmStep(std::vector< WrkVrt > *, const std::string &name, bool final=false)
monitor the intermediate status of vertexing
Definition: VertexingAlgs.cxx:1970
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
VKalVrtAthena::VrtSecInclusive::m_tree_Vert
TTree * m_tree_Vert
Definition: VrtSecInclusive.h:314
VKalVrtAthena::VrtSecInclusive::initialize
virtual StatusCode initialize()
Definition: VrtSecInclusive.cxx:84
VKalVrtAthena::VrtSecInclusive::checkTrackHitPatternToVertexByExtrapolation
bool checkTrackHitPatternToVertexByExtrapolation(const xAOD::TrackParticle *trk, const Amg::Vector3D &vertex)
New method with track extrapolation.
Definition: Reconstruction/VKalVrt/VrtSecInclusive/src/Utilities.cxx:1171
VKalVrtAthena::VrtSecInclusive::mergeFinalVertices
StatusCode mergeFinalVertices(std::vector< WrkVrt > *)
attempt to merge vertices by lookng at the distance between two vertices
Definition: VertexingAlgs.cxx:1416
VKalVrtAthena::VrtSecInclusive::addEventInfo
StatusCode addEventInfo()
Definition: AANT_Tools.cxx:236
VKalVrtAthena::VrtSecInclusive::findNtrackVertices
StatusCode findNtrackVertices(std::vector< WrkVrt > *)
Definition: VertexingAlgs.cxx:360
ServiceHandle< ITHistSvc >
VKalVrtAthena::VrtSecInclusive::clearNtupleVariables
StatusCode clearNtupleVariables()
Definition: AANT_Tools.cxx:227