ATLAS Offline Software
T2TrackManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
20 
21 #ifndef TRIGT2BEAMSPOT_T2TRACKMANAGER_H
22 #define TRIGT2BEAMSPOT_T2TRACKMANAGER_H
23 
26 
27 #include <vector>
28 #include <cmath>
29 
30 namespace PESA
31 {
32 
34  {
35  public:
36 
37  using TrackVector = std::vector<const Trk::Track*>;
38 
39  // List of the splitter algorithms
40  // TODO: Only Alternating split works, Pt does things that look strange
41  // and it should be validated before it can be used.
42  enum Algorithm { Alternating, Pt /*, Phi, NorthSouth, Charge */ };
43 
44  explicit T2TrackManager(int nSplit=2, Algorithm alg=Alternating) : m_nSplit(nSplit), m_alg(alg) {}
45 
46  // Return a vector of sub-clusters
47  std::vector<TrackVector> split(const TrackVector& cluster, const EventContext& ctx) const;
48 
49  private:
50 
51  // The splitter algorithms
52  int alternatingSplit(int& key) const; // 1 for me, 1 for you, 2 for me, ...
53  int orderedSplit(int& key, int nEntries) const; // 1, 2, 3 for me, 1, 2, 3 for you ...
54 
56  const int m_nSplit = 2; // How many output clusters
57  const int m_alg = Alternating; // Which algorithm to use
58  };
59 
60 } //PESA
61 
62 #endif
SGout2dot.alg
alg
Definition: SGout2dot.py:243
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
PESA::T2TrackManager::T2TrackManager
T2TrackManager(int nSplit=2, Algorithm alg=Alternating)
Definition: T2TrackManager.h:44
PESA::T2TrackManager::Algorithm
Algorithm
Definition: T2TrackManager.h:42
PESA::T2TrackManager::TrackVector
std::vector< const Trk::Track * > TrackVector
Definition: T2TrackManager.h:37
PESA
Local tools.
Definition: T2BeamSpot.cxx:13
PESA::T2TrackManager::orderedSplit
int orderedSplit(int &key, int nEntries) const
Definition: T2TrackManager.cxx:74
PESA::T2TrackManager::Alternating
@ Alternating
Definition: T2TrackManager.h:42
PESA::T2TrackManager::Pt
@ Pt
Definition: T2TrackManager.h:42
TrackCollection.h
PESA::T2TrackManager::alternatingSplit
int alternatingSplit(int &key) const
Definition: T2TrackManager.cxx:66
PESA::T2TrackManager
Definition: T2TrackManager.h:34
PESA::T2TrackManager::split
std::vector< TrackVector > split(const TrackVector &cluster, const EventContext &ctx) const
Definition: T2TrackManager.cxx:34
PESA::T2TrackManager::m_alg
const int m_alg
Definition: T2TrackManager.h:57
dqBeamSpot.nEntries
int nEntries
Definition: dqBeamSpot.py:73
PESA::T2TrackManager::m_nSplit
const int m_nSplit
Data members.
Definition: T2TrackManager.h:56
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37