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

#include <StGenericVertexFinder.h>

Inheritance diagram for StGenericVertexFinder:
StEvPPV::StPPVertexFinder StFixedVertexFinder StMinuitVertexFinder StppLMVVertexFinder StPPVertexFinder

Public Types

using StDcaList = std::vector< const StDcaGeometry * >
 
using VertexFit_t = star_vertex::VertexFit_t
 
using SeedFinder_t = star_vertex::SeedFinder_t
 Options to select vertex seed finder.
 

Public Member Functions

virtual int fit (StEvent *)=0
 
StPrimaryVertexgetVertex (int idx) const
 
void addVertex (const StPrimaryVertex &vtx)
 
int size () const
 
void UseVertexConstraint (const vertexSeed_st &beamline)
 
void NoVertexConstraint ()
 
int IsVertexConstraint () const
 
virtual void UsePCT (bool usePCT=true)
 
virtual void UseBTOF (bool useBTOF=true)
 
virtual void UseCTB (bool useCTB=true)
 
virtual void printInfo (ostream &=cout) const =0
 
virtual void SetMode (Int_t mode=0)
 
virtual int GetMode () const
 
void SetDebugLevel (Int_t level)
 
virtual void Init ()
 
virtual void Finish ()
 
virtual void InitRun (int run_number, const St_db_Maker *db_maker)
 
virtual void Clear ()
 
const std::vector
< StPrimaryVertex > * 
result ()
 
void result (TClonesArray &stMuDstPrimaryVertices)
 
void FillStEvent (StEvent *)
 
virtual void SetVertexPosition (double x, double y, double z)
 
virtual void SetVertexError (double x, double y, double z)
 
virtual int IsFixed () const
 
virtual int fit (const StMuDst &muDst)
 

Protected Member Functions

 StGenericVertexFinder ()
 Default initialization with unspecified seed finder and fitting mode.
 
 StGenericVertexFinder (SeedFinder_t seedFinder, VertexFit_t fitMode)
 
std::vector< double > FindSeeds_TSpectrum ()
 
double beamX (double z) const
 
double beamY (double z) const
 
StThreeVectorD CalcVertexSeed (const StDcaList &trackDcas)
 
virtual double CalcChi2DCAs (const StThreeVectorD &point)
 Caclulates total chi2 for the track DCAs stored in mDCAs and a point.
 
double CalcChi2Beamline (const StThreeVectorD &point)
 Caclulates chi2 for the beamline and a point. More...
 
double CalcChi2DCAsBeamline (const StThreeVectorD &point)
 Caclulates total chi2 for the beamline and track DCAs stored in mDCAs and a point.
 

Static Protected Member Functions

static void fcnCalcChi2DCAs (int &npar, double *gin, double &f, double *par, Int_t iflag)
 
static void fcnCalcChi2DCAsBeamline1D (int &npar, double *gin, double &f, double *par, Int_t iflag)
 A static interface to CalcChi2DCAs(...) with x and y fixed by beamline equation.
 
static void fcnCalcChi2DCAsBeamline (int &npar, double *gin, double &f, double *par, int iflag)
 A static interface to CalcChi2DCAsBeamline(...)
 

Protected Attributes

StPrimaryVertexOrder mVertexOrderMethod
 
bool mVertexConstrain
 
int mMode
 
VertexFit_t mVertexFitMode
 The type of vertex fit to use in derived concrete implementation.
 
SeedFinder_t mSeedFinderType
 The type of vertex seed finder to use in derived concrete implementation.
 
int mDebugLevel
 
bool mUseBtof
 
bool mUseCtb
 
vertexSeed_st mBeamline
 
StDcaList mDCAs
 
TMinuit * mMinuit
 

Static Protected Attributes

static StGenericVertexFindersSelf = nullptr
 By default point to invalid object. More...
 

Detailed Description

Author
Lee Barnby, April 2003

(pseudo) Base class for vertex finders

Id:
StGenericVertexFinder.h,v 1.58 2020/09/13 02:55:56 genevb Exp

Definition at line 30 of file StGenericVertexFinder.h.

Member Typedef Documentation

using StGenericVertexFinder::VertexFit_t = star_vertex::VertexFit_t

Options used to define the type of vertex fit performed in a concrete implementation

Definition at line 39 of file StGenericVertexFinder.h.

Member Function Documentation

