Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /EICrecon/src/tests/track_propagation_test/TrackPropagationTest_processor.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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