Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:18:09

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef INTTCLUSTERQA_H
0004 #define INTTCLUSTERQA_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <cmath>
0009 #include <map>
0010 #include <set>
0011 #include <string>
0012 
0013 class PHCompositeNode;
0014 class TH1;
0015 class TH2;
0016 
0017 class InttClusterQA : public SubsysReco
0018 {
0019  public:
0020   InttClusterQA(const std::string &name = "InttClusterQA");
0021 
0022   ~InttClusterQA() override = default;
0023 
0024   int InitRun(PHCompositeNode *topNode) override;
0025   int process_event(PHCompositeNode *topNode) override;
0026   int EndRun(const int runnumber) override;
0027 
0028   void writeSensorInfo(bool value)
0029   {
0030     m_sensorInfo = value;
0031   }
0032 
0033  private:
0034   void createHistos();
0035 
0036   std::string getHistoPrefix() const;
0037   std::map<int, int> m_layerLadderMap;
0038   int m_event = 0;
0039   int m_totalClusters = 0;
0040   int m_nclustersPerSensor[4][16][4] = {{{0}}};
0041   bool m_sensorInfo = false;
0042   double cluszbin[56] = {-25., -22.57245 - 1.1,             //
0043                          -22.57245 - 0.9, -22.57245 + 0.9,  //
0044                          -20.57245 - 0.9, -20.57245 + 0.9,  //
0045                          -18.57245 - 0.9, -18.57245 + 0.9,  //
0046                          -16.57245 - 0.9, -16.57245 + 0.9,  //
0047                          -14.57245 - 0.9, -14.57245 + 0.9,  //
0048                          -12.57245 - 0.7, -12.57245 + 0.7,  //
0049                          -10.97245 - 0.7, -10.97245 + 0.7,  //
0050                          -9.372450 - 0.7, -9.372450 + 0.7,  //
0051                          -7.772450 - 0.7, -7.772450 + 0.7,  //
0052                          -6.172450 - 0.7, -6.172450 + 0.7,  //
0053                          -4.572450 - 0.7, -4.572450 + 0.7,  //
0054                          -2.972450 - 0.7, -2.972450 + 0.7,  //
0055                          -1.372450 - 0.7, -1.372450 + 0.7,  //
0056                          0.4275496 - 0.7, 0.4275496 + 0.7,  //
0057                          2.0275495 - 0.7, 2.0275495 + 0.7,  //
0058                          3.6275494 - 0.7, 3.6275494 + 0.7,  //
0059                          5.2275495 - 0.7, 5.2275495 + 0.7,  //
0060                          6.8275494 - 0.7, 6.8275494 + 0.7,  //
0061                          8.4275493 - 0.7, 8.4275493 + 0.7,  //
0062                          10.027549 - 0.7, 10.027549 + 0.7,  //
0063                          11.627549 - 0.7, 11.627549 + 0.7,  //
0064                          13.627549 - 0.9, 13.627549 + 0.9,  //
0065                          15.627549 - 0.9, 15.627549 + 0.9,  //
0066                          17.627550 - 0.9, 17.627550 + 0.9,  //
0067                          19.627550 - 0.9, 19.627550 + 0.9,  //
0068                          21.627550 - 0.9, 21.627550 + 0.9,  //
0069                          21.627550 + 1.1, 25.};
0070 
0071   TH1 *h_occupancy{nullptr};
0072   TH1 *h_clusSize{nullptr};
0073   TH1 *h_clusPhi_incl{nullptr};
0074   TH1 *h_clusPhi_l34{nullptr};
0075   TH1 *h_clusPhi_l56{nullptr};
0076   TH2 *h_clusZ_clusPhi_l34{nullptr};
0077   TH2 *h_clusZ_clusPhi_l56{nullptr};
0078   TH2 *h_cluspersensor[4][16][4] = {{{nullptr}}};
0079 };
0080 
0081 #endif  // InttClusterQA_H