StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
StFcsWaveformFitMaker Class Reference
Inheritance diagram for StFcsWaveformFitMaker:
StMaker TDataSet

Public Member Functions

 StFcsWaveformFitMaker (const char *name="StFcsWaveformFitMaker")
 
virtual int Init ()
 
virtual int InitRun (int runNumber)
 
virtual int Make ()
 
virtual int Finish ()
 
virtual void Clear (Option_t *option="")
 User defined functions.
 
void setDebug (int v=1)
 
void setTest (int v)
 Set test level. Intended to be used for single files. Output file name can be changed with writeFile(), see mTest for meaning of values.
 
void setEnergySelect (int ecal=13, int hcal=13, int pres=1)
 
void setEnergySumScale (double ecal=1.0, double hcal=1.0, double pres=1.0)
 
void setCenterTimeBins (int v, int min=0, int max=512)
 
void setAdcSaturation (int v)
 
void setError (double v)
 
void setErrorSaturated (int v)
 
void setMinAdc (int v)
 
void setTail (int v)
 Set tail parameters to use for #mDbPulse, see StFcsDbPulse::setTail()
 
void setMaxPeak (int v)
 Set maximum number of peaks to fit, see #mMaxPeak.
 
void setPedTimeBins (int min, int max)
 Set the timebin region where the pedestal occurs, for non-pedestal subtracted data.
 
void setAnaWaveform (bool value=true)
 Set whether to compute integral of waveform (true); or just recompute energy (false); see #mAnaWaveform.
 
