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