File indexing completed on 2026-09-24 08:25:49
0001
0002
0003
0004
0005
0006 #include <Evaluator/DD4hepUnits.h>
0007 #include <JANA/JApplicationFwd.h>
0008 #include <JANA/Utils/JTypeInfo.h>
0009 #include <string>
0010 #include <vector>
0011 #include <edm4eic/unit_system.h>
0012
0013 #include "algorithms/fardetectors/MatrixTransferStaticConfig.h"
0014 #include "algorithms/fardetectors/PolynomialMatrixReconstructionConfig.h"
0015 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0016 #include "factories/digi/SiliconTrackerDigi_factory.h"
0017 #include "factories/fardetectors/MatrixTransferStatic_factory.h"
0018 #include "factories/fardetectors/PolynomialMatrixReconstruction_factory.h"
0019 #include "factories/tracking/TrackerHitReconstruction_factory.h"
0020
0021 extern "C" {
0022 void InitPlugin(JApplication* app) {
0023 InitJANAPlugin(app);
0024 using namespace eicrecon;
0025
0026 MatrixTransferStaticConfig recon_cfg;
0027 PolynomialMatrixReconstructionConfig recon_poly_cfg;
0028
0029
0030 app->Add(new JOmniFactoryGeneratorT<SiliconTrackerDigi_factory>(
0031 "ForwardRomanPotRawHits", {"EventHeader", "ForwardRomanPotHits"},
0032 {"ForwardRomanPotRawHits", "ForwardRomanPotRawHitLinks", "ForwardRomanPotRawHitAssociations"},
0033 {
0034 .threshold = 10.0 * dd4hep::keV,
0035 .timeResolution = 30 * edm4eic::unit::ps,
0036 },
0037 app));
0038
0039 app->Add(new JOmniFactoryGeneratorT<TrackerHitReconstruction_factory>(
0040 "ForwardRomanPotRecHits", {"ForwardRomanPotRawHits"}, {"ForwardRomanPotRecHits"},
0041 {
0042 .timeResolution = 30 * edm4eic::unit::ps,
0043 },
0044 app));
0045
0046 app->Add(new JOmniFactoryGeneratorT<MatrixTransferStatic_factory>(
0047 "ForwardRomanPotStaticRecParticles",
0048 {
0049 "MCParticles",
0050 "ForwardRomanPotRecHits",
0051 },
0052 {
0053 "ForwardRomanPotStaticRecParticles",
0054 },
0055 {
0056 .matrix_configs =
0057 {{
0058 .nomMomentum = 275.0,
0059 .aX =
0060 {
0061 {3.251116, 30.285734},
0062 {0.186036375, 0.196439472},
0063 },
0064 .aY =
0065 {
0066 {0.4730500000, 3.062999454},
0067 {0.0204108951, -0.139318692},
0068 },
0069
0070 .local_x_offset = -1209.29,
0071 .local_y_offset = 0.00132511,
0072 .local_x_slope_offset = -45.4772,
0073 .local_y_slope_offset = 0.000745498,
0074
0075 },
0076 {
0077
0078 .nomMomentum = 130.0,
0079 .aX =
0080 {
0081 {3.16912, 22.4693},
0082 {0.182402, -0.218209},
0083 },
0084
0085 .aY =
0086 {
0087 {0.520743, 3.17339},
0088 {0.0222482, -0.0923779},
0089 },
0090
0091 .local_x_offset = -1209.29,
0092 .local_y_offset = 0.00132511,
0093 .local_x_slope_offset = -45.4772,
0094 .local_y_slope_offset = 0.000745498,
0095
0096 },
0097 {
0098 .nomMomentum = 100.0,
0099
0100 .aX =
0101 {
0102 {3.152158, 20.852072},
0103 {0.181649517, -0.303998487},
0104 },
0105
0106 .aY =
0107 {
0108 {0.5306100000, 3.19623343},
0109 {0.0226283320, -0.082666019},
0110 },
0111
0112 .local_x_offset = -1209.27,
0113 .local_y_offset = 0.00355218,
0114 .local_x_slope_offset = -45.4737,
0115 .local_y_slope_offset = 0.00204394,
0116
0117 },
0118 {
0119 .nomMomentum = 41.0,
0120
0121 .aX =
0122 {
0123 {3.135997, 18.482273},
0124 {0.176479921, -0.497839483},
0125
0126 },
0127 .aY = {{0.4914400000, 4.53857451}, {0.0179664765, 0.004160679}},
0128
0129 .local_x_offset = -1209.22,
0130 .local_y_offset = 0.00868737,
0131 .local_x_slope_offset = -45.4641,
0132 .local_y_slope_offset = 0.00498786,
0133
0134 }},
0135 .hit1minZ = 32541.0,
0136 .hit1maxZ = 32554.0,
0137 .hit2minZ = 34239.0,
0138 .hit2maxZ = 34252.0,
0139
0140 .readout = "ForwardRomanPotRecHits",
0141 },
0142 app));
0143
0144 app->Add(new JOmniFactoryGeneratorT<PolynomialMatrixReconstruction_factory>(
0145 "ForwardRomanPotRecParticles",
0146 {
0147 "MCParticles",
0148 "ForwardRomanPotRecHits",
0149 },
0150 {
0151 "ForwardRomanPotRecParticles",
0152 },
0153 {
0154 .poly_matrix_configs = {{
0155 .nomMomentum = 275.0,
0156 },
0157 {
0158 .nomMomentum = 130.0,
0159 },
0160 {
0161 .nomMomentum = 100.0,
0162 },
0163 {
0164 .nomMomentum = 41.0,
0165
0166 }},
0167 .hit1minZ = 32541.0,
0168 .hit1maxZ = 32554.0,
0169 .hit2minZ = 34239.0,
0170 .hit2maxZ = 34252.0,
0171
0172 .readout = "ForwardRomanPotRecHits",
0173 },
0174 app));
0175 }
0176 }