22 outputCollectionName_(iConfig.getParameter<
std::
string>(
"l1VertexCollectionName")),
27 case Algorithm::fastHisto:
28 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using the fastHisto binning algorithm";
30 case Algorithm::fastHistoEmulation:
32 <<
"VertexProducer::Finding vertices using the emulation version of the fastHisto binning algorithm";
34 case Algorithm::fastHistoLooseAssociation:
36 <<
"VertexProducer::Finding vertices using the fastHistoLooseAssociation binning algorithm";
38 case Algorithm::GapClustering:
39 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a gap clustering algorithm";
41 case Algorithm::agglomerativeHierarchical:
42 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a Simple Merge Clustering algorithm";
44 case Algorithm::DBSCAN:
45 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a DBSCAN algorithm";
48 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a PVR algorithm";
50 case Algorithm::adaptiveVertexReconstruction:
52 <<
"VertexProducer::Finding vertices using an AdaptiveVertexReconstruction algorithm";
55 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a Highest Pt Vertex algorithm";
57 case Algorithm::Kmeans:
58 edm::LogInfo(
"VertexProducer") <<
"VertexProducer::Finding vertices using a kmeans algorithm";
72 iEvent.getByToken(l1TracksToken_, l1TracksHandle);
74 std::vector<l1tVertexFinder::L1Track>
l1Tracks;
75 l1Tracks.reserve(l1TracksHandle->size());
76 if (settings_.debug() > 1) {
77 edm::LogInfo(
"VertexProducer") <<
"produce::Processing " << l1TracksHandle->size() <<
" tracks";
79 for (
const auto&
track : l1TracksHandle->ptrs()) {
84 if (l1track.pt() >= settings_.vx_TrackMinPt()) {
87 if (settings_.debug() > 2) {
88 edm::LogInfo(
"VertexProducer") <<
"produce::Removing track with too low of a pt (" << l1track.pt() <<
")\n" 89 <<
" word = " << l1track.getTTTrackPtr()->getTrackWord().to_string(2);
93 if (settings_.debug() > 1) {
94 edm::LogInfo(
"VertexProducer") <<
"produce::Processing " <<
l1Tracks.size() <<
" tracks after minimum pt cut of" 95 << settings_.vx_TrackMinPt() <<
" GeV";
100 switch (settings_.vx_algo()) {
101 case Algorithm::fastHisto: {
106 case Algorithm::fastHistoEmulation:
109 case Algorithm::fastHistoLooseAssociation:
112 case Algorithm::GapClustering:
115 case Algorithm::agglomerativeHierarchical:
118 case Algorithm::DBSCAN:
124 case Algorithm::adaptiveVertexReconstruction:
130 case Algorithm::Kmeans:
139 if (settings_.vx_algo() == Algorithm::fastHistoEmulation) {
140 std::unique_ptr<l1t::VertexWordCollection> product_emulation =
142 iEvent.put(
std::move(product_emulation), outputCollectionName_ +
"Emulation");
144 std::unique_ptr<l1t::VertexCollection> product(
new std::vector<l1t::Vertex>());
146 product->emplace_back(
vtx.vertex());
void fastHistoLooseAssociation()
High pT Vertex Algorithm.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
void GapClustering()
Gap Clustering Algorithm.
#define DEFINE_FWK_MODULE(type)
void agglomerativeHierarchicalClustering()
Simple Merge Algorithm.
const std::string outputCollectionName_
void adaptiveVertexReconstruction()
Adaptive Vertex Reconstruction algorithm.
void findPrimaryVertex()
Find the primary vertex.
void fastHisto(const TrackerTopology *tTopo)
Histogramming algorithm.
const std::vector< RecoVertex<> > & vertices() const
Returns the z positions of the reconstructed primary vertices.
bool getData(T &iHolder) const
void sortVerticesInPt()
Sort vertices in pT.
VertexProducer(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
void PVR()
Find maximum distance in two clusters of tracks.
void fastHistoEmulation()
Histogramming algorithm (emulation)
void HPV()
High pT Vertex Algorithm.
void Kmeans()
Kmeans Algorithm.
const l1t::VertexWordCollection & verticesEmulation() const
Returns the emulation primary vertices.
Algorithm vx_algo() const
void DBSCAN()
DBSCAN algorithm.
l1tVertexFinder::AlgoSettings settings_