51 Hal::McEvent* mc_event = (Hal::McEvent*) event;
52 fTotalTracksNo = mc_event->GetTotalTrackNo();
53 for (
int i = 0; i < fTotalTracksNo; i++) {
54 Hal::McTrack* to = (Hal::McTrack*) fTracks->ConstructedAt(i);
55 Hal::McTrack* from = (Hal::McTrack*) mc_event->GetTrack(i);
56 to->ResetTrack(i,
this);
66 Bool_t UseFreez = kTRUE;
67 if (conf.
freezX == AnalysisTree::UndefValueShort) {
73 for (
int i = 0; i < fTotalTracksNo; i++) {
75 track->ResetTrack(i,
this);
76 AnalysisTree::Particle particle = data->
GetParticles()->GetChannel(i);
77 Double_t px = particle.GetField<
float>(conf.
px);
78 Double_t py = particle.GetField<
float>(conf.
py);
79 Double_t pz = particle.GetField<
float>(conf.
pz);
80 Double_t mass = particle.GetField<
float>(conf.
mass);
82 Int_t mother_id = particle.GetField<
int>(conf.
motherId);
83 Int_t pid = particle.GetField<
int>(conf.
pdg);
84 Double_t e = TMath::Sqrt(px * px + py * py + pz * pz + mass * mass);
85 track->SetMomentum(px, py, pz, e);
88 Double_t
x = particle.GetField<
float>(conf.
freezX);
89 Double_t
y = particle.GetField<
float>(conf.
freezY);
90 Double_t z = particle.GetField<
float>(conf.
freezZ);
91 Double_t t = particle.GetField<
float>(conf.
freezT);
92 track->SetFreezoutPosition(
x,
y, z, t);
95 if (mother_id == -1) {
99 track->SetMotherIndex(track->GetMotherIndex());
101 track->SetCharge(CalculateCharge(pid));