Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hcal.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file hcal.h
1 #ifndef __HCAL_H__
2 #define __HCAL_H__
3 #include <TString.h>
4 #include <Event/fileEventiterator.h>
5 #include <Event/Event.h>
6 #include <map>
7 #include <vector>
8 class TFile;
9 class TTree;
10 class TString;
11 class TGraph;
12 class TCanvas;
13 class TH1F;
14 class TH2F;
15 class TF1;
16 
17 class hcal
18 {
19  public:
20  hcal();
21  ~hcal(){;}
22  void Initialize();
23  int evLoop(int nevt);
24  int GetNextEvent();
25  int collect(int);
26  void setPrdf(TString & fin)
27  { prdfName = fin; }
28  void setPrdflist(TString &fin);
29  void set_display(bool b)
30  { display = b; }
31  void Display();
32  int Clear();
33 
34  void SetCableMap(int _nch, int *_index)
35  { NCH = _nch;
36  channel_index.assign( _index, _index+_nch+1); }
37 
38  TGraph* getSignal(int ch)
39  { return gpulse[ch]; }
40  static double SignalShape(double *x, double *par);
41  static double SignalShapeNegative(double *x, double *par);
42  void fitShape(int);
43  void Save(char*);
45  { polarity_positive = b; }
46  void set_verbosity(bool b)
47  { verbosity = b; }
48  void set_plot_max(float max)
49  { plot_max = max; }
50  void set_plot_min(float min)
51  { plot_min = min; }
52  void FitDisplay();
53  public:
54  int runnumber;
55  int nevents;
56  TString prdfName;
57  int NCH;
58  int NSAMPLES;
59  int PEDESTAL;
60  bool display;
63  TGraph *gpulse[100]; //Signal
64  std::vector<int> channel_index;
65  TF1 *fits[100];
67  TH2F *h2_fit_shape[100];
68  TH1F *h_PulsePeaks[100];
69  TH1F *h_PulseInt[100];
70  TH2F *h2_Pulse_H_Int[100];
71  TH2F *h_hilo[100];
72  TH1F *h_gain[100];
73  TH1F *h_tres[100];
74  TH1F *h_ped_res[100];
76  TH1F *h_info;
77  TGraph *rate;
78  TCanvas *c;
79  float plot_max;
80  float plot_min;
81  TFile *fout;
82  bool polarity_positive; //default yes
83  bool verbosity;
84  std::map<int,float> saturation_map;
85 };
86 
87 #endif