20#include "KFParticleTopoReconstructor.h"
32class KFParticleFinder;
44 double fQp{std::numeric_limits<double>::signaling_NaN()};
45 double fQpVar{std::numeric_limits<double>::signaling_NaN()};
46 double fBeta{std::numeric_limits<double>::signaling_NaN()};
47 double fBetaVar{std::numeric_limits<double>::signaling_NaN()};
53 double fAbs{std::numeric_limits<double>::signaling_NaN()};
54 double fX{std::numeric_limits<double>::signaling_NaN()};
55 double fY{std::numeric_limits<double>::signaling_NaN()};
113 explicit V0FinderTask(
int verbose = 1) : FairTask(
"V0FinderTask", verbose){};
128 void Exec(Option_t*)
override;
134 InitStatus
Init()
override;
212 constexpr int Ndf{2};
326 static std::string
ToString(
const FairTrackParam* pParam);
362 const std::vector<int>& vTrackIds,
const std::vector<float>& vChi2ToPv,
363 bool bAtFirstPoint)
const;
383 template<
bool UseEvent>
448 std::make_unique<CbmVertex>()};
454 std::make_shared<KFParticleTopoReconstructor>()};
456 std::make_unique<KFParticleTopoReconstructor>()};
469 std::unique_ptr<V0FinderQa>
fpQa{
nullptr};
A simple QA for the V0 finder class (runs together with the finder task)
Class to store different triggers for a given event.
Class characterising one event by a collection of links (indices) to data objects,...
static double InversedChi2Prob(double p, int ndf)
A class to find V0 candidates in mCBM.
static constexpr float kChi2PvPrimThrsh
Chi2 threshold of assigning tracks as primaries in PV reco.
bool AssignMomentum(CbmGlobalTrack *pTrack, int pdg)
Assigns momentum to a global track.
~V0FinderTask()=default
Destructor.
void SetPrimaryProbCut(double pVal)
Sets P-value cut to the topology reconstructor.
TClonesArray * fpBrStsHits
void SetChi2CutXiOmega(float cut)
Sets cut for and .
EPvUsageMode
Primary vertex finding/handling mode.
void SetSecondaryCuts(float sigmaMass, float chi2Topo, float ldl)
Sets cuts on selection of secondary and primary candidates.
std::unique_ptr< V0FinderQa > fpQa
If QA is processed.
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.
void SetChi2TopoCutCharm2D(float cut)
Sets cut for open charm with 2 daughters.
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
bool fbUsePvChi2Selection
Select.
InitStatus Init() override
Initializes the task.
TClonesArray * fpBrTofTracks
void SetPtCutJPsi(float cut)
Sets the cut on transverse momentum of each daughter track of .
EProcessingMode fProcessingMode
Processing mode.
void SetPvFindingMode(EPvUsageMode mode)
Sets PV finding mode.
TClonesArray * fpBrRecoEvents
std::vector< DcaVector > fvTrackDca
Track DCA vector [n selected tracks].
KFParticleFinder * GetKFParticleFinder()
Mutable access to the KfParticleFinder of the run topology reconstructor.
void SetChiPrimaryCutCharm(float cut)
Sets cut on of each track for open charm particles.
const auto & GetTrackDcaToOrigin() const
Gets DCA to origin.
void StoreParticles()
Stores particles, reconstructed in event to the run topology reconstructor.
void SetTzeroOffset(double offset)
Sets an offset to t0.
QpAndBeta EstimateQp(const CbmTofHit *pTofHit, int pdg) const
Estimates q/p of the track, using one TOF hit (Norbert's method)
const std::shared_ptr< const KFParticleTopoReconstructor > GetTopoReconstructor() const
Accessor to the 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)
Accessor to the track DCA.
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.
void SetChi2TopoCutCharmManybodyDecays(float cut)
Sets cut for open charm with >=3 daughters.
static constexpr double kSpeedOfLight
Speed of light [cm/ns].
bool ProcessEvent(const CbmEvent *pEvent)
Processes one event.
void SetChiPrimaryCut2D(float cut)
Sets cut on of each track for 2-daughter decays.
void SetChi2CutCharm2D(float cut)
Sets cut for open charm with 2 daughters.
void SetUseMc(bool bUseMc)
Sets the MC flag (if MC information required)
void SetMaxDistanceBetweenParticlesCut(float cut)
Sets cut on the distance between secondary tracks at the DCA point.
bool fbUseMc
Run using MC-information.
void AddDecayToReconstructionList(int pdg)
Adds particle to reconstruction list.
void SetPtCutLMVM(float cut)
Sets the cut on transverse momentum of each daughter track of low mass vector mesons.
void SetQpAssignedUncertainty(double uncertainty)
Assignes an uncertainty to the momentum measurement.
ClassDefOverride(V0FinderTask, 0)
void SetLdLCutCharmManybodyDecays(float cut)
Sets cut for open charm with >=3 daughters.
void SetMinPionDca(double dca)
Sets minimal pion DCA to primary vertex.
void SetChi2Cut2D(float cut)
Sets cut on for 2-daughter decays.
bool SelectTrack(CbmGlobalTrack *pTrack, int iTrk)
Selects/rejects a track.
V0FinderTask & operator=(V0FinderTask &&)=delete
V0FinderTask & operator=(const V0FinderTask &)=delete
void SetMixedEventMode(bool bMixedEvent)
Special settings in the mixed-event analysis mode.
std::unique_ptr< KFParticleTopoReconstructor > fpTopoReconstructorEvent
void SetChi2TopoCutXiOmega(float cut)
Sets cut for and .
TClonesArray * fpBrTrdTracks
TClonesArray * fpBrTofHits
void SetChi2TopoCutResonances(float cut)
Sets cut for resonances.
void SetLCut(float cut)
Sets cut on the distance to the primary vertex from the decay vertex.
EProcessingMode
Data processing mode.
static constexpr double kPionMass
Pion mass [GeV/c2].
TClonesArray * fpBrStsTracks
double fTzeroOffset
Offset for T0.
static constexpr int kUndefPdg
Undefined value, such tracks will be skipped.
@ TracksWAtLeastOneTofHit
@ TracksWithUnphysicalBeta
@ TracksWNegativeTofHitTime
@ TracksWAtLeastTwoTofHits
int InferTrackPidTopo(double dca) const
Infers PID hypothesis for a track using track topology.
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)
void SetLdLCutCharm2D(float cut)
Sets cut for open charm with 2 daughters.
void SetPCutLMVM(float cut)
Sets the cut on momentum of each daughter track of low mass vector mesons in dimuon channel.
TClonesArray * fpBrTrdHits
EPidApproach
PID approach used.
void Exec(Option_t *) override
Executes the task.
void SetPtCutCharm(float cut)
Sets the cut on transverse momentum of each daughter track of open charm particles.
std::shared_ptr< KFParticleTopoReconstructor > fpTopoReconstructorRun
Main topology reconstructor.
void SetMinProtonDca(double dca)
Sets minimal proton DCA to primary vertex.
CbmVertex * fpBrPrimaryVertex
void SetLdLCut2D(float cut)
Sets cut on for 2-daughter decays.
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.
void SetChi2CutCharmManybodyDecays(float cut)
Sets cut for open charm with >=3 daughters.
bool fbMixedEventMode
Run in a mix-event mode.
void SetRunQa(bool bRunQa)
Sets the flag: if the QA should be executed.
EPidApproach fPidApproach
PID approach used.
int fPrimaryAssignedPdg
Assigned PDG hypothesis for primary particles.
void SetPidApproach(EPidApproach pid)
Sets PID approach.
void SetChi2CutResonances(float cut)
Sets cut for resonances.
void SetLdLCutXiOmega(float cut)
Sets cut for and .
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.