Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 07:55:52

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