TAPDPulse

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
#ifndef TAPDPulse_H
#define TAPDPulse_H

#include "TObject.h"
#include <vector>

class TAPDPulse : public TObject {
private:
  int _nsamples;
  int _presample;
  int _firstsample;
  int _lastsample;
  int _timingcutlow;
  int _timingcuthigh;
  int _timingquallow;
  int _timingqualhigh;
  double _ratiomaxcutlow;
  double _ratiomincutlow;
  double _ratiomincuthigh;

  double* adc_;
  bool isMaxFound_;
  bool isPedCalc_;
  double adcMax_;
  int iadcMax_;
  double pedestal_;

  void init(int, int, int, int, int, int, int, int, double, double, double);

public:
  // Default Constructor, mainly for Root
  TAPDPulse();

  // Constructor
  TAPDPulse(int, int, int, int, int, int, int, int, double, double, double);

  // Destructor: Does nothing
  ~TAPDPulse() override;

  bool setPulse(double*);
  double getMax();
  int getMaxSample();
  double getDelta(int, int);
  double getRatio(int, int);
  bool isTimingOK();
  bool isTimingQualOK();
  bool areFitSamplesOK();
  bool isPulseOK();
  bool arePulseRatioOK();
  bool isPulseRatioMaxOK();
  bool isPulseRatioMinOK();
  double getPedestal();
  double* getAdcWithoutPedestal();
  void setPresamples(int);
  ClassDefOverride(TAPDPulse, 0)
};

#endif