44#include "FairTrackParam.h"
46#include <TDatabasePDG.h>
47#include <TLorentzVector.h>
49#include <TParticlePDG.h>
82 , fPdgCode(fastTrk->GetPdgCode())
83 , fLabel(fastTrk->GetFirstMother())
92 TParticlePDG* mcPart = fastTrk->GetPDG(0);
93 if (mcPart)
fCharge = mcPart->Charge() / 3;
105 , fGlblTrackIndex(gIndex)
107 , fMuchTrack(muchtrk)
109 , fRichRing(richring)
112 , fStsTrackMatch(stsmatch)
113 , fMuchTrackMatch(muchmatch)
114 , fTrdTrackMatch(trdmatch)
115 , fRichRingMatch(richmatch)
116 , fRichProj(richproj)
117 , fMvdEntrance(new FairTrackParam())
124 Double_t m2 = TMath::Power(TDatabasePDG::Instance()->GetParticle(11)->Mass(), 2);
134 fExtrapolator->Extrapolate(&litParamIn, &litParamOut, zMvd, NULL);
143 fPosition.SetXYZM(ppar->GetX(), ppar->GetY(), ppar->GetZ(), TMath::Sqrt(m2));
144 fCharge = (ppar->GetQp() > 0. ? +1. : -1.);
156 : TNamed(track.GetName(), track.GetTitle())
157 , fPrimVertex(track.fPrimVertex)
158 , fGlblTrack(track.GetGlobalTrack())
159 , fGlblTrackIndex(track.GetGlobalIndex())
160 , fStsTrack(track.fStsTrack)
161 , fMuchTrack(track.fMuchTrack)
162 , fTrdTrack(track.fTrdTrack)
163 , fRichRing(track.GetRichRing())
164 , fTofHit(track.GetTofHit())
165 , fMCTrack(track.GetMCTrack())
170 , fRichProj(track.GetRichProj())
171 , fMvdEntrance(track.GetMvdEntrance())
172 , fMomentum(track.fMomentum)
173 , fPosition(track.fPosition)
174 , fChi2Vtx(track.ChiToVertex())
175 , fCharge(track.Charge())
176 , fPdgCode(track.PdgCode())
177 , fLabel(track.GetLabel())
178 , fWeight(track.GetWeight())
179 , fFastTrack(track.fFastTrack)
245 const Double_t mpdg1 = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass();
246 const Double_t mpdg2 = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass();
247 const Double_t cpdg1 = TDatabasePDG::Instance()->GetParticle(pdg1)->Charge() * 3;
248 const Double_t cpdg2 = TDatabasePDG::Instance()->GetParticle(pdg2)->Charge() * 3;
257 else if (
fCharge * cpdg2 < 0) {
262 Error(
"SetMassHypo",
"via STS charge went wrong!");
277 fPosition.SetXYZM(ppar->GetX(), ppar->GetY(), ppar->GetZ(), TMath::Sqrt(m2));
278 fCharge = (ppar->GetQp() > 0. ? +1. : -1.);
304 vector<CbmStsTrack> stsTracks;
307 vector<CbmL1PFFitter::PFFieldRegion> vField;
308 vector<float> chiPrim;
309 vector<int> pidHypos;
310 pidHypos.push_back(pidHypo);
316 if (pidHypo) fPFFitter.
Fit(stsTracks, pidHypos);
324 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
325 if (!vtxTrack)
Error(
"Refit",
"No track param found!");
329 vtxTrack->Momentum(mom);
333 vtxTrack->Position(
pos);
337 fCharge = (vtxTrack->GetQp() > 0. ? +1. : -1.);
358 Double_t c[3] = {ppar->GetCovariance(0, 0), ppar->GetCovariance(1, 0), ppar->GetCovariance(1, 1)};
363 Double_t d = c[0] * c[2] - c[1] * c[1];
364 Double_t chi = TMath::Sqrt(TMath::Abs(0.5 * (dx * dx * c[0] - 2 * dx * dy * c[1] + dy * dy * c[2]) / d));
365 Bool_t isNull = (TMath::Abs(d) < 1.e-20);
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
@ kMvd
Micro-Vertex Detector.
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
@ kRich
Ring-Imaging Cherenkov Detector.
Typedefs for algorithm interfaces.
Data class for track parameters.
Data class for STS tracks.
boost::shared_ptr< CbmLitTrackExtrapolator > TrackExtrapolatorPtr
ClassImp(PairAnalysisTrack) PairAnalysisTrack
const CbmTrackParam * GetParamVertex() const
Double_t * GetCovMatrix()
void GetChiToVertex(std::vector< CbmStsTrack > &Tracks, std::vector< PFFieldRegion > &field, std::vector< float > &chiToVtx, CbmKFVertex &primVtx, float chiPrim=-1)
void Fit(std::vector< CbmStsTrack > &Tracks, const std::vector< CbmMvdHit > &vMvdHits, const std::vector< CbmStsHit > &vStsHits, const std::vector< int > &pidHypo)
static void FairTrackParamToCbmLitTrackParam(const FairTrackParam *par, CbmLitTrackParam *litPar)
static void CbmLitTrackParamToFairTrackParam(const CbmLitTrackParam *litPar, FairTrackParam *par)
Data class for track parameters.
int32_t GetPdgCode() const
static CbmMvdDetector * Instance()
CbmMvdStationPar * GetParameterFile()
Int_t GetStationCount() const
Double_t GetZPosition(Int_t stationNumber) const
const FairTrackParam * GetParamFirst() const
CbmTrackMatchNew * fRichRingMatch
CbmTrackMatchNew * fMuchTrackMatch
CbmTrackMatchNew * GetTrackMatch(ECbmModuleId det) const
CbmTrack * GetTrack(ECbmModuleId det) const
CbmGlobalTrack * fGlblTrack
void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump)
virtual ~PairAnalysisTrack()
void Refit(Int_t pidHypo)
CbmTrackMatchNew * fStsTrackMatch
FairTrackParam * fMvdEntrance
CbmMuchTrack * fMuchTrack
CbmTrackMatchNew * fTrdTrackMatch
CbmKFVertex * fPrimVertex