CbmRoot
|
A V0-finding algorithm. More...
#include <KfpV0Finder.h>
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. | |
V0Finder & | operator= (const V0Finder &)=delete |
Copy assignment operator. | |
V0Finder & | operator= (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 ![]() | |
void | SetChi2Cut2D (float cut) |
Sets cut on ![]() | |
void | SetLdLCut2D (float cut) |
Sets cut on ![]() | |
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< ParticleInfo > | fvParticleInfo |
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. | |
A V0-finding algorithm.
Definition at line 25 of file KfpV0Finder.h.
|
default |
Default constructor.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
default |
Destructor.
|
inline |
Adds particle to reconstruction list.
pdg | A PDG code of the particle to be reconstructed |
Definition at line 65 of file KfpV0Finder.h.
References GetKFParticleFinder().
Referenced by cbm::algo::V0FinderChain::Init().
|
private |
Assigns momentum based on the TOF measurement.
[in] | tofHits | Tof hits container |
[in] | tofHitIds | Tof hit indices, used by the track |
[in] | t0 | A t0 value |
[in,out] | pidInfo | PID information for the track |
Definition at line 24 of file KfpV0Finder.cxx.
References EstimateBeta(), cbm::algo::kfp::V0Finder::ParticleInfo::fBeta, cbm::algo::kfp::V0Finder::ParticleInfo::fCharge, fEventMonitor, cbm::algo::kfp::V0Finder::ParticleInfo::fMass, cbm::algo::kfp::V0Finder::ParticleInfo::fQp, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), kUseAverageSpeed, sqrt(), cbm::algo::kfp::TracksWNegativeTofHitTime, cbm::algo::kfp::TracksWoTofHits, and cbm::algo::kfp::TracksWUnphysicalBeta.
Referenced by FindV0Candidates().
|
private |
Assigns PID info based on the estimated DCA.
dca | DCA of track to origin |
Definition at line 59 of file KfpV0Finder.cxx.
References cbm::algo::kfp::V0Finder::ParticleInfo::fCharge, cbm::algo::kfp::V0Finder::ParticleInfo::fDca, fEventMonitor, cbm::algo::kfp::V0Finder::ParticleInfo::fMass, fMinPionDca, fMinProtonDca, cbm::algo::kfp::V0Finder::ParticleInfo::fPdg, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), kPionMass, kProtonMass, kUndefPdg, cbm::algo::kfp::PionsDca, cbm::algo::kfp::PrimaryDca, cbm::algo::kfp::ProtonsDca, and cbm::algo::kfp::TracksWoPid.
Referenced by CollectDca().
|
private |
Collects a vector of DCA.
recoEvent | Instance of a reconstructed event |
Definition at line 89 of file KfpV0Finder.cxx.
References AssignPid(), EstimateDca(), fEventMonitor, fvParticleInfo, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), cbm::algo::RecoResults::stsHits, cbm::algo::RecoResults::trackStsHitIndices, and cbm::algo::kfp::TracksWoStsHits.
|
private |
Collects T0 values among the BMON hits.
bmonHits | A 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.
References fvT0s.
|
private |
Estimates speed of particle, using TOF measurement.
tofHit | A TOF hit |
t0 | An t0 value |
Definition at line 128 of file KfpV0Finder.cxx.
References fOrigin, fTzeroOffset, kSpeedOfLight, cbm::algo::tof::Hit::Time(), cbm::algo::tof::Hit::X(), x, cbm::algo::tof::Hit::Y(), y, and cbm::algo::tof::Hit::Z().
Referenced by AssignMomentum().
Estimate DCA of a track to origin.
fst | first STS hit |
snd | second STS hit |
Definition at line 118 of file KfpV0Finder.cxx.
References fOrigin, cbm::algo::sts::Hit::X(), cbm::algo::sts::Hit::Y(), and cbm::algo::sts::Hit::Z().
Referenced by CollectDca().
|
private |
Tries to find V0-candidates for a given t0.
recoEvent | Instance of a reconstructed event |
t0 | An estimated t0 value |
Definition at line 143 of file KfpV0Finder.cxx.
References AssignMomentum(), cbm::algo::kfp::EventsLambdaCand, cbm::algo::kfp::ExecKfp, fEventMonitor, fOrigin, fpTopoReconstructor, fQpAssignedUncertainty, fvParticleInfo, fvSelectedTrackIds, fvTrackParam, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), cbm::algo::kfp::InitKfp, InitTrackParamVectors(), cbm::algo::kfp::KfpLambdaCandidates, kUndefPdg, MakeKfpPrimaryVertex(), cbm::algo::kfp::Pions, cbm::algo::kfp::PreselectTracks, cbm::algo::kfp::Protons, cbm::algo::ca::MonitorData< C, T >::ResetCounter(), SelectTrack(), SetKfpTrackParameters(), cbm::algo::ca::MonitorData< C, T >::StartTimer(), cbm::algo::ca::MonitorData< C, T >::StopTimer(), cbm::algo::RecoResults::tofHits, cbm::algo::RecoResults::tracks, tracks, cbm::algo::kfp::TracksSelected, cbm::algo::kfp::TracksWoMomentum, and cbm::algo::RecoResults::trackTofHitIndices.
|
inline |
Gets monitor data.
Definition at line 68 of file KfpV0Finder.h.
References fEventMonitor.
Referenced by cbm::algo::V0FinderChain::ProcessEvent().
|
inline |
Mutable access to the KfParticleFinder of the run topology reconstructor.
Definition at line 74 of file KfpV0Finder.h.
References fpTopoReconstructor.
Referenced by AddDecayToReconstructionList(), SetChi2Cut2D(), SetChiPrimaryCut2D(), SetLCut(), and SetLdLCut2D().
|
inline |
Constant access to the KfParticleFinder of the run topology reconstructor.
Definition at line 77 of file KfpV0Finder.h.
References fpTopoReconstructor.
|
inline |
|
inline |
Gets a vector of particle info.
Definition at line 80 of file KfpV0Finder.h.
References fvParticleInfo.
Referenced by cbm::algo::kfp::V0FinderQa::Exec().
|
inline |
Gets selected t0.
Definition at line 84 of file KfpV0Finder.h.
References fSelectedT0.
|
inline |
Gets indices of selected tracks.
Definition at line 87 of file KfpV0Finder.h.
References fvSelectedTrackIds.
|
inline |
Gets found t0s.
Definition at line 90 of file KfpV0Finder.h.
References fvT0s.
Referenced by cbm::algo::kfp::V0FinderQa::Exec().
|
inline |
Accessor to topology reconstructor.
Definition at line 93 of file KfpV0Finder.h.
References fpTopoReconstructor.
Referenced by cbm::algo::kfp::V0FinderQa::Exec().
|
inline |
Gets track parameters.
Definition at line 96 of file KfpV0Finder.h.
References fvTrackParam.
Referenced by cbm::algo::kfp::V0FinderQa::Exec().
void V0Finder::Init | ( | ) |
Initializes the instance (called in the beginning of the run)
Definition at line 246 of file KfpV0Finder.cxx.
References fOrigin, and fpTopoReconstructor.
Referenced by cbm::algo::V0FinderChain::Init().
|
private |
Initializes copies of track parameter vectors.
tracks | A container of tracks |
Definition at line 250 of file KfpV0Finder.cxx.
References fvTrackParam, and tracks.
Referenced by FindV0Candidates().
|
staticprivate |
Makes a KF vertex.
r | coordinates of PV [cm] |
Definition at line 260 of file KfpV0Finder.cxx.
Referenced by FindV0Candidates().
Copy assignment operator.
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.
References cbm::algo::RecoResults::bmonHits, cbm::algo::kfp::CollectDca, cbm::algo::kfp::CollectT0, cbm::algo::kfp::EventsTotal, cbm::algo::kfp::EventsWoTzero, fBmonPartitionIndex, fEventMonitor, cbm::algo::kfp::FindV0Candidates, fSelectedT0, fvParticleInfo, fvT0s, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), cbm::algo::kfp::KfpEventsLambdaCand, CbmEventTriggers::Lambda, cbm::algo::kfp::ProcessEvent, cbm::algo::ca::MonitorData< C, T >::Reset(), CbmEventTriggers::Set(), cbm::algo::ca::MonitorData< C, T >::StartTimer(), cbm::algo::ca::MonitorData< C, T >::StopTimer(), cbm::algo::RecoResults::tracks, and cbm::algo::kfp::TracksTotal.
Referenced by cbm::algo::V0FinderChain::ProcessEvent().
|
private |
Applies selection cut on the track.
particleInfo | Particle collected information |
Definition at line 322 of file KfpV0Finder.cxx.
References cbm::algo::kfp::V0Finder::ParticleInfo::fBeta, fMaxBetaPion, fMaxBetaProton, fMinBetaPion, fMinBetaProton, and cbm::algo::kfp::V0Finder::ParticleInfo::fPdg.
Referenced by FindV0Candidates().
|
inline |
Sets an address of a reference BMON diamond.
iPartition | An index of the BMON hit partition: used to selected the hits from the particular config |
Definition at line 106 of file KfpV0Finder.h.
References fBmonPartitionIndex.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets cut on
cut | Cut value |
Definition at line 163 of file KfpV0Finder.h.
References GetKFParticleFinder().
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets cut on
cut | Cut value |
Definition at line 159 of file KfpV0Finder.h.
References GetKFParticleFinder().
Referenced by cbm::algo::V0FinderChain::Init().
|
private |
Sets KFP track parameters.
[in,out] | kfpTrkVector | Reference to the KFP track vector |
[in] | iKfpTrk | Index of the KFP track |
[in] | iCaTrk | Index of the CA track |
[in] | trkParam | Track parameters |
[in] | particleInfo | Particle information |
Definition at line 340 of file KfpV0Finder.cxx.
References cbm::algo::kf::TrackParamBase< T >::C00(), cbm::algo::kf::TrackParamBase< T >::C01(), cbm::algo::kf::TrackParamBase< T >::C11(), cbm::algo::kfp::V0Finder::ParticleInfo::fCharge, cbm::algo::kf::TrackParamBase< T >::GetQp(), cbm::algo::kf::TrackParamBase< T >::GetTx(), cbm::algo::kf::TrackParamBase< T >::GetTy(), cbm::algo::kf::TrackParamBase< T >::GetX(), cbm::algo::kf::TrackParamBase< T >::GetY(), and cbm::algo::kf::TrackParamBase< T >::GetZ().
Referenced by FindV0Candidates().
|
inline |
Sets cut on the distance to the primary vertex from the decay vertex.
cut | Cut value [cm] |
Definition at line 155 of file KfpV0Finder.h.
References GetKFParticleFinder().
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets cut on
cut | Cut value |
Definition at line 167 of file KfpV0Finder.h.
References GetKFParticleFinder().
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
dca | DCA [cm] |
Definition at line 109 of file KfpV0Finder.h.
References fMinPionDca.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets minimal proton DCA to primary vertex.
dca | DCA [cm] |
Definition at line 113 of file KfpV0Finder.h.
References fMinProtonDca.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets origin.
x | X-coordinate of the origin [cm] |
y | Y-coordinate of the origin [cm] |
z | Z-coordinate of the origin [cm] |
Definition at line 120 of file KfpV0Finder.h.
|
inline |
Sets minimal pion DCA to primary vertex.
Sets pion velocity range
vMin | Minimal velocity [cm/ns] |
vMax | Maximal velocity [cm/ns] |
Definition at line 126 of file KfpV0Finder.h.
References fMaxBetaPion, fMinBetaPion, and kSpeedOfLight.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets the assigned PDG for primary particles.
pdg | PDG code of the particle |
Definition at line 143 of file KfpV0Finder.h.
References fPrimaryAssignedPdg.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets proton velocity range.
vMin | Minimal velocity [cm/ns] |
vMax | Maximal velocity [cm/ns] |
Definition at line 135 of file KfpV0Finder.h.
References fMaxBetaProton, fMinBetaProton, and kSpeedOfLight.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Assignes an uncertainty to the momentum measurement.
uncertainty | Relative uncertainty ( = sqrt(var(q/p)) / (q/p)) |
Definition at line 147 of file KfpV0Finder.h.
References fQpAssignedUncertainty.
Referenced by cbm::algo::V0FinderChain::Init().
|
inline |
Sets an offset to t0.
offset | An offset [ns] |
Definition at line 151 of file KfpV0Finder.h.
References fTzeroOffset.
Referenced by cbm::algo::V0FinderChain::Init().
|
private |
Index of selected partition in BMON hit vector.
Definition at line 259 of file KfpV0Finder.h.
Referenced by Process(), and SetBmonPartitionIndex().
|
private |
Main monitor data instance.
Definition at line 245 of file KfpV0Finder.h.
Referenced by AssignMomentum(), AssignPid(), CollectDca(), FindV0Candidates(), GetEventMonitor(), and Process().
|
private |
Maximal proton velocity (beta) [c].
Definition at line 255 of file KfpV0Finder.h.
Referenced by SelectTrack(), and SetPionVelocityRange().
|
private |
Maximal proton velocity (beta) [c].
Definition at line 253 of file KfpV0Finder.h.
Referenced by SelectTrack(), and SetProtonVelocityRange().
|
private |
Minimal proton velocity (beta) [c].
Definition at line 254 of file KfpV0Finder.h.
Referenced by SelectTrack(), and SetPionVelocityRange().
|
private |
Minimal proton velocity (beta) [c].
Definition at line 252 of file KfpV0Finder.h.
Referenced by SelectTrack(), and SetProtonVelocityRange().
|
private |
Minimum DCA to PV for pions.
Definition at line 249 of file KfpV0Finder.h.
Referenced by AssignPid(), and SetMinPionDca().
|
private |
Minimum DCA to PV for protons.
Definition at line 250 of file KfpV0Finder.h.
Referenced by AssignPid(), and SetMinProtonDca().
|
private |
Coordinates of origin [cm].
Definition at line 262 of file KfpV0Finder.h.
Referenced by EstimateBeta(), EstimateDca(), FindV0Candidates(), GetOrigin(), Init(), and SetOrigin().
|
private |
Assigned PDG hypothesis for primary particles.
Definition at line 256 of file KfpV0Finder.h.
Referenced by SetPrimaryAssignedPdg().
|
private |
An instance of the topology reconstructor.
Definition at line 274 of file KfpV0Finder.h.
Referenced by FindV0Candidates(), GetKFParticleFinder(), GetKFParticleFinder(), GetTopoReconstructor(), and Init().
|
private |
Assigned relative uncertainty for q/p estimation.
Definition at line 251 of file KfpV0Finder.h.
Referenced by FindV0Candidates(), and SetQpAssignedUncertainty().
|
private |
A t0 value selected by the lambda-finder.
Definition at line 266 of file KfpV0Finder.h.
Referenced by GetSelectedT0(), and Process().
|
private |
Offset for T0.
Definition at line 248 of file KfpV0Finder.h.
Referenced by EstimateBeta(), and SetTzeroOffset().
|
private |
PID info of tracks (in event)
Definition at line 264 of file KfpV0Finder.h.
Referenced by CollectDca(), FindV0Candidates(), GetParticleInfo(), and Process().
|
private |
IDs of selected tracks (in event)
Definition at line 265 of file KfpV0Finder.h.
Referenced by FindV0Candidates(), and GetSelectedTrackIds().
|
private |
Found t0s [ns] (in event)
Definition at line 263 of file KfpV0Finder.h.
Referenced by CollectT0(), GetT0s(), and Process().
|
private |
A copy of track parameters (first, last)
Definition at line 269 of file KfpV0Finder.h.
Referenced by FindV0Candidates(), GetTrackAssignedParams(), and InitTrackParamVectors().
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Speed of light [cm/ns].
Definition at line 42 of file KfpV0Finder.h.
Referenced by EstimateBeta(), SetPionVelocityRange(), and SetProtonVelocityRange().
|
staticconstexpr |
PDG for tracks, which PID cannot be inferred.
Definition at line 43 of file KfpV0Finder.h.
Referenced by AssignPid(), cbm::algo::kfp::V0FinderQa::Exec(), and FindV0Candidates().
|
staticconstexprprivate |
If an average speed of tof hits is used.
Definition at line 243 of file KfpV0Finder.h.
Referenced by AssignMomentum().