ATLAS Offline Software
VrtSecInclusive.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 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  //---------------- HBOOK
87  ITHistSvc* hist_root=nullptr;
88  ATH_MSG_INFO("initialize: begin");
89  //
90  // first instantiate tools
91 
92  // VKalVrt vertex fitter
93  if (m_fitSvc.retrieve().isFailure()) {
94  ATH_MSG_ERROR("initialize: Can't find Trk::TrkVKalVrtFitter");
95  return StatusCode::SUCCESS;
96  } else {
97  ATH_MSG_INFO("initialize: Trk::TrkVKalVrtFitter found");
98  }
99 
100  //
101  // retreive tool to get trackParameters of generated Particles
102  if(m_truthToTrack.retrieve().isFailure()) {
103  ATH_MSG_INFO("initialize: Cannot retrieve Trk::TruthToTrack Tool!");
104  return StatusCode::FAILURE;
105  }
106  else {
107  ATH_MSG_INFO("initialize: Retrieved Trk::TruthToTrack Tool" << m_truthToTrack);
108 
109  }
110  // extract TrackToVertex extrapolator tool
111  if ( m_trackToVertexTool.retrieve().isFailure() ) {
112  ATH_MSG_ERROR("initialize: failed to retrieve trackToVertex tool ");
113  return StatusCode::SUCCESS;
114  }
115  else {
116  ATH_MSG_INFO("initialize: Retrieved Reco::TrackToVertex Tool" << m_trackToVertexTool);
117  }
118  // extract TrackToVertexIPEstimator extrapolator tool
119  if ( m_trackToVertexIPEstimatorTool.retrieve().isFailure() ) {
120  ATH_MSG_ERROR("initialize: failed to retrieve trackToVertexIPEstimator tool ");
121  return StatusCode::SUCCESS;
122  }
123  else {
124  ATH_MSG_INFO("initialize: Retrieved Trk::TrackToVertexIPEstimator Tool" << m_trackToVertexIPEstimatorTool);
125  }
126 
127  if( detStore()->retrieve(m_atlasId, "AtlasID").isFailure() ) return StatusCode::FAILURE;
128  if( detStore()->retrieve(m_pixelId, "PixelID").isFailure() ) return StatusCode::FAILURE;
129  if( detStore()->retrieve(m_sctId, "SCT_ID") .isFailure() ) return StatusCode::FAILURE;
130 
131  if ( m_pixelCondSummaryTool.retrieve().isFailure() ) {
132  ATH_MSG_ERROR("initialize: failed to retrieve PixelConditionsSummaryTool");
133  return StatusCode::SUCCESS;
134  }
135  else {
136  ATH_MSG_INFO("initialize: Retrieved PixelConditionsSummaryTool" << m_pixelCondSummaryTool);
137  }
138  if ( m_sctCondSummaryTool.retrieve().isFailure() ) {
139  ATH_MSG_ERROR("initialize: failed to retrieve SCTConditionsSummaryTool");
140  return StatusCode::SUCCESS;
141  }
142  else {
143  ATH_MSG_INFO("initialize: Retrieved SCTConditionsSummaryTool" << m_sctCondSummaryTool);
144  }
145 
146  ATH_CHECK( m_extrapolator.retrieve() );
147 
148  // extract VertexMapper
149  if( m_jp.doMapToLocal ) {
150  ATH_CHECK( m_vertexMapper.retrieve() );
151  }
152 
153  // Track selection algorithm configuration
157 
158  // if none of the above two flags are activated, use ID tracks (default)
160 
162 
163  }
164 
165 
166  // Vertexing algorithm configuration
167  m_vertexingAlgorithms.emplace_back( "extractIncompatibleTrackPairs", &VrtSecInclusive::extractIncompatibleTrackPairs );
168  m_vertexingAlgorithms.emplace_back( "findNtrackVertices", &VrtSecInclusive::findNtrackVertices );
169  m_vertexingAlgorithms.emplace_back( "rearrangeTracks", &VrtSecInclusive::rearrangeTracks );
170 
171  if( m_jp.doReassembleVertices ) {
172  m_vertexingAlgorithms.emplace_back( "reassembleVertices", &VrtSecInclusive::reassembleVertices );
173  }
174 
175  if( m_jp.doMergeByShuffling ) {
176  m_vertexingAlgorithms.emplace_back( "mergeByShuffling", &VrtSecInclusive::mergeByShuffling );
177  }
178 
180  m_vertexingAlgorithms.emplace_back( "mergeFinalVertices", &VrtSecInclusive::mergeFinalVertices );
181  }
182 
184  m_vertexingAlgorithms.emplace_back( "associateNonSelectedTracks", &VrtSecInclusive::associateNonSelectedTracks );
185  }
186 
188 
189 
190  // now make histograms/ntuples
191 
192  ATH_CHECK( service( "THistSvc", hist_root ) );
193 
194  if( m_jp.FillHist ) {
195 
196  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 };
197  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 };
198 
199  const size_t& nAlgs = m_vertexingAlgorithms.size();
200 
201  ATH_MSG_INFO("initialize: Filling Histograms");
202  //
203  m_hists["trkSelCuts"] = new TH1F("trkSelCuts", ";Cut Order;Tracks", 10, -0.5, 10-0.5 );
204  m_hists["selTracksDist"] = new TH1F("selTracksDist", ";Selected Tracks;Events", 2000, -0.5, 2000-0.5 );
205  m_hists["initVertexDispD0"] = new TH2F("initVertexDispD0", ";Rough d0 wrt init [mm];r [mm];Vertices", 1000, -100, 100, rbins.size()-1, &(rbins[0]) );
206  m_hists["initVertexDispZ0"] = new TH2F("initVertexDispZ0", ";Rough z0 wrt init [mm];z [mm];Vertices", 1000, -100, 100, 100, -1000, 1000 );
207  m_hists["incompMonitor"] = new TH1F("incompMonitor", ";Setp;Track Pairs", 10, -0.5, 10-0.5 );
208  m_hists["2trkVerticesDist"] = new TH1F("2trkVerticesDist", ";2-track Vertices;Events", 1000, -0.5, 1000-0.5 );
209  m_hists["2trkChi2Dist"] = new TH1F("2trkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
210  m_hists["NtrkChi2Dist"] = new TH1F("NtrkChi2Dist", ";log10(#chi^{2}/N_{dof});Entries", 100, -3, 7 );
211  m_hists["vPosDist"] = new TH2F("vPosDist", ";r;#vec{x}*#vec{p}/p_{T} [mm]", rbins.size()-1, &(rbins[0]), 200, -1000, 1000 );
212  m_hists["vPosMomAngTDist"] = new TH2F("vPosMomAngDistT", ";r;cos(#vec{r},#vec{p}_{T})", rbins.size()-1, &(rbins[0]), 200, -1.0, 1.0 );
213  m_hists["disabledCount"] = new TH1F("disabledCount", ";N_{modules};Tracks", 20, -0.5, 10-0.5 );
214  m_hists["vertexYield"] = new TH1F("vertexYield", ";Algorithm Step;Vertices", nAlgs, -0.5, nAlgs-0.5 );
215  m_hists["vertexYieldNtrk"] = new TH2F("vertexYieldNtrk", ";Ntrk;Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
216  m_hists["vertexYieldChi2"] = new TH2F("vertexYieldChi2", ";#chi^{2}/N_{dof};Algorithm Step;Vertices", 100, 0, 100, nAlgs, -0.5, nAlgs-0.5 );
217  m_hists["mergeType"] = new TH1F("mergeType", ";Merge Algorithm Type;Entries", 10, -0.5, 10-0.5 );
218  m_hists["associateMonitor"] = new TH1F("associateMonitor", ";Step;Vertices", 10, -0.5, 10-0.5 );
219  m_hists["shuffleMinSignif1"] = new TH1F("shuffleMinSignif1", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
220  m_hists["shuffleMinSignif2"] = new TH1F("shuffleMinSignif2", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
221  m_hists["shuffleMinSignif3"] = new TH1F("shuffleMinSignif3", ";Min( log_{10}( Significance ) );Vertices", 100, -3, 5 );
222  m_hists["finalCutMonitor"] = new TH1F("finalCutMonitor", ";Step;Vertices", 6, -0.5, 6-0.5 );
223  m_hists["finalVtxNtrk"] = new TH1F("finalVtxNtrk", ";N_{trk};Vertices", nbins.size()-1, &(nbins[0]) );
224  m_hists["finalVtxR"] = new TH1F("finalVtxR", ";r [mm];Vertices", 600, 0, 600 );
225  m_hists["finalVtxNtrkR"] = new TH2F("finalVtxNtrkR", ";N_{trk};r [mm];Vertices", nbins.size()-1, &(nbins[0]), rbins.size()-1, &(rbins[0]) );
226  m_hists["CPUTime"] = new TH1F("CPUTime", ";Step;Accum. CPU Time [s]", 10, -0.5, 10-0.5 );
227  m_hists["nMatchedTruths"] = new TH2F("nMatchedTruths", ";Step;;r [mm];Matched truth vertices", 11, -0.5, 11-0.5, rbins.size()-1, &(rbins[0]) );
228  m_hists["vPosMomAngT"] = new TH1F("vPosMomAngT", ";cos(#vec{r},#vec{p}_{T}", 200, -1.0, 1.0 );
229  m_hists["vPosMomAng3D"] = new TH1F("vPosMomAng3D", ";cos(#vec{r},#vec{p})", 200, -1.0, 1.0 );
230  m_hists["2trkVtxDistFromPV"] = new TH1F("2trkVtDistFromPV", ";2tr vertex distance from PV;Events", 100, 0, 3 );
231 
232 
233  std::string histDir("/AANT/VrtSecInclusive" + m_jp.augVerString + "/");
234 
235  for( auto& pair : m_hists ) {
236  ATH_CHECK( hist_root->regHist( histDir + pair.first, pair.second ) );
237  }
238  }
239 
240 
241  if( m_jp.FillNtuple ) {
242 
244 
245  m_tree_Vert = new TTree("tree_VrtSecInclusive","TTree of VrtSecInclusive");
246  ATH_CHECK( hist_root->regTree("/AANT/tree_VrtSecInclusive", m_tree_Vert) );
247 
248  ATH_CHECK( setupNtuple() );
249 
250  }
251 
252  // initialize keys
254 
255  // Instantiate and initialize our event info decorator write
257  this->declare(m_vertexingStatusKey);
258  m_vertexingStatusKey.setOwner(&(*this));
260 
261  //
262  ATH_MSG_INFO("initialize: Exit VrtSecInclusive::initialize()");
263  return StatusCode::SUCCESS;
264  }
265 
266 
267 
268  //__________________________________________________________________________
270  {
271 
272  ATH_MSG_INFO("finalize: VrtSecInclusive finalize()");
273  return StatusCode::SUCCESS;
274  }
275 
276  //__________________________________________________________________________
278  {
279 
280  ATH_MSG_DEBUG("initEvent: begin");
281 
282  // Clear all variables to be stored to the AANT
283  if( m_jp.FillNtuple ) {
285  }
286 
287 
288  ATH_MSG_DEBUG("initEvent: from initEvent ");
289  return StatusCode::SUCCESS;
290 
291  }
292 
293 
294  //__________________________________________________________________________
296  {
297  //
298  ATH_MSG_DEBUG("VrtSecInclusive execute()");
299 
300  m_vertexingStatus = -1;
301 
303  if (!eventInfo.isValid()) {
304  ATH_MSG_ERROR ("Could not retrieve EventInfo");
305  return StatusCode::FAILURE;
306  }
307 
309 
310  // clear ntuple variables
311  StatusCode sc = this->initEvent();
312  if(sc.isFailure()) {
313  ATH_MSG_WARNING("Problem in initEvent ");
314  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
315  return StatusCode::SUCCESS;
316  }
317 
318  // add event level info to ntuple
319  if( m_jp.FillNtuple ) sc = addEventInfo();
320 
321  if (sc.isFailure() ) {
322  ATH_MSG_WARNING("Failure in getEventInfo() ");
323  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
324  return StatusCode::SUCCESS;
325  }
326 
327 
329  //
330  // Setup StoreGate Variables
331  //
332 
333  // Check Return StatusCode::Failure if the user-specified container names have duplication.
334  {
335  std::vector<std::string> userContainerNames { m_jp.secondaryVerticesContainerName, m_jp.all2trksVerticesContainerName };
336  std::set<std::string> userContainerNamesSet;
337  for( auto& name : userContainerNames ) userContainerNamesSet.insert( name );
338  if( userContainerNamesSet.size() != userContainerNames.size() ) {
339  ATH_MSG_ERROR( " > " << __FUNCTION__ << ": detected duplicated user-specified container name. Please check your job property" );
340  return StatusCode::FAILURE;
341  }
342  }
343 
344  auto *secondaryVertexContainer = new xAOD::VertexContainer;
345  auto *secondaryVertexAuxContainer = new xAOD::VertexAuxContainer;
346 
347  secondaryVertexContainer ->setStore( secondaryVertexAuxContainer );
348 
349  ATH_CHECK( evtStore()->record( secondaryVertexContainer, "VrtSecInclusive_" + m_jp.secondaryVerticesContainerName + m_jp.augVerString ) );
350  ATH_CHECK( evtStore()->record( secondaryVertexAuxContainer, "VrtSecInclusive_" + m_jp.secondaryVerticesContainerName + m_jp.augVerString + "Aux." ) );
351 
353  auto *twoTrksVertexContainer = new xAOD::VertexContainer;
354  auto *twoTrksVertexAuxContainer = new xAOD::VertexAuxContainer;
355 
356  twoTrksVertexContainer ->setStore( twoTrksVertexAuxContainer );
357 
358  ATH_CHECK( evtStore()->record( twoTrksVertexContainer, "VrtSecInclusive_" + m_jp.all2trksVerticesContainerName + m_jp.augVerString ) );
359  ATH_CHECK( evtStore()->record( twoTrksVertexAuxContainer, "VrtSecInclusive_" + m_jp.all2trksVerticesContainerName + m_jp.augVerString + "Aux." ) );
360 
361  for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
362 
363  auto& name = itr->first;
364 
365  auto *intermediateVertexContainer = new xAOD::VertexContainer;
366  auto *intermediateVertexAuxContainer = new xAOD::VertexAuxContainer;
367 
368  intermediateVertexContainer ->setStore( intermediateVertexAuxContainer );
369 
370  ATH_CHECK( evtStore()->record( intermediateVertexContainer, "VrtSecInclusive_IntermediateVertices_" + name + m_jp.augVerString ) );
371  ATH_CHECK( evtStore()->record( intermediateVertexAuxContainer, "VrtSecInclusive_IntermediateVertices_" + name + m_jp.augVerString + "Aux." ) );
372  }
373 
374  }
375 
377 
378 
379  // Later use elsewhere in the algorithm
380  m_selectedTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>> ( );
381  m_associatedTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>>( );
382  m_leptonicTracks = std::make_unique<std::vector<const xAOD::TrackParticle*>> ( );
383 
385 
387  //
388  // now start algorithm
389  //
390 
391  //--------------------------------------------------------
392  // Primary vertex processing
393  //
394  sc = this->processPrimaryVertices(); // fetch the 1st primary reconstructed vertex
395 
396  if( sc.isFailure() or !m_thePV ) {
397 
398  ATH_MSG_WARNING("processPrimaryVertices() failed");
399  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
400  return StatusCode::SUCCESS;
401  }
402 
403  // Perform track selection and store it to selectedBaseTracks
404  try {
405 
406  for( auto alg : m_trackSelectionAlgs ) {
407  ATH_CHECK( (this->*alg)() );
408  }
409 
410  } catch( ... ) {
411 
412  ATH_MSG_WARNING( " > " << __FUNCTION__ << ": some other error is detected in the track selection scope." );
413 
414  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
415  return StatusCode::SUCCESS;
416 
417  }
418 
419 
420  if( m_jp.FillNtuple )
421  m_ntupleVars->get<unsigned int>( "NumSelTrks" ) = static_cast<int>( m_selectedTracks->size() );
422 
423  // fill information about selected tracks in AANT
425 
426  //-------------------------------------------------------
427  // Skip the event if the number of selected tracks is more than m_jp.SelTrkMaxCutoff
428  if( m_selectedTracks->size() < 2 ) {
429  ATH_MSG_DEBUG( "execute: Too few (<2) selected reco tracks. Terminated reconstruction." );
430  m_vertexingStatus = 1;
431  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
432  return StatusCode::SUCCESS;
433  }
434 
435  if( m_selectedTracks->size() > m_jp.SelTrkMaxCutoff ) {
436  ATH_MSG_INFO( "execute: Too many selected reco tracks. Terminated reconstruction." );
437  m_vertexingStatus = 2;
438  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
439  return StatusCode::SUCCESS;
440  }
441 
442  //-------------------------------------------------------
443  // Core part of Vertexing
444  //
445 
446  try {
447 
449 
450  // set of vertices created in the following while loop.
451  auto* workVerticesContainer = new std::vector<WrkVrt>;
452 
453  // the main sequence of the main vertexing algorithms
454  // see initialize() what kind of algorithms exist.
455  for( auto itr = m_vertexingAlgorithms.begin(); itr!=m_vertexingAlgorithms.end(); ++itr ) {
456 
457  auto& name = itr->first;
458  auto alg = itr->second;
459 
460  auto t_start = std::chrono::system_clock::now();
461 
462  ATH_CHECK( (this->*alg)( workVerticesContainer ) );
463 
464  auto t_end = std::chrono::system_clock::now();
465 
466  if( m_jp.FillHist ) {
467  auto sec = std::chrono::duration_cast<std::chrono::microseconds>( t_end - t_start ).count();
468  m_hists["CPUTime"]->Fill( m_vertexingAlgorithmStep, sec/1.e6 );
469  }
470 
471  auto end = std::remove_if( workVerticesContainer->begin(), workVerticesContainer->end(),
472  []( WrkVrt& wrkvrt ) {
473  return ( !wrkvrt.isGood || wrkvrt.nTracksTotal() < 2 ); }
474  );
475 
476  workVerticesContainer->erase( end, workVerticesContainer->end() );
477 
478  ATH_CHECK( monitorVertexingAlgorithmStep( workVerticesContainer, name, std::next( itr ) == m_vertexingAlgorithms.end() ) );
479 
481 
482  }
483 
484  delete workVerticesContainer;
485 
486  } catch(std::exception& e) {
487 
488  ATH_MSG_WARNING( " > " << __FUNCTION__ << ": exception detected in the vertexing scope: " << e.what() );
489  m_vertexingStatus = 4;
490 
491  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
492  return StatusCode::SUCCESS;
493 
494  }
495 
496  m_vertexingStatus = 0;
497  vertexingStatusDecor(*eventInfo) = m_vertexingStatus;
498 
499  // Fill AANT
500  if( m_jp.FillNtuple ) {
501  m_tree_Vert->Fill();
503  }
504 
505 
506  ATH_MSG_VERBOSE( "execute: process done." );
507  // end
508  return StatusCode::SUCCESS;
509 
510  }
511 
512 } // 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 >
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:27
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
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:24
VKalVrtAthena::VrtSecInclusive::JobProperties::doMergeByShuffling
bool doMergeByShuffling
Definition: VrtSecInclusive.h:181
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
VKalVrtAthena::VrtSecInclusive::selectInDetAndGSFTracks
StatusCode selectInDetAndGSFTracks()
Definition: TrackSelectionAlgs.cxx:301
VKalVrtAthena::VrtSecInclusive::m_sctCondSummaryTool
ToolHandle< IInDetConditionsTool > m_sctCondSummaryTool
Definition: VrtSecInclusive.h:276
VKalVrtAthena::VrtSecInclusive::setupNtuple
StatusCode setupNtuple()
Definition: AANT_Tools.cxx:217
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:269
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:99
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:295
VKalVrtAthena::VrtSecInclusive::selectTracksInDet
StatusCode selectTracksInDet()
Definition: TrackSelectionAlgs.cxx:224
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:195
VKalVrtAthena::VrtSecInclusive::fillAANT_SelectedBaseTracks
StatusCode fillAANT_SelectedBaseTracks()
Definition: AANT_Tools.cxx:262
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:252
VKalVrtAthena::VrtSecInclusive::selectTracksFromElectrons
StatusCode selectTracksFromElectrons()
Definition: TrackSelectionAlgs.cxx:278
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
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
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:277
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:235
VKalVrtAthena::VrtSecInclusive::findNtrackVertices
StatusCode findNtrackVertices(std::vector< WrkVrt > *)
Definition: VertexingAlgs.cxx:360
VKalVrtAthena::VrtSecInclusive::clearNtupleVariables
StatusCode clearNtupleVariables()
Definition: AANT_Tools.cxx:226