Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /// ===========================================================================
0002 /*! \file   TrksInJetQAClustManager.h
0003  *  \author Derek Anderson
0004  *  \date   03.25.2024
0005  *
0006  *  A submodule for the TrksInJetQA module to generate
0007  *  QA plots for track clusters
0008  */
0009 /// ===========================================================================
0010 
0011 #ifndef TRKSINJETQACLUSTMANAGER_H
0012 #define TRKSINJETQACLUSTMANAGER_H
0013 
0014 // submodule definitions
0015 #include "TrksInJetQABaseManager.h"
0016 
0017 // tracking includes
0018 #include <trackbase/ActsGeometry.h>
0019 #include <trackbase/TrkrCluster.h>
0020 #include <trackbase/TrkrDefs.h>
0021 #include <trackbase/TrkrHitSet.h>
0022 
0023 // root includes
0024 #include <TH1.h>
0025 #include <TH2.h>
0026 
0027 // c++ utilities
0028 #include <limits>
0029 #include <utility>
0030 #include <vector>
0031 
0032 // ============================================================================
0033 //! Tracker cluster histogram manager for TrksInJetQA module
0034 // ============================================================================
0035 /*! This histogram manager defines what to histogram
0036  *  from tracker clusters.
0037  */
0038 class TrksInJetQAClustManager : public TrksInJetQABaseManager
0039 {
0040  public:
0041   ///! enumerate cluster subsystems
0042   enum Type
0043   {
0044     All,
0045     Mvtx,
0046     Intt,
0047     Tpc
0048   };
0049 
0050   ///! enumerate 1D histograms
0051   enum H1D
0052   {
0053     PosX,
0054     PosY,
0055     PosZ,
0056     PosR
0057   };
0058 
0059   ///! enumerate 2D histograms
0060   enum H2D
0061   {
0062     PosYvsX,
0063     PosRvsZ
0064   };
0065 
0066   // --------------------------------------------------------------------------
0067   // Cluster histogram content
0068   // --------------------------------------------------------------------------
0069   /*! A small struct to consolidate what variables
0070    *  to histogram for clusters.
0071    */ 
0072   struct ClustQAContent
0073   {
0074     double x = std::numeric_limits<double>::max();
0075     double y = std::numeric_limits<double>::max();
0076     double z = std::numeric_limits<double>::max();
0077     double r = std::numeric_limits<double>::max();
0078   };
0079 
0080   // ctor/dtor
0081   using TrksInJetQABaseManager::TrksInJetQABaseManager;
0082   ~TrksInJetQAClustManager(){};
0083 
0084   // public methods
0085   void GetInfo(TrkrCluster* cluster, TrkrDefs::cluskey& clustKey, ActsGeometry* actsGeom);
0086 
0087  private:
0088   // private methods
0089   void FillHistograms(const int type, ClustQAContent& content);
0090 
0091   // inherited private methods
0092   void DefineHistograms() override;
0093 
0094 };  // end TrksInJetQAClustManager
0095 
0096 #endif
0097 
0098 // end ========================================================================