Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackBetaCut.cxx
1/*
2 * TrackBetaCut.cxx
3 *
4 * Created on: 23 lut 2016
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TrackBetaCut.h"
10
11#include "Track.h"
12
13namespace Hal {
14 TrackBetaCut::TrackBetaCut() : TrackCut(1) { SetUnitName("#beta"); }
15
16 Bool_t TrackBetaCut::Pass(Track* track) {
17 Double_t px = track->GetPx();
18 Double_t py = track->GetPy();
19 Double_t pz = track->GetPz();
20 Double_t p = TMath::Abs(px * px + py * py + pz * pz);
21 Double_t beta = p / track->GetE();
22 SetValue(beta);
23 return Validate();
24 }
25
26 TrackBetaCut::~TrackBetaCut() {}
27} // namespace Hal
Double_t GetPz() const
Definition Track.h:109
Double_t GetPx() const
Definition Track.h:99
Double_t GetPy() const
Definition Track.h:104
Double_t GetE() const
Definition Track.h:114