TGraphAsymmErrors * resetGraph ()
 Create or Reset TGraphAsymmErrors (at #mHitIdx)
 
TGraphAsymmErrors * getGraph (int idx=-1)
 Return TGraphAsymmErrors at idx. More...
 
TGraphAsymmErrors * getGraph (int det, int id)
 Get graph of a particular detector and channel id if it exists in mChWaveData.
 
void setMeasureTime (char *file)
 
TGraphAsymmErrors * makeTGraphAsymmErrors (int n, double *t, double *adc)
 Create TGraphAsymmErrors from given timebin and adc data. More...
 
TGraphAsymmErrors * makeTGraphAsymmErrors (TGraph *g)
 Same as makeTGraphAsymmErrors(int,double*,double*) except using a TGraph object.
 
TGraphAsymmErrors * makeTGraphAsymmErrors (StFcsHit *hit)
 Same as makeTGraphAsymmErrors(int,double*,double*) except using StFcsHit object, also names graphs by detid and chan id.
 
TGraphAsymmErrors * makeTGraphAsymmErrors (TH1 *hist)
 Same as makeTGraphAsymmErrors(int,double*,double*) except using 1D histogram where histogram bin is timebin value and ADC is bin content.
 
float analyzeWaveform (int select, TGraphAsymmErrors *g, float *res, TF1 *&f, float ped=0.0)
 Perfom the analysis using selected method. More...
 
float analyzeWaveform (int select, int n, double *t, double *adc, float *res, TF1 *&f, float ped=0.0)
 same as analyzeWaveform(int, TGraphAsymmErrors*, float*, TF1*&, float) except will generate TGraphAsymmErrors object from timebin (t) and adc array data
 
float analyzeWaveform (int select, TGraph *g, float *res, TF1 *&f, float ped=0.0)
 same as analyzeWaveform(int, TGraphAsymmErrors*, float*, TF1*&, float) except will generate TGraphAsymmErrors object from timebin and adc data in a TGraph
 
float analyzeWaveform (int select, StFcsHit *hit, float *res, TF1 *&f, float ped=0.0)
 same as analyzeWaveform(int, TGraphAsymmErrors*, float*, TF1*&, float) except will generate TGraphAsymmErrors object from StFcsHit
 
float AnaPed (TGraphAsymmErrors *g, float &ped, float &pedstd)
 
float AnaPed (StFcsHit *hit, float &ped, float &pedstd)
 
float sum8 (TGraphAsymmErrors *g, float *res)
 mEnergySelect=1
 
float sum16 (TGraphAsymmErrors *g, float *res)
 mEnergySelect=2
 
float highest (TGraphAsymmErrors *g, float *res)
 mEnergySelect=3 More...
 
float highest3 (TGraphAsymmErrors *g, float *res)
 mEnergySelect=4 More...
 
float gausFit (TGraphAsymmErrors *g, float *res, TF1 *&f, float ped=0.0)
 mEnergySelect=10
 
float gausFitWithPed (TGraphAsymmErrors *g, float *res, TF1 *&f)
 mEnergySelect=11
 
float PulseFit1 (TGraphAsymmErrors *g, float *res, TF1 *&f, float ped=0.0)
 mEnergySelect=12, find and fit selected peaks around triggered crossing using PeakCompare()
 
float PulseFit2 (TGraphAsymmErrors *g, float *res, TF1 *&f, float ped=0.0)
 mEnergySelect=13, (default) find and fit selected peaks around triggered crossing using NPeaksPrePost()
 
float PulseFitAll (TGraphAsymmErrors *g, float *res, TF1 *&f, float ped=0.0)
 mEnergySelect=14, fit all peaks less than mMaxPeak
 
float PulseFit2WithPed (TGraphAsymmErrors *g, float *res, TF1 *&f)
 mEnergySelect=15, first find pedestal using #AnaPed(), then call PulseFit2()
 
float PulseFitAllWithPed (TGraphAsymmErrors *g, float *res, TF1 *&f)
 mEnergySelect=16, first find pedestal using #AnaPed(), then call PulseFitAll()
 
float PedFitPulseFit (TGraphAsymmErrors *g, float *res, TF1 *&f)
 mEnergySelect=17, first find pedestal using #StFcsPulseAna::AnalyzePedestal() then call PulseFitAll()
 
void setMaxPage (int v)
 Max pages to draw.
 
void setSkip (int v)
 Number of channels to skip before drawing.
 
void setFileName (char *file, int maxpage=25, int skip=5)
 Set event drawing options. More...
 
void writeFile (std::string filename)
 Use to change the name of the file where test histograms will be saved.
 
void setFitDrawOn (int v=1)
 Sets how much channel data will saved in mChWaveData. More...
 
void setFitFilter (char *filter)
 
int centerTB () const
 
void setDavidFitter (StFcsPulseAna *v)
 Override mPulseFit, will be deleted.
 
StFcsPulseAnadavidFitter ()
 
StFcsPulseAnaInitFitter (Double_t ped=0)
 Sets up basic values needed by StFcsPulseAna. More...
 
void drawRegion (int det, int col_low, int row_low, int col_high, int row_high, int event=0)
 draw a region of the Ecal or Hcal More...
 
void drawEvent (int det, int event=0)
 Utilizes drawRegion() to draw all channels in an event.
 
void drawFitter (Option_t *opt)
 Call StFcsPulseAna::Draw()
 
void drawCh (UInt_t detid, UInt_t ch) const
 Draw a single channel on the current canvas/pad. More...
 
void drawDualFit (UInt_t detid, UInt_t ch)
 Special draw function, to compare fits for a single channel. More...
 
void printArray () const
 Print contents of mChWaveData, excluding timebin and adc information.
 
void printSetup () const
 Print contents of internal variables.
 
- Public Member Functions inherited from StMaker
 StMaker (const char *name="", const char *dummy=0)
 Constructor & Destructor.
 
virtual Int_t IsChain () const
 
virtual void StartMaker ()
 
virtual Int_t IMake (Int_t number)
 
virtual void EndMaker (Int_t ierr)
 
virtual Int_t FinishRun (Int_t oldrunumber)
 
virtual void FatalErr (Int_t Ierr, const char *Com)
 
virtual void PrintInfo ()
 
virtual void NotifyMe (const char *, const void *)
 
virtual void AddMaker (StMaker *mk)
 
virtual void MakeDoc (const TString &, const TString &, Bool_t)
 
virtual void AddData (TDataSet *data, const char *dir=".data")
 User methods.
 
virtual TDataSetAddObj (TObject *obj, const char *dir, int owner=1)
 
virtual TDataSetToWhiteBoard (const char *name, void *dat)
 
virtual TDataSetToWhiteBoard (const char *name, void *dat, void *del)
 
virtual TDataSetToWhiteBoard (const char *name, TObject *dat, Int_t owner)
 
virtual TDataSetToWhiteConst (const char *name, TObject *dat)
 
virtual TDataSetToWhiteConst (const char *name, void *dat)
 
virtual TDataSetWhiteBoard (const char *name, void *v=0) const
 
virtual Int_t Skip (Int_t nskip)
 
virtual void AddConst (TDataSet *data=0)
 
virtual void AddHist (TH1 *h, const char *dir=0)
 
virtual void AddGarb (TDataSet *data=0)
 
virtual void AddRunco (TDataSet *data=0)
 
virtual void AddRunco (Double_t par, const char *name, const char *comment)
 
void AddRunCont (TDataSet *data=0)
 
virtual TList * GetHistList () const
 
virtual TH1 * GetHist (const char *histName) const
 
virtual StMakercd ()
 
virtual StMakerCd ()
 
virtual Int_t GetNumber () const
 STAR methods.
 
virtual void SetNumber (Int_t number)
 
virtual StMakerGetParentChain () const
 
virtual Int_t GetIventNumber () const
 Returns the current event number.
 
virtual void SetIventNumber (Int_t iv)
 
virtual Int_t GetEventNumber () const
 
virtual Int_t GetRunNumber () const
 Returns the current RunNumber.
 
virtual const TDatime & GetDateTime () const
 
virtual const TDatime & GetDBTime () const
 
virtual void SetDateTime (Int_t idat, Int_t itim)
 
virtual StEvtHddrGetEvtHddr () const
 
virtual Int_t GetDate () const
 
virtual Int_t GetTime () const
 
virtual const char * GetEventType () const
 
virtual TDataSetGetData (const char *name, const char *dir=".data") const
 
virtual TDataSetGetData () const
 
virtual TDataSetGetConst () const
 
virtual TDataSetGetDataSet (const char *logInput) const
 
virtual TDataSetDataSet (const char *logInput) const
 
virtual TDataSetGetInputDS (const char *logInput) const
 
virtual TDataSetGetDataBase (const char *logInput, const TDatime *td=0)
 
virtual TDataSetGetInputDB (const char *logInput)
 
virtual Int_t GetDebug () const
 
virtual Int_t Debug () const
 
virtual Int_t GetMakeReturn () const
 
virtual TList * Histograms () const
 
virtual TString GetAlias (const char *log, const char *dir=".aliases") const
 
virtual TString GetInput (const char *log) const
 
virtual TString GetOutput (const char *log) const
 
virtual TList * GetMakeList () const
 
virtual StMakerGetParentMaker () const
 
virtual StMakerGetMaker (const char *mkname)
 
virtual StMakerGetMakerInheritsFrom (const char *mktype) const
 
virtual Bool_t IsActive ()
 
virtual StMakerMaker (const char *mkname)
 
virtual void SetBIT (EMakerStatus k)
 Maker Status Bits.
 
virtual void ResetBIT (EMakerStatus k)
 
virtual Bool_t TestBIT (EMakerStatus k)
 
virtual void SetActive (Bool_t k=kTRUE)
 Setters for flags and switches.
 
virtual void SetDebug (Int_t l=1)
 
virtual void SetDEBUG (Int_t l=1)
 
virtual void SetFlavor (const char *flav, const char *tabname)
 
virtual void SetMakeReturn (Int_t ret)
 
virtual void SetAlias (const char *log, const char *act, const char *dir=".aliases")
 
virtual void AddAlias (const char *log, const char *act, const char *dir=".aliases")
 
virtual void SetInput (const char *log, const char *act)
 
virtual void SetOutput (const char *log, const char *act)
 
virtual void SetOutput (const char *log, TDataSet *ds)
 
virtual void SetOutput (TDataSet *ds)
 
virtual void SetOutputAll (TDataSet *ds, Int_t level=1)
 
virtual void SetMode (Int_t mode=0)
 
virtual void SetNotify (const char *about, StMaker *mk)
 
virtual Int_t GetMode ()
 
virtual Int_t GetDebug ()
 
virtual const StChainOptGetChainOpt () const
 
virtual TFile * GetTFile () const
 
virtual void NotifyEm (const char *about, const void *ptr)
 
virtual Double_t RealTime ()
 
virtual Double_t CpuTime ()
 
virtual void StartTimer (Bool_t reset=kFALSE)
 
virtual void StopTimer ()
 
virtual void PrintTimer (Option_t *option="")
 
virtual void PrintTotalTime ()
 
virtual const char * GetName () const
 special overload
 
TObject * GetDirObj (const char *dir) const
 
void SetDirObj (TObject *obj, const char *dir)
 
Int_t SetAttr (const char *key, const char *val, const char *to=".")
 
Int_t SetAttr (const char *key, Int_t val, const char *to=".")
 
Int_t SetAttr (const char *key, UInt_t val, const char *to=".")
 
Int_t SetAttr (const char *key, Double_t val, const char *to=".")
 
Int_t SetAttr (const StMaker *mk)
 
Int_t RemAttr (const char *key, const char *to=".")
 
const TAttrGetAttr () const
 
Int_t IAttr (const char *key) const
 
UInt_t UAttr (const char *key) const
 
Double_t DAttr (const char *key) const
 
const char * SAttr (const char *key) const
 
void PrintAttr () const
 
- 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 int GenericPadPos (int value, int Nvals, int PadNums)
 Helper function for PadNum4x4. More...
 
static int PadNum4x4 (int det, int col, int row)
 Helper function for drawRegion() More...
 
- Static Public Member Functions inherited from StMaker
static StMakerNew (const char *classname, const char *name="", void *title=0)
 
static StMakerGetTopChain ()
 
static StMakerGetChain ()
 
static StMakerGetFailedMaker ()
 
static StMakerGetMaker (const TDataSet *ds)
 Static functions.
 
static EDataSetPass ClearDS (TDataSet *ds, void *user)
 
static const char * RetCodeAsString (Int_t kode)
 
static Int_t AliasDate (const char *alias)
 
static Int_t AliasTime (const char *alias)
 
static const char * AliasGeometry (const char *alias)
 
static const DbAlias_tGetDbAliases ()
 
static void SetTestMaker (StTestMaker *mk)
 
static Int_t Cleanup (TDataSet *&ds)
 
static void lsMakers (const StMaker *top)
 
- Static Public Member Functions inherited from TDataSet
static TDataSetGetMainSet ()
 return pointer to the main dataset
 
static TDataSetinstance ()
 

Public Attributes

TH1F * mTime = 0
 
TH2F * mTimeIntg [4]
 
- Public Attributes inherited from StMaker
enum StMaker:: { ... }  EModule_return_Status
 

Protected Member Functions

void drawFit (TGraphAsymmErrors *gg, TF1 *func)
 Draw a single TGraph.
 
void SetupDavidFitterMay2022 (Double_t ped=0)
 This special function is used to set all the parameters for StFcsPulseAna based on cosmic and Run 22 data. It is intended to be used only for Run 22 data.
 
int PeakCompare (const PeakWindow &pwin1, const PeakWindow &pwin2)
 Compare if two peaks overlap and return a bit vector of tests passed/failed. More...
 
std::vector< int > NPeaksPrePost (int &trigidx, Double_t &xmin, Double_t &xmax) const
 Finds out how many peaks are within a fixed number of pre-crossings and post-crossings. More...
 
- Protected Member Functions inherited from StMaker
StMessMgrGetLogger () const
 
virtual TDataSetFindDataSet (const char *logInput, const StMaker *uppMk=0, const StMaker *dowMk=0) const
 
- 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.
 

Protected Attributes

TClonesArray mChWaveData
 Contains all graph data.
 
StFcsPulseAnamPulseFit
 Pointer to peak finder used by some analysis methods.
 
int mTest = 0
 Variable to use when testing StFcsWaveformFitMaker algorithms. More...
 
TFile * mOutFile
 Root output file for testing.
 
TH2F * mH2_Dep0DepMod [3]
 
TH2F * mH2_Sum8Dep0 [3]
 
TH2F * mH2_Sum8DepMod [3]
 
TH1F * mH1_NPeaksAkio = 0
 Number of peaks found by gausFit()
 
TH1F * mH1_NPeaksFilteredAkio = 0
 Number of peaks found by gausFit() for signals that had a triggered crossing.
 
TH2F * mH2F_AdcTbAkio [6]
 Adc vs. Tb for different number of peaks Akio method.
 
TH2F * mH2F_AdcTbMine [6]
 Adc vs. Tb for different number of peaks my method.
 
TH2F * mH2F_AdcTbValidPeak [7]
 Adc vs. Tb from my algorithm that had a peak at #mCenterTb (Need an extra one for non-valid peaks)
 
TH2F * mH2F_SumFitvSumWin [6]
 Sum from Akio's Fit function vs. Sum from my found peak window for different number of peaks.
 
TH2F * mH2F_APeakvMPeak [6]
 PeakLocations from Akio vs. Mine.
 
TH1F * mH1F_PeakStart [6]
 PeakWindow Starting x-values
 
TH1F * mH1F_PeakEnd [6]
 PeakWindow Ending x-values
 
TH1F * mH1_PeakTiming = 0
 Timing for just peak finding.
 
TH1F * mH1F_NPeaks [7]
 Number of peaks found by peak finder StFcsPulseAna.
 
TH1F * mH1F_NPeaksFiltered [7]
 Number of peaks for cases where a peak around #mCenterTB was found.
 
TH2F * mH2_NPeakvsPeakXdiff = 0
 Number of peaks vs. Peak X diff.
 
TH2F * mH2_NPeakvsPeakYratio = 0
 Number of peaks vs. Peak Y ratio.
 
TH1F * mH1_VOverlap = 0
 Value of overlap.
 
TH2F * mH2_NOvsNPeaks = 0
 NO (Number of overlaps) vs. Number of peaks.
 
TH2F * mH2_VvsNOverlap = 0
 Compare value for that peak comparison vs. Overlap index.
 
TH2F * mH2F_NOvsId [6]
 NO (number of overlaps) vs channel id for the 6 detector ids.
 
TH1F * mH1F_Res0 [7]
 Histogram of all res[0] regardless of method.
 
TH1F * mH1F_Res0Zoom [7]
 Histogram of all res[0] with finer bining at low end.
 
TH1F * mH1F_Sum8Res0 [7]
 Histogram of "res[0]" using sum8 regardless of method called.
 
TH1F * mH1F_Sum8Res0Zoom [7]
 same as mH1F_Sum8Res0 with finer bining at low end
 
TH1F * mH1F_FitRes0 [7]
 Histogram of "res[0]" from fit regardless of method called.
 
TH1F * mH1F_FitRes0Zoom [7]
 same as mH1F_FitRes0 with finer bining at low end
 
TH2F * mH2F_Sum8vFit [7]
 Histograms of Fit res[0] vs. sum8 res[0].
 
TH1F * mH1_TimeFitPulse = 0
 Histogram to time how long just the fitting takes in PulseFit1() and PulseFit2()
 
TH2F * mH2_HeightvsSigma = 0
 Histogram of all fitted peak heights vs. their sigma.
 
TH2F * mH2_HeightvsSigmaTrig = 0
 Histogram of height of fitted peaks in triggered crossing vs. their sigma.
 
TH1F * mH1_ChiNdf = 0
 Histogram of chi^2/ndf for all fits.
 
TH2F * mH2_HeightvsChiNdf = 0
 Histogram of height vs. chi^2/ndf for all fits.
 
TH2F * mH2_MeanvsChiNdf = 0
 Histogram of height vs. chi^2/ndf for all fits.
 
TH2F * mH2_SigmavsChiNdf = 0
 Histogram of chi^2/ndf for all fits.
 
TH1F * mH1_PeakTimingGaus = 0
 Histogram to test timing of gausFit()
 
TH1F * mH1_PeakTimingPuls = 0
 Histogram to test timing of PulseFit1()
 
TH2F * mH2_PeakTimingCompare = 0
 Histogram to test timing between PulseFit1() vs. gausFit()
 
- Protected Attributes inherited from StMaker
TDataSetm_DataSet
 
TDataSetm_ConstSet
 
TDataSetm_GarbSet
 
TDataSetm_Inputs
 
TDataSetm_Ouputs
 list of logInput:ActualInput
 
TDataSetm_Runco
 list of logOuput:ActualOuput
 
TList * m_Histograms
 Run Control parameters.
 
Int_t fTallyMaker [kStFatal+1]
 counters
 
Int_t m_Mode
 counters
 
Int_t m_Number
 Integer mode of maker.
 
Int_t m_LastRun
 Serial event number.
 
Int_t m_DebugLevel
 Last Run number.
 
Int_t m_MakeReturn
 Debug level.
 
TStopwatch m_Timer
 Make() return flag.
 
StMemStatfMemStatMake
 Timer object.
 
StMemStatfMemStatClear
 StMemStat for Make.
 
Int_t fStatus
 StMemStat for Clear.
 
StMessMgrfLogger
 Maker status.
 
StTurnLoggerfLoggerHold
 
- Protected Attributes inherited from TDataSet
TDataSetfParent
 
TSeqCollection * fList
 

Additional Inherited Members

- Public Types inherited from StMaker
enum  EDebugLevel { kNormal, kDebug }
 
enum  { kSTAFCV_BAD, kSTAFCV_OK, kSTAFCV_ERR =2, kSTAFCV_FATAL =3 }
 
enum  EMakerStatus {
  kInitBeg = 1, kInitEnd = 2, kMakeBeg = 3, kCleaBeg = 4,
  kFiniBeg = 5, kFiniEnd = 6, kActive = 7
}
 
- 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 }
 
- Static Protected Member Functions inherited from TDataSet
static EDataSetPass SortIt (TDataSet *ds)
 
static EDataSetPass SortIt (TDataSet *ds, void *user)
 
- Static Protected Attributes inherited from StMaker
static StMakerfgTopChain = 0
 list of Histograms
 
static StMakerfgStChain = 0
 pointer to top StChain
 
static StMakerfgFailedMaker = 0
 current pointer to StChain
 
static StTestMakerfgTestMaker = 0
 current pointer to failed maker
 
static Int_t fgTallyMaker [kStFatal+1] = {0,0,0,0,0}
 
- Static Protected Attributes inherited from TDataSet
static TDataSetfgMainSet = &mainSet
 

Detailed Description

Definition at line 67 of file StFcsWaveformFitMaker.h.

Member Function Documentation

float StFcsWaveformFitMaker::analyzeWaveform ( int  select,
TGraphAsymmErrors *  g,
float *  res,
TF1 *&  f,
float  ped = 0.0 
)

Perfom the analysis using selected method.

Main analysis function that will determine the ADC sum used to compute the energy

Parameters
selectanalysis method to use
gTGraphAsymmErrors data to use in the analysis method
resarray of determined values from analysis method, max is 8
  • res[0] = pulse integral [ch]
  • res[1] = pulse peak height [ch]
  • res[2] = pulse peak position [timebin]
  • res[3] = pulse peak sigma [timebin]
  • res[4] = pulse fit chi2/NDF
  • res[5] = number of peaks
  • res[6] = pedestal Value
  • res[7] = pedestal Standard Deviation
