Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /// ===========================================================================
0002 /*! \file   TrksInJetQATrkManager.h
0003  *  \author Derek Anderson
0004  *  \date   03.25.2024
0005  *
0006  *  A submodule for the TrksInJetQA module to generate
0007  *  QA plots for tracks
0008  */
0009 /// ===========================================================================
0010 
0011 #ifndef TRKSINJETQATRKMANAGER_H
0012 #define TRKSINJETQATRKMANAGER_H
0013 
0014 // submodule definitions
0015 #include "TrksInJetQABaseManager.h"
0016 
0017 // jet includes
0018 #include <jetbase/Jet.h>
0019 
0020 // tracking includes
0021 #include <trackbase_historic/SvtxTrack.h>
0022 
0023 // root includes
0024 #include <TH1.h>
0025 #include <TH2.h>
0026 
0027 // c++ utilities
0028 #include <limits>
0029 #include <optional>
0030 #include <utility>
0031 #include <vector>
0032 
0033 // ============================================================================
0034 //! Track histogram manager for TrksInJetQA module
0035 // ============================================================================
0036 /*! This histogram manager defines what to histogram
0037  *  from tracks.
0038  */
0039 class TrksInJetQATrkManager : public TrksInJetQABaseManager
0040 {
0041  public:
0042   ///! enumerates types of tracks
0043   // - TODO split tracks into seed types
0044   enum Type
0045   {
0046     All
0047   };
0048 
0049   ///! enumerates 1D histograms
0050   enum H1D
0051   {
0052     Eta,
0053     Phi,
0054     Pt,
0055     Z,
0056     Jt,
0057     Qual
0058   };
0059 
0060   ///! enumerates 2D histograms
0061   enum H2D
0062   {
0063     EtaVsPhi,
0064     PtVsQual
0065   };
0066 
0067   // --------------------------------------------------------------------------
0068   // Track histogram content
0069   // --------------------------------------------------------------------------
0070   /*! A small struct to consolidate what variables
0071    *  to histogram for tracks.
0072    */ 
0073   struct TrackQAContent
0074   {
0075     double eta = std::numeric_limits<double>::max();
0076     double phi = std::numeric_limits<double>::max();
0077     double pt = std::numeric_limits<double>::max();
0078     double z = std::numeric_limits<double>::max();
0079     double jt = std::numeric_limits<double>::max();
0080     double qual = std::numeric_limits<double>::max();
0081   };
0082 
0083   // ctor/dtor
0084   using TrksInJetQABaseManager::TrksInJetQABaseManager;
0085   ~TrksInJetQATrkManager(){};
0086 
0087   // public methods
0088   void GetInfo(SvtxTrack* track, std::optional<Jet*> jet = std::nullopt);
0089 
0090  private:
0091   // private methods
0092   void FillHistograms(const int type, TrackQAContent& content);
0093 
0094   // inherited private methods
0095   void DefineHistograms() override;
0096 
0097 };  // end TrksInJetQATrkManager
0098 
0099 #endif
0100 
0101 // end ========================================================================