File indexing completed on 2024-11-15 08:59:58
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <JANA/JEvent.h>
0008 #include <edm4eic/TrackParametersCollection.h>
0009 #include <memory>
0010 #include <string>
0011 #include <utility>
0012 #include <vector>
0013
0014 #include "algorithms/tracking/OrthogonalTrackSeedingConfig.h"
0015 #include "algorithms/tracking/TrackSeeding.h"
0016 #include "extensions/jana/JOmniFactory.h"
0017 #include "services/geometry/acts/ACTSGeo_service.h"
0018
0019 namespace eicrecon {
0020
0021 class TrackSeeding_factory :
0022 public JOmniFactory<TrackSeeding_factory, OrthogonalTrackSeedingConfig> {
0023
0024 private:
0025 using AlgoT = eicrecon::TrackSeeding;
0026 std::unique_ptr<AlgoT> m_algo;
0027
0028 PodioInput<edm4eic::TrackerHit> m_hits_input {this};
0029 PodioOutput<edm4eic::TrackParameters> m_parameters_output {this};
0030
0031
0032 ParameterRef<float> m_rMax {this, "rMax", config().rMax, "max measurement radius for Acts::OrthogonalSeedFinder"};
0033 ParameterRef<float> m_rMin {this, "rMin", config().rMin, "min measurement radius for Acts::OrthogonalSeedFinder"};
0034 ParameterRef<float> m_deltaRMinTopSP {this, "deltaRMinTopSP", config().deltaRMinTopSP, "min distance in r between middle and top space point in one seed for Acts::OrthogonalSeedFinder"};
0035 ParameterRef<float> m_deltaRMaxTopSP {this, "deltaRMaxTopSP", config().deltaRMaxTopSP, "max distance in r between middle and top space point in one seed for Acts::OrthogonalSeedFinder"};
0036 ParameterRef<float> m_deltaRMinBottomSP {this, "deltaRMinBottomSP", config().deltaRMinBottomSP, "min distance in r between bottom and middle space point in one seed for Acts::OrthogonalSeedFinder"};
0037 ParameterRef<float> m_deltaRMaxBottomSP {this, "deltaRMaxBottomSP", config().deltaRMaxBottomSP, "max distance in r between bottom and middle space point in one seed for Acts::OrthogonalSeedFinder"};
0038 ParameterRef<float> m_collisionRegionMin {this, "collisionRegionMin", config().collisionRegionMin, "min location in z for collision region for Acts::OrthogonalSeedFinder"};
0039 ParameterRef<float> m_collisionRegionMax {this, "collisionRegionMax", config().collisionRegionMax, "max location in z for collision region for Acts::OrthogonalSeedFinder"};
0040 ParameterRef<float> m_zMax {this, "zMax", config().zMax, "Max z location for measurements for Acts::OrthogonalSeedFinder"};
0041 ParameterRef<float> m_zMin {this, "zMin", config().zMin, "Min z location for measurements for Acts::OrthogonalSeedFinder"};
0042 ParameterRef<unsigned int> m_maxSeedsPerSpM {this, "maxSeedsPerSpM", config().maxSeedsPerSpM, "Maximum number of seeds one space point can be the middle of for Acts::OrthogonalSeedFinder"};
0043 ParameterRef<float> m_cotThetaMax {this, "cotThetaMax", config().cotThetaMax, "cot of maximum theta angle for Acts::OrthogonalSeedFinder"};
0044 ParameterRef<float> m_sigmaScattering {this, "sigmaScattering", config().sigmaScattering, "number of sigmas of scattering angle to consider for Acts::OrthogonalSeedFinder"};
0045 ParameterRef<float> m_radLengthPerSeed {this, "radLengthPerSeed", config().radLengthPerSeed, "Approximate number of radiation lengths one seed traverses for Acts::OrthogonalSeedFinder"};
0046 ParameterRef<float> m_minPt {this, "minPt", config().minPt, "Minimum pT to search for for Acts::OrthogonalSeedFinder"};
0047 ParameterRef<float> m_bFieldInZ {this, "bFieldInZ", config().bFieldInZ, "Value of B Field to use in kiloTesla for Acts::OrthogonalSeedFinder"};
0048 ParameterRef<float> m_beamPosX {this, "beamPosX", config().beamPosX, "Beam position in x for Acts::OrthogonalSeedFinder"};
0049 ParameterRef<float> m_beamPosY {this, "beamPosY", config().beamPosY, "Beam position in y for Acts::OrthogonalSeedFinder"};
0050 ParameterRef<float> m_impactMax {this, "impactMax", config().impactMax, "maximum impact parameter allowed for seeds for Acts::OrthogonalSeedFinder. rMin should be larger than impactMax."};
0051 ParameterRef<float> m_rMinMiddle {this, "rMinMiddle", config().rMinMiddle, "min radius for middle space point for Acts::OrthogonalSeedFinder"};
0052 ParameterRef<float> m_rMaxMiddle {this, "rMaxMiddle", config().rMaxMiddle, "max radius for middle space point for Acts::OrthogonalSeedFinder"};
0053 ParameterRef<float> m_locaError {this, "loc_a_Error", config().locaError, "Error on Loc a for Acts::OrthogonalSeedFinder"};
0054 ParameterRef<float> m_locbError {this, "loc_b_Error", config().locbError, "Error on Loc b for Acts::OrthogonalSeedFinder"};
0055 ParameterRef<float> m_phiError {this, "phi_Error", config().phiError, "Error on phi for Acts::OrthogonalSeedFinder"};
0056 ParameterRef<float> m_thetaError {this, "theta_Error", config().thetaError, "Error on theta for Acts::OrthogonalSeedFinder"};
0057 ParameterRef<float> m_qOverPError {this, "qOverP_Error", config().qOverPError, "Error on q/p for Acts::OrthogonalSeedFinder"};
0058 ParameterRef<float> m_timeError {this, "time_Error", config().timeError, "Error on time for Acts::OrthogonalSeedFinder"};
0059
0060 Service<ACTSGeo_service> m_ACTSGeoSvc {this};
0061
0062 public:
0063 void Configure() {
0064 m_algo = std::make_unique<AlgoT>();
0065 m_algo->applyConfig(config());
0066 m_algo->init(m_ACTSGeoSvc().actsGeoProvider(), logger());
0067 }
0068
0069 void ChangeRun(int64_t run_number) {
0070 }
0071
0072 void Process(int64_t run_number, uint64_t event_number) {
0073 m_parameters_output() = m_algo->produce(*m_hits_input());
0074 }
0075 };
0076
0077 }