Commit 76a5422f authored by Kostyleva D.A's avatar Kostyleva D.A

Number of points for smoothing are added in analyse.cpp

parent 882d69e4
......@@ -19,7 +19,7 @@ int main(int argc, char* argv[])
const Double_t cfTD = 1.5; //in ns
Double_t noiseMin = 5;
Double_t noiseMax = 25;
Int_t nump = 5; //number of points for smoothing
......@@ -79,6 +79,7 @@ int main(int argc, char* argv[])
wevent[j]->SetCFratio(cfRatio);
wevent[j]->SetCFtimeDelay(cfTD);
wevent[j]->SetNoiseRange(noiseMin, noiseMax);
wevent[j]->SetSmoothPoints(nump);
tw->Bronch(bName.Data(), "AEvent", &wevent[j]); // create branches in atree to hold analyzed data
}
//----event loop in tr input tree
......
......@@ -131,10 +131,10 @@ void AEvent::SmoothGraphs() {
//smoothing graph
fGraphSmooth->Set(fNPoints - 4);
fGraphSmooth->Set(fNPoints - fWinSize/2);
Int_t winSize = 5; //number of smoothing points
Int_t winMidSize = winSize / 2;
//Int_t winSize = 5; //number of smoothing points
Int_t winMidSize = fWinSize / 2;
Double_t tmin, tmax, meanTime, meanAmp;
for(Int_t i = winMidSize; i < fNPoints - winMidSize; ++i) {
......@@ -151,7 +151,7 @@ void AEvent::SmoothGraphs() {
meanTime = (tmax - tmin)*0.5 + tmin;
//cout<<"mean time "<<meant<<endl;
meanAmp = mean / winSize;
meanAmp = mean / fWinSize;
//cout<<"mean amp "<<fAmpPos[i]<<endl;
fGraphSmooth->SetPoint(i, meanTime, meanAmp);
......
......@@ -65,6 +65,7 @@ private:
Double_t fNoiseRangeMin; //!
Double_t fNoiseRangeMax; //!
Int_t fWinSize; //!
public:
AEvent();
......@@ -103,6 +104,9 @@ public:
void SetNoiseRange(Double_t min, Double_t max) { fNoiseRangeMin = min; fNoiseRangeMax = max; };
//Set noise range to be used in FindZeroLevel()
void SetSmoothPoints(Int_t numofp) {fWinSize = numofp; };
//set number of smoothing points
void Reset();
//Resets arrays to zeros
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment