Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-09 09:33:25

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Wouter Deconinck
0003 
0004 #include <Evaluator/DD4hepUnits.h>
0005 #include <JANA/JApplicationFwd.h>
0006 #include <JANA/Utils/JTypeInfo.h>
0007 #include <cmath>
0008 #include <string>
0009 #include <vector>
0010 
0011 #include "extensions/jana/JOmniFactoryGeneratorT.h"
0012 #include "factories/calorimetry/CalorimeterHitDigi_factory.h"
0013 
0014 extern "C" {
0015 void InitPlugin(JApplication* app) {
0016 
0017   using namespace eicrecon;
0018 
0019   InitJANAPlugin(app);
0020 
0021   // Luminosity direct-photon calorimeter (epic compact/far_backward/lumi/directPC.xml):
0022   // a single 20 x 20 x 20 cm^3 PbWO4 block on the electron beam axis behind the pair
0023   // spectrometer, with NoSegmentation, so there is exactly one readout channel. It sees
0024   // bremsstrahlung and ISR photons. The geometry is a placeholder without a photosensor
0025   // or readout specification, so the ADC and TDC settings below are copied from the
0026   // EcalLumiSpec digitization (LUMISPECCAL), the other calorimeter of the luminosity
0027   // system. The 20 GeV range covers one photon at the highest electron beam energy;
0028   // several photons in the same frame saturate the ADC, which is not modelled further.
0029   app->Add(new JOmniFactoryGeneratorT<CalorimeterHitDigi_factory>(
0030       "LumiDirectPCALRawHits", {"EventHeader", "LumiDirectPCALHits"},
0031       {"LumiDirectPCALRawHits", "LumiDirectPCALRawHitLinks", "LumiDirectPCALRawHitAssociations"},
0032       {
0033           .eRes          = {0.0 * sqrt(dd4hep::GeV), 0.02, 0.0 * dd4hep::GeV}, // flat 2%
0034           .tRes          = 0.0 * dd4hep::ns,
0035           .capADC        = 16384,
0036           .dyRangeADC    = 20 * dd4hep::GeV,
0037           .pedMeanADC    = 100,
0038           .pedSigmaADC   = 1,
0039           .resolutionTDC = 10 * dd4hep::picosecond,
0040           .corrMeanScale = "1.0",
0041           .readout       = "LumiDirectPCALHits",
0042       },
0043       app // TODO: Remove me once fixed
0044       ));
0045 }
0046 }