Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:10

0001 #ifndef __ATRACE_H__
0002 #define __ATRACE_H__
0003 
0004 //
0005 //  Hello ATrace Fans,
0006 //       
0007 //      This class will represent a trace from the (ADC) Oscilloscope. 
0008 //  In the initial implementation, it will hold the timebins of the ADC.
0009 //  It will have the methods of finding its maximum (averaged over +/- n
0010 //  channels). 
0011 //                                                      ~TKH and MAB
0012 
0013 #include <vector>
0014 
0015 class TF1;
0016 class TH1D;
0017 
0018 class ATrace
0019 {
0020  public:
0021   
0022   ATrace();
0023   ~ATrace();
0024 
0025   std::vector<double> voltage;
0026 
0027   double FindMaximum(int n);  
0028   int    FindMaximumMiddle(int n);  
0029   void   FitLeftEdge();
0030   double PulseHeight(){return height;}
0031   double PulseTime(){return time;}
0032   double GetW() {return W;}
0033   double GetdW() {return dW;}
0034   int    NAboveThreshold( double thrup, double thrdown );
0035 
0036   double PulseWidth( double thrup, double thrdown );
0037 
0038   void MakeTrace(int sign=-1);
0039 
0040   static bool FastFits;
0041   static double SingleEmean;
0042   static double SingleEsigma;
0043   static double DoubleEmean;
0044   static double DoubleEsigma;
0045 
0046 
0047  protected:
0048   
0049   static int numtraces;
0050   int mytrace;
0051 
0052   double height;
0053   double time;
0054   double W;
0055   double dW;
0056   TH1D* trace;
0057   TF1* fermi;
0058 
0059   char fcn_name[500];
0060   char hst_name[500];
0061   
0062 };
0063 
0064 #endif /* __ATRACE_H__ */