4 #include "KVChargeSignal.h"
63 if (
fType.Contains(
"QL")) {
411 if (!window)
return 0;
413 TGraph* gmoy =
new TGraph();
414 TGraph* grms =
new TGraph();
416 bidim =
new TGraph();
418 Int_t nsamples = GetN() / width;
420 printf(
"npoints=%d - nsamples=%d - width=%d\n", GetN(), nsamples, width);
422 Double_t rms_max = 0;
424 for (Int_t ii = 0; ii < nsamples; ii += 1) {
427 for (Int_t nn = 0; nn < width; nn += 1) {
428 GetPoint(width * ii + nn, xx, yy);
429 if (nn == 0) xinf = xx;
432 Double_t xmoy = xinf;
433 Double_t rms = h2->GetRMS();
434 Double_t mean = h2->GetMean();
435 printf(
"%d %lf %lf %lf\n", ii, xmoy, rms, mean);
436 gmoy->SetPoint(ii, xmoy, mean);
437 grms->SetPoint(ii, xmoy, rms);
438 bidim->SetPoint(ii, mean, rms);
441 rms_max = h2->GetRMS();
446 Int_t ideb = irms_max;
447 Double_t ybefore = rms_max;
448 Double_t yafter = -1;
449 Int_t iparcours = ideb - 1;
451 grms->GetPoint(iparcours, xx, yafter);
452 while (yafter < ybefore) {
455 grms->GetPoint(iparcours, xx, yafter);
457 Double_t xgauche = 0;
458 grms->GetPoint(iparcours + 1, xgauche, yy);
461 gmoy->GetPoint(iparcours + 1, xx, ybas);
465 iparcours = ideb + 1;
467 grms->GetPoint(iparcours, xx, yafter);
468 while (yafter < ybefore) {
471 grms->GetPoint(iparcours, xx, yafter);
473 Double_t xdroite = 0;
474 grms->GetPoint(iparcours - 1, xdroite, yy);
477 gmoy->GetPoint(iparcours - 1, xx, yhaut);
KVChargeSignal()
Default constructor.
virtual ~KVChargeSignal()
Destructor.
Double_t GetMaxFluctuationsWindow(Double_t *window, Int_t width=10)
virtual void LoadPSAParameters()
virtual void SetDefaultValues()
void Copy(TObject &obj) const
void SetTauRC(Int_t taurc)
TString fType
string to identify the signal type : "QH1", "I2" etc ...
void Copy(TObject &obj) const
Double_t GetAmplitude() const
void SetPoleZeroCorrection(Bool_t with=kTRUE)
void SetBaseLineLength(Int_t length, Int_t first=0)
void SetTrapShaperParameters(Double_t rise, Double_t flat)
void SetType(const Char_t *type)
void SetChannelWidth(double width)