fTF1 function to use for fitting if needed, gets deleted on function call so analysis method must create a new one each time
pedpedestal value to use in the analysis method

Definition at line 662 of file StFcsWaveformFitMaker.cxx.

References centerTB(), drawFit(), gausFit(), gausFitWithPed(), StFcsDb::getFromName(), highest(), highest3(), mH1F_Res0, mOutFile, mTest, PedFitPulseFit(), PulseFit1(), PulseFit2(), PulseFit2WithPed(), PulseFitAll(), PulseFitAllWithPed(), sum16(), sum8(), StFcsPulseAna::SumDep0(), and StFcsPulseAna::SumDep0Mod().

Referenced by analyzeWaveform(), and Make().

int StFcsWaveformFitMaker::centerTB ( ) const
inline
Returns
#mCenterTB

Definition at line 205 of file StFcsWaveformFitMaker.h.

Referenced by analyzeWaveform(), and InitFitter().

StFcsPulseAna* StFcsWaveformFitMaker::davidFitter ( )
inline
Returns
mPulseFit

Definition at line 207 of file StFcsWaveformFitMaker.h.

References mPulseFit.

void StFcsWaveformFitMaker::drawCh ( UInt_t  detid,
UInt_t  ch 
) const

Draw a single channel on the current canvas/pad.

