Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:34

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  protected:
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  private:
0049   int load_nodes(PHCompositeNode *);
0050 
0051   SvtxTrack *getTrack(unsigned int track_id, SvtxTrackMap *trackmap);
0052   PHG4Particle *getTruthTrack(SvtxTrack *thisTrack);
0053   CLHEP::HepLorentzVector *makeHepLV(PHCompositeNode *topNode, int track_number);
0054 
0055   PHG4TruthInfoContainer *m_truthContainer = nullptr;
0056 
0057   std::unique_ptr<SvtxEvalStack> m_svtxEvalStack;
0058 
0059   SvtxTrackMap *m_trackMap = nullptr;
0060   PHG4TruthInfoContainer *m_truthInfo = nullptr;
0061   KFParticle_Container *m_kfpContainer = nullptr;
0062   std::map<std::string, std::pair<int, float>> particleMasses;
0063   std::string m_trackMapName = "SvtxTrackMap";
0064 };
0065 
0066 #endif  // QAG4SIMULATIONKFPARTICLE_H