EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
MatrixTransferStatic_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<MatrixTransferStatic_factory, MatrixTransferStaticConfig> {
24
25public:
27
28private:
29 std::unique_ptr<AlgoT> m_algo;
30
31 PodioInput<edm4hep::MCParticle> m_mcparts_input{this};
32 PodioInput<edm4eic::TrackerHit> m_hits_input{this};
33 PodioOutput<edm4eic::ReconstructedParticle> m_tracks_output{this};
34
35 Service<DD4hep_service> m_geoSvc{this};
36
37 ParameterRef<float> partMass{this, "partMass", config().partMass};
38 ParameterRef<float> partCharge{this, "partCharge", config().partCharge};
39 ParameterRef<long long> partPDG{this, "partPDG", config().partPDG};
40
41 ParameterRef<double> crossingAngle{this, "crossingAngle", config().crossingAngle};
42
43 // FIXME JANA2 does not support vector of vector
44 //ParameterRef<std::vector<std::vector<double>>> aX {this, "aX", config().aX};
45 //ParameterRef<std::vector<std::vector<double>>> aY {this, "aY", config().aY};
46
47 ParameterRef<double> hit1minZ{this, "hit1minZ", config().hit1minZ};
48 ParameterRef<double> hit1maxZ{this, "hit1maxZ", config().hit1maxZ};
49 ParameterRef<double> hit2minZ{this, "hit2minZ", config().hit2minZ};
50 ParameterRef<double> hit2maxZ{this, "hit2maxZ", config().hit2maxZ};
51
52 ParameterRef<std::string> readout{this, "readout", config().readout};
53
54 ParameterRef<bool> requireBeamProton{this, "requireBeamProton", config().requireBeamProton};
55 ParameterRef<bool> requireMatchingMatrix{this, "requireMatchingMatrix",
56 config().requireMatchingMatrix};
57
58 Service<AlgorithmsInit_service> m_algorithmsInit{this};
59
60public:
61 void Configure() {
62 m_algo = std::make_unique<AlgoT>(GetPrefix());
63 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
64 m_algo->applyConfig(config());
65 m_algo->init();
66 }
67
68 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
69 m_algo->process({m_mcparts_input(), m_hits_input()}, {m_tracks_output().get()});
70 }
71};
72
73} // namespace eicrecon
Definition JOmniFactory.h:30
MatrixTransferStaticConfig & 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 MatrixTransferStatic_factory.h:23
void Process(int32_t, uint64_t)
Definition MatrixTransferStatic_factory.h:68
void Configure()
Definition MatrixTransferStatic_factory.h:61
Definition MatrixTransferStatic.h:29
-client
Definition CalorimeterClusterRecoCoG.cc:37