Draw a single channel's adc vs. tb data. If mPulseFit!=0 then also draw found peaks from StFcsPulseAna.

Needs #mFitDrawOn=1 otherwise channel may not exist in mChWaveData

Parameters
detiddetector id to draw
chchannel to draw

Definition at line 1083 of file StFcsWaveformFitMaker.cxx.

References StFcsPulseAna::DrawCopy(), StFcsPulseAna::GetData(), StFcsDb::getFromName(), mChWaveData, and mPulseFit.

void StFcsWaveformFitMaker::drawDualFit ( UInt_t  detid,
UInt_t  ch 
)

Special draw function, to compare fits for a single channel.

This function will draw a single channel's adc vs. timebin on the current canvas/pad and also the fits from the two methods PulseFit2() and gausFit(). It is intended to be used for comparison and testing only.

Needs #mFitDrawOn=1 otherwise channel may not exist in mChWaveData

Parameters
detiddetector id to draw
chchannel to draw

Definition at line 1120 of file StFcsWaveformFitMaker.cxx.

References StFcsPulseAna::AnalyzeForPeak(), StFcsDbPulse::createPulse(), StFcsPulseAna::DrawCopy(), PeakAna::FoundPeakIndex(), gausFit(), StFcsPulseAna::GetData(), StFcsDb::getFromName(), PeakAna::GetPeak(), mChWaveData, PeakWindow::mEndX, PeakWindow::mPeakX, mPulseFit, PeakWindow::mStartX, PeakAna::NPeaks(), StFcsPulseAna::SetFitPars(), and StFcsDbPulse::TBPerRC().

