// Author: Andrea Palaia 24/08/09 #include #include "Riostream.h" #include "TVectorD.h" #include "TGraph.h" #include "TAxis.h" #include "TCanvas.h" #include "TMath.h" #include "Waveform.h" Int_t index(TVectorD v, Double_t val) { Int_t index = 0; Int_t size = v.GetNoElements(); for (Int_t i=0; iSetLineColor(color); gr1->SetLineWidth(2); gr1->GetXaxis()->SetTitle("s"); gr1->Draw(opt.Data()); } //______________________________________________________________________________ Double_t Waveform::GetMax() { // Gets the maximum value of the spectrum. return wave.Max(); } //______________________________________________________________________________ Double_t Waveform::Integral() { Double_t integral = 0; Int_t size = wave.GetNoElements(); for(Int_t j=0;jval) index = j; if(falling_edge&&wave(j)>=val&&wave(j+1)10) { flag = true; break; } else counter = 0; } return flag; } //______________________________________________________________________________ Bool_t Waveform::IsNoise() { Bool_t flag = false; if(Integral()*GetSampleFreq()<1) flag = true; return flag; } //______________________________________________________________________________ void Waveform::Shift(Int_t points) { }