Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef QAG4SIMULATIONKFPARTICLE_H
0004 #define QAG4SIMULATIONKFPARTICLE_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <g4eval/SvtxEvalStack.h>
0009 
0010 #include <memory>
0011 #include <string>  // for string
0012 
0013 class KFParticle_Container;
0014 class PHCompositeNode;
0015 class PHG4Particle;
0016 class PHG4TruthInfoContainer;
0017 class SvtxClusterEval;
0018 class SvtxTrackMap;
0019 class SvtxTrack;
0020 
0021 namespace CLHEP
0022 {
0023   class HepLorentzVector;
0024 }
0025 
0026 class QAG4SimulationKFParticle : public SubsysReco
0027 {
0028  public:
0029   QAG4SimulationKFParticle(const std::string &name, const std::string &mother_name, double min_m, double max_m);
0030 
0031   virtual ~QAG4SimulationKFParticle() = default;
0032 
0033   int Init(PHCompositeNode *topNode);
0034   int InitRun(PHCompositeNode *topNode);
0035   int process_event(PHCompositeNode *topNode);
0036 
0037   std::string get_histo_prefix();
0038 
0039   void setTrackMapName(const std::string &name) { m_trackMapName = name; }
0040 
0041  private:
0042   SvtxClusterEval *clustereval{nullptr};
0043   int m_mother_id{0};
0044   double m_min_mass{0.};
0045   double m_max_mass{10.};
0046   std::string m_mother_name;
0047 
0048   int load_nodes(PHCompositeNode *);
0049 
0050   SvtxTrack *getTrack(unsigned int track_id, SvtxTrackMap *trackmap);
0051   PHG4Particle *getTruthTrack(SvtxTrack *thisTrack);
0052   CLHEP::HepLorentzVector *makeHepLV(PHCompositeNode *topNode, int track_number);
0053 
0054   PHG4TruthInfoContainer *m_truthContainer{nullptr};
0055 
0056   std::unique_ptr<SvtxEvalStack> m_svtxEvalStack;
0057 
0058   SvtxTrackMap *m_trackMap{nullptr};
0059   PHG4TruthInfoContainer *m_truthInfo{nullptr};
0060   KFParticle_Container *m_kfpContainer{nullptr};
0061   std::map<std::string, std::pair<int, float>> particleMasses;
0062   std::string m_trackMapName{"SvtxTrackMap"};
0063 };
0064 
0065 #endif  // QAG4SIMULATIONKFPARTICLE_H