Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-28 07:03:01

0001 // Created by Dmitry Romanov
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 //
0004 
0005 #pragma once
0006 
0007 #include <JANA/JApplication.h>
0008 #include <JANA/JEvent.h>
0009 #include <TDirectory.h>
0010 #include <TH1.h>
0011 #include <TH2.h>
0012 #include <memory>
0013 #include <string>
0014 #include <vector>
0015 
0016 class TrackingOccupancyAnalysis {
0017 
0018 public:
0019     void init(JApplication *app, TDirectory *plugin_tdir);
0020 
0021     void process(const std::shared_ptr<const JEvent> &event);
0022 
0023 private:
0024 
0025     /// This is edm4hep::SimTrackerHits names of different detector readouts
0026     std::vector<std::string> m_data_names = {
0027             "SiBarrelHits",         // Barrel Tracker
0028             "VertexBarrelHits",     // Vertex
0029             "TrackerEndcapHits",    // End Cap tracker
0030           // MPGD
0031             "MPGDBarrelHits",
0032             "OuterMPGDBarrelHits",
0033             "ForwardMPGDEndcapHits",
0034             "BackwardMPGDEndcapHits",
0035           // TOF
0036             "TOFEndcapHits",
0037             "TOFBarrelHits",
0038     };
0039 
0040     /// Hits count histogram for each hits readout name
0041     std::vector<std::shared_ptr<TH1F>> m_hits_count_hists;
0042 
0043     /// Hits occupancy histogram for each hits readout name
0044     std::vector<std::shared_ptr<TH2F>> m_hits_occup_hists;
0045 
0046     /// Total occupancy of all m_data_names
0047     TH2F * m_total_occup_th2;                 /// MC Particles px,py
0048 };