Commit 0ca0b60d authored by Muzalevsky I.A's avatar Muzalevsky I.A

method for obtaining EdgeSlope and EdgeBorders added for class AEvent

parent 89696c5a
......@@ -74,7 +74,7 @@ void AEvent::ProcessEvent() {
fTimeAmpMax = maxAmpT;
SetGraphs();
FindFrontProperties();
SetCFD();
SetChargeCFD();
......@@ -90,6 +90,9 @@ void AEvent::Reset() {
fAmpCFD[i] = 0;
}
EdgeSlope=0.;
t_10=0.;
t_90=0.;
fAmpMax = 0.;
fTimeAmpMax = 0.;
fTimeCFD = 0.;
......@@ -176,7 +179,33 @@ void AEvent::SetCFD() {
}
}
}
/////// trying to create method
void AEvent::FindFrontProperties() {
if (!fGraphSignal) {
Warning("AEvent::FindZeroLevel", "Graph was not set");
return;
}
Int_t NumM = fTimeAmpMax*10;
for(Int_t i=NumM;i>0;i--)
{
if( fAmpPos[i]<0.1*fAmpMax ) {t_10 = fTime[i+1];break;}
}
for(Int_t i=NumM;i>0;i--)
{
if( fAmpPos[i]<0.9*fAmpMax ) {t_90 = fTime[i+1];break;}
}
TF1 *fit1 = new TF1("fit1","[1]*x+[0]"); //function for one parameter fitting in the range of pmin-pmax
fit1->SetRange(t_10,t_90);
fGraphSignal->Fit(fit1,"R","goff");
EdgeSlope = fit1->GetParameter(1);
delete fit1;
}
////////
Double_t AEvent::FindZeroLevel() {
SetGraphs();
......@@ -227,3 +256,15 @@ Double_t AEvent::GetOnefTime(Int_t i) {
Double_t AEvent::GetOnefAmpPos(Int_t i) {
return fAmpPos[i];
}
Double_t AEvent::GetT_10() {
return t_10;
}
Double_t AEvent::GetT_90() {
return t_90;
}
Double_t AEvent::GetEdgeSlope() {
return EdgeSlope;
}
......@@ -39,6 +39,9 @@ private:
Double_t fAmpMax;
Double_t fTimeAmpMax;
Double_t fZeroLevel;
Double_t EdgeSlope;
Double_t t_10;
Double_t t_90;
TArrayD fAmpCFD; //array for CFD amplitudes (attenuated, inversed and delayed)
Double_t fTimeCFD; //zero-crossing time
......@@ -60,6 +63,10 @@ public:
AEvent(const Int_t npoints);
virtual ~AEvent();
ClassDef(AEvent,1);
Double_t GetT_10();
Double_t GetT_90();
Double_t GetEdgeSlope();
Double_t GetfCFD();
Double_t GetOnefTime(Int_t i);
Double_t GetOnefAmpPos(Int_t i);
......@@ -91,6 +98,8 @@ public:
}
//draws signal shape graphs
void FindFrontProperties();
Double_t FindZeroLevel();
//for zero level correction. one parameter fit between pmin and pmax
//returns fit parameter i.e. number on which amplitude should be corrected
......
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