All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CrtCalTree.h
Go to the documentation of this file.
1 #ifndef CRTCALTREE_H
2 #define CRTCALTREE_H
3 
4 #include <TDirectory.h>
5 #include <TBranch.h>
6 #include <TTree.h>
7 #include <TFile.h>
8 
9 #include <map>
10 #include <string>
11 #include <iostream>
12 #include <vector>
13 
14 using std::map;
15 using std::string;
16 using std::vector;
17 
18 namespace icarus{
19  namespace crt {
20  class CrtCalTree;
21  }
22 }
23 
25 
26 
27  public:
28 
29  CrtCalTree(TTree* tree);
30  CrtCalTree(string fname);
31  ~CrtCalTree();
32 
33  float GetGain(uint8_t mac, uint8_t channel);
34  float GetPed(uint8_t mac, uint8_t channel);
35  bool GetActive(uint8_t mac, uint8_t channel);
36  vector<uint8_t> GetMacs();
37  float GetGainXsqr(uint8_t mac, uint8_t channel);
38  short GetGainNdf(uint8_t mac, uint8_t channel);
39  float GetGainErr(uint8_t mac, uint8_t channel);
40  float GetPedErr(uint8_t mac, uint8_t channel);
41  float GetPedXsqr(uint8_t mac, uint8_t channel);
42  short GetPedNdf(uint8_t mac, uint8_t channel);
43  float GetPedSigma(uint8_t mac, uint8_t channel);
44  float GetPedSigmaErr(uint8_t mac, uint8_t channel);
45 
46  void Dump();
47  private:
48  void Init();
49 
50  TTree* fTree;
51  std::map<std::pair<uint8_t,uint8_t>,float> fMacChanToGain;
52  std::map<std::pair<uint8_t,uint8_t>,float> fMacChanToPed;
53  std::map<std::pair<uint8_t,uint8_t>,bool> fMacChanToActive;
54  std::vector<uint8_t> fMacs;
55  std::map<uint8_t,int> fMacToEntry;
56 
57  uint8_t mac5;
58  float gain[32];
59  float ped[32];
60  bool active[32];
61  float gainXsqr[32];
62  UShort_t gainNdf[32];
63  float gainErr[32];
64  float pedXsqr[32];
65  UShort_t pedNdf[32];
66  float pedErr[32];
67  float pedSigma[32];
68  float pedSigmaErr[32];
69 
70  TBranch* b_mac5;
71  TBranch* b_gain;
72  TBranch* b_ped;
73  TBranch* b_active;
74  TBranch* b_gainXsqr;
75  TBranch* b_gainNdf;
76  TBranch* b_gainErr;
77  TBranch* b_pedXsqr;
78  TBranch* b_pedNdf;
79  TBranch* b_pedErr;
80  TBranch* b_pedSigma;
81  TBranch* b_pedSigmaErr;
82 
83 
84 };
85 
86 #endif
bool GetActive(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:60
float GetPedErr(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:86
string fname
Definition: demo.py:5
UShort_t pedNdf[32]
Definition: CrtCalTree.h:65
std::map< uint8_t, int > fMacToEntry
Definition: CrtCalTree.h:55
float GetPed(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:56
float GetPedSigma(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:104
std::vector< uint8_t > fMacs
Definition: CrtCalTree.h:54
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
float GetPedSigmaErr(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:110
std::map< std::pair< uint8_t, uint8_t >, float > fMacChanToPed
Definition: CrtCalTree.h:52
UShort_t gainNdf[32]
Definition: CrtCalTree.h:62
short GetPedNdf(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:98
vector< uint8_t > GetMacs()
Definition: CrtCalTree.cxx:64
std::map< std::pair< uint8_t, uint8_t >, float > fMacChanToGain
Definition: CrtCalTree.h:51
std::map< std::pair< uint8_t, uint8_t >, bool > fMacChanToActive
Definition: CrtCalTree.h:53
float GetGain(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:52
CrtCalTree(TTree *tree)
Definition: CrtCalTree.cxx:8
float GetPedXsqr(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:92
process_name crt
float GetGainXsqr(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:68
float GetGainErr(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:80
short GetGainNdf(uint8_t mac, uint8_t channel)
Definition: CrtCalTree.cxx:74