24 TrackSmear(), fPxSmear(0.0), fPySmear(0.0), fPzSmear(0.0), fPtSmear(0.0), fSmearMode(0) {}
65 Double_t px, py, pz, e;
66 TLorentzVector* true_mom = mod->GetTrueMomentum();
71 Double_t m2 = e * e - px * px - py * py - pz * pz;
75 px = px * (1. + gRandom->Gaus(0, fPxSmear));
76 py = py * (1. + gRandom->Gaus(0, fPySmear));
79 px = px * (1. + gRandom->Gaus(0, fPxSmear));
80 py = py * (1. + gRandom->Gaus(0, fPySmear));
81 pz = pz * (1. + gRandom->Gaus(0, fPzSmear));
84 e = TMath::Sqrt(m2 + px * px + py * py + pz * pz);
88 Task::EInitFlag TrackSmearMomentumPercent::Init() {
89 if (fPtSmear != 0) fSmearMode = 1;
90 if (fPzSmear != 0) fSmearMode = 2;
91 if (fPxSmear != 0) fSmearMode = 3;
95 fPxSmear = fPtSmear / TMath::Sqrt(2.0) / 100.0;
96 fPySmear = fPtSmear / TMath::Sqrt(2.0) / 100.0;
100 fPxSmear = fPtSmear / TMath::Sqrt(2.0) / 100.0;
101 fPySmear = fPtSmear / TMath::Sqrt(2.0) / 100.0;
104 fPxSmear = fPxSmear / 100.0;
105 fPySmear = fPySmear / 100.0;
106 fPzSmear = fPzSmear / 100.0;
109 return Task::EInitFlag::kSUCCESS;