double StGenericVertexFinder::beamX ( double  z) const
protected

Returns x coordinate on the beamline (given by mBeamline) corresponding to the passed value of z.

Definition at line 431 of file StGenericVertexFinder.cxx.

References mBeamline.

Referenced by fcnCalcChi2DCAsBeamline1D().

double StGenericVertexFinder::beamY ( double  z) const
protected

Returns y coordinate on the beamline (given by mBeamline) corresponding to the passed value of z.

Definition at line 441 of file StGenericVertexFinder.cxx.

References mBeamline.

Referenced by fcnCalcChi2DCAsBeamline1D().

double StGenericVertexFinder::CalcChi2Beamline ( const StThreeVectorD point)
protected

Caclulates chi2 for the beamline and a point.

Calculates chi^2 for the beamline and a point (xv, yv, zv) passed as input argument.

The beamline parameters are taken from this class member object mBeamline of vertexSeed_st type which is initialized in UseVertexConstraint().

The distance between the beamline and the point is experssed in terms of the measured beamline parameters and the point's coordinates. We then calculate the Jacobian for thus parameterized distance w.r.t. measured parameters, and calculate the error on the distance itself by calculating a new covariance matrix S' = JSJ^T. Note that in the representation along the line connecting the poin with the beamline the covariance matrix has a dimension of 1.

Author
Dmitri Smirnov
Date
April, 2016

Definition at line 277 of file StGenericVertexFinder.cxx.

References mBeamline.

Referenced by CalcChi2DCAsBeamline().

StThreeVectorD StGenericVertexFinder::CalcVertexSeed ( const StDcaList &  trackDcas)
protected

Recalculates the vertex position from DCA measurements in the input list of DCAs

Estimates vertex position from track DCA states in mDCAs. The beam position is not taken into account.

Author
Dmitri Smirnov
Date
April 2016

Definition at line 358 of file StGenericVertexFinder.cxx.

void StGenericVertexFinder::FillStEvent ( StEvent event)

Adds the vertex to StEvent (currently as a primary) Here we invent our own flag and other data to put in In real life we have to get it from somewhere (as done for position)

Definition at line 94 of file StGenericVertexFinder.cxx.

Referenced by StiStarVertexFinder::fit(), and StGenericVertexMaker::Make().

std::vector< double > StGenericVertexFinder::FindSeeds_TSpectrum ( )
protected

Searches for vertex candidates and fills private mVertexData container using the ROOT's TSpectrum peak finder applied to the distribution of track DCAs along the z axis

Searches for vertex seeds using the ROOT's TSpectrum peak finder applied to track's DCA z distribution. This method can be transfered to a separate class complying with a VertexSeedFinder interface (not available as of now). Returns a vector of peak positions along the z. We copy the result to a vector because TSpectrum::GetPositionX() may return either float* or double* depending on ROOT version.

Definition at line 123 of file StGenericVertexFinder.cxx.

References mDCAs.

void StGenericVertexFinder::UseVertexConstraint ( const vertexSeed_st &  beamline)

Stores beamline parameters (aka vertexSeed) from DB record in this class member mBeamline.

Definition at line 404 of file StGenericVertexFinder.cxx.

References mBeamline, and UseVertexConstraint().

Referenced by UseVertexConstraint().

Member Data Documentation

vertexSeed_st StGenericVertexFinder::mBeamline
protected

All measured parameters of the beamline. Updated whenever UseVertexConstraint(const vertexSeed_st&) is called

Definition at line 102 of file StGenericVertexFinder.h.

Referenced by beamX(), beamY(), CalcChi2Beamline(), and UseVertexConstraint().

StDcaList StGenericVertexFinder::mDCAs
protected

A container with pointers to DCA states to be used in a vertex fit. The DCAs are assumed to be calculated w.r.t. the z-axis, i.e. x = y = 0.

Definition at line 106 of file StGenericVertexFinder.h.

Referenced by CalcChi2DCAs(), and FindSeeds_TSpectrum().

StGenericVertexFinder * StGenericVertexFinder::sSelf = nullptr
staticprotected

By default point to invalid object.

Static pointer to this base class allowing access to concrete implementations from Minuit minimization function

Definition at line 112 of file StGenericVertexFinder.h.

Referenced by fcnCalcChi2DCAsBeamline(), and fcnCalcChi2DCAsBeamline1D().


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