EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
SecondaryVerticesHelix_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2025 Xin Dong
3
4#pragma once
5
6#include <JANA/JEvent.h>
7#include <memory>
8#include <string>
9#include <utility>
10#include <vector>
11
16
17namespace eicrecon {
18
20 : public JOmniFactory<SecondaryVerticesHelix_factory, SecondaryVerticesHelixConfig> {
21
22public:
24
25private:
26 std::unique_ptr<AlgoT> m_algo;
27
28 PodioInput<edm4eic::Vertex> m_rc_vertices_input{this};
29 PodioInput<edm4eic::ReconstructedParticle> m_rc_parts_input{this};
30
31 // Declare outputs
32 PodioOutput<edm4eic::Vertex> m_secondary_vertices_output{this};
33
34 // Declare parameters
35 ParameterRef<bool> m_unlikesign{this, "unlikesign", config().unlikesign};
36 ParameterRef<float> m_minDca{this, "minDca", config().minDca};
37 ParameterRef<float> m_maxDca12{this, "maxDca12", config().maxDca12};
38 ParameterRef<float> m_maxDca{this, "maxDca", config().maxDca};
39 ParameterRef<float> m_minCostheta{this, "minCostheta", config().minCostheta};
40
41 Service<AlgorithmsInit_service> m_algorithmsInit{this};
42
43public:
44 void Configure() {
45 m_algo = std::make_unique<AlgoT>(GetPrefix());
46 m_algo->level((algorithms::LogLevel)logger()->level());
47
48 m_algo->applyConfig(config());
49 m_algo->init();
50 }
51
52 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
53 m_algo->process({m_rc_vertices_input(), m_rc_parts_input()},
54 {m_secondary_vertices_output().get()});
55 }
56};
57
58} // namespace eicrecon
Definition JOmniFactory.h:30
SecondaryVerticesHelixConfig & config()
Retrieve reference to embedded config object.
Definition JOmniFactory.h:576
std::shared_ptr< spdlog::logger > & logger()
Retrieve reference to already-configured logger.
Definition JOmniFactory.h:573
Definition SecondaryVerticesHelix_factory.h:20
void Configure()
Definition SecondaryVerticesHelix_factory.h:44
void Process(int32_t, uint64_t)
Definition SecondaryVerticesHelix_factory.h:52
Definition SecondaryVerticesHelix.h:25
-client
Definition CalorimeterClusterRecoCoG.cc:37