CbmRoot
Loading...
Searching...
No Matches
V0Finder Class Reference

A V0-finding algorithm. More...

#include <KfpV0Finder.h>

Collaboration diagram for V0Finder:
[legend]

Classes

struct  ParticleInfo
 A structure to keep temporary PID information for tracks. More...
 

Public Member Functions

 V0Finder ()=default
 Default constructor.
 
 V0Finder (const V0Finder &)=delete
 Copy constructor.
 
 V0Finder (V0Finder &&)=delete
 Move constructor.
 
 ~V0Finder ()=default
 Destructor.
 
V0Finderoperator= (const V0Finder &)=delete
 Copy assignment operator.
 
V0Finderoperator= (V0Finder &&)=delete
 Move assignment operator.
 
void AddDecayToReconstructionList (int pdg)
 Adds particle to reconstruction list.
 
const V0FinderMonitorData_t & GetEventMonitor () const
 Gets monitor data.
 
const std::array< float, 3 > & GetOrigin () const
 Gets origin.
 
KFParticleFinder * GetKFParticleFinder ()
 Mutable access to the KfParticleFinder of the run topology reconstructor.
 
const KFParticleFinder * GetKFParticleFinder () const
 Constant access to the KfParticleFinder of the run topology reconstructor.
 
const std::vector< ParticleInfo > & GetParticleInfo () const
 Gets a vector of particle info.
 
double GetSelectedT0 () const
 Gets selected t0.
 
const std::vector< uint32_t > & GetSelectedTrackIds () const
 Gets indices of selected tracks.
 
const std::vector< double > & GetT0s () const
 Gets found t0s.
 
const std::unique_ptr< KFParticleTopoReconstructor > & GetTopoReconstructor () const
 Accessor to topology reconstructor.
 
const auto & GetTrackAssignedParams () const
 Gets track parameters.
 
void Init ()
 Initializes the instance (called in the beginning of the run)
 
CbmEventTriggers Process (const RecoResults &recoEvent)
 Processes a reconstructed data sample, returns a collection of fired triggers.
 
void SetBmonPartitionIndex (int iPartition)
 Sets an address of a reference BMON diamond.
 
void SetMinPionDca (double dca)
 
void SetMinProtonDca (double dca)
 Sets minimal proton DCA to primary vertex.
 
void SetOrigin (double x, double y, double z)
 Sets origin.
 
void SetPionVelocityRange (double vMin, double vMax)
 Sets minimal pion DCA to primary vertex.
 
void SetProtonVelocityRange (double vMin, double vMax)
 Sets proton velocity range.
 
void SetPrimaryAssignedPdg (int pdg)
 Sets the assigned PDG for primary particles.
 
void SetQpAssignedUncertainty (double uncertainty)
 Assignes an uncertainty to the momentum measurement.
 
void SetTzeroOffset (double offset)
 Sets an offset to t0.
 
void SetLCut (float cut)
 Sets cut on the distance to the primary vertex from the decay vertex.
 
void SetChiPrimaryCut2D (float cut)
 Sets cut on $\chi^2_{prim}$ of each track for 2-daughter decays.
 
void SetChi2Cut2D (float cut)
 Sets cut on $\chi^2_{geo}$ for 2-daughter decays.
 
void SetLdLCut2D (float cut)
 Sets cut on $l/\Delta l$ for 2-daughter decays.
 

Static Public Attributes

static constexpr double kPionMass {0.13957039}
 Pion mass [GeV/c2].
 
static constexpr double kProtonMass {0.938272088}
 Proton mass [GeV/c2].
 
static constexpr double kSpeedOfLight {29.9792458}
 Speed of light [cm/ns].
 
static constexpr int32_t kUndefPdg {-2}
 PDG for tracks, which PID cannot be inferred.
 

Private Member Functions

bool AssignMomentum (const PartitionedVector< tof::Hit > &tofHits, const std::vector< RecoResults::HitId_t > &tofHitIds, double t0, ParticleInfo &pidInfo)
 Assigns momentum based on the TOF measurement.
 
void AssignPid (ParticleInfo &info)
 Assigns PID info based on the estimated DCA.
 
void CollectDca (const RecoResults &recoEvent)
 Collects a vector of DCA.
 
void CollectT0 (gsl::span< const bmon::Hit > bmonHits)
 Collects T0 values among the BMON hits.
 
double EstimateBeta (const tof::Hit &tofHit, double t0) const
 Estimates speed of particle, using TOF measurement.
 
double EstimateDca (const sts::Hit &fst, const sts::Hit &snd) const
 Estimate DCA of a track to origin.
 
bool FindV0Candidates (const RecoResults &recoEvent, double t0)
 Tries to find V0-candidates for a given t0.
 
void InitTrackParamVectors (const ca::Vector< ca::Track > &tracks)
 Initializes copies of track parameter vectors.
 
bool SelectTrack (const ParticleInfo &particleInfo) const
 Applies selection cut on the track.
 
void SetKfpTrackParameters (KFPTrackVector &kfpTrkVector, uint32_t iKfpTrk, uint32_t iCaTrk, const ca::Track::TrackParam_t &trkParam, const ParticleInfo &particleInfo) const
 Sets KFP track parameters.
 

Static Private Member Functions

static KFVertex MakeKfpPrimaryVertex (const std::array< float, 3 > &r)
 Makes a KF vertex.
 

Private Attributes

V0FinderMonitorData_t fEventMonitor
 Main monitor data instance.
 
double fTzeroOffset {0.}
 Offset for T0.
 
double fMinPionDca {1.5}
 Minimum DCA to PV for pions.
 
double fMinProtonDca {0.5}
 Minimum DCA to PV for protons.
 
double fQpAssignedUncertainty {0.1}
 Assigned relative uncertainty for q/p estimation.
 
double fMinBetaProton {0.}
 Minimal proton velocity (beta) [c].
 
double fMaxBetaProton {1.}
 Maximal proton velocity (beta) [c].
 
double fMinBetaPion {0.}
 Minimal proton velocity (beta) [c].
 
double fMaxBetaPion {1.}
 Maximal proton velocity (beta) [c].
 
int fPrimaryAssignedPdg {321}
 Assigned PDG hypothesis for primary particles.
 
int fBmonPartitionIndex {-1}
 Index of selected partition in BMON hit vector.
 
std::array< float, 3 > fOrigin {0.f, 0.f, 0.f}
 Coordinates of origin [cm].
 
std::vector< double > fvT0s
 Found t0s [ns] (in event)
 
std::vector< ParticleInfofvParticleInfo
 PID info of tracks (in event)
 
std::vector< uint32_t > fvSelectedTrackIds
 IDs of selected tracks (in event)
 
double fSelectedT0 {std::numeric_limits<double>::quiet_NaN()}
 A t0 value selected by the lambda-finder.
 
std::vector< std::pair< ca::Track::TrackParam_t, ca::Track::TrackParam_t > > fvTrackParam
 A copy of track parameters (first, last)
 
std::unique_ptr< KFParticleTopoReconstructor > fpTopoReconstructor {std::make_unique<KFParticleTopoReconstructor>()}
 An instance of the topology reconstructor.
 

Static Private Attributes

static constexpr bool kUseAverageSpeed {false}
 If an average speed of tof hits is used.
 

Detailed Description

A V0-finding algorithm.

Definition at line 25 of file KfpV0Finder.h.

Constructor & Destructor Documentation

◆ V0Finder() [1/3]

cbm::algo::kfp::V0Finder::V0Finder ( )
default

Default constructor.

◆ V0Finder() [2/3]

cbm::algo::kfp::V0Finder::V0Finder ( const V0Finder & )
delete

Copy constructor.

◆ V0Finder() [3/3]

cbm::algo::kfp::V0Finder::V0Finder ( V0Finder && )
delete

Move constructor.

◆ ~V0Finder()

cbm::algo::kfp::V0Finder::~V0Finder ( )
default

Destructor.

Member Function Documentation

◆ AddDecayToReconstructionList()

void cbm::algo::kfp::V0Finder::AddDecayToReconstructionList ( int pdg)
inline

Adds particle to reconstruction list.

Parameters
pdgA PDG code of the particle to be reconstructed

Definition at line 65 of file KfpV0Finder.h.

◆ AssignMomentum()

bool V0Finder::AssignMomentum ( const PartitionedVector< tof::Hit > & tofHits,
const std::vector< RecoResults::HitId_t > & tofHitIds,
double t0,
ParticleInfo & pidInfo )
private

Assigns momentum based on the TOF measurement.

Parameters
[in]tofHitsTof hits container
[in]tofHitIdsTof hit indices, used by the track
[in]t0A t0 value
[in,out]pidInfoPID information for the track
Returns
true A physically reasonable momentum assigned
false Momentum was not assigned, because it was nonphysical

Definition at line 24 of file KfpV0Finder.cxx.

◆ AssignPid()

void V0Finder::AssignPid ( ParticleInfo & info)
private

Assigns PID info based on the estimated DCA.

Parameters
dcaDCA of track to origin
Returns
(mass, charge, pid)

Definition at line 59 of file KfpV0Finder.cxx.

◆ CollectDca()

void V0Finder::CollectDca ( const RecoResults & recoEvent)
private

Collects a vector of DCA.

Parameters
recoEventInstance of a reconstructed event

Definition at line 89 of file KfpV0Finder.cxx.

◆ CollectT0()

void V0Finder::CollectT0 ( gsl::span< const bmon::Hit > bmonHits)
private

Collects T0 values among the BMON hits.

Parameters
bmonHitsA span of BMON hits

If multiple T0-s are found, the routine will run multiple times, until V0-candidates are found

Definition at line 108 of file KfpV0Finder.cxx.

◆ EstimateBeta()

double V0Finder::EstimateBeta ( const tof::Hit & tofHit,
double t0 ) const
private

Estimates speed of particle, using TOF measurement.

Parameters
tofHitA TOF hit
t0An t0 value
Returns
Speed of particle [c]

Definition at line 128 of file KfpV0Finder.cxx.

◆ EstimateDca()

double V0Finder::EstimateDca ( const sts::Hit & fst,
const sts::Hit & snd ) const
private

Estimate DCA of a track to origin.

Parameters
fstfirst STS hit
sndsecond STS hit
Returns
dca [cm]

Definition at line 118 of file KfpV0Finder.cxx.

◆ FindV0Candidates()

bool V0Finder::FindV0Candidates ( const RecoResults & recoEvent,
double t0 )
private

Tries to find V0-candidates for a given t0.

Parameters
recoEventInstance of a reconstructed event
t0An estimated t0 value
Returns
true V0-candidates found
false V0-candidates not found

Definition at line 143 of file KfpV0Finder.cxx.

◆ GetEventMonitor()

const V0FinderMonitorData_t & cbm::algo::kfp::V0Finder::GetEventMonitor ( ) const
inline

Gets monitor data.

Definition at line 68 of file KfpV0Finder.h.

◆ GetKFParticleFinder() [1/2]

KFParticleFinder * cbm::algo::kfp::V0Finder::GetKFParticleFinder ( )
inline

Mutable access to the KfParticleFinder of the run topology reconstructor.

Definition at line 74 of file KfpV0Finder.h.

◆ GetKFParticleFinder() [2/2]

const KFParticleFinder * cbm::algo::kfp::V0Finder::GetKFParticleFinder ( ) const
inline

Constant access to the KfParticleFinder of the run topology reconstructor.

Definition at line 77 of file KfpV0Finder.h.

◆ GetOrigin()

const std::array< float, 3 > & cbm::algo::kfp::V0Finder::GetOrigin ( ) const
inline

Gets origin.

Definition at line 71 of file KfpV0Finder.h.

◆ GetParticleInfo()

const std::vector< ParticleInfo > & cbm::algo::kfp::V0Finder::GetParticleInfo ( ) const
inline

Gets a vector of particle info.

Definition at line 80 of file KfpV0Finder.h.

◆ GetSelectedT0()

double cbm::algo::kfp::V0Finder::GetSelectedT0 ( ) const
inline

Gets selected t0.

Note
NaN, if Lambda-candidate was not found

Definition at line 84 of file KfpV0Finder.h.

◆ GetSelectedTrackIds()

const std::vector< uint32_t > & cbm::algo::kfp::V0Finder::GetSelectedTrackIds ( ) const
inline

Gets indices of selected tracks.

Definition at line 87 of file KfpV0Finder.h.

◆ GetT0s()

const std::vector< double > & cbm::algo::kfp::V0Finder::GetT0s ( ) const
inline

Gets found t0s.

Definition at line 90 of file KfpV0Finder.h.

◆ GetTopoReconstructor()

const std::unique_ptr< KFParticleTopoReconstructor > & cbm::algo::kfp::V0Finder::GetTopoReconstructor ( ) const
inline

Accessor to topology reconstructor.

Definition at line 93 of file KfpV0Finder.h.

◆ GetTrackAssignedParams()

const auto & cbm::algo::kfp::V0Finder::GetTrackAssignedParams ( ) const
inline

Gets track parameters.

Definition at line 96 of file KfpV0Finder.h.

◆ Init()

void V0Finder::Init ( )

Initializes the instance (called in the beginning of the run)

Definition at line 246 of file KfpV0Finder.cxx.

◆ InitTrackParamVectors()

void V0Finder::InitTrackParamVectors ( const ca::Vector< ca::Track > & tracks)
private

Initializes copies of track parameter vectors.

Parameters
tracksA container of tracks

Definition at line 250 of file KfpV0Finder.cxx.

◆ MakeKfpPrimaryVertex()

KFVertex V0Finder::MakeKfpPrimaryVertex ( const std::array< float, 3 > & r)
staticprivate

Makes a KF vertex.

Parameters
rcoordinates of PV [cm]

Definition at line 260 of file KfpV0Finder.cxx.

◆ operator=() [1/2]

V0Finder & cbm::algo::kfp::V0Finder::operator= ( const V0Finder & )
delete

Copy assignment operator.

◆ operator=() [2/2]

V0Finder & cbm::algo::kfp::V0Finder::operator= ( V0Finder && )
delete

Move assignment operator.

◆ Process()

CbmEventTriggers V0Finder::Process ( const RecoResults & recoEvent)

Processes a reconstructed data sample, returns a collection of fired triggers.

Definition at line 275 of file KfpV0Finder.cxx.

◆ SelectTrack()

bool V0Finder::SelectTrack ( const ParticleInfo & particleInfo) const
private

Applies selection cut on the track.

Parameters
particleInfoParticle collected information
Returns
true Track is selected
false Track is rejected

Definition at line 322 of file KfpV0Finder.cxx.

◆ SetBmonPartitionIndex()

void cbm::algo::kfp::V0Finder::SetBmonPartitionIndex ( int iPartition)
inline

Sets an address of a reference BMON diamond.

Parameters
iPartitionAn index of the BMON hit partition: used to selected the hits from the particular config

Definition at line 106 of file KfpV0Finder.h.

◆ SetChi2Cut2D()

void cbm::algo::kfp::V0Finder::SetChi2Cut2D ( float cut)
inline

Sets cut on $\chi^2_{geo}$ for 2-daughter decays.

Parameters
cutCut value

Definition at line 163 of file KfpV0Finder.h.

◆ SetChiPrimaryCut2D()

void cbm::algo::kfp::V0Finder::SetChiPrimaryCut2D ( float cut)
inline

Sets cut on $\chi^2_{prim}$ of each track for 2-daughter decays.

Parameters
cutCut value

Definition at line 159 of file KfpV0Finder.h.

◆ SetKfpTrackParameters()

void V0Finder::SetKfpTrackParameters ( KFPTrackVector & kfpTrkVector,
uint32_t iKfpTrk,
uint32_t iCaTrk,
const ca::Track::TrackParam_t & trkParam,
const ParticleInfo & particleInfo ) const
private

Sets KFP track parameters.

Parameters
[in,out]kfpTrkVectorReference to the KFP track vector
[in]iKfpTrkIndex of the KFP track
[in]iCaTrkIndex of the CA track
[in]trkParamTrack parameters
[in]particleInfoParticle information

Definition at line 340 of file KfpV0Finder.cxx.

◆ SetLCut()

void cbm::algo::kfp::V0Finder::SetLCut ( float cut)
inline

Sets cut on the distance to the primary vertex from the decay vertex.

Parameters
cutCut value [cm]

Definition at line 155 of file KfpV0Finder.h.

◆ SetLdLCut2D()

void cbm::algo::kfp::V0Finder::SetLdLCut2D ( float cut)
inline

Sets cut on $l/\Delta l$ for 2-daughter decays.

Parameters
cutCut value

Definition at line 167 of file KfpV0Finder.h.

◆ SetMinPionDca()

void cbm::algo::kfp::V0Finder::SetMinPionDca ( double dca)
inline
Parameters
dcaDCA [cm]

Definition at line 109 of file KfpV0Finder.h.

◆ SetMinProtonDca()

void cbm::algo::kfp::V0Finder::SetMinProtonDca ( double dca)
inline

Sets minimal proton DCA to primary vertex.

Parameters
dcaDCA [cm]

Definition at line 113 of file KfpV0Finder.h.

◆ SetOrigin()

void cbm::algo::kfp::V0Finder::SetOrigin ( double x,
double y,
double z )
inline

Sets origin.

Parameters
xX-coordinate of the origin [cm]
yY-coordinate of the origin [cm]
zZ-coordinate of the origin [cm]

Definition at line 120 of file KfpV0Finder.h.

◆ SetPionVelocityRange()

void cbm::algo::kfp::V0Finder::SetPionVelocityRange ( double vMin,
double vMax )
inline

Sets minimal pion DCA to primary vertex.

Sets pion velocity range

Parameters
vMinMinimal velocity [cm/ns]
vMaxMaximal velocity [cm/ns]

Definition at line 126 of file KfpV0Finder.h.

◆ SetPrimaryAssignedPdg()

void cbm::algo::kfp::V0Finder::SetPrimaryAssignedPdg ( int pdg)
inline

Sets the assigned PDG for primary particles.

Parameters
pdgPDG code of the particle

Definition at line 143 of file KfpV0Finder.h.

◆ SetProtonVelocityRange()

void cbm::algo::kfp::V0Finder::SetProtonVelocityRange ( double vMin,
double vMax )
inline

Sets proton velocity range.

Parameters
vMinMinimal velocity [cm/ns]
vMaxMaximal velocity [cm/ns]

Definition at line 135 of file KfpV0Finder.h.

◆ SetQpAssignedUncertainty()

void cbm::algo::kfp::V0Finder::SetQpAssignedUncertainty ( double uncertainty)
inline

Assignes an uncertainty to the momentum measurement.

Parameters
uncertaintyRelative uncertainty ( = sqrt(var(q/p)) / (q/p))

Definition at line 147 of file KfpV0Finder.h.

◆ SetTzeroOffset()

void cbm::algo::kfp::V0Finder::SetTzeroOffset ( double offset)
inline

Sets an offset to t0.

Parameters
offsetAn offset [ns]

Definition at line 151 of file KfpV0Finder.h.

Member Data Documentation

◆ fBmonPartitionIndex

int cbm::algo::kfp::V0Finder::fBmonPartitionIndex {-1}
private

Index of selected partition in BMON hit vector.

Definition at line 259 of file KfpV0Finder.h.

◆ fEventMonitor

V0FinderMonitorData_t cbm::algo::kfp::V0Finder::fEventMonitor
private

Main monitor data instance.

Definition at line 245 of file KfpV0Finder.h.

◆ fMaxBetaPion

double cbm::algo::kfp::V0Finder::fMaxBetaPion {1.}
private

Maximal proton velocity (beta) [c].

Definition at line 255 of file KfpV0Finder.h.

◆ fMaxBetaProton

double cbm::algo::kfp::V0Finder::fMaxBetaProton {1.}
private

Maximal proton velocity (beta) [c].

Definition at line 253 of file KfpV0Finder.h.

◆ fMinBetaPion

double cbm::algo::kfp::V0Finder::fMinBetaPion {0.}
private

Minimal proton velocity (beta) [c].

Definition at line 254 of file KfpV0Finder.h.

◆ fMinBetaProton

double cbm::algo::kfp::V0Finder::fMinBetaProton {0.}
private

Minimal proton velocity (beta) [c].

Definition at line 252 of file KfpV0Finder.h.

◆ fMinPionDca

double cbm::algo::kfp::V0Finder::fMinPionDca {1.5}
private

Minimum DCA to PV for pions.

Definition at line 249 of file KfpV0Finder.h.

◆ fMinProtonDca

double cbm::algo::kfp::V0Finder::fMinProtonDca {0.5}
private

Minimum DCA to PV for protons.

Definition at line 250 of file KfpV0Finder.h.

◆ fOrigin

std::array<float, 3> cbm::algo::kfp::V0Finder::fOrigin {0.f, 0.f, 0.f}
private

Coordinates of origin [cm].

Definition at line 262 of file KfpV0Finder.h.

◆ fPrimaryAssignedPdg

int cbm::algo::kfp::V0Finder::fPrimaryAssignedPdg {321}
private

Assigned PDG hypothesis for primary particles.

Definition at line 256 of file KfpV0Finder.h.

◆ fpTopoReconstructor

std::unique_ptr<KFParticleTopoReconstructor> cbm::algo::kfp::V0Finder::fpTopoReconstructor {std::make_unique<KFParticleTopoReconstructor>()}
private

An instance of the topology reconstructor.

Definition at line 274 of file KfpV0Finder.h.

◆ fQpAssignedUncertainty

double cbm::algo::kfp::V0Finder::fQpAssignedUncertainty {0.1}
private

Assigned relative uncertainty for q/p estimation.

Definition at line 251 of file KfpV0Finder.h.

◆ fSelectedT0

double cbm::algo::kfp::V0Finder::fSelectedT0 {std::numeric_limits<double>::quiet_NaN()}
private

A t0 value selected by the lambda-finder.

Definition at line 266 of file KfpV0Finder.h.

◆ fTzeroOffset

double cbm::algo::kfp::V0Finder::fTzeroOffset {0.}
private

Offset for T0.

Definition at line 248 of file KfpV0Finder.h.

◆ fvParticleInfo

std::vector<ParticleInfo> cbm::algo::kfp::V0Finder::fvParticleInfo
private

PID info of tracks (in event)

Definition at line 264 of file KfpV0Finder.h.

◆ fvSelectedTrackIds

std::vector<uint32_t> cbm::algo::kfp::V0Finder::fvSelectedTrackIds
private

IDs of selected tracks (in event)

Definition at line 265 of file KfpV0Finder.h.

◆ fvT0s

std::vector<double> cbm::algo::kfp::V0Finder::fvT0s
private

Found t0s [ns] (in event)

Definition at line 263 of file KfpV0Finder.h.

◆ fvTrackParam

std::vector<std::pair<ca::Track::TrackParam_t, ca::Track::TrackParam_t> > cbm::algo::kfp::V0Finder::fvTrackParam
private

A copy of track parameters (first, last)

Definition at line 269 of file KfpV0Finder.h.

◆ kPionMass

double cbm::algo::kfp::V0Finder::kPionMass {0.13957039}
staticconstexpr

Pion mass [GeV/c2].

Definition at line 40 of file KfpV0Finder.h.

◆ kProtonMass

double cbm::algo::kfp::V0Finder::kProtonMass {0.938272088}
staticconstexpr

Proton mass [GeV/c2].

Definition at line 41 of file KfpV0Finder.h.

◆ kSpeedOfLight

double cbm::algo::kfp::V0Finder::kSpeedOfLight {29.9792458}
staticconstexpr

Speed of light [cm/ns].

Definition at line 42 of file KfpV0Finder.h.

◆ kUndefPdg

int32_t cbm::algo::kfp::V0Finder::kUndefPdg {-2}
staticconstexpr

PDG for tracks, which PID cannot be inferred.

Definition at line 43 of file KfpV0Finder.h.

◆ kUseAverageSpeed

bool cbm::algo::kfp::V0Finder::kUseAverageSpeed {false}
staticconstexprprivate

If an average speed of tof hits is used.

Definition at line 243 of file KfpV0Finder.h.


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