Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
PairEtaPtCut.cxx
1/*
2 * PairEtaPtCut.cxx
3 *
4 * Created on: 2 sie 2021
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "PairEtaPtCut.h"
10
11#include "Track.h"
12#include "TwoTrack.h"
13#include <TMath.h>
14
15namespace Hal {
16 PairEtaPtCut::PairEtaPtCut() : TwoTrackCut(2) {
17 SetUnitName("#eta_{pair} []", 0);
18 SetUnitName("p_{T pair} [GeV/c]", 1);
19 }
20
21 Bool_t PairEtaPtCut::Pass(TwoTrack* pair) {
22 Double_t px = pair->GetTrack1()->GetMomentum().Px() + pair->GetTrack2()->GetMomentum().Px();
23 Double_t py = pair->GetTrack1()->GetMomentum().Py() + pair->GetTrack2()->GetMomentum().Py();
24 Double_t pz = pair->GetTrack1()->GetMomentum().Pz() + pair->GetTrack2()->GetMomentum().Pz();
25 Double_t pt = TMath::Sqrt(px * px + py * py);
26 Double_t p = TMath::Sqrt(pt * pt + pz * pz);
27 SetValue(0.5 * TMath::Log((p + pz) / (p - pz)), 0);
28 SetValue(pt, 1);
29 return Validate();
30 }
31
32 PairEtaPtCut::~PairEtaPtCut() {}
33} // namespace Hal
const TLorentzVector & GetMomentum() const
Definition Track.h:118
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80