6#include "CbmStsPoint.h"
7#include "CbmStsTrack.h"
35 cout <<
"\nBmnPairFinder::Constructor()" << endl;
42 fParticle = unique_ptr<TParticlePDG>(particle);
47 cout <<
"\nBmnPairFinder::Destructor()" << endl;
52 cout <<
"\nBmnPairFinder::Init()" << endl;
65 LOGF(error,
"Unsupported particle %d %s !",
fParticle->PdgCode(),
fParticle->GetName());
73 FairRootManager* ioman = FairRootManager::Instance();
95 printf(
"Event number: %d\n",
evNumber);
112 for (
Int_t iTrack = 0; iTrack <
fStsTracks->GetEntriesFast(); iTrack++) {
128 if (par_prot_Vp.GetQp() < 0)
135 for (
Int_t jTrack = 0; jTrack <
fStsTracks->GetEntriesFast(); jTrack++) {
149 if (par_pion_Vp.GetQp() > 0)
161 if (V0Z < lowV0Z || V0Z > 50)
182 Double_t V0X = .5 * (par_prot_V0.GetX() + par_pion_V0.GetX());
183 if (V0X < -2.0 || V0X > 2.0)
185 Double_t V0Y = .5 * (par_prot_V0.GetY() + par_pion_V0.GetY());
186 if (V0Y < -2.0 || V0Y > 2.0)
209 TMath::Sqrt(
Sq(par_prot_V0.GetX() - par_pion_V0.GetX()) +
Sq(par_prot_V0.GetY() - par_pion_V0.GetY()));
223 pair.
SetTxPair(par_prot_V0.GetTx(), par_pion_V0.GetTx());
224 pair.
SetTyPair(par_prot_V0.GetTy(), par_pion_V0.GetTy());
246 const Int_t nPlanes = 5;
251 while (range >= 0.1) {
254 Double_t zStep = (zMax - zMin) / nPlanes;
262 for (
Int_t iPlane = 0; iPlane < nPlanes; ++iPlane) {
263 zPlane[iPlane] = zMax - iPlane * zStep;
265 nullptr,
nullptr,
kTRUE);
267 nullptr,
nullptr,
kTRUE);
276 map<Double_t, Double_t> dist_zPlanes;
278 for (
Int_t iPlane = 0; iPlane < nPlanes; iPlane++)
279 dist_zPlanes[
Dist[iPlane]] = zPlane[iPlane];
281 z_0 = dist_zPlanes.begin()->second;
292 Double_t Tx1, Ty1, Tx2, Ty2, p1, p2;
296 Tx1 = pi_plus_meson_V0.GetTx();
297 Ty1 = pi_plus_meson_V0.GetTy();
298 Tx2 = pi_minus_meson_V0.GetTx();
299 Ty2 = pi_minus_meson_V0.GetTy();
300 p1 = 1. / pi_plus_meson_V0.GetQp();
302 p2 = 1. / pi_minus_meson_V0.GetQp();
327 FairTrackParam pi_minus_meson_V0,
335 Double_t Tx1, Ty1, Tx2, Ty2, p1, p2;
340 Tx1 = pi_plus_meson_V0.GetTx();
341 Ty1 = pi_plus_meson_V0.GetTy();
342 Tx2 = pi_minus_meson_V0.GetTx();
343 Ty2 = pi_minus_meson_V0.GetTy();
344 p1 = 1. / pi_plus_meson_V0.GetQp();
345 p2 = 1. / pi_minus_meson_V0.GetQp();
354 Double_t PzPart0 = PzPart1 + PzPart2;
355 Double_t PxPart0 = PzPart1 * Tx1 + PzPart2 * Tx2;
356 Double_t PyPart0 = PzPart1 * Ty1 + PzPart2 * Ty2;
358 Double_t TxPart0 = PxPart0 / PzPart0;
359 Double_t TyPart0 = PyPart0 / PzPart0;
361 Double_t xPart0 = TxPart0 * (Vp.
Z() - V0.
Z()) + V0.
X();
362 Double_t yPart0 = TyPart0 * (Vp.
Z() - V0.
Z()) + V0.
Y();
371 Double_t Tx = pi_plus_meson_V0.GetTx();
372 Double_t Ty = pi_plus_meson_V0.GetTy();
373 Double_t p = 1. / pi_plus_meson_V0.GetQp();
384 Double_t Tx1, Ty1, Tx2, Ty2, p1, p2;
389 Tx1 = proton_V0.GetTx();
390 Ty1 = proton_V0.GetTy();
391 Tx2 = pi_minus_meson_V0.GetTx();
392 Ty2 = pi_minus_meson_V0.GetTy();
394 p1 = 1. / proton_V0.GetQp();
395 p2 = 1. / pi_minus_meson_V0.GetQp();
401 Pproton.
SetX(Tx1 * A1 * p1);
402 Pproton.
SetY(Ty1 * A1 * p1);
403 Pproton.
SetZ(p1 * A1);
405 Pnegpimeson.
SetX(Tx2 * A2 * p2);
406 Pnegpimeson.
SetY(Ty2 * A2 * p2);
407 Pnegpimeson.
SetZ(p2 * A2);
417 return ACos(dot_product / (mag_Pproton * mag_Pnegpimeson)) * 180 /
Pi();
423 cout <<
"\n-I- [BmnPairFinder::Finish] " << endl;
Float_t Dist(Float_t x1, Float_t y1, Float_t x2, Float_t y2)
const Float_t DCA12CutMax
const Float_t DCA12CutMin
BmnStatus
Define status code.
unique_ptr< TParticlePDG > fDecaySecondParticle
virtual InitStatus Init()
unique_ptr< TParticlePDG > fParticle
Double_t FindDCA0(FairTrackParam pi_plus_meson_V0, FairTrackParam pi_minus_meson_V0, Double_t vPx, Double_t vPy, Double_t vPz, Double_t v0x, Double_t v0y, Double_t v0z)
Double_t FindEta(FairTrackParam pi_plus_meson_V0)
BmnPairFinder(TParticlePDG *particle=TDatabasePDG::Instance() ->GetParticle("Lambda0"))
TClonesArray * fStsTracks
Double_t GetPath(Double_t vPx, Double_t vPy, Double_t vPz, Double_t v0x, Double_t v0y, Double_t v0z)
Double_t FindV0ByVirtualPlanes(BmnGlobalTrack *track1, BmnGlobalTrack *track2, Double_t z_0, Double_t range)
DstEventHeader * fDstHeader
BmnKalmanFilter * fKalman
virtual void Exec(Option_t *option)
Double_t FindAngleDecayProducts(FairTrackParam proton_V0, FairTrackParam pi_minus_meson_V0)
Double_t FindInvMass(FairTrackParam pi_plus_meson_V0, FairTrackParam pi_minus_meson_V0)
TClonesArray * fParticlePair
unique_ptr< TParticlePDG > fDecayFirstParticle
void SetDCA2(Double_t val)
void SetTxPair(Double_t val1, Double_t val2)
void SetNHitsPair(vector< Int_t > part1, vector< Int_t > part2)
void SetTyPair(Double_t val1, Double_t val2)
void SetInvMass(Double_t val)
void SetChi2Pair(Double_t val1, Double_t val2)
void SetV0Y(Double_t val)
void SetV0Z(Double_t val)
void SetDCA1(Double_t val)
void SetAngleDecayProducts(Double_t val)
void SetDCA12(Double_t val)
void SetMomPair(Double_t val1, Double_t val2)
void SetDCA0(Double_t val)
void SetEtaPair(Double_t val1, Double_t val2)
void SetPath(Double_t val)
void SetV0X(Double_t val)
void SetNDFPair(Int_t val1, Int_t val2)
void SetChi2(Double_t chi2)
void SetParamLast(FairTrackParam &par)
FairTrackParam * GetParamFirst()
void SetParamFirst(FairTrackParam &par)
Modifiers.
FairTrackParam * GetParamLast()
Int_t GetNStsHits() const
Accessors.
FairTrackParam * GetParamFirst()
static TDatabasePDG * Instance()
void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t m)
Double_t Dot(const TVector3 &) const
Double_t Sqrt(Double_t x)