StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StFcsPulseAna Class Reference

#include <StFcsPulseAna.h>

Inheritance diagram for StFcsPulseAna:
PeakAna

Public Member Functions

 StFcsPulseAna ()
 Default constructor.
 
 StFcsPulseAna (std::string name)
 Constructor with name.
 
 StFcsPulseAna (TGraph *Sig, std::string name="StFcsPulseAna")
 Construct with a known TGraph.
 
 StFcsPulseAna (const StFcsPulseAna &old, const char *post_name="_copy", TGraph *graph=0)
 Copy Constructor can be called with a new graph and post-fix to the name.
 
StFcsPulseAnaoperator= (const StFcsPulseAna &rhs)
 Assignment operator.
 
virtual ~StFcsPulseAna ()
 Destructor.
 
virtual void Copy (TObject &obj) const
 Internal method use Clone instead.
 
virtual TObject * Clone (const char *newname) const
 Clones internal graph as opposed to just copying the pointer.
 
virtual Int_t AnalyzeForPeak ()
 Overwritten from PeakAna to process peak tunneling after finding all peaks.
 
virtual Int_t AnalyzeForPeak (Double_t peak, Double_t width)
 
virtual Int_t AnalyzeForNoisyPeak ()
 
virtual TGraphAsymmErrors * GetData () const
 Overwrite from PeakAna to type convert for StFcsWaveformFitMaker.
 
const char * GetName () const
 
std::string & Name ()
 
const std::string & Name () const
 
void setDbPulse (StFcsDbPulse *p)
 
void ResetFinder ()
 Resets all histograms and values.
 
void ResetBaseline ()
 Resets baseline values.
 
void ResetSum ()
 Only resets variables related to finding the sum.
 
Int_t Sum (Int_t Start, Int_t End)
 Add raw ADC within a given range and subtract the baseline.
 
Int_t SumWindow ()
 Sum the ADC in the peak defined by mFoundPeak and subtract the baseline.
 
Double_t GausFit (Int_t Start=0, Int_t End=0)
 Do a Gaussian fit on mFoundPeak and return the integral subtracted by the baseline.
 
void SignalMBPars (double &height, double &scale)
 Figure out the height and scale of a Maxwell-Boltzmann distribution that approximates the signal.
 
double SumMB ()
 Integral of an approximated Maxwell-Boltzmann distribution minus the baseline.
 
Double_t MBFit (Int_t Start=0, Int_t End=0)
 Fit a Maxwell-Boltzmann distribution to mFoundPeak and return the integral minus the baseline.
 
Double_t PulseFit (Int_t Start=0, Int_t End=0)
 Fit the pulse shape defined in StFcsDbPulse::multiPulseShape() to all peaks and return the integral of the found peak minus the baseline.
 
void SetFitPars (TF1 *&func, int start=-1, int end=-1)
 Set the parameters of an external TF1 function that has the form of StFcsDbPulse::multiPulseShape(), optionally only set fit paramaters for peaks from index start up to and including end.
 
void SetFitSignal (TF1 *func)
 
void SetBaselineFit (TF1 *func)
 
void SetZS ()
 Call this for ZS data which uses thresholds that are relevant for that. (like 0 baseline and 0.5 sigma so thereshold is at 2 since ZS is pedestal subtracted. Maybe even 0.3 so it is above one.
 
void AnalyzeForPedestal ()
 Analyze graph data to determine baseline internally.
 
TH1F * BaselineHist () const
 
TF1 * SignalFit (const char option='n')
 
TF1 * SignalFit () const
 
TF1 * BaselineFit () const
 
virtual StFcsPulseAnaDrawCopy (Option_t *opt="", const char *name_postfix="_copy", TGraph *graph=0) const
 Clone and draw, see PeakAna::Draw() for options.
 
virtual void Print (Option_t *opt="") const
 Print class variables. More...
 
virtual void MergeByProbability (std::vector< PeakWindow > &merged) const
 Overwritten from PeakAna::MergeByProbability() to change merge criteria.
 
- Public Member Functions inherited from PeakAna
 PeakAna ()
 Default constructor that always creates a new TGraph.
 
 PeakAna (int size, double *xvals, double *yvals)
 Constructor using array of x and y values with known size.
 
 PeakAna (TGraph *Sig)
 Constructor with a known TGraph.
 
 PeakAna (TH1 *hist)
 Constructor with a histogram, histogram gets converted to graph object.
 
 PeakAna (const PeakAna &OldAna, TGraph *graph=0)
 Copy constructor can be called with a new graph.
 
PeakAnaoperator= (const PeakAna &rhs)
 Assignment operator doesn't clone graph.
 
virtual ~PeakAna ()
 Destructor.
 
virtual void AddPeakStats (TPaveText *pave, const char *opt="")
 Add peak information to a "statistics" box. More...
 
void ConvertPeaksToGraph ()
 same as ConvertPeaksToGraph() but creates a new graph that replaces old one
 
PeakAna ConvertPeaksToAna ()
 same as ConvertPeaksToAna() but returns new PeakAna with same settings without modifying current one
 
virtual void GetPossiblePeaks ()
 Finds all possible Peaks in signal with some criteria. More...
 
virtual Int_t SearchForPeak (const std::vector< PeakWindow > &PossiblePeaks)
 searches a vector of PeakWindow's for a specific peak based on input search criteria More...
 
Int_t SearchForPeak (const std::vector< PeakWindow > &PossiblePeaks, const PeakWindow &search)
 same as SearchForPeak() but and set search criteria using PeakWindow
 
Int_t SearchForPeak (const std::vector< PeakWindow > &PossiblePeaks, Double_t peak, Double_t width)
 same as SearchForPeak() and set search window by peak location and width
 
virtual void MergeByChirality (std::vector< PeakWindow > &newpeaks) const
 
virtual short MergeLeftOrRight (UInt_t index) const
 
Double_t Baseline () const
 
Double_t BaselineSigma () const
 
Double_t BaselineSigmaScale () const
 
Double_t MinX () const
 
Double_t MinY () const
 
Double_t MaxX () const
 
Double_t MaxY () const
 
Double_t SearchPeak () const
 
Double_t SearchWidth () const
 
Double_t TunnelScale () const
 
Double_t TunnelSigma () const
 
Double_t TunnelThreshold () const
 
virtual void Draw (Option_t *opt="")
 Draw method for PeakAna. More...
 
virtual void Paint (Option_t *opt="")
 
PeakAnaPainterGetPainter (Option_t *opt="")
 
void ForceInternal ()
 
PeakAnaGausFilter (Int_t sizeavgs=0, bool copy=true)
 Apply a Gaussian filter to the data. More...
 
bool GoodWindow ()
 Check if found peak is inside mXRangeMin, mYRangeMin, mXRangeMax, mYRangeMax and has logical values.
 
UInt_t GetDebug () const
 
const PeakWindowGetPeak (UInt_t peakidx) const
 
PeakWindowGetPeak (UInt_t peakidx)
 
UInt_t GetFilter () const
 
Int_t GetFilterScale () const
 
Int_t FoundPeakIndex () const
 
virtual void GetXYMax (Double_t xmin, Double_t xmax)
 Finds and sets mMaxX and mMaxY.
 
Double_t MaxXval ()
 
Double_t MaxYval ()
 
PeakAnaMeanFilter (Int_t sizeavgs=0, bool copy=true)
 Apply a Mean filter to the data. More...
 
int NPeaks () const
 
bool ValidPeakIdx () const
 
Double_t PeakStart ()
 Found Signal starting x-value.
 
Double_t PeakEnd ()
 Found Signal ending x-value.
 
Double_t PeakX ()
 x-value of found signal peak
 
Double_t PeakY ()
 y-value of found signal peak
 
void PeakXY (Double_t &xval, Double_t &yval)
 get peak x, and y value directly by reference
 
bool PeakTunnel (const PeakWindow &window) const
 test whether a given peak satisifies peak tunnel parameters More...
 
Double_t PeakProb (const PeakWindow &window, Double_t scale, Double_t sigma) const
 compute a given PeakWindow probability using internal graph More...
 
void ResetPeak ()
 Resets values associated with peak finding.
 
void SetDebug (UInt_t level)
 
virtual void SetData (TGraph *graph)
 sets new data for PeakAna More...
 
virtual void SetData (TH1 *hist, UInt_t numavgs=1)
 sets new data for PeakAna using histogram object More...
 
void SetBaseline (Double_t base, Double_t sigma)
 
void SetBaselineSigmaScale (Double_t scale)
 
void SetContinuity (Double_t val)
 
void SetFilter (UInt_t filter, Int_t scale, Double_t sigma=0)
 Set the filter to use when peak finding. More...
 
void SetRange (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
 Sets the absolute range of the data. More...
 
void SetSearchWindow (Double_t peak, Double_t width)
 Sets peak search parameters. More...
 
void SetTunnelScale (Double_t value)
 
void SetTunnelSigma (Double_t value)
 
void SetTunnelPars (Double_t scale, Double_t sigma)
 
void SetTunnelThreshold (Double_t value)
 
Double_t ChiralityPeakScale () const
 
Double_t ChiralityScale () const
 
Double_t ChiralityProbScale () const
 
Double_t ChiralityThreshold () const
 
void SetChiralityPeakScale (Double_t v)
 
void SetChiralityScale (Double_t v)
 
void SetChiralityProbScale (Double_t v)
 
void SetChiralityThreshold (Double_t v)
 
void SetPeak (const Int_t peakpoint, const Double_t peakx)
 Overwrite peak location in #mFoundpeak. WARNING doesn't set start and end values nor overwrite mComputedIndex.
 
void SetWindow (const Int_t start, const Int_t end)
 Overwrite peak start and end values in mFoundPeak. WARNING doesn't set peak values nor overwrite mComputedIndex.
 
void SetWindow (PeakWindow window)
 Overwrite mFoundPeak with a different PeakWindow. WARNING doesn't overwrite mComputedIndex.
 
Color_t GetLineColor () const
 
Style_t GetLineStyle () const
 
Width_t GetLineWidth () const
 
Color_t GetFillColor () const
 
Style_t GetFillStyle () const
 
Color_t GetMarkerColor () const
 
Size_t GetMarkerSize () const
 
Style_t GetMarkerStyle () const
 
void SetLineColor (Color_t color)
 
void SetLineColorAlpha (Color_t color, Float_t alpha)
 
void SetLineStyle (Style_t style)
 
void SetLineWidth (Width_t width)
 
void SetFillColor (Color_t color)
 
void SetFillColorAlpha (Color_t color, Float_t alpha)
 
void SetFillStyle (Style_t style)
 
void SetMarkerColor (Color_t color=1)
 
void SetMarkerColorAlpha (Color_t color, Float_t alpha)
 
void SetMarkerSize (Size_t size=1)
 
void SetMarkerStyle (Style_t style=1)
 
Color_t GetBaseLineColor () const
 
Style_t GetBaseLineStyle () const
 
Width_t GetBaseLineWidth () const
 
Color_t GetHitLineColor () const
 
Style_t GetHitLineStyle () const
 
Width_t GetHitLineWidth () const
 
void SetBaseLineColor (Color_t color)
 
void SetBaseLineColorAlpha (Color_t color, Float_t alpha)
 
void SetBaseLineStyle (Style_t style)
 
void SetBaseLineWidth (Width_t width)
 
void SetHitLineColor (Color_t color)
 
void SetHitLineColorAlpha (Color_t color, Float_t alpha)
 
void SetHitLineStyle (Style_t style)
 
void SetHitLineWidth (Width_t width)
 
Color_t GetPeakLineColorS (UInt_t peakidx) const
 
Color_t GetPeakLineColorE (UInt_t peakidx) const
 
Style_t GetPeakStyleS (UInt_t peakidx) const
 
Style_t GetPeakStyleE (UInt_t peakidx) const
 
Width_t GetPeakWidthS (UInt_t peakidx) const
 
Width_t GetPeakWidthE (UInt_t peakidx) const
 
Color_t GetFoundPeakLineColorS () const
 
Color_t GetFoundPeakLineColorE () const
 
Style_t GetFoundPeakStyleS () const
 
Style_t GetFoundPeakStyleE () const
 
Width_t GetFoundPeakWidthS () const
 
Width_t GetFoundPeakWidthE () const
 
void SetFoundPeakLineColorS (Color_t s_color)
 
void SetFoundPeakLineColorE (Color_t e_color)
 
void SetFoundPeakLineColor (Color_t s_color, Color_t e_color)
 
void SetFoundPeakStyleS (Style_t s_style)
 
void SetFoundPeakStyleE (Style_t e_style)
 
void SetFoundPeakStyle (Style_t s_style, Style_t e_style)
 
void SetFoundPeakWidthS (Width_t s_width)
 
void SetFoundPeakWidthE (Width_t e_width)
 
void SetFoundPeakWidth (Width_t s_width, Width_t e_width)
 
void SetPeakLineColorS (UInt_t peakidx, Color_t s_color)
 
void SetPeakLineColorE (UInt_t peakidx, Color_t e_color)
 
void SetPeakLineColor (UInt_t peakidx, Color_t s_color, Color_t e_color)
 
void SetPeakLineColorAlphaS (UInt_t peakidx, Color_t s_color, Float_t s_alpha)
 
void SetPeakLineColorAlphaE (UInt_t peakidx, Color_t e_color, Float_t e_alpha)
 
void SetPeakLineColorAlpha (UInt_t peakidx, Color_t s_color, Float_t s_alpha, Color_t e_color, Float_t e_alpha)
 
void SetPeakLineStyleS (UInt_t peakidx, Style_t s_style)
 
void SetPeakLineStyleE (UInt_t peakidx, Style_t e_style)
 
void SetPeakLineStyle (UInt_t peakidx, Style_t s_style, Style_t e_style)
 
void SetPeakLineWidthS (UInt_t peakidx, Width_t s_width)
 
void SetPeakLineWidthE (UInt_t peakidx, Width_t e_width)
 
void SetPeakLineWidth (UInt_t peakidx, Width_t s_width, Width_t e_width)
 
void SetAllPeakLineColor (Color_t s_color, Color_t e_color)
 
void SetAllPeakLineStyle (Style_t s_style, Color_t e_style)
 
void SetAllPeakLineWidth (Width_t s_width, Width_t e_width)
 

Static Public Member Functions

static double MaxwellBoltzmannDist (double *x, double *p)
 Maxwell Boltzmann Distribution function.
 
static void GetMBPars (const double &xpeak, const double &xrise, const double &yh, const double &ped, double &height, double &scale)
 Get parameters for a Maxwell Boltzmann distribution from above based on the 4 const parameters.
 
static void FillAdc (TGraphAsymmErrors *g, unsigned short &counter, int Start, unsigned short *adcdata)
 Needed for SumDep0, et al. It basically fills in tb vs. adc sequentially so all timebins from a given start value have an adc.
 
static int SumDep0 (TGraphAsymmErrors *gdata, int Start, int ped=0)
 Test of sum method in DEP board.
 
static int SumDep0Mod (TGraphAsymmErrors *gdata, int Start, int ped=0)
 Test my modified sum method to DEP board.
 
- Static Public Member Functions inherited from PeakAna
static TGraph * ConvertHistToGraph (TH1 *graph, UInt_t numavgs=1)
 Converts a histogram to a graph. More...
 
static TGraph * ConvertPeaksToGraph (const std::vector< PeakWindow > &Peaks)
 Convert each peak position into a TGraph. More...
 
static PeakAna ConvertPeaksToAna (const PeakAna &Ana)
 same as ConvertPeaksToGraph() but returns a new PeakAna with same settings without modifying old one
 

Protected Member Functions

void Init ()
 Initialize everything to zero except signal and background histograms.
 
bool FindBaseline ()
 Does Gaussian fitting to mH1_Baseline to determine baseline.
 
- Protected Member Functions inherited from PeakAna
void Init ()
 Initialize internal varaibles.
 
virtual bool MergeLeft (Double_t leftchir, Double_t thischir, Double_t rightchir) const
 
virtual std::vector< std::pair
< int, int > > 
MergeIndices (std::vector< short > &vec) const
 

Protected Attributes

StFcsDbPulsemDbPulse
 Pointer to StFcsDbPulse.
 
TH1F * mH1_Baseline
 Histogram that holds projection of mG_Data for baseline determination.
 
TF1 * mF1_SignalFit
 Function to fit to the data.
 
TF1 * mF1_BaselineFit
 Gaussian function to fit to mH1_Baseline to determine baseline.
 
- Protected Attributes inherited from PeakAna
Int_t mComputedIndex
 Index in mPeaks where a peak was found. More...
 
std::vector< PeakWindowmPeaks
 vector that stores all the found peaks in the data
 
PeakWindow mFoundPeak
 Copy of found peak in mPeaks. More...
 
PeakWindow mSearch
 Variable that defines peak search parameters. More...
 
Double_t mBaseline
 Minimum threshold to search for a peak. More...
 
Double_t mBaselineSigma
 Error on PeakAna::mBaseline. More...
 
Double_t mBaselineSigmaScale
 scale on PeakAna::mBaselineSigma to determine final threshold More...
 
Double_t mMaxX
 x-value where global maximum occurs
 
Double_t mMaxY
 y-value of global maximum
 
Double_t mDeltaX
 graph known delta-x More...
 
TGraph * mG_Data
 TGraph that stores the x,y data. More...
 
Double_t mXRangeMin
 Absolute possible x-value minimum of data.
 
Double_t mXRangeMax
 Absolute possible x-value maximum of data.
 
Double_t mYRangeMin
 Absolute possible y-value minimum of data.
 
Double_t mYRangeMax
 Absolute possible y-value maximum of data.
 
Double_t mTunnelScale
 Scale on exponential for determining tunneling probability (default is 1) see #PeakWindow::PeakTunelProb()
 
Double_t mTunnelSigma
 Sigma for Gaussian for determining tunneling probability (default is 1) see #PeakWindow::PeakTunelProb()
 
Double_t mTunnelThreshold
 Cutoff probability for peak tunneling method. If threshold less than 0 (default) then skip peak tunnel method, see PeakTunnel()
 
Double_t mChiralityPeakScale
 
Double_t mChiralityScale
 
Double_t mChiralityProbScale
 
Double_t mChiralityThreshold
 
UInt_t mFilter
 Filter to use in AnalyzeForPeak() More...
 
Double_t * mFilterWeights
 Array of weights to use in filtering, size is 2*mFilterScale+1.
 
Int_t mFilterScale
 How many points to group together when applying filter.
 
PeakAnaPaintermPainter
 Painter for this class.
 
TString mOption
 Drawing option.
 

Additional Inherited Members

- Static Protected Member Functions inherited from PeakAna
static double * GaussianMatrix2D (int rx, double sx=0, int ry=0, double sy=0, bool kNorm=true)
 Generates up to a 2D matrix of Gaussian weights. More...
 

Detailed Description

This class is an extension of PeakAna to analyze specifically STAR data from the DEP boards. The DEP boards are used in the Forward Calorimeter System (FCS) and comprises of an electromagnetic, and hadronic calorimeters as well as a preshower.

Definition at line 36 of file StFcsPulseAna.h.

Member Function Documentation

TF1* StFcsPulseAna::BaselineFit ( ) const
inline
Returns
mF1_BaselineFit

Definition at line 93 of file StFcsPulseAna.h.

References mF1_BaselineFit.

Referenced by operator=(), and StFcsPulseAna().

TH1F* StFcsPulseAna::BaselineHist ( ) const
inline
Returns
mH1_Baseline

Definition at line 90 of file StFcsPulseAna.h.

References mH1_Baseline.

Referenced by operator=(), and StFcsPulseAna().

const char* StFcsPulseAna::GetName ( ) const
inline
Returns
#mName as const char*

Definition at line 59 of file StFcsPulseAna.h.

std::string& StFcsPulseAna::Name ( )
inline
Returns
#mName

Definition at line 60 of file StFcsPulseAna.h.

Referenced by Clone(), and operator=().

const std::string& StFcsPulseAna::Name ( ) const
inline
Returns
#mName

Definition at line 61 of file StFcsPulseAna.h.

void StFcsPulseAna::Print ( Option_t *  opt = "") const
virtual

Print class variables.

Parameters
opt"ana" means call PeakAna::Print(), "debug" print extra information

Reimplemented from PeakAna.

Definition at line 683 of file StFcsPulseAna.cxx.

References GetData(), PeakAna::mBaseline, PeakAna::mBaselineSigma, mDbPulse, mF1_BaselineFit, mF1_SignalFit, PeakAna::mFoundPeak, mH1_Baseline, PeakAna::mSearch, PeakWindow::Print(), and PeakAna::Print().

Referenced by AnalyzeForPedestal().

void StFcsPulseAna::SetBaselineFit ( TF1 *  func)
inline
Parameters
funcsets mF1_BaselineFit

Definition at line 84 of file StFcsPulseAna.h.

References mF1_BaselineFit.

void StFcsPulseAna::setDbPulse ( StFcsDbPulse p)
inline
Parameters
psets mDbPulse

Definition at line 63 of file StFcsPulseAna.h.

References mDbPulse.

void StFcsPulseAna::SetFitSignal ( TF1 *  func)
inline
Parameters
funcsets mF1_SignalFit

Definition at line 83 of file StFcsPulseAna.h.

References mF1_SignalFit.

TF1* StFcsPulseAna::SignalFit ( ) const
inline
Returns
mF1_SignalFit

Definition at line 92 of file StFcsPulseAna.h.

References mF1_SignalFit.


The documentation for this class was generated from the following files: