File indexing completed on 2024-04-06 11:57:47
0001 #ifndef TShapeAnalysis_H
0002 #define TShapeAnalysis_H
0003
0004 #include "TObject.h"
0005 #include <vector>
0006 class TTree;
0007
0008 class TShapeAnalysis : public TObject {
0009 public:
0010 static constexpr int fNchsel = 1700;
0011
0012 private:
0013 char filename[80];
0014 long int timestart, timestop;
0015 int index[fNchsel], npass[fNchsel];
0016 int nsamplecristal, sampbmax, sampamax, nevt;
0017 int presample;
0018 double noise;
0019 double alpha0, beta0;
0020 double alpha_val[fNchsel], beta_val[fNchsel], width_val[fNchsel], chi2_val[fNchsel];
0021 int flag_val[fNchsel];
0022 double alpha_init[fNchsel], beta_init[fNchsel], width_init[fNchsel], chi2_init[fNchsel];
0023 int flag_init[fNchsel], eta_init[fNchsel], phi_init[fNchsel];
0024
0025 int dcc_init[fNchsel], tower_init[fNchsel], ch_init[fNchsel], side_init[fNchsel];
0026
0027 double rawsglu[fNchsel][200][10];
0028 double npassok[fNchsel];
0029
0030 TTree *tABinit;
0031 TTree *tABout;
0032
0033 double chi2cut;
0034 int nchsel;
0035
0036 void init(double, double, double, double);
0037 void init(TTree *tAB, double, double, double, double);
0038
0039 public:
0040
0041 TShapeAnalysis(double, double, double, double);
0042
0043 TShapeAnalysis(TTree *tAB, double, double, double, double);
0044
0045
0046 ~TShapeAnalysis() override;
0047
0048 void set_const(int, int, int, int, int, double, double);
0049 void set_presample(int);
0050 void set_nch(int);
0051 void assignChannel(int, int);
0052 void putDateStart(long int);
0053 void putDateStop(long int);
0054 void getDateStart();
0055 void getDateStop();
0056 void putAllVals(int, double *, int, int);
0057 void putAllVals(int, double *, int, int, int, int, int, int);
0058 void putalphaVal(int, double);
0059 void putbetaVal(int, double);
0060 void putwidthVal(int, double);
0061 void putchi2Val(int, double);
0062 void putflagVal(int, int);
0063 void putalphaInit(int, double);
0064 void putbetaInit(int, double);
0065 void putwidthInit(int, double);
0066 void putchi2Init(int, double);
0067 void putflagInit(int, int);
0068 void putetaInit(int, int);
0069 void putphiInit(int, int);
0070 void computeShape(std::string namefile, TTree *);
0071 void computetmaxVal(int, double *);
0072 void printshapeData(int);
0073 std::vector<double> getVals(int);
0074 std::vector<double> getInitVals(int);
0075
0076 ClassDefOverride(TShapeAnalysis, 0)
0077 };
0078
0079 #endif