Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-28 07:48:25

0001 // Copyright 2023, Alex Jentsch
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 //
0004 //
0005 
0006 #include <Evaluator/DD4hepUnits.h>
0007 #include <JANA/JApplicationFwd.h>
0008 #include <edm4eic/EDM4eicVersion.h>
0009 #include <JANA/Utils/JTypeInfo.h>
0010 #include <string>
0011 #include <vector>
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   //Digitized hits, especially for thresholds
0030   app->Add(new JOmniFactoryGeneratorT<SiliconTrackerDigi_factory>(
0031       "ForwardRomanPotRawHits", {"EventHeader", "ForwardRomanPotHits"},
0032       {"ForwardRomanPotRawHits",
0033 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0034        "ForwardRomanPotRawHitLinks",
0035 #endif
0036        "ForwardRomanPotRawHitAssociations"},
0037       {
0038           .threshold      = 10.0 * dd4hep::keV,
0039           .timeResolution = 8,
0040       },
0041       app));
0042 
0043   app->Add(new JOmniFactoryGeneratorT<TrackerHitReconstruction_factory>(
0044       "ForwardRomanPotRecHits", {"ForwardRomanPotRawHits"}, {"ForwardRomanPotRecHits"},
0045       {
0046           .timeResolution = 8,
0047       },
0048       app));
0049 
0050   app->Add(new JOmniFactoryGeneratorT<MatrixTransferStatic_factory>(
0051       "ForwardRomanPotStaticRecParticles",
0052       {
0053           "MCParticles",
0054           "ForwardRomanPotRecHits",
0055       },
0056       {
0057           "ForwardRomanPotStaticRecParticles",
0058       },
0059       {
0060           .matrix_configs =
0061               {{
0062                    .nomMomentum = 275.0,
0063                    .aX =
0064                        {
0065                            {3.251116, 30.285734},
0066                            {0.186036375, 0.196439472},
0067                        },
0068                    .aY =
0069                        {
0070                            {0.4730500000, 3.062999454},
0071                            {0.0204108951, -0.139318692},
0072                        },
0073 
0074                    .local_x_offset = -1209.29,   //-0.339334, these are the local coordinate values
0075                    .local_y_offset = 0.00132511, //-0.000299454,
0076                    .local_x_slope_offset = -45.4772,    //-0.219603248,
0077                    .local_y_slope_offset = 0.000745498, //-0.000176128,
0078 
0079                },
0080                {
0081                    // NOT TUNED -- just for testing purposes
0082                    .nomMomentum = 130.0,
0083                    .aX =
0084                        {
0085                            {3.16912, 22.4693},
0086                            {0.182402, -0.218209},
0087                        },
0088 
0089                    .aY =
0090                        {
0091                            {0.520743, 3.17339},
0092                            {0.0222482, -0.0923779},
0093                        },
0094 
0095                    .local_x_offset = -1209.29,   //-0.339334, these are the local coordinate values
0096                    .local_y_offset = 0.00132511, //-0.000299454,
0097                    .local_x_slope_offset = -45.4772,    //-0.219603248,
0098                    .local_y_slope_offset = 0.000745498, //-0.000176128,
0099 
0100                },
0101                {
0102                    .nomMomentum = 100.0,
0103 
0104                    .aX =
0105                        {
0106                            {3.152158, 20.852072},
0107                            {0.181649517, -0.303998487},
0108                        },
0109 
0110                    .aY =
0111                        {
0112                            {0.5306100000, 3.19623343},
0113                            {0.0226283320, -0.082666019},
0114                        },
0115 
0116                    .local_x_offset       = -1209.27,   //-0.329072,
0117                    .local_y_offset       = 0.00355218, //-0.00028343,
0118                    .local_x_slope_offset = -45.4737,   //-0.218525084,
0119                    .local_y_slope_offset = 0.00204394, //-0.00015321,
0120 
0121                },
0122                {
0123                    .nomMomentum = 41.0,
0124 
0125                    .aX =
0126                        {
0127                            {3.135997, 18.482273},
0128                            {0.176479921, -0.497839483},
0129 
0130                        },
0131                    .aY = {{0.4914400000, 4.53857451}, {0.0179664765, 0.004160679}},
0132 
0133                    .local_x_offset       = -1209.22,   //-0.283273,
0134                    .local_y_offset       = 0.00868737, //-0.00552451,
0135                    .local_x_slope_offset = -45.4641,   //-0.21174031,
0136                    .local_y_slope_offset = 0.00498786, //-0.003212011,
0137 
0138                }},
0139           .hit1minZ = 32541.0,
0140           .hit1maxZ = 32554.0,
0141           .hit2minZ = 34239.0,
0142           .hit2maxZ = 34252.0,
0143 
0144           .readout = "ForwardRomanPotRecHits",
0145       },
0146       app));
0147 
0148   app->Add(new JOmniFactoryGeneratorT<PolynomialMatrixReconstruction_factory>(
0149       "ForwardRomanPotRecParticles",
0150       {
0151           "MCParticles",
0152           "ForwardRomanPotRecHits",
0153       },
0154       {
0155           "ForwardRomanPotRecParticles",
0156       },
0157       {
0158           .poly_matrix_configs = {{
0159                                       .nomMomentum = 275.0,
0160                                   },
0161                                   {
0162                                       .nomMomentum = 130.0,
0163                                   },
0164                                   {
0165                                       .nomMomentum = 100.0,
0166                                   },
0167                                   {
0168                                       .nomMomentum = 41.0,
0169 
0170                                   }},
0171           .hit1minZ            = 32541.0,
0172           .hit1maxZ            = 32554.0,
0173           .hit2minZ            = 34239.0,
0174           .hit2maxZ            = 34252.0,
0175 
0176           .readout = "ForwardRomanPotRecHits",
0177       },
0178       app));
0179 }
0180 }