Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:00

0001 #ifndef SVTXTRUTHRECOTABLEEVAL_H
0002 #define SVTXTRUTHRECOTABLEEVAL_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <trackbase_historic/PHG4ParticleSvtxMap.h>
0007 #include <trackbase_historic/SvtxPHG4ParticleMap.h>
0008 
0009 #include <memory>
0010 #include <string>
0011 
0012 class PHCompositeNode;
0013 class PHG4TruthInfoContainer;
0014 class SvtxEvalStack;
0015 
0016 class SvtxTruthRecoTableEval : public SubsysReco
0017 {
0018  public:
0019   SvtxTruthRecoTableEval(const std::string &name = "SvtxTruthRecoTableEval");
0020 
0021   virtual ~SvtxTruthRecoTableEval();
0022 
0023   int Init(PHCompositeNode *) override;
0024   int InitRun(PHCompositeNode *topNode) override;
0025   int process_event(PHCompositeNode *topNode) override;
0026   int ResetEvent(PHCompositeNode *topNode) override;
0027 
0028   int End(PHCompositeNode *topNode) override;
0029 
0030   //! minimal momentum of particle to trigger an analysis and entry into the truth map.
0031   //! default to 50MeV, bending before reaching the active TPC
0032   void setMinMomentumTruthMap(const double v) { m_minMomentumTruthMap = v; }
0033 
0034  private:
0035   int createNodes(PHCompositeNode *topNode);
0036 
0037   void fillTruthMap(PHCompositeNode *topNode);
0038   void fillRecoMap(PHCompositeNode *topNode);
0039 
0040   bool m_scanForPrimaries = false;
0041 
0042   //! minimal momentum of particle to trigger an analysis and entry into the truth map.
0043   //! default to 50MeV, bending before reaching the active TPC
0044   double m_minMomentumTruthMap = 50e-3;
0045 
0046   PHG4ParticleSvtxMap *m_truthMap = nullptr;
0047   SvtxPHG4ParticleMap *m_recoMap = nullptr;
0048   std::unique_ptr<SvtxEvalStack> m_svtxevalstack;
0049 };
0050 
0051 #endif  // SVTXTRUTHRECOTABLEEVAL_H