StRoot
1
|
#include <StFcsDbPulse.h>
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. | |
TDataSet * | At (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 TDataSet * | Find (const char *path) const |
virtual TDataSet * | FindByName (const char *name, const char *path="", Option_t *opt="") const |
virtual TDataSet * | FindByPath (const char *path) const |
Aliase for TDataSet::Find(const Char_t *path) method. | |
virtual TDataSet * | FindByTitle (const char *title, const char *path="", Option_t *opt="") const |
TObject * | FindObject (const char *name) const |
TObject * | FindObject (const TObject *o) const |
virtual TDataSet * | First () 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 TDataSet * | GetParent () const |
virtual Long_t | HasData () const |
virtual TDataSet * | Instance () 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 TDataSet * | RemoveAt (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 TDataSet * | Last () 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 TDataSet * | Next () const |
virtual TDataSet * | Prev () 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 TDataSet * | GetMainSet () |
return pointer to the main dataset | |
static TDataSet * | instance () |
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 | |
TDataSet * | fParent |
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 | |
TDataSet * | GetRealParent () |
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 TDataSet * | fgMainSet = &mainSet |
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.
|
inline |
|
inline |
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()
xlow | lowest x-value for function |
xhigh | highest x-value for function |
npars | number 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().
|
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
value | is the row or column number of an Ecal or Hcal channel |
Nvals | is the number of stuff per column or row to put on same pad |
PadNums | is the total number of pads in the column or row |
Definition at line 116 of file StFcsDbPulse.cxx.
Referenced by PadNum4x4().
|
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.
gae | TGraph to scan |
Ymin | lowest possible y-value to check and then store result of found minimum y-value |
Ymax | highest possible y-value to check and then store result of found maximum y-value |
xmin | minimum x-value to start searching for y-min/max |
xmax | minimum x-value to start seraching for y-min/max |
Definition at line 142 of file StFcsDbPulse.cxx.
Referenced by StFcsWaveformFitMaker::drawRegion().
|
inline |
Definition at line 66 of file StFcsDbPulse.h.
References mGSigma.
Referenced by StFcsWaveformFitMaker::gausFit(), Print(), StFcsPulseAna::PulseFit(), StFcsWaveformFitMaker::PulseFit1(), StFcsWaveformFitMaker::PulseFit2(), StFcsWaveformFitMaker::PulseFitAll(), and StFcsPulseAna::SetFitPars().
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
x | one dimension array as x-value input of function |
p | parameters 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().
|
inline |
|
inline |
|
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
det | Ecal or Hcal detector ID |
col | column number of Ecal or Hcal channel to draw |
row | row 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
x | one dimension array as x-value input of function |
p | array 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().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
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.
tail | set 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().
|
inline |
|
inline |
|
inline |
|
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.
gae | graph object that holds the pulse data |
i | point on the graph object to modify |
adc | ADC value to be checked for error assignment |
Yerr | Y error on ADC for values below ADC saturation |
YerrSat | Y error on ADC for values above ADC saturation |
Definition at line 73 of file StFcsDbPulse.cxx.
Referenced by StFcsWaveformFitMaker::makeTGraphAsymmErrors().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 41 of file StFcsDbPulse.h.
References mTBPerRC.
Referenced by StFcsWaveformFitMaker::drawDualFit(), StFcsWaveformFitMaker::NPeaksPrePost(), nsecPerTB(), and Print().
|
inline |
Definition at line 69 of file StFcsDbPulse.h.
References mXoff1.
Referenced by Print().
|
inline |
Definition at line 70 of file StFcsDbPulse.h.
References mXoff2.
Referenced by Print().