19#include "KFParticle/KFParticleTopoReconstructor.h"
33class KFParticleFinder;
39 using namespace cbm::algo::kfp;
103 double fAbs{std::numeric_limits<double>::quiet_NaN()};
104 double fX{std::numeric_limits<double>::quiet_NaN()};
105 double fY{std::numeric_limits<double>::quiet_NaN()};
111 double dca{std::numeric_limits<double>::quiet_NaN()};
112 double beta{std::numeric_limits<double>::quiet_NaN()};
119 double dca{std::numeric_limits<double>::quiet_NaN()};
120 double beta{std::numeric_limits<double>::quiet_NaN()};
127 explicit V0FinderTask(
int verbose = 1) : FairTask(
"V0FinderTask", verbose){};
142 void Exec(Option_t*)
override;
148 InitStatus
Init()
override;
253 static std::string
ToString(
const FairTrackParam* pParam);
271 template<
int PdgCode>
303 const std::vector<int>& vTrackIds,
const std::vector<float>& vChi2ToPv,
304 bool bAtFirstPoint)
const;
323 template<
bool UseEvent>
360 std::shared_ptr<Cutter_t>
fpCutter{std::make_shared<Cutter_t>()};
382 std::make_unique<CbmVertex>()};
387 std::shared_ptr<KFParticleTopoReconstructor>
fpTopoReconstructorTs{std::make_shared<KFParticleTopoReconstructor>()};
389 std::make_unique<KFParticleTopoReconstructor>()};
A selector class for V0-candidates in mCBM.
Different definitions for V0 candidates finding in mCBM.
Class to store different triggers for a given event.
Class characterising one event by a collection of links (indices) to data objects,...
A collection of cuts for V0 production analysis in mCBM.
static constexpr float kChi2PvPrimThrsh
Chi2 threshold of assigning tracks as primaries in PV reco.
~V0FinderTask()=default
Destructor.
void SetConfigName(const TString &fileName)
Sets name of the configuration file.
TClonesArray * fpBrStsHits
double fMinBetaPion
Minimal proton velocity (beta) [c].
EPvUsageMode
Primary vertex finding/handling mode.
KFVertex MakeKfpPrimaryVertex(float x, float y, float z) const
Makes a KF vertex.
DcaVector EstimateDcaToOrigin(const CbmStsTrack *pTrack) const
Estimates distance to the origin.
void Finish() override
Action on the end of the run.
double fMinProtonDca
Minimum DCA to PV for protons.
V0FinderTask(V0FinderTask &&)=delete
static bool CheckTrackParam(const FairTrackParam *pParam)
Checks track parameter validity.
cbm::core::EnumArray< ECounter, size_t > fCounters
Counters per run.
std::vector< CbmEventTriggers > * fpBrEventTriggers
std::shared_ptr< KFParticleTopoReconstructor > fpTopoReconstructorTs
Main topology reconstructor.
bool fbUsePvChi2Selection
Select.
InitStatus Init() override
Initializes the task.
TClonesArray * fpBrTofTracks
TString fsCutsConfigName
Name of the config.
EProcessingMode fProcessingMode
Processing mode.
void SetPvFindingMode(EPvUsageMode mode)
Sets PV finding mode.
TClonesArray * fpBrRecoEvents
std::vector< DcaVector > fvTrackDca
Track DCA vector [n global tracks].
cbm::algo::kfp::ETrackPid InferTrackPidTopo(double dca) const
Infers PID hypothesis for a track using track topology.
KFParticleFinder * GetKFParticleFinder()
Mutable access to the KfParticleFinder of the run topology reconstructor.
TrackInfo CollectTrackInfo(const CbmGlobalTrack *pTrack) const
Fill track extra info.
const auto & GetTrackDcaToOrigin() const
Gets DCA to origin.
void SetTzeroOffset(double offset)
Sets an offset to t0.
void StoreParticles(const CbmEvent *pEvent)
Stores particles, reconstructed in event to the run topology reconstructor.
TString fsQaOutputName
Output QA name.
void SetQaOutputFileName(const TString &fileName)
Sets a file name for the QA.
static constexpr double kProtonMass
Proton mass [GeV/c2].
void SetProcessingMode(EProcessingMode mode)
Sets processing mode (time-based/event-based)
static constexpr int kPrimaryPdg
PID hypothesis of primary tracks (kaons?)
double ShiftTofHitsToTzero(const CbmEvent *pEvent)
Shifts TOF hits to the t0 estimation.
KFPTrackVector MakeKfpTrackVector(const std::vector< const CbmGlobalTrack * > &vpTracks, const std::vector< int > &vTrackIds, const std::vector< float > &vChi2ToPv, bool bAtFirstPoint) const
Makes a KF-particle track vector.
const std::vector< TrackInfo > & GetTrackInfo() const
Accessor to the track extra info.
std::shared_ptr< const Cutter_t > GetCutter() const
Accessor to the cutter.
void AssignMomentum(CbmGlobalTrack *pTrack, double beta)
Assigns momentum to a global track.
static constexpr double kSpeedOfLight
Speed of light [cm/ns].
std::shared_ptr< Cutter_t > fpCutter
void SetUseMc(bool bUseMc)
Sets the MC flag (if MC information required)
void ApplyConfiguration()
Applies configuration from fsConfigName.
bool fbUseMc
Run using MC-information.
void AddDecayToReconstructionList(int pdg)
Adds particle to reconstruction list.
double fMaxBetaProton
Maximal proton velocity (beta) [c].
void SetQpAssignedUncertainty(double uncertainty)
Assignes an uncertainty to the momentum measurement.
ClassDefOverride(V0FinderTask, 0)
void SetMinPionDca(double dca)
Sets minimal pion DCA to primary vertex.
std::shared_ptr< const KFParticleTopoReconstructor > GetTopoReconstructor() const
Accessor to the topology reconstructor.
V0FinderTask & operator=(V0FinderTask &&)=delete
TString fsConfigName
Name of the config.
V0FinderTask & operator=(const V0FinderTask &)=delete
void SetMixedEventMode(bool bMixedEvent)
Special settings in the mixed-event analysis mode.
std::unique_ptr< KFParticleTopoReconstructor > fpTopoReconstructorEvent
TClonesArray * fpBrTrdTracks
const std::vector< DcaVector > & GetTrackDca() const
Accessor to the track DCA.
V0FinderCutter< EV0Type::Lambda > Cutter_t
std::vector< TrackInfo > fvTrackInfo
Track info vector [n global tracks].
TClonesArray * fpBrTofHits
EProcessingMode
Data processing mode.
std::vector< ParticleInfo > fvParticleInfo
Extra information on particles [n particles in TS].
void SetCutsConfigName(const TString &fileName)
Sets name of the configuration file for cuts.
static constexpr double kPionMass
Pion mass [GeV/c2].
TClonesArray * fpBrStsTracks
double EstimateBeta(const CbmTofHit *pTofHit) const
Estimates beta of the track, using one TOF hit.
double fTzeroOffset
Offset for T0.
static constexpr int kUndefPdg
Undefined value, such tracks will be skipped.
double fMaxBetaPion
Maximal proton velocity (beta) [c].
@ TracksWAtLeastOneTofHit
@ TracksWithUnphysicalBeta
@ TracksWNegativeTofHitTime
@ TracksWAtLeastTwoTofHits
static std::string ToString(EProcessingMode mode)
String representation of processing mode.
V0FinderTask(const V0FinderTask &)=delete
TClonesArray * fpBrGlobalTracks
std::unique_ptr< CbmVertex > fpOrigin
Origin (e.g., can be either reconstructed PV or target)
TClonesArray * fpBrTrdHits
EPidApproach
PID approach used.
void Exec(Option_t *) override
Executes the task.
void SetMinProtonDca(double dca)
Sets minimal proton DCA to primary vertex.
CbmVertex * fpBrPrimaryVertex
double fMinPionDca
Minimum DCA to PV for pions.
const KFParticleFinder * GetKFParticleFinder() const
Constant access to the KfParticleFinder of the run topology reconstructor.
double fQpAssignedUncertainty
Assigned relative uncertainty for q/p estimation.
EPvUsageMode fPvUsageMode
Primary vertex mode.
V0FinderTask(int verbose=1)
Constructor.
bool fbMixedEventMode
Run in a mix-event mode.
EPidApproach fPidApproach
PID approach used.
const std::vector< ParticleInfo > & GetParticleInfo() const
Accessor to the particle extra info.
int fPrimaryAssignedPdg
Assigned PDG hypothesis for primary particles.
void SetPidApproach(EPidApproach pid)
Sets PID approach.
double fMinBetaProton
Minimal proton velocity (beta) [c].
ETrackPid
An enumeration for PID of global tracks.
@ ProcessEvent
Processing of a single event.
A vector representation of DCA to target.
double fAbs
Absolute value.
double fY
Y-component of the unit-vector.
double fX
X-component of the unit-vector.
Extra information on KFParticle, required by the V0 analysis.
double beta
Speed of particle [c] (from TOF hit info)
double dca
DCA to origin [cm] (from STS hit info)
const CbmTofHit * pTofHit
Pointer to TOF hit.
int32_t eventID
Event index.
Extra information on track, required by the V0 analysis.
double beta
Speed of particle [c].
double dca
DCA to origin [cm].
const CbmTofHit * pTofHit
Pointer to TOF hit.