void StFcsWaveformFitMaker::drawRegion ( int  det,
int  col_low,
int  row_low,
int  col_high,
int  row_high,
int  event = 0 
)

draw a region of the Ecal or Hcal

This function can be used to draw the timebin and adc data in the Ecal or Hcal for a specified region in terms of column and rows. It draws on the internal canvas #mCanvas. Utilizes PadNum4x4(), and GenericPadPos() to get the correct pad number. By default, it will draw on the same pad, a 2x3 (column x row) grouping of channels for Ecal and a 2x2 grouping of channels in the Hcal.

Needs #mFitDrawOn>0 to draw all channels

Parameters
detdetector id to draw, only Ecal and Hcal (det<4)
col_lowlowest column of Ecal/Hcal to draw
row_lowlowest row of Ecal/Hcal to draw
col_highhighest column of Ecal/Hcal to draw
row_highhighest row of Ecal/Hcal to draw
eventevent number that is drawn, only used in file name when saving, this way multiple events can be saved without overwrite

Definition at line 1208 of file StFcsWaveformFitMaker.cxx.

References StFcsDb::getColumnNumber(), StFcsDb::getFromName(), StFcsDb::getRowNumber(), StFcsDbPulse::getYMinMax(), mChWaveData, and StFcsDbPulse::PadNum4x4().

