StRoot
1

#include <PeakWindow.h>
Public Member Functions  
PeakWindow ()  
Default Constructor. More...  
PeakWindow (Double_t start, Double_t end)  
Construct with known start and end points, peak gets set to imposible values.  
PeakWindow (const PeakWindow &oldpeak)  
Copy Constructor.  
PeakWindow &  operator= (const PeakWindow &rhs) 
Assignment operator.  
virtual  ~PeakWindow () 
Destructor.  
virtual void  Copy (TObject &obj) const 
Only copies variables, to copy TLines use Clone()  
virtual TObject *  Clone (const char *newname="") const 
Clone whole object, name is irrelevant.  
void  SetWindow (Double_t s, Double_t e) 
void  GetWindow (Double_t &s, Double_t &e) const 
void  SetPeak (TGraph *gdata) 
sets mPeakX based on mP_Peak using line of slopes from points (mP_Peak1,mP_Peak) and (mP_Peak,mP_Peak+1) More...  
virtual void  Combine (const PeakWindow &other, bool keepthis=true) 
merges one PeakWindow into another More...  
virtual UShort_t  CompareTo (const PeakWindow &other) const 
compare two PeakWindow objects More...  
Double_t  StartEndLineSlope () const 
Computes the slope of the line formed by the points (mStartX,mStartY) and (mEndX,mEndY)  
Double_t  StartEndSlopeUncertainty (Double_t sigma) const 
Uncertainty int the slope of the line formed by the points (mStartX,mStartY) and (mEndX,mEndY)  
Double_t  StartEndLineYint () const 
Computes the yintercept of the line formed by the points (mStartX,mStartY) and (mEndX,mEndY)  
Double_t  MidPoint (TGraph *graph=0) const 
Computes the the line formed by the points (mStartX,mStartY) and (mEndX,mEndY) and evaluates that line at mPeakX. More...  
virtual Double_t  SlopeChirality (Double_t scale) const 
virtual Double_t  PeakChirality (Double_t slopescale, Double_t peakscale) const 
virtual Double_t  PeakChiralityProb (Double_t probscale, Double_t chirality) const 
virtual Double_t  PeakChiralityProb (Double_t probscale, Double_t peakscale, Double_t chirscale) const 
virtual Double_t  PeakTunnelProb (TGraph *graph, Double_t scale=1.0, Double_t sigma=1.0) const 
Compute probablity that a given PeakWindow is a real peak. More...  
virtual void  Reset (Double_t start, Double_t end) 
Reset PeakWindow to constructor state.  
virtual void  Print (Option_t *opt="") const 
Prints information about PeakWindow.  
virtual void  Draw (Option_t *opt="") 
Draw the PeakWindow. More...  
virtual void  Paint (Option_t *opt="") 
paint method see Draw() for options  
TLine *  GetStartLine (Double_t ymin=0, Double_t ymax=0) 
Create and return a TLine for the start of the peak window.  
Color_t  GetStartLineColor () const 
Style_t  GetStartLineStyle () const 
Width_t  GetStartLineWidth () const 
void  SetStartLineColor (Color_t color) 
void  SetStartLineColorAlpha (Color_t color, Float_t alpha) 
void  SetStartLineStyle (Style_t style) 
void  SetStartLineWidth (Width_t width) 
TMarker *  GetPeakMarker () 
Create and return a TMarker to mark the location of the peak.  
Color_t  GetPeakMarkerColor () const 
Style_t  GetPeakMarkerStyle () const 
Size_t  GetPeakMarkerSize () const 
void  SetPeakMarkerColor (Color_t color) 
void  SetPeakMarkerColorAlpha (Color_t color, Float_t alpha) 
void  SetPeakMarkerStyle (Style_t style) 
void  SetPeakMarkerSize (Size_t size) 
TLine *  GetEndLine (Double_t ymin=0, Double_t ymax=0) 
Create and return a TLine for the end of the peak window.  
Color_t  GetEndLineColor () const 
Style_t  GetEndLineStyle () const 
Width_t  GetEndLineWidth () const 
void  SetEndLineColor (Color_t color) 
void  SetEndLineColorAlpha (Color_t color, Float_t alpha) 
void  SetEndLineStyle (Style_t style) 
void  SetEndLineWidth (Width_t width) 
Static Public Member Functions  
static PeakWindow  Combine (const PeakWindow &leftpeak, const PeakWindow &rightpeak, bool keepleft=true) 
combine two PeakWindow objects More...  
Public Attributes  
Double_t  mStartX 
x value for start of the peak window  
Double_t  mEndX 
x value for end of the peak window  
Double_t  mStartY 
y value associated with mStartX  
Double_t  mEndY 
y value associated with mEndX  
Int_t  mP_Peak 
Point Number of peak in a TGraph object (P for point), point is such that slope with previous point will be positive and next point will be negative.  
Double_t  mPeakX 
xvalue of peak position as determined by SetPeak()  
Double_t  mPeakY 
yvalue at mP_Peak  
Protected Member Functions  
ClassDef (PeakWindow, 3)  
Protected Attributes  
TLine *  mStartLine 
TLine for drawing the start of the peak window.  
TMarker *  mPeakMarker 
TMarker for drawing the peak location.  
TLine *  mEndLine 
TLine for drawing the end of the peak window.  
Data class to hold properties of a found peak like the peak position and its start and end points. Mostly used as a helper class for PeakAna.
A "peak window" consists of 3 points: where a peak starts (first positive slope after negative slopes leading up to peak), where it plateaus (slope is zero i.e. the peak position), and where the peak ends (last negative slope before changing to positive slopes)
Definition at line 55 of file PeakWindow.h.
PeakWindow::PeakWindow  (  ) 

