Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /// ===========================================================================
0002 /*! \file   TrksInJetQAHitManager.h
0003  *  \author Derek Anderson
0004  *  \date   03.25.2024
0005  *
0006  *  A submodule for the TrksInJetQA module
0007  *  to generate QA plots for track hits
0008  */
0009 /// ===========================================================================
0010 
0011 #ifndef TRKSINJETQAHITMANAGER_H
0012 #define TRKSINJETQAHITMANAGER_H
0013 
0014 // submodule definitions
0015 #include "TrksInJetQABaseManager.h"
0016 
0017 // tracking includes
0018 #include <trackbase/InttDefs.h>
0019 #include <trackbase/MvtxDefs.h>
0020 #include <trackbase/TpcDefs.h>
0021 #include <trackbase/TrkrDefs.h>
0022 #include <trackbase/TrkrHit.h>
0023 
0024 // root includes
0025 #include <TH1.h>
0026 #include <TH2.h>
0027 
0028 // c++ utilities
0029 #include <limits>
0030 #include <utility>
0031 #include <vector>
0032 
0033 // ============================================================================
0034 //! Tracker hit histogram manager for TrksInJetQA module
0035 // ============================================================================
0036 /*! This histogram manager defines what to histogram
0037  *  from tracker hits.
0038  */
0039 class TrksInJetQAHitManager : public TrksInJetQABaseManager
0040 {
0041  public:
0042   ///! enumerate hit subsystem
0043   enum Type
0044   {
0045     All,
0046     Mvtx,
0047     Intt,
0048     Tpc
0049   };
0050 
0051   ///! enumerates 1D histograms
0052   enum H1D
0053   {
0054     Ene,
0055     ADC,
0056     Layer,
0057     PhiBin,
0058     ZBin
0059   };
0060 
0061   ///! enumerates 2D histograms
0062   enum H2D
0063   {
0064     EneVsLayer,
0065     EneVsADC,
0066     PhiVsZBin
0067   };
0068 
0069   // --------------------------------------------------------------------------
0070   //! Hit histogram content
0071   // --------------------------------------------------------------------------
0072   /*! A small struct to consolidate what variables
0073    *  to histogram for hits.
0074    */ 
0075   struct HitQAContent
0076   {
0077     double ene = std::numeric_limits<double>::max();
0078     uint64_t adc = std::numeric_limits<uint64_t>::max();
0079     uint16_t layer = std::numeric_limits<uint16_t>::max();
0080     uint16_t phiBin = std::numeric_limits<uint16_t>::max();
0081     uint16_t zBin = std::numeric_limits<uint16_t>::max();
0082   };
0083 
0084   // ctor/dtor
0085   using TrksInJetQABaseManager::TrksInJetQABaseManager;
0086   ~TrksInJetQAHitManager(){};
0087 
0088   // public methods
0089   void GetInfo(TrkrHit* hit, TrkrDefs::hitsetkey& setKey, TrkrDefs::hitkey& hitKey);
0090 
0091  private:
0092   // private methods
0093   void FillHistograms(const int type, HitQAContent& content);
0094 
0095   // inherited private methods
0096   void DefineHistograms() override;
0097 
0098 };  // end TrksInJetQAHitManager
0099 
0100 #endif
0101 
0102 // end ========================================================================