29 #include "TLinearFitter.h"
63 if (plane != NULL )plane->
print();
71 std::cout <<
" Processing Event " <<
nEvents<< std::endl;
75 TLinearFitter* fFitCh =
new TLinearFitter(1,
"pol2",
"D");
78 for(Int_t ndet=0;ndet<2;ndet++) {
82 if(
gHarpoDebug>1) Info(
"process",
"Processing detector %d", ndet);
84 std::cout <<
"Event " <<
nEvents <<
", detector " << ndet <<
" " << m << std::endl;
86 Warning(
"process",
"Event %ld, No Data Map for plane %d",
nEvents, ndet);
90 for(Int_t i=0;i<
NADC;i++){
99 Info(
"process",
"Data ZERO SUPPRESSED (%d)",Qnoise);
103 if(
gHarpoDebug>2) Info(
"process",
"Data FULL (%d)",Qnoise);
104 for(Int_t i=0;i<
NADC;i++){
105 TArrayD* valuesTB =
new TArrayD(
NALL);
106 for(Int_t j=0;j<
NALL;j++){
108 valuesTB->AddAt(q,j);
110 Double_t noiseTB =
TruncMean(valuesTB,0.16,0.84);
111 TGraph* gMinusCh =
new TGraph();
112 for(Int_t j=0;j<
NALL;j++){
116 gMinusCh->SetPoint(gMinusCh->GetN(),j,q);
118 fFitCh->AssignData(gMinusCh->GetN(), 1, gMinusCh->GetX(), gMinusCh->GetY());
121 Double_t mean = 0, rms = 0;
123 for(Int_t j=0;j<
NALL;j++){
125 q -= fFitCh->GetParameter(0) + j*fFitCh->GetParameter(1) + j*j*fFitCh->GetParameter(2);
133 rms = TMath::Sqrt(rms/nnoise - mean*mean/nnoise/nnoise);
134 for(Int_t j=0;j<
NALL;j++){
160 Info(
"Constructor",
"Use default Noise Cut %g",
fNoiseCut);
163 Info(
"Constructor",
"Use Noise Cut %g",
fNoiseCut);
184 Int_t size = vect->GetSize();
185 Double_t truncMean = 0;
186 Int_t* index =
new Int_t[size];
187 TMath::Sort(size,vect->GetArray(),index,kFALSE);
188 Int_t t = 0, tLow, tHigh;
192 while(vect->At(index[t])==-1000&&t<size-1) t++;
193 tLow = TMath::FloorNint(t + (size - t)*tl);
194 tHigh = TMath::FloorNint(t + (size - t)*th);
196 for(Int_t tind = tLow; tind<tHigh; tind++) truncMean += vect->At(index[tind]);
199 return truncMean/(tHigh-tLow);
Double_t GetRawData(Int_t i, Int_t j)
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
void SetData(Int_t i, Int_t j, Double_t val)
Int_t isZS
Redefine empty default.
Double_t TruncMean(TArrayD *vect, Double_t tl, Double_t th)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
HarpoEventHeader * GetHeader()
void Save(char *mode=NULL)
const ULong_t gkNDetectors
HarpoAnalyseNoiseSuppression()
Suppresses baseline fluctuations in non-zerosuppressed data.
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
void SetRawData(Int_t i, Int_t j, Double_t val)
R__EXTERN HarpoDetSet * gHDetSet
void print()
Overload, method which do all job.