static 
combine two PeakWindow objects
leftpeak  one of the peaks to be combined and assumed to have the lower xvalue 
rightpeak  one of the peaks to be combined and assumed to have the higher xvalue 
keepleft  boolean to determine which peak position should be kept in the combined peak, true means "leftpeak", false means "rightpeak" 
Definition at line 156 of file PeakWindow.cxx.
References mEndX, mEndY, mP_Peak, mPeakX, mPeakY, mStartX, and mStartY.
Referenced by PeakAna::GetPossiblePeaks().

virtual 
merges one PeakWindow into another
Changes "this" peak to include the "other" peak.
other  PeakWindow to merge with this one 
keepthis  true means keep "this" peak's position, false means keep "other" peak's position 
Definition at line 137 of file PeakWindow.cxx.
References mEndX, mEndY, mP_Peak, mPeakX, mPeakY, mStartX, and mStartY.

virtual 
compare two PeakWindow objects
Compares two PeakWindow's and returns a value based on how different they are
Definition at line 271 of file PeakWindow.cxx.
References mEndX, mEndY, mP_Peak, mPeakX, mPeakY, mStartX, and mStartY.

virtual 
Draw the PeakWindow.
opt  options for drawing:

Definition at line 288 of file PeakWindow.cxx.
void PeakWindow::GetWindow  (  Double_t &  s, 
Double_t &  e  
)  const 
s  get xvalue for start of peak 
e  get xvalue for end of peak 
Definition at line 76 of file PeakWindow.cxx.
Double_t PeakWindow::MidPoint  (  TGraph *  graph = 0  )  const 
Computes the the line formed by the points (mStartX,mStartY) and (mEndX,mEndY) and evaluates that line at mPeakX.
The function is mostly needed in computing the probablity for peak tunneling since the difference of MidPoint() and mPeakY is used in the probability formula.
Definition at line 194 of file PeakWindow.cxx.
References mEndX, mEndY, mP_Peak, mPeakX, mStartX, and mStartY.
Referenced by PeakAna::ConvertPeaksToAna().

virtual 
Compute probablity that a given PeakWindow is a real peak.
or 1 if PeakHeightDiff<=0
Erfc = complimentary error function
StartEndDiff = mEndXmStartX
PeakHeightDiff = mPeakY  MidPoint()
This function will work even if SetPeak() is not called since it requires a TGraph and will read the values from there
graph  TGraph of data points 
scale  StartEndDiff scale in formula of probability 
sigma  sigma of Erfc to use in formula of probability 
Definition at line 247 of file PeakWindow.cxx.
References mEndX, mEndY, mP_Peak, mStartX, and mStartY.
Referenced by PeakAna::GetPossiblePeaks(), StFcsPulseAna::MergeByProbability(), PeakAna::PeakProb(), and PeakAna::PeakTunnel().
void PeakWindow::SetPeak  (  TGraph *  gdata  ) 
sets mPeakX based on mP_Peak using line of slopes from points (mP_Peak1,mP_Peak) and (mP_Peak,mP_Peak+1)
This function is used to set mPeakX to a value from the left and right slopes of mP_Peak to correct for any discretization coming from points on a graph. Requires mP_Peak has been set correctly
gdata  TGraph where data is stored 
Definition at line 112 of file PeakWindow.cxx.
References mP_Peak, mPeakX, and mPeakY.
Referenced by PeakAna::GetPossiblePeaks().
void PeakWindow::SetWindow  (  Double_t  s, 
Double_t  e  
) 
s  set xvalue for start of peak 
e  set xvalue for end of peak 
Definition at line 70 of file PeakWindow.cxx.
References mEndX, and mStartX.
Referenced by StFcsPulseAna::AnalyzeForPeak(), PeakAna::AnalyzeForPeak(), PeakAna::Init(), PeakAna::SetSearchWindow(), and PeakAna::SetWindow().