BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
KFParticleFinder.h
Go to the documentation of this file.
1#ifndef KFParticleFinder_h
2#define KFParticleFinder_h
3
4#include "CbmKFTrack.h"
6#include "KFParticle.h"
7#include "KFParticleSIMD.h"
8
9#include <vector>
10
11class L1FieldRegion;
12class KFParticleSIMD;
14class CbmStsTrack;
15
17{
18 public:
21
22 /// Find particles with 2-body decay channel from input tracks vRTracks with primary vertex PrimVtx:
23 /// 1. K0s->pi+ pi-
24 /// 2. Lambda->p pi-
25 /// All particles are put into the Particles array. 3 cuts for each particle are required.
26 /// First index in the cuts array sets a particle number (see table above), second index - a cut number:
27 /// cut[0][0] - chi to a primary vertex of a track (sqare root from a normalized on a total error of
28 /// the track and the vertex distance between the track and the primary vertex), only
29 /// element cut[0][0] is used to select tracks, all other elements cut[*][0] are not used;
30 /// cut[*][1] - chi2/ndf of the reconstructed particle;
31 /// cut[*][2] - z coordinate of the reconstructed particle.
32 /// cut[*][3] - chi2/ndf of the reconstructed particle fitted to the PV;
33
34 static void FindParticles(std::vector<CbmKFTrack>& vRTracks,
35 std::vector<float>& ChiToPrimVtx,
36 std::vector<L1FieldRegion>& vField,
37 std::vector<KFParticle>& Particles,
38 KFParticleSIMD& PrimVtx,
39 const std::vector<int>& vTrackPDG,
40 const float cuts[2][3] = DefaultCuts);
41
42 static void ExtrapolateToPV(std::vector<KFParticle>& vParticles, KFParticleSIMD& PrimVtx);
44
45 static void Find2DaughterDecay(std::vector<CbmKFTrack>& vTracks,
46 const std::vector<L1FieldRegion>& vField,
47 std::vector<KFParticle>& Particles,
48 const int DaughterNegPDG,
49 const int DaughterPosPDG,
50 const int MotherPDG,
51 std::vector<short>& idNeg,
52 std::vector<short>& idPos,
53 KFParticleSIMD& PrimVtx,
54 const float* cuts = 0,
55 bool isPrimary = 0,
56 std::vector<float>* vMotherTopoChi2Ndf = 0,
57 const float* secCuts = 0,
58 const float massMotherPDG = 0,
59 const float massMotherPDGSigma = 0,
60 std::vector<KFParticle>* vMotherPrim = 0,
61 std::vector<KFParticle>* vMotherSec = 0);
62
63 static void Find2DaughterDecay(std::vector<CbmKFTrack>& vTracks,
64 const std::vector<L1FieldRegion>& vField,
65 std::vector<KFParticle>& Particles,
66 const int DaughterNegPDG,
67 const int DaughterPosPDG,
68 const int MotherPDG,
69 std::vector<short>& idNeg,
70 std::vector<short>& idPos,
71 KFParticleSIMD& PrimVtx,
72 const float* cuts,
73 bool isPrimary,
74 const float PtCut,
75 const float Chi2PrimCut = -100.f,
76 std::vector<float>* ChiToPrimVtx = 0,
77 const float* PCut = 0);
78
79 static void FindTrackV0Decay(const int MotherPDG,
80 std::vector<KFParticle>& Particles,
81 std::vector<KFParticle>& vV0,
82 std::vector<CbmKFTrack>& vTracks,
83 const std::vector<L1FieldRegion>& field,
84 const int DaughterPDG,
85 std::vector<short>& idTrack,
86 KFParticleSIMD& PrimVtx,
87 const float* cuts = 0,
88 bool isPrimary = 0,
89 std::vector<float>* ChiToPrimVtx = 0,
90 std::vector<KFParticle>* vHyperonPrim = 0,
91 float hyperonPrimMass = 0,
92 float hyperonPrimMassErr = 0,
93 std::vector<KFParticle>* vHyperonSec = 0);
94
95 static void FindHyperons(int PDG,
96 KFParticleSIMD vDaughters[2],
97 std::vector<int>& daughterIds,
98 std::vector<KFParticle>& vLambdaSec,
99 std::vector<KFParticle>& vHyperon,
100 KFParticleSIMD& PrimVtx,
101 const float* cuts = 0,
102 int startIndex = 0);
103
104 static void CombinePartPart(std::vector<KFParticle>& particles1,
105 std::vector<KFParticle>& particles2,
106 std::vector<KFParticle>& Particles,
107 KFParticleSIMD& PrimVtx,
108 const float* cuts = 0,
109 bool isPrimary = 0,
110 const int MotherPDG = 0,
111 bool isSameInputPart = 0,
112 std::vector<KFParticle>* vMotherPrim = 0,
113 std::vector<KFParticle>* vMotherSec = 0,
114 float* SecCuts = 0,
115 float massMotherPdg = 0,
116 float massMotherPdgSigma = 0);
117
118 static void FindDMesLambdac(std::vector<CbmKFTrack>& vTracks,
119 const std::vector<L1FieldRegion>& vField,
120 std::vector<KFParticle>& Particles,
121 const int DaughterPDG[5], // pi, K_b, pi_b, K, p
122 const int MotherPDG[8],
123 std::vector<short>* idTrack[5], // pi, K_b, pi_b, K, p
124 KFParticleSIMD& PrimVtx,
125 const float cuts[8][8],
126 std::vector<float> ChiToPrimVtx);
127
128 static void CombineTrackPart(std::vector<CbmKFTrack>& vTracks,
129 const std::vector<L1FieldRegion>& vField,
130 std::vector<KFParticle>& Particles,
131 KFParticle& part,
132 const int DaughterPDG,
133 const int MotherPDG,
134 std::vector<short>& id,
135 const float* cuts,
136 const unsigned short startIndex = 0,
137 const bool IsSamePart = 0);
138
139 static void SelectParticleCandidates(std::vector<KFParticle>& Particles,
140 std::vector<KFParticle>& vCandidates,
141 KFParticleSIMD& PrimVtx,
142 const float cuts[5]);
143
144 void ConstructPVT(std::vector<CbmKFTrack>& vRTracks);
145
146 private:
147 static const float DefaultCuts[2][3];
148};
149
150#endif /* !KFParticleFinder_h */
F32vec4 fvec
Definition P4_F32vec4.h:231
void ConstructPVT(std::vector< CbmKFTrack > &vRTracks)
static void SelectParticleCandidates(std::vector< KFParticle > &Particles, std::vector< KFParticle > &vCandidates, KFParticleSIMD &PrimVtx, const float cuts[5])
static fvec GetChi2BetweenParticles(KFParticleSIMD &p1, KFParticleSIMD &p2)
static void ExtrapolateToPV(std::vector< KFParticle > &vParticles, KFParticleSIMD &PrimVtx)
static void FindTrackV0Decay(const int MotherPDG, std::vector< KFParticle > &Particles, std::vector< KFParticle > &vV0, std::vector< CbmKFTrack > &vTracks, const std::vector< L1FieldRegion > &field, const int DaughterPDG, std::vector< short > &idTrack, KFParticleSIMD &PrimVtx, const float *cuts=0, bool isPrimary=0, std::vector< float > *ChiToPrimVtx=0, std::vector< KFParticle > *vHyperonPrim=0, float hyperonPrimMass=0, float hyperonPrimMassErr=0, std::vector< KFParticle > *vHyperonSec=0)
static void CombineTrackPart(std::vector< CbmKFTrack > &vTracks, const std::vector< L1FieldRegion > &vField, std::vector< KFParticle > &Particles, KFParticle &part, const int DaughterPDG, const int MotherPDG, std::vector< short > &id, const float *cuts, const unsigned short startIndex=0, const bool IsSamePart=0)
static void CombinePartPart(std::vector< KFParticle > &particles1, std::vector< KFParticle > &particles2, std::vector< KFParticle > &Particles, KFParticleSIMD &PrimVtx, const float *cuts=0, bool isPrimary=0, const int MotherPDG=0, bool isSameInputPart=0, std::vector< KFParticle > *vMotherPrim=0, std::vector< KFParticle > *vMotherSec=0, float *SecCuts=0, float massMotherPdg=0, float massMotherPdgSigma=0)
static void FindParticles(std::vector< CbmKFTrack > &vRTracks, std::vector< float > &ChiToPrimVtx, std::vector< L1FieldRegion > &vField, std::vector< KFParticle > &Particles, KFParticleSIMD &PrimVtx, const std::vector< int > &vTrackPDG, const float cuts[2][3]=DefaultCuts)
Find particles with 2-body decay channel from input tracks vRTracks with primary vertex PrimVtx:
static void Find2DaughterDecay(std::vector< CbmKFTrack > &vTracks, const std::vector< L1FieldRegion > &vField, std::vector< KFParticle > &Particles, const int DaughterNegPDG, const int DaughterPosPDG, const int MotherPDG, std::vector< short > &idNeg, std::vector< short > &idPos, KFParticleSIMD &PrimVtx, const float *cuts=0, bool isPrimary=0, std::vector< float > *vMotherTopoChi2Ndf=0, const float *secCuts=0, const float massMotherPDG=0, const float massMotherPDGSigma=0, std::vector< KFParticle > *vMotherPrim=0, std::vector< KFParticle > *vMotherSec=0)
static void FindHyperons(int PDG, KFParticleSIMD vDaughters[2], std::vector< int > &daughterIds, std::vector< KFParticle > &vLambdaSec, std::vector< KFParticle > &vHyperon, KFParticleSIMD &PrimVtx, const float *cuts=0, int startIndex=0)
static void Find2DaughterDecay(std::vector< CbmKFTrack > &vTracks, const std::vector< L1FieldRegion > &vField, std::vector< KFParticle > &Particles, const int DaughterNegPDG, const int DaughterPosPDG, const int MotherPDG, std::vector< short > &idNeg, std::vector< short > &idPos, KFParticleSIMD &PrimVtx, const float *cuts, bool isPrimary, const float PtCut, const float Chi2PrimCut=-100.f, std::vector< float > *ChiToPrimVtx=0, const float *PCut=0)
static const float DefaultCuts[2][3]
static void FindDMesLambdac(std::vector< CbmKFTrack > &vTracks, const std::vector< L1FieldRegion > &vField, std::vector< KFParticle > &Particles, const int DaughterPDG[5], const int MotherPDG[8], std::vector< short > *idTrack[5], KFParticleSIMD &PrimVtx, const float cuts[8][8], std::vector< float > ChiToPrimVtx)