ATLAS Offline Software
Loading...
Searching...
No Matches
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
30namespace 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
DataVector adapter that acts like it holds const pointers.
int alternatingSplit(int &key) const
std::vector< TrackVector > split(const TrackVector &cluster, const EventContext &ctx) const
int orderedSplit(int &key, int nEntries) const
T2TrackManager(int nSplit=2, Algorithm alg=Alternating)
const int m_nSplit
Data members.
std::vector< const Trk::Track * > TrackVector
Local tools.
Definition idx.h:9