Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:29:38

0001 // Copyright 2024, Jefferson Science Associates, LLC.
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 
0004 
0005 #include "MyFileReaderGenerator.h"
0006 #include "MyFileWriter.h"
0007 #include "MyTimesliceSplitter.h"
0008 #include "MyProtoclusterFactory.h"
0009 #include "MyClusterFactory.h"
0010 
0011 #include <JANA/Components/JOmniFactoryGeneratorT.h>
0012 
0013 #include <JANA/JApplication.h>
0014 
0015 
0016 extern "C"{
0017 void InitPlugin(JApplication *app) {
0018 
0019     InitJANAPlugin(app);
0020 
0021     // Event source generator instantiates a FileReader for each filename passed to jana.
0022     // The event source it produces is configured to either produce Timeslices or Events.
0023     // Either way, these files contain just hits
0024     app->Add(new MyFileReaderGenerator());
0025 
0026     // Event processor that writes events (and timeslices, if they are present) to file
0027     app->Add(new MyFileWriter());
0028 
0029     // Unfolder that takes timeslices and splits them into physics events.
0030     app->Add(new MyTimesliceSplitter());
0031 
0032     // Factory that produces timeslice-level protoclusters from timeslice-level hits
0033     app->Add(new JOmniFactoryGeneratorT<MyProtoclusterFactory>(
0034                 { .tag = "timeslice_protoclusterizer", 
0035                   .level = JEventLevel::Timeslice,
0036                   .input_names = {"hits"}, 
0037                   .output_names = {"ts_protoclusters"}
0038                 }));
0039 
0040     // Factory that produces event-level protoclusters from event-level hits
0041     app->Add(new JOmniFactoryGeneratorT<MyProtoclusterFactory>(
0042                 { .tag = "event_protoclusterizer", 
0043                   .input_names = {"hits"}, 
0044                   .output_names = {"evt_protoclusters"}}
0045                 ));
0046 
0047     // Factory that produces event-level clusters from event-level protoclusters
0048     app->Add(new JOmniFactoryGeneratorT<MyClusterFactory>(
0049                 { .tag = "clusterizer", 
0050                   .input_names = {"evt_protoclusters"}, 
0051                   .output_names = {"clusters"}}
0052                 ));
0053 
0054 
0055 }
0056 } // "C"
0057 
0058