Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:44

0001 /// ===========================================================================
0002 /*! \file   TrksInJetQAInJetFiller.h
0003  *  \author Derek Anderson
0004  *  \date   04.03.2024
0005  *
0006  *  A submodule for the TrksInJetsQA F4A module to produce
0007  *  QA histograms for tracks and more in jets
0008  */
0009 /// ===========================================================================
0010 
0011 #ifndef TRKSINJETQAINJETFILLER_H
0012 #define TRKSINJETQAINJETFILLER_H
0013 
0014 // module utilities
0015 #include "TrksInJetQABaseFiller.h"
0016 #include "TrksInJetQADefs.h"
0017 
0018 // g4eval includes
0019 #include <g4eval/ClusKeyIter.h>
0020 
0021 // jet includes
0022 #include <jetbase/Jet.h>
0023 #include <jetbase/JetContainer.h>
0024 
0025 // particle flow includes
0026 #include <particleflowreco/ParticleFlowElement.h>
0027 #include <particleflowreco/ParticleFlowElementContainer.h>
0028 
0029 // phool includes
0030 #include <phool/PHCompositeNode.h>
0031 #include <phool/getClass.h>
0032 #include <phool/phool.h>
0033 
0034 // tracking includes
0035 #include <trackbase/ActsGeometry.h>
0036 #include <trackbase/TrkrCluster.h>
0037 #include <trackbase/TrkrClusterContainer.h>
0038 #include <trackbase/TrkrDefs.h>
0039 #include <trackbase/TrkrHit.h>
0040 #include <trackbase/TrkrHitSet.h>
0041 #include <trackbase/TrkrHitSetContainer.h>
0042 #include <trackbase_historic/SvtxTrack.h>
0043 #include <trackbase_historic/SvtxTrackMap.h>
0044 
0045 // c+ utilities
0046 #include <cassert>
0047 #include <vector>
0048 
0049 // ============================================================================
0050 //! In-jet histogram filler for TrksInJetQA module
0051 // ============================================================================
0052 /*! This histogram filler defines how to fill histograms
0053  *  for in-jet populations.
0054  */
0055 class TrksInJetQAInJetFiller : public TrksInJetQABaseFiller
0056 {
0057  public:
0058   ///! enumerates additional nodes to grab
0059   enum Node
0060   {
0061     Flow
0062   };
0063 
0064   // ctor/dtor
0065   using TrksInJetQABaseFiller::TrksInJetQABaseFiller;
0066   ~TrksInJetQAInJetFiller() override = default;
0067 
0068   // inherited public methods
0069   void Fill(PHCompositeNode* topNode) override;
0070 
0071  private:
0072   // private methods
0073   void GetNode(const int node, PHCompositeNode* topNode);
0074   void FillJetAndTrackQAHists(PHCompositeNode* topNode);
0075   void FillClustAndHitQAHists(SvtxTrack* track);
0076   void GetCstTracks(Jet* jet, PHCompositeNode* topNode);
0077   void GetNonCstTracks(Jet* jet);
0078   static bool IsCstNotRelevant(const uint32_t type);
0079   bool IsTrkInList(const uint32_t id);
0080   static double GetTrackJetDist(SvtxTrack* track, Jet* jet);
0081   TrksInJetQADefs::PFObject* GetPFObject(const uint32_t id, PHCompositeNode* topNode);
0082   static SvtxTrack* GetTrkFromPFO(TrksInJetQADefs::PFObject* pfo);
0083 
0084   ///! node of particle flow elements
0085   TrksInJetQADefs::PFObjectStore* m_flowStore {nullptr};
0086 
0087   // for tracks in jet
0088   std::vector<SvtxTrack*> m_trksInJet;
0089 
0090 };  // end TrksInJetQAInJetFiller
0091 
0092 #endif
0093 
0094 // end ========================================================================