Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:21:23

0001 #ifndef QA_QAG4SIMULATIONMICROMEGAS_H
0002 #define QA_QAG4SIMULATIONMICROMEGAS_H
0003 
0004 #include <trackbase/ClusterErrorPara.h>
0005 #include <trackbase/TrkrDefs.h>
0006 
0007 #include <fun4all/SubsysReco.h>
0008 
0009 #include <set>
0010 #include <string>
0011 
0012 class ActsGeometry;
0013 class PHCompositeNode;
0014 class PHG4CylinderGeomContainer;
0015 class PHG4Hit;
0016 class PHG4Particle;
0017 class PHG4HitContainer;
0018 class TrkrClusterContainer;
0019 class TrkrHitSetContainer;
0020 class TrkrClusterHitAssoc;
0021 class TrkrHitTruthAssoc;
0022 class PHG4TruthInfoContainer;
0023 class SvtxEvalStack;
0024 
0025 /// \class QAG4SimulationMicromegas
0026 class QAG4SimulationMicromegas : public SubsysReco
0027 {
0028  public:
0029   /// constructor
0030   QAG4SimulationMicromegas(const std::string& name = "QAG4SimulationMicromegas");
0031 
0032   int InitRun(PHCompositeNode* topNode) override;
0033   int process_event(PHCompositeNode* topNode) override;
0034 
0035  private:
0036   /// common prefix for QA histograms
0037   std::string get_histo_prefix() const;
0038   std::unique_ptr<SvtxEvalStack> m_svtxEvalStack;
0039   /// load nodes
0040   int load_nodes(PHCompositeNode*);
0041 
0042   /// evaluate hits
0043   void evaluate_hits();
0044 
0045   /// evaluate clusters
0046   void evaluate_clusters();
0047 
0048   // get geant hits associated to a cluster
0049   using G4HitSet = std::set<PHG4Hit*>;
0050   G4HitSet find_g4hits(TrkrDefs::cluskey) const;
0051 
0052   /// true if histograms are initialized
0053   bool m_initialized = false;
0054 
0055   //! micromegas geometry
0056   PHG4CylinderGeomContainer* m_micromegas_geonode{nullptr};
0057 
0058   /// Acts tracking geometry for surface lookup
0059   ActsGeometry* m_tGeometry{nullptr};
0060 
0061   /// cluster map
0062   TrkrClusterContainer* m_cluster_map{nullptr};
0063 
0064   /// hitsets
0065   TrkrHitSetContainer* m_hitsets{nullptr};
0066 
0067   /// clusters to hit association
0068   TrkrClusterHitAssoc* m_cluster_hit_map{nullptr};
0069 
0070   /// hit to g4hit association
0071   TrkrHitTruthAssoc* m_hit_truth_map{nullptr};
0072 
0073   /// g4 hits
0074   PHG4HitContainer* m_g4hits_micromegas{nullptr};
0075 
0076   PHG4TruthInfoContainer* m_truthContainer;
0077   /// list of relevant layers
0078   /* it is filled at Init stage. It should not change for the full run */
0079   std::set<int> m_layers;
0080   ClusterErrorPara _ClusErrPara;
0081 };
0082 
0083 #endif