AEvent.h 1.2 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
/*
 * 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;
39 40
	Double_t fAmpCFD[NCELLS];	//array for CFD amplitudes (attenuated, inversed and delayed)
	Double_t fCFD;			//zero-crossing time
41 42

	TGraph *gSignal;
43
	TGraph *gCFD;
44 45 46 47 48

	RawEvent *fInputEvent;		//!

public:
	AEvent();
49 50
	virtual ~AEvent();
	ClassDef(AEvent,1);
51 52 53 54 55 56 57 58 59

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

	TGraph* GetGraph() {
60 61
		return gCFD;
	//	return gSignal;
62 63 64 65
	}

private:
	void Init();
66
	void SetGraphs();
67
	void SetCFD(/*Double_t c = 0.5, Int_t td = 5*/);
68 69 70
};

#endif /* DATACLASSES_AEVENT_H_ */