Referenced by drawEvent().

int StFcsWaveformFitMaker::Finish ( )
virtual
int StFcsWaveformFitMaker::GenericPadPos ( int  value,
int  Nvals,
int  PadNums 
)
static

Helper function for PadNum4x4.

This function can be used to get the pad number needed when you have Nvals of stuff to draw in a single column/row

Parameters
valuecolumn/row of Ecal or Hcal channel to draw
Nvalsnumber of channels in a column/row to draw on the same pad
PadNumsnumber of pads in a column/row
Returns
column/row number in a TCanvas that was split

Definition at line 1705 of file StFcsWaveformFitMaker.cxx.

Referenced by PadNum4x4().

TGraphAsymmErrors * StFcsWaveformFitMaker::getGraph ( int  idx = -1)

Return TGraphAsymmErrors at idx.

Parameters
idxindex of mChWaveData to get graph, if idx<0 (default) it returns "current" which is idx=#mHitIdx-1
Returns
TGraphAsymmErrors for channel data, 0 if idx does not exist in mChWaveData

Definition at line 547 of file StFcsWaveformFitMaker.cxx.

References mChWaveData.

Referenced by Make().

float StFcsWaveformFitMaker::highest ( TGraphAsymmErrors *  g,
float *  res 
)
float StFcsWaveformFitMaker::highest3 ( TGraphAsymmErrors *  g,
float *  res 
)
StFcsPulseAna * StFcsWaveformFitMaker::InitFitter ( Double_t  ped = 0)

Sets up basic values needed by StFcsPulseAna.

Parameters
pedthe pedestal value to use

Definition at line 1771 of file StFcsWaveformFitMaker.cxx.

References centerTB(), mPulseFit, PeakAna::SetBaseline(), PeakAna::SetBaselineSigmaScale(), PeakAna::SetContinuity(), PeakAna::SetRange(), and PeakAna::SetSearchWindow().

Referenced by SetupDavidFitterMay2022().

int StFcsWaveformFitMaker::Make ( )
virtual

The Make() method is the one responsible for calling the maker's InitRun(). Note that that InitRun() is called for real data and if both of the following are true

  • a header exists
  • the run number changes

This is the ONLY place calling the InitRun() routine.

check privilege to skip event

Reimplemented from StMaker.

Definition at line 463 of file StFcsWaveformFitMaker.cxx.

References analyzeWaveform(), StFcsDb::getGain(), StFcsDb::getGainCorrection(), getGraph(), StFcsDb::getName(), kStOK, kStOk, kStWarn, mH1_PeakTimingGaus, mH1_PeakTimingPuls, mH2_PeakTimingCompare, mTest, and StFcsDb::setPedestal().

TGraphAsymmErrors * StFcsWaveformFitMaker::makeTGraphAsymmErrors ( int  n,
double *  t,
double *  adc 
)

Create TGraphAsymmErrors from given timebin and adc data.

This function is used populate a TGraphAsymmErrors object from raw data with asymmetric errors when adc is saturated at #mAdcSaturation. Uses StFcsDbPulse::setTGraphAsymmErrors() to determine the errors.

Places graph at #mHitIdx=0 of mChWaveData and will be deleted in destructor except when #mFitDrawOn is set, see setFitDrawOn().

Parameters
nsize of array/data
tarray of timebin data
adcarray of ADC data
Returns
ADC saturated TGraphAsymmErrors object

Definition at line 575 of file StFcsWaveformFitMaker.cxx.

References resetGraph(), and StFcsDbPulse::setTGraphAsymmErrors().

Referenced by analyzeWaveform(), and makeTGraphAsymmErrors().

std::vector< int > StFcsWaveformFitMaker::NPeaksPrePost ( int &  trigidx,
Double_t &  xmin,
Double_t &  xmax 
) const
protected

Finds out how many peaks are within a fixed number of pre-crossings and post-crossings.

This function is used to find out how many peaks are within 3 RHIC pre-crossings and 2 RHIC post-crossings. The index in PeakAna::mPeaks that those peaks correspond to are saved in a vector and returned with trigidx being the index in the returned vector where the triggered crossing occurs in PeakAna::mPeaks. It also will find the x-range for the returned peak index vector (xmin, xmax).

Parameters
trigidxindex in the returned vector of where the triggered crossing occurs in PeakAna::mPeaks
xminminimum x-value for the found peaks
xmaxmaximum x-value for the found peaks
Returns
vector of indexes for PeakAna::mPeaks which correspond to peaks within the search crieteria

Definition at line 1745 of file StFcsWaveformFitMaker.cxx.

References PeakAna::GetPeak(), PeakWindow::mEndX, PeakWindow::mPeakX, mPulseFit, PeakWindow::mStartX, PeakAna::NPeaks(), and StFcsDbPulse::TBPerRC().

Referenced by PulseFit2().

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

Helper function for drawRegion()

Get the pad number to use when drawing Ecal and Hcal channels on a TCanvas split into 4x4 pads. It assumes each pad will contain a 2x3 (column x row) grouping of Ecal channels and a 2x2 grouping of Hcal channels.

Parameters
detdetector id to get pad for
colcolumn of Ecal/Hcal channel to get pad number for
rowrow of Ecal/Hcal channel to get pad number for
Returns
pad number to draw channel on for a 4x4 split TCanvas

Definition at line 1711 of file StFcsWaveformFitMaker.cxx.

References GenericPadPos().

int StFcsWaveformFitMaker::PeakCompare ( const PeakWindow pwin1,
const PeakWindow pwin2 
)
protected

Compare if two peaks overlap and return a bit vector of tests passed/failed.

This function can be used to compare two PeakWindow objects pwin1 and pwin2 for overlap. It will check x-difference between the peak locations and the ratio of the peak heights. If the x-difference is <10.0 it will turn on bit 0. If peak ratio of pwin1 to pwin2 is <2 it will turn on bit 1. If returned bit vector is 0 it means pwin1 does not overlap with pwin2

Parameters
pwin1first PeakWindow to compare
pwin2second PeakWindow to compare
Returns
bit vector of tests passed, 0 means no overlap

Definition at line 1729 of file StFcsWaveformFitMaker.cxx.

References PeakWindow::mPeakX, and PeakWindow::mPeakY.

Referenced by PulseFit1().

void StFcsWaveformFitMaker::setFileName ( char *  file,
int  maxpage = 25,
int  skip = 5 
)
inline

Set event drawing options.

This function can be used to set the file name the channel drawing canvas will save to, the number of pages for the canvas to save, and how may channels to skip when drawing channels

Parameters
filename of file to save drawing canvas to, exclude file extension in the name since all saved files will be pdf format
maxpagemaximum number of pages to draw
skipnumber of channels to skip before drawing

Definition at line 190 of file StFcsWaveformFitMaker.h.

void StFcsWaveformFitMaker::setFitDrawOn ( int  v = 1)
inline

Sets how much channel data will saved in mChWaveData.

This flag is used to tell StFcsWaveformFitMaker how much channel data to store for each event.

Parameters
vflag level
  • 0 = only store 1 channel data for an event, i.e. don't increment #mHitIdx
  • 1 = keep all channel data for an event, i.e. increment #mHitIdx until event ends
  • 2 = keep channel data up to MAXPAD=16 in drawFit(), i.e. increment #mHitIdx until #mHitIdx=MAXPAD

Definition at line 201 of file StFcsWaveformFitMaker.h.

Member Data Documentation

int StFcsWaveformFitMaker::mTest = 0
protected

Variable to use when testing StFcsWaveformFitMaker algorithms.

Self contained analysis for testing various components/functions of StFcsWaveformFitMaker

Definition at line 289 of file StFcsWaveformFitMaker.h.

Referenced by analyzeWaveform(), gausFit(), Make(), PulseFit1(), PulseFit2(), and setTest().


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