Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcRawDataDecoder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcRawDataDecoder.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef TPCRAWDATADECODER_H
4 #define TPCRAWDATADECODER_H
5 
6 //#include "TpcMap.h"
7 
8 #include <trackbase/TrkrDefs.h>
9 #include <trackbase/TrkrHitSet.h>
10 
11 #include <fun4all/SubsysReco.h>
12 
13 #include <memory>
14 #include <string>
15 
16 class CDBTTree;
17 class CDBInterface;
18 class PHCompositeNode;
20 //class TrkrHitSetContainer;
21 //class TrkrHitSet;
22 //class TrkrHit;
23 class TH2;
24 class TH3;
25 class TNtuple;
26 
28 {
29  public:
30  TpcRawDataDecoder(const std::string &name = "TpcRawDataDecoder");
31 
32  ~TpcRawDataDecoder() override;
33 
34  int Init(PHCompositeNode *topNode) override;
35 
41  int InitRun(PHCompositeNode *topNode) override;
42 
46  int process_event(PHCompositeNode *topNode) override;
47 
49  //int ResetEvent(PHCompositeNode *topNode) override;
50 
52  //int EndRun(const int runnumber) override;
53 
55  int End(PHCompositeNode *topNode) override;
56 
58  //int Reset(PHCompositeNode * /*topNode*/) override;
59 
60  //void Print(const std::string &what = "ALL") const override;
61  //void setHistoFileName(const std::string &what = "./outputfile.root");
62 
63  protected:
64  Fun4AllHistoManager *hm = nullptr;
66 
67  static const int layercount = 16;
68  static const int layeroffset = 7 + 16;
69  int _ievent = 0;
70  //TrkrHitSetContainer *m_hits = nullptr;
71  //TrkrHitSet *m_hitset;
72  //TrkrHit *m_hit = nullptr;
73 
74  // RawHitSetContainer *m_rawhits __attribute__ ((unused)) = nullptr;
75 
76  //TpcMap M;
77  TNtuple *h_Alive = nullptr;
78  CDBTTree *m_cdbttree = nullptr;
79  CDBInterface *m_cdb = nullptr;
80 
81  struct ped_tpc_map
82  {
83  unsigned int CHN_ID;
84  unsigned int FEE_ID;
85  unsigned int MOD_ID;
86  double PedMean;
87  double PedStdi;
88  unsigned int SEC_ID;
89  };
90 
91  //std::map<unsigned int, struct ped_tpc_map> tmap;
92 
96 
97  private:
98  int m_Debug = 0;
99  //TH3* _h_hit_XYT = nullptr;
100  //TH3* _h_hit_PT_ADCcut = nullptr;
101  TH2* _h_hit_XY = nullptr;
102  TH2* _h_hit_XY_ADCcut = nullptr;
103 
104 };
105 
106 #endif // TPC_RAWDATADECODER_H