Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:04

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/JApplication.h>
0008 #include <vector>
0009 
0010 #include "algorithms/fardetectors/MatrixTransferStaticConfig.h"
0011 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0012 #include "factories/digi/SiliconTrackerDigi_factory.h"
0013 #include "factories/fardetectors/MatrixTransferStatic_factory.h"
0014 #include "factories/tracking/TrackerHitReconstruction_factory.h"
0015 
0016 
0017 extern "C" {
0018 void InitPlugin(JApplication *app) {
0019     InitJANAPlugin(app);
0020     using namespace eicrecon;
0021 
0022     MatrixTransferStaticConfig recon_cfg;
0023 
0024         //Digitized hits, especially for thresholds
0025         app->Add(new JOmniFactoryGeneratorT<SiliconTrackerDigi_factory>(
0026         "ForwardOffMTrackerRawHits",
0027         {
0028           "ForwardOffMTrackerHits"
0029         },
0030         {
0031           "ForwardOffMTrackerRawHits",
0032           "ForwardOffMTrackerRawHitAssociations"
0033         },
0034         {
0035             .threshold = 10.0 * dd4hep::keV,
0036             .timeResolution = 8,
0037         },
0038         app
0039     ));
0040 
0041         app->Add(new JOmniFactoryGeneratorT<TrackerHitReconstruction_factory>(
0042         "ForwardOffMTrackerRecHits",
0043         {"ForwardOffMTrackerRawHits"},
0044         {"ForwardOffMTrackerRecHits"},
0045         {
0046             .timeResolution = 8,
0047         },
0048         app
0049     ));
0050 
0051     //Static transport matrix for Off Momentum detectors
0052     recon_cfg.aX = {{1.6248, 12.966293},
0053                     {0.1832, -2.8636535}};
0054     recon_cfg.aY = {{0.0001674, -28.6003},
0055                     {0.0000837, -2.87985}};
0056 
0057     recon_cfg.local_x_offset       = -11.9872;  // in mm --> this is from misalignment of the detector
0058     recon_cfg.local_y_offset       = -0.0146;   // in mm --> this is from misalignment of the detector
0059     recon_cfg.local_x_slope_offset = -14.75315; // in mrad
0060     recon_cfg.local_y_slope_offset = -0.0073;   // in mrad
0061     recon_cfg.nomMomentum          =  137.5;    // in GEV --> exactly half of the top energy momentum (for proton spectators from deuteron breakup)
0062 
0063     recon_cfg.hit1minZ = 22499.0;
0064     recon_cfg.hit1maxZ = 22522.0;
0065     recon_cfg.hit2minZ = 24499.0;
0066     recon_cfg.hit2maxZ = 24522.0;
0067 
0068     recon_cfg.readout              = "ForwardOffMTrackerRecHits";
0069 
0070     app->Add(new JOmniFactoryGeneratorT<MatrixTransferStatic_factory>("ForwardOffMRecParticles",{"MCParticles","ForwardOffMTrackerRecHits"},{"ForwardOffMRecParticles"},recon_cfg,app));
0071 
0072 }
0073 }