Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:00:01

0001 #pragma once
0002 
0003 #include <Acts/Surfaces/DiscSurface.hpp>
0004 #include <JANA/JApplication.h>
0005 #include <JANA/JEvent.h>
0006 #include <JANA/JEventProcessor.h>
0007 #include <TDirectory.h>
0008 #include <memory>
0009 
0010 #include "algorithms/tracking/TrackPropagation.h"
0011 #include "extensions/spdlog/SpdlogMixin.h"
0012 
0013 class TrackPropagationTest_processor:
0014         public JEventProcessor,
0015         public eicrecon::SpdlogMixin   // this automates proper log initialization
0016 {
0017 public:
0018     explicit TrackPropagationTest_processor(JApplication *);
0019     ~TrackPropagationTest_processor() override = default;
0020 
0021     //----------------------------
0022     // Init
0023     //
0024     // This is called once before the first call to the Process method
0025     // below. You may, for example, want to open an output file here.
0026     // Only one thread will call this.
0027     void Init() override;
0028 
0029     //----------------------------
0030     // Process
0031     //
0032     // This is called for every event. Multiple threads may call this
0033     // simultaneously. If you write something to an output file here
0034     // then make sure to protect it with a mutex or similar mechanism.
0035     // Minimize what is done while locked since that directly affects
0036     // the multi-threaded performance.
0037     void Process(const std::shared_ptr<const JEvent>& event) override;
0038 
0039     //----------------------------
0040     // Finish
0041     //
0042     // This is called once after all events have been processed. You may,
0043     // for example, want to close an output file here.
0044     // Only one thread will call this.
0045     void Finish() override;
0046 
0047 private:
0048 
0049     /// Directory to store histograms to
0050     TDirectory *m_dir_main{};
0051 
0052     /// Tracking propagation algorithm
0053     eicrecon::TrackPropagation m_propagation_algo;
0054 
0055     /// A surface to propagate to
0056     std::shared_ptr<Acts::DiscSurface> m_hcal_surface;
0057 };