AEvent.h 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * AEvent.h
 *
 *  Created on: Dec 28, 2016
 *      Author: daria
 */

#ifndef DATACLASSES_AEVENT_H_
#define DATACLASSES_AEVENT_H_

#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>

#include "TError.h"
#include "TString.h"
#include "TTree.h"
#include "TFile.h"
//#include "TMath.h"


#include "RawEvent.h"

25
//#define NCELLS 1024
26 27 28 29 30 31 32 33 34

using std::cout;
using std::endl;

class AEvent {

private:

	const Int_t fNPoints;	//!
35 36 37
	TArrayD fAmpPos;	//array for raw amplitudes
	TArrayD fTime;		//array for raw times

38 39
	Double_t fAmpMax;
	Double_t fTimeAmpMax;
40 41

	TArrayD fAmpCFD;	//array for CFD amplitudes (attenuated, inversed and delayed)
42
	Double_t fCFD;			//zero-crossing time
43 44

	TGraph *gSignal;
45
	TGraph *gCFD;
46 47 48 49 50

	RawEvent *fInputEvent;		//!

public:
	AEvent();
51
	AEvent(const Int_t npoints);
52 53
	virtual ~AEvent();
	ClassDef(AEvent,1);
54 55 56 57 58 59 60 61 62

	void SetRawDataFile(const char* inprawfile, const char* treename);
	void ProcessEvent();
//	void Integral()
	void SetInputEvent(RawEvent** event);
	void Reset();
	 //Resets arrays to zeros

	TGraph* GetGraph() {
63 64
		return gCFD;
	//	return gSignal;
65 66 67 68
	}

private:
	void Init();
69
	void SetGraphs();
70
	void SetCFD(/*Double_t c = 0.5, Int_t td = 5*/);
71 72 73
};

#endif /* DATACLASSES_AEVENT_H_ */