Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackKtCut.cxx
1/*
2 * TwoTrackKtCut.cxx
3 *
4 * Created on: 28-10-2013
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "TwoTrackKtCut.h"
11
12#include "Track.h"
13#include "TwoTrack.h"
14
15namespace Hal {
16 TwoTrackKtCut::TwoTrackKtCut() : TwoTrackCut(1) { SetUnitName("k_{T} [GeV/c]"); }
17
18 TwoTrackKtCut::~TwoTrackKtCut() {}
19
20 Bool_t TwoTrackKtCut::Pass(TwoTrack* pair) {
21 Double_t px = pair->GetTrack1()->GetPx();
22 Double_t py = pair->GetTrack1()->GetPy();
23 switch (pair->GetPairType()) {
24 case TwoTrack::kRotated:
25 px -= pair->GetTrack2()->GetPx();
26 py -= pair->GetTrack2()->GetPy();
27 break;
28 case TwoTrack::kHemishpere:
29 px -= pair->GetTrack2()->GetPx();
30 py -= pair->GetTrack2()->GetPy();
31 break;
32 default:
33 px += pair->GetTrack2()->GetPx();
34 py += pair->GetTrack2()->GetPy();
35 break;
36 }
37 SetValue((TMath::Sqrt(px * px + py * py)) / 2.0);
38 return Validate();
39 }
40} // namespace Hal
Double_t GetPx() const
Definition Track.h:99
Double_t GetPy() const
Definition Track.h:104
PairType GetPairType() const
Definition TwoTrack.h:70
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80