Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ATrace.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ATrace.h
1 #ifndef __ATRACE_H__
2 #define __ATRACE_H__
3 
4 //
5 // Hello ATrace Fans,
6 //
7 // This class will represent a trace from the (ADC) Oscilloscope.
8 // In the initial implementation, it will hold the timebins of the ADC.
9 // It will have the methods of finding its maximum (averaged over +/- n
10 // channels).
11 // ~TKH and MAB
12 
13 #include <vector>
14 
15 class TF1;
16 class TH1D;
17 
18 class ATrace
19 {
20  public:
21 
22  ATrace();
23  ~ATrace();
24 
25  std::vector<double> voltage;
26 
27  double FindMaximum(int n);
28  int FindMaximumMiddle(int n);
29  void FitLeftEdge();
30  double PulseHeight(){return height;}
31  double PulseTime(){return time;}
32  double GetW() {return W;}
33  double GetdW() {return dW;}
34  int NAboveThreshold( double thrup, double thrdown );
35 
36  double PulseWidth( double thrup, double thrdown );
37 
38  void MakeTrace(int sign=-1);
39 
40  static bool FastFits;
41  static double SingleEmean;
42  static double SingleEsigma;
43  static double DoubleEmean;
44  static double DoubleEsigma;
45 
46 
47  protected:
48 
49  static int numtraces;
50  int mytrace;
51 
52  double height;
53  double time;
54  double W;
55  double dW;
56  TH1D* trace;
57  TF1* fermi;
58 
59  char fcn_name[500];
60  char hst_name[500];
61 
62 };
63 
64 #endif /* __ATRACE_H__ */