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

#include <StFcsDbPulse.h>

Inheritance diagram for StFcsDbPulse:
TDataSet

Public Member Functions

 StFcsDbPulse (const char *name="fcsPulse")
 Constructor.
 
virtual ~StFcsDbPulse ()
 Destructor.
 
int Init ()
 Initialize object.
 
void setTBPerRC (double v)
 
double TBPerRC () const
 
double nsecPerTB () const
 nanoseconds per timebin
 
double BeamLengthSig () const
 beam length sigma
 
void setTail (int tail)
 Sets the variables needed by the sum of xexp functions that describe the tail of the pulse shape. More...
 
void setGSigma (double v)
 
void setA1 (double v)
 
void setA2 (double v)
 
void setXoff1 (double v)
 
void setXoff2 (double v)
 
void setTau1 (double v)
 
void setTau2 (double v)
 
void setP1 (double v)
 
void setP2 (double v)
 
double GSigma () const
 
double A1 () const
 
double A2 () const
 
double Xoff1 () const
 
double Xoff2 () const
 
double Tau1 () const
 
double Tau2 () const
 
double P1 () const
 
double P2 () const
 
double pulseShape (double *x, double *p)
 Single pulse shape gaus+xexp+xexp. More...
 
double multiPulseShape (double *x, double *p)
 Multi-pulse shape function constant+gaus+xexp+xexp for many pulses. More...
 
TF1 * createPulse (double xlow=0, double xhigh=1, int npars=5)
 Function to create pulse shape for FCS, 5 parameters is minimum. More...
 
virtual void Print (Option_t *opt="") const
 Print all the constants associated with this class.
 
- Public Member Functions inherited from TDataSet
 TDataSet (const char *name="", TDataSet *parent=0, Bool_t arrayFlag=kFALSE)
 
 TDataSet (const TDataSet &src, EDataSetPass iopt=kAll)
 
 TDataSet (TNode &src)
 This copy ctor has been depricated (left for thwe sake of the backweard compatibility)
 
virtual ~TDataSet ()
 std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl;
 
virtual void Add (TDataSet *dataset)
 
virtual void AddAt (TDataSet *dataset, Int_t idx=0)
 
virtual void AddAtAndExpand (TDataSet *dataset, Int_t idx=0)
 
virtual void AddFirst (TDataSet *dataset)
 Add TDataSet object at the beginning of the dataset list of this dataset.
 
virtual void AddLast (TDataSet *dataset)
 Add TDataSet object at the end of the dataset list of this dataset.
 
TDataSetAt (Int_t idx) const
 
virtual void Browse (TBrowser *b)
 Browse this dataset (called by TBrowser).
 
virtual TObject * Clone (const char *newname="") const
 the custom implementation fo the TObject::Clone
 
virtual void Delete (Option_t *opt="")
 
virtual TDataSetFind (const char *path) const
 
virtual TDataSetFindByName (const char *name, const char *path="", Option_t *opt="") const
 
virtual TDataSetFindByPath (const char *path) const
 Aliase for TDataSet::Find(const Char_t *path) method.
 
virtual TDataSetFindByTitle (const char *title, const char *path="", Option_t *opt="") const
 
TObject * FindObject (const char *name) const
 
TObject * FindObject (const TObject *o) const
 
virtual TDataSetFirst () const
 Return the first object in the list. Returns 0 when list is empty.
 
TObjArray * GetObjArray () const
 
virtual TSeqCollection * GetCollection () const
 
TList * GetList () const
 
virtual Int_t GetListSize () const
 
TObject * GetMother () const
 
virtual TObject * GetObject () const
 The depricated method (left here for the sake of the backward compatibility)
 
virtual TDataSetGetParent () const
 
virtual Long_t HasData () const
 
virtual TDataSetInstance () const
 
virtual TString Path () const
 return the full path of this data set
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *, void *), void *user, Int_t depth=0)
 
virtual void PrintContents (Option_t *opt="") const
 
virtual Int_t Purge (Option_t *opt="")
 
virtual void Remove (TDataSet *set)
 Remiove the "set" from this TDataSet.
 
virtual TDataSetRemoveAt (Int_t idx)
 
virtual void SetMother (TDataSet *parent=0)
 
virtual void SetObject (TObject *obj)
 The depricated method (left here for the sake of the backward compatibility)
 
virtual void SetParent (TDataSet *parent=0)
 
virtual void SetWrite ()
 
virtual void Shunt (TDataSet *newParent=0)
 
virtual void Sort ()
 Sort recursively all members of the TDataSet with TList::Sort method.
 
virtual Bool_t IsEmpty () const
 return kTRUE if the "internal" collection has no member
 
virtual Bool_t IsFolder () const
 
virtual Bool_t IsMarked () const
 
virtual Bool_t IsThisDir (const char *dirname, int len=-1, int ignorecase=0) const
 
virtual TDataSetLast () const
 Return the last object in the list. Returns 0 when list is empty.
 
virtual void ls (Option_t *option="") const
 
virtual void ls (Int_t depth) const
 
void Mark ()
 
void UnMark ()
 
void MarkAll ()
 Mark all members of this dataset.
 
void UnMarkAll ()
 UnMark all members of this dataset.
 
void InvertAllMarks ()
 Invert mark bit for all members of this dataset.
 
void Mark (UInt_t flag, EBitOpt reset=kSet)
 
virtual TDataSetNext () const
 
virtual TDataSetPrev () const
 
virtual void Update ()
 
virtual void Update (TDataSet *set, UInt_t opt=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static double sqrtpi ()
 sqrt(TMath::Pi)
 
static double sqrt2pi ()
 sqrt(2*TMath::Pi)
 
static void setTGraphAsymmErrors (TGraphAsymmErrors *gae, const int &i, const double &adc, double Yerr, double YerrSat)
 Figure out and set the errors on FCS pulse data stored in a TGraphAsymmErrors object. More...
 
static int GenericPadPos (int value, int Nvals, int PadNums)
 Function to tell you pad number when drawing multiple objects on the same pad. More...
 
static int PadNum4x4 (int det, int col, int row)
 Function that gives pad number when drawing a specific detector id. More...
 
static Int_t getYMinMax (TGraphAsymmErrors *gae, Double_t &Ymin, Double_t &Ymax, Double_t xmin=-5, Double_t xmax=2000)
 Finds minimum and maximum y-values in a TGraph and returns index for max y. More...
 
- Static Public Member Functions inherited from TDataSet
static TDataSetGetMainSet ()
 return pointer to the main dataset
 
static TDataSetinstance ()
 

Protected Attributes

double mTBPerRC
 number of timebins in one RHIC crossing
 
double mGSigma
 pulse shape nominal sigma of Gaussian part
 
double mA1
 pulse shape tail: height of first xexp function
 
double mA2
 pulse shape tail: height of second xexp function
 
double mXoff1
 pulse shape tail: x offset of first xexp function
 
double mXoff2
 pulse shape tail: x offset of second xexp function
 
double mTau1
 pulse shape tail: scale of first xexp function
 
double mTau2
 pulse shape tail: scale of second xexp function
 
double mP1
 pulse shape tail: power of first xexp function
 
double mP2
 pulse shape tail: power of second xexp function
 
- Protected Attributes inherited from TDataSet
TDataSetfParent
 
TSeqCollection * fList
 

Additional Inherited Members

- Public Types inherited from TDataSet
enum  EDataSetPass {
  kContinue, kPrune, kStop, kUp,
  kStruct, kAll, kRefs, kMarked
}
 
enum  ESetBits { kMark = BIT(22), kArray = BIT(20) }
 
enum  EBitOpt { kSet = kTRUE, kReset = kFALSE }
 
- Protected Member Functions inherited from TDataSet
virtual void SetMother (TObject *mother)
 
 TDataSet (const char *name, const char *title)
 
void AddMain (TDataSet *set)
 add data set to main data set
 
TDataSetGetRealParent ()
 return real parent
 
void MakeCollection ()
 Create the internal container at once if any.
 
- Static Protected Member Functions inherited from TDataSet
static EDataSetPass SortIt (TDataSet *ds)
 
static EDataSetPass SortIt (TDataSet *ds, void *user)
 
- Static Protected Attributes inherited from TDataSet
static TDataSetfgMainSet = &mainSet
 

Detailed Description

The purpose of this class is to define the constants related to the pulse shape of the FCS data. This pulse shape will be used in both fitting the data and in simulating pulses.

The pulse shape function is gaus+xexp+xexp, where gaus is a Gaussian function used to describe the main signal and the sum of xexp functions is used to describe the tail of the signal.
xexp=A/(tau^2) * (x-x0)^n * exp(-(x-x0)/tau)

To use pulse shapes without a tail setTail(0)
To use pulse shapes for Run 22 data setTail(2)

Definition at line 28 of file StFcsDbPulse.h.

Member Function Documentation

double StFcsDbPulse::A1 ( ) const
inline
Returns
mA1

Definition at line 67 of file StFcsDbPulse.h.

References mA1.

Referenced by Print().

double StFcsDbPulse::A2 ( ) const
inline
Returns
mA2

Definition at line 68 of file StFcsDbPulse.h.

References mA2.

Referenced by Print().

TF1 * StFcsDbPulse::createPulse ( double  xlow = 0,
double  xhigh = 1,
int  npars = 5 
)

Function to create pulse shape for FCS, 5 parameters is minimum.

Creates a ROOT TF1 for #multipulseShape()

Parameters
xlowlowest x-value for function
xhighhighest x-value for function
nparsnumber of parameters needed by TF1 (2+3*number of pulses)

Definition at line 109 of file StFcsDbPulse.cxx.

References multiPulseShape().

Referenced by StFcsWaveformFitMaker::drawDualFit(), StFcsWaveformFitMaker::gausFit(), StFcsWaveformFitMaker::PulseFit1(), StFcsWaveformFitMaker::PulseFit2(), StFcsWaveformFitMaker::PulseFitAll(), and StFcsPulseAna::SetFitPars().

int StFcsDbPulse::GenericPadPos ( int  value,
int  Nvals,
int  PadNums 
)
static

Function to tell you pad number when drawing multiple objects on the same pad.

This function is mostly used by PadNum4x4() for drawing FCS Ecal and Hcal channels on the same canvas

Parameters
valueis the row or column number of an Ecal or Hcal channel
Nvalsis the number of stuff per column or row to put on same pad
PadNumsis the total number of pads in the column or row

Definition at line 116 of file StFcsDbPulse.cxx.

Referenced by PadNum4x4().

Int_t StFcsDbPulse::getYMinMax ( TGraphAsymmErrors *  gae,
Double_t &  Ymin,
Double_t &  Ymax,
Double_t  xmin = -5,
Double_t  xmax = 2000 
)
static

Finds minimum and maximum y-values in a TGraph and returns index for max y.

This function is used to scan a TGraph and find the global minimum and maximum y-values inside a specified x-range.

Parameters
gaeTGraph to scan
Yminlowest possible y-value to check and then store result of found minimum y-value
Ymaxhighest possible y-value to check and then store result of found maximum y-value
xminminimum x-value to start searching for y-min/max
xmaxminimum x-value to start seraching for y-min/max

Definition at line 142 of file StFcsDbPulse.cxx.

Referenced by StFcsWaveformFitMaker::drawRegion().

double StFcsDbPulse::GSigma ( ) const
inline
double StFcsDbPulse::multiPulseShape ( double *  x,
double *  p 
)

Multi-pulse shape function constant+gaus+xexp+xexp for many pulses.

Extends pulseShape() to be able to generate many pulses. The values associated with xexp are fixed for all pulses with the constants defined in this class

Parameters
xone dimension array as x-value input of function
pparameters to describe number of pulses and the Gaussian for those pulses
p[0] = number of pulses
p[1] = constant offset
p[2] = height of Gaussian pulse 1
p[3] = mean of Gaussian pulse 1
p[4] = sigma of Gaussian pulse 1
p[5] = height of Gaussian pulse 2
...

Definition at line 100 of file StFcsDbPulse.cxx.

References pulseShape().

Referenced by createPulse(), and StFcsPulseAna::PulseFit().

double StFcsDbPulse::P1 ( ) const
inline
Returns
mP1

Definition at line 73 of file StFcsDbPulse.h.

References mP1.

Referenced by Print().

double StFcsDbPulse::P2 ( ) const
inline
Returns
mP2

Definition at line 74 of file StFcsDbPulse.h.

References mP2.

Referenced by Print().

int StFcsDbPulse::PadNum4x4 ( int  det,
int  col,
int  row 
)
static

Function that gives pad number when drawing a specific detector id.

This function is used to know where to draw a specific Ecal or Hcal channels on utilizing a canvas with 4 rows and 4 columns

Parameters
detEcal or Hcal detector ID
colcolumn number of Ecal or Hcal channel to draw
rowrow number of Ecal or Hcal channel to draw

Definition at line 122 of file StFcsDbPulse.cxx.

References GenericPadPos().

Referenced by StFcsWaveformFitMaker::drawRegion().

double StFcsDbPulse::pulseShape ( double *  x,
double *  p 
)

Single pulse shape gaus+xexp+xexp.

1-dimensional function to describe the pulse shape which is a Gaussian for the main part plus a tail
gaus = Gaussian
xexp = A/tau/tau*(x-x0)^n*exp(-(x-x0)/tau))
parameters of xexp are fixed constants in this class and describe the tail of the pulse shape

Parameters
xone dimension array as x-value input of function
parray of parameters for Gaussian

Definition at line 82 of file StFcsDbPulse.cxx.

References mA1, mA2, mP1, mP2, mTau1, mTau2, mXoff1, and mXoff2.

Referenced by multiPulseShape().

void StFcsDbPulse::setA1 ( double  v)
inline
Parameters
vset mA1

Definition at line 56 of file StFcsDbPulse.h.

References mA1.

void StFcsDbPulse::setA2 ( double  v)
inline
Parameters
vset mA2

Definition at line 57 of file StFcsDbPulse.h.

References mA2.

void StFcsDbPulse::setGSigma ( double  v)
inline
Parameters
vset mGSigma

Definition at line 55 of file StFcsDbPulse.h.

References mGSigma.

void StFcsDbPulse::setP1 ( double  v)
inline
Parameters
vset mP1

Definition at line 62 of file StFcsDbPulse.h.

References mP1.

void StFcsDbPulse::setP2 ( double  v)
inline
Parameters
vset mP2

Definition at line 63 of file StFcsDbPulse.h.

References mP2.

void StFcsDbPulse::setTail ( int  tail)

Sets the variables needed by the sum of xexp functions that describe the tail of the pulse shape.

It will set the constants related to the tail of the pulse shape to known values based on previous data analysis.

Parameters
tailset values for pulse shape tail based on predefined values
0 = no tail
1 = tail shape based on LED data from Lab
2 = tail shape based on Run 22 LED data

Definition at line 40 of file StFcsDbPulse.cxx.

References mA1, mA2, mGSigma, mP1, mP2, mTau1, mTau2, mXoff1, mXoff2, and nsecPerTB().

void StFcsDbPulse::setTau1 ( double  v)
inline
Parameters
vset mTau1

Definition at line 60 of file StFcsDbPulse.h.

References mTau1.

void StFcsDbPulse::setTau2 ( double  v)
inline
Parameters
vset mTau2

Definition at line 61 of file StFcsDbPulse.h.

References mTau2.

void StFcsDbPulse::setTBPerRC ( double  v)
inline
Parameters
vset mTBPerRC

Definition at line 40 of file StFcsDbPulse.h.

References mTBPerRC.

void StFcsDbPulse::setTGraphAsymmErrors ( TGraphAsymmErrors *  gae,
const int &  i,
const double &  adc,
double  Yerr,
double  YerrSat 
)
static

Figure out and set the errors on FCS pulse data stored in a TGraphAsymmErrors object.

Assign the error on each point of the TGraphAsymmErrors object that either holds the pulse data or is being filled with the pulse data. The error on X is assumed to be zero. ADC saturation is fixed at 4K because it is 12 bit.

Parameters
gaegraph object that holds the pulse data
ipoint on the graph object to modify
adcADC value to be checked for error assignment
YerrY error on ADC for values below ADC saturation
YerrSatY error on ADC for values above ADC saturation

Definition at line 73 of file StFcsDbPulse.cxx.

Referenced by StFcsWaveformFitMaker::makeTGraphAsymmErrors().

void StFcsDbPulse::setXoff1 ( double  v)
inline
Parameters
vset mXoff1

Definition at line 58 of file StFcsDbPulse.h.

References mXoff1.

void StFcsDbPulse::setXoff2 ( double  v)
inline
Parameters
vset mXoff2

Definition at line 59 of file StFcsDbPulse.h.

References mXoff2.

double StFcsDbPulse::Tau1 ( ) const
inline
Returns
mTau1

Definition at line 71 of file StFcsDbPulse.h.

References mTau1.

Referenced by Print().

double StFcsDbPulse::Tau2 ( ) const
inline
Returns
mTau2

Definition at line 72 of file StFcsDbPulse.h.

References mTau2.

Referenced by Print().

double StFcsDbPulse::TBPerRC ( ) const
inline
double StFcsDbPulse::Xoff1 ( ) const
inline
Returns
mXoff1

Definition at line 69 of file StFcsDbPulse.h.

References mXoff1.

Referenced by Print().

double StFcsDbPulse::Xoff2 ( ) const
inline
Returns
mXoff2

Definition at line 70 of file StFcsDbPulse.h.

References mXoff2.

Referenced by Print().


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