17#include <RtypesCore.h>
18#include <TDatabasePDG.h>
23 TrackYCut::TrackYCut() : TrackCut(1) { SetUnitName(
"y"); }
25 Bool_t TrackYCut::Pass(
Track* track) {
26 Double_t pz = track->
GetPz();
27 Double_t e = track->
GetE();
28 Double_t y = 0.5 * TMath::Log((e + pz) / (e - pz));
33 TrackYCut::~TrackYCut() {
37 Bool_t TrackYAssumedCut::Pass(
Track* track) {
39 Double_t E = TMath::Sqrt(p * p + fMass);
40 Double_t y = 0.5 * TMath::Log((E + p) / (E - p));
45 void TrackYAssumedCut::SetPid(Int_t pid) {
46 TDatabasePDG* pdg = TDatabasePDG::Instance();
47 TParticlePDG* part = pdg->GetParticle(pid);
50 fMass = fMass * fMass;
57 Bool_t TrackYAssumedCut::Init(Int_t taskId) {
58 if (fMass < 0)
return kFALSE;
59 return TrackCut::Init(taskId);
62 Package* TrackYAssumedCut::Report()
const {
63 Package* pack = TrackCut::Report();
void AddObject(TObject *object)
const TLorentzVector & GetMomentum() const