EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
PolynomialMatrixReconstruction_factory.h
Go to the documentation of this file.
1// Created by Alex Jentsch
2// Subject to the terms in the LICENSE file found in the top-level directory.
3//
4
5#pragma once
6
7#include <DDRec/CellIDPositionConverter.h>
11
12// Event Model related classes
13#include <edm4eic/ReconstructedParticleCollection.h>
14#include <edm4eic/TrackerHitCollection.h>
15#include <edm4hep/SimTrackerHitCollection.h>
16#include <edm4hep/MCParticleCollection.h>
17
19
20namespace eicrecon {
21
23 : public JOmniFactory<PolynomialMatrixReconstruction_factory,
24 PolynomialMatrixReconstructionConfig> {
25
26public:
28
29private:
30 std::unique_ptr<AlgoT> m_algo;
31
32 PodioInput<edm4hep::MCParticle> m_mcparts_input{this};
33 PodioInput<edm4eic::TrackerHit> m_hits_input{this};
34 PodioOutput<edm4eic::ReconstructedParticle> m_tracks_output{this};
35
36 Service<DD4hep_service> m_geoSvc{this};
37
38 ParameterRef<float> partMass{this, "partMass", config().partMass};
39 ParameterRef<float> partCharge{this, "partCharge", config().partCharge};
40 ParameterRef<long long> partPDG{this, "partPDG", config().partPDG};
41
42 ParameterRef<double> crossingAngle{this, "crossingAngle", config().crossingAngle};
43
44 ParameterRef<double> hit1minZ{this, "hit1minZ", config().hit1minZ};
45 ParameterRef<double> hit1maxZ{this, "hit1maxZ", config().hit1maxZ};
46 ParameterRef<double> hit2minZ{this, "hit2minZ", config().hit2minZ};
47 ParameterRef<double> hit2maxZ{this, "hit2maxZ", config().hit2maxZ};
48
49 ParameterRef<std::string> readout{this, "readout", config().readout};
50
51 ParameterRef<bool> requireBeamProton{this, "requireBeamProton", config().requireBeamProton};
52
53 Service<AlgorithmsInit_service> m_algorithmsInit{this};
54
55public:
56 void Configure() {
57 m_algo = std::make_unique<AlgoT>(GetPrefix());
58 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
59 m_algo->applyConfig(config());
60 m_algo->init();
61 }
62
63 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
64 m_algo->process({m_mcparts_input(), m_hits_input()}, {m_tracks_output().get()});
65 }
66};
67
68} // namespace eicrecon
Definition JOmniFactory.h:30
PolynomialMatrixReconstructionConfig & 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 PolynomialMatrixReconstruction_factory.h:24
void Process(int32_t, uint64_t)
Definition PolynomialMatrixReconstruction_factory.h:63
void Configure()
Definition PolynomialMatrixReconstruction_factory.h:56
Definition PolynomialMatrixReconstruction.h:28
-client
Definition CalorimeterClusterRecoCoG.cc:37