AEvent.h 1.02 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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/*
 * 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"

#define NCELLS 1024

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

class AEvent {

private:

	const Int_t fNPoints;	//!
	Double_t fAmpPos[NCELLS];	//array for raw amplitudes
	Double_t fTime[NCELLS];		//array for raw times
	Double_t fAmpMax;
	Double_t fTimeAmpMax;

	TGraph *gSignal;
41
	TGraph *gCFD;
42 43 44 45 46

	RawEvent *fInputEvent;		//!

public:
	AEvent();
47 48
	virtual ~AEvent();
	ClassDef(AEvent,1);
49 50 51 52 53 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() {
		return gSignal;
	}

private:
	void Init();
63 64
	void SetGraphs();
	void SetCFD();
65 66 67
};

#endif /* DATACLASSES_AEVENT_H_ */