64 int nv = clones->GetEntriesFast();
66 fTracks->ExpandCreateFast(fTotalTracksNo);
67 for (
int i = 0; i < nv; i++) {
71 track->Hal::ExpTrack::CopyData(&temp->GetTrack());
73 track->EnableV0(kTRUE, kTRUE);
75 auto vecpos = temp->GetV0().GetMomPos();
76 auto vecneg = temp->GetV0().GetMomNeg();
78 temp->ComputeStuff(
this, track);
80 auto recalcmom1 = temp->GetV0().GetMomPos();
81 auto recalcmom2 = temp->GetV0().GetMomNeg();
82 track->GetV0Info()->SetMomPos(recalcmom1.X(), recalcmom1.Y(), recalcmom1.Z());
83 track->GetV0Info()->SetMomNeg(recalcmom2.X(), recalcmom2.Y(), recalcmom2.Z());
88 auto vecpos1 = temp->GetV0().GetMomPos();
89 auto vecpos2 = temp->GetV0().GetMomNeg();
90 std::cout << __FILE__ <<
"____" << std::endl;
91 auto print = [](TString t, TVector3
x) {
92 std::cout << Form(
"%4.4f %4.4f %4.4f %s",
x.X(),
x.Y(),
x.Z(), t.Data()) << std::endl;
94 auto raw1 = GetTrack(temp->GetV0().GetPosId())->GetMomentum().Vect();
95 auto raw2 = GetTrack(temp->GetV0().GetNegId())->GetMomentum().Vect();
102 print(
"p1c", vecpos1);
103 print(
"p1x", vecpos);
104 print(
"p2c", vecpos2);
105 print(
"p2x", vecneg);
106 print(
"sum com", (vecpos1 + vecpos2));
107 print(
"sum raw", (raw1 + raw2));
108 print(
"tot v0m", track->GetMomentum().Vect());
113 track->GetV0Info()->
CopyData(&temp->GetV0());
131 fVertex->SetXYZT(start.X(), start.Y(), start.Z(), start.T());
132 fTracks->ExpandCreateFast(fTotalTracksNo);
134 for (
int i = 0; i < fTotalTracksNo; i++) {
136 track->ResetTrack(i,
this);
138 track->SetChi2(glob->
GetChi2());
140 track->SetTrackLenght(glob->
GetLength());
143 track->SetMomentum(track_param->
GetPx(), track_param->
GetPy(), track_param->
GetPz(), 0);
144 track->SetDCA(track_param->GetX() - fVertex->X(), track_param->GetY() - fVertex->Y(),
145 track_param->GetZ() - fVertex->Z());
148 if (track_param->GetQp() > 0) {
152 track->SetCharge(-1);
154 if (sts_index >= 0) {
164 Hal::ToFTrack* tof = (Hal::ToFTrack*) track->
GetDetTrack(Hal::DetectorID::kTOF);
166 if (tof_index >= 0) {
169 Double_t beta = track->GetTrackLenght() / t / (29.9792458);
170 Double_t p = track->GetMomentum().P();
171 Double_t m2 = p * p * (1. / beta / beta - 1.);
177 tof->SetMass2(Hal::ToFTrack::DummyVal());
178 tof->SetBeta(Hal::ToFTrack::DummyVal());
189 fVertex->SetXYZT(start.X(), start.Y(), start.Z(), start.T());
190 fTracks->ExpandCreateFast(fTotalTracksNo);
192 for (
int i = 0; i < fTotalTracksNo; i++) {
193 AnalysisTree::Track p = container->
GetVtxTracks()->GetChannel(i);
194 AnalysisTree::ShortInt_t match = container->
GetVtx2ToFMatch()->GetMatchDirect(i);
196 track->ResetTrack(i,
this);
197 track->SetChi2(p.GetField<
float>(ids.
vtx_chi2));
199 track->SetMomentum(p.GetPx(), p.GetPy(), p.GetPz(), 0);
203 track->SetCharge(p.GetField<
int>(ids.
vtx_q));
205 Hal::ToFTrack* tof = (Hal::ToFTrack*) track->
GetDetTrack(Hal::DetectorID::kTOF);
206 if (match == AnalysisTree::UndefValueShort) {
208 tof->SetMass2(Hal::ToFTrack::DummyVal());
209 tof->SetBeta(Hal::ToFTrack::DummyVal());
213 AnalysisTree::Hit tof_hit = container->
GetTofHits()->GetChannel(match);
214 Double_t P = track->GetMomentum().P();
215 Double_t m2 = tof_hit.GetField<
float>(ids.
tof_mass2);
216 const TLorentzVector& vec = track->GetMomentum();
217 Double_t mom2 = vec.Px() * vec.Px() + vec.Py() * vec.Py() + vec.Pz() * vec.Pz();
218 Double_t
E = TMath::Sqrt(mom2 + m2);
219 Double_t beta = P /
E;