Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:07:27

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 <JANA/Utils/JTypeInfo.h>
0009 #include <string>
0010 #include <vector>
0011 
0012 #include "algorithms/fardetectors/MatrixTransferStaticConfig.h"
0013 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0014 #include "factories/digi/SiliconTrackerDigi_factory.h"
0015 #include "factories/fardetectors/MatrixTransferStatic_factory.h"
0016 #include "factories/tracking/TrackerHitReconstruction_factory.h"
0017 
0018 extern "C" {
0019 void InitPlugin(JApplication* app) {
0020   InitJANAPlugin(app);
0021   using namespace eicrecon;
0022 
0023   MatrixTransferStaticConfig recon_cfg;
0024 
0025   //Digitized hits, especially for thresholds
0026   app->Add(new JOmniFactoryGeneratorT<SiliconTrackerDigi_factory>(
0027       "ForwardRomanPotRawHits", {"EventHeader", "ForwardRomanPotHits"},
0028       {"ForwardRomanPotRawHits", "ForwardRomanPotRawHitAssociations"},
0029       {
0030           .threshold      = 10.0 * dd4hep::keV,
0031           .timeResolution = 8,
0032       },
0033       app));
0034 
0035   app->Add(new JOmniFactoryGeneratorT<TrackerHitReconstruction_factory>(
0036       "ForwardRomanPotRecHits", {"ForwardRomanPotRawHits"}, {"ForwardRomanPotRecHits"},
0037       {
0038           .timeResolution = 8,
0039       },
0040       app));
0041 
0042   app->Add(new JOmniFactoryGeneratorT<MatrixTransferStatic_factory>(
0043       "ForwardRomanPotRecParticles",
0044       {
0045           "MCParticles",
0046           "ForwardRomanPotRecHits",
0047       },
0048       {
0049           "ForwardRomanPotRecParticles",
0050       },
0051       {
0052           .matrix_configs =
0053               {{
0054                    .nomMomentum = 275.0,
0055                    .aX =
0056                        {
0057                            {3.251116, 30.285734},
0058                            {0.186036375, 0.196439472},
0059                        },
0060                    .aY =
0061                        {
0062                            {0.4730500000, 3.062999454},
0063                            {0.0204108951, -0.139318692},
0064                        },
0065 
0066                    .local_x_offset = -1209.29,   //-0.339334, these are the local coordinate values
0067                    .local_y_offset = 0.00132511, //-0.000299454,
0068                    .local_x_slope_offset = -45.4772,    //-0.219603248,
0069                    .local_y_slope_offset = 0.000745498, //-0.000176128,
0070 
0071                },
0072                {
0073                    // NOT TUNED -- just for testing purposes
0074                    .nomMomentum = 130.0,
0075                    .aX =
0076                        {
0077                            {3.16912, 22.4693},
0078                            {0.182402, -0.218209},
0079                        },
0080 
0081                    .aY =
0082                        {
0083                            {0.520743, 3.17339},
0084                            {0.0222482, -0.0923779},
0085                        },
0086 
0087                    .local_x_offset = -1209.29,   //-0.339334, these are the local coordinate values
0088                    .local_y_offset = 0.00132511, //-0.000299454,
0089                    .local_x_slope_offset = -45.4772,    //-0.219603248,
0090                    .local_y_slope_offset = 0.000745498, //-0.000176128,
0091 
0092                },
0093                {
0094                    .nomMomentum = 100.0,
0095 
0096                    .aX =
0097                        {
0098                            {3.152158, 20.852072},
0099                            {0.181649517, -0.303998487},
0100                        },
0101 
0102                    .aY =
0103                        {
0104                            {0.5306100000, 3.19623343},
0105                            {0.0226283320, -0.082666019},
0106                        },
0107 
0108                    .local_x_offset       = -1209.27,   //-0.329072,
0109                    .local_y_offset       = 0.00355218, //-0.00028343,
0110                    .local_x_slope_offset = -45.4737,   //-0.218525084,
0111                    .local_y_slope_offset = 0.00204394, //-0.00015321,
0112 
0113                },
0114                {
0115                    .nomMomentum = 41.0,
0116 
0117                    .aX =
0118                        {
0119                            {3.135997, 18.482273},
0120                            {0.176479921, -0.497839483},
0121 
0122                        },
0123                    .aY = {{0.4914400000, 4.53857451}, {0.0179664765, 0.004160679}},
0124 
0125                    .local_x_offset       = -1209.22,   //-0.283273,
0126                    .local_y_offset       = 0.00868737, //-0.00552451,
0127                    .local_x_slope_offset = -45.4641,   //-0.21174031,
0128                    .local_y_slope_offset = 0.00498786, //-0.003212011,
0129 
0130                }},
0131           .hit1minZ = 32541.0,
0132           .hit1maxZ = 32554.0,
0133           .hit2minZ = 34239.0,
0134           .hit2maxZ = 34252.0,
0135 
0136           .readout = "ForwardRomanPotRecHits",
0137       },
0138       app));
0139 }
0140 }