Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackPhiCut.cxx
1/*
2 * TwoTrackPhiCut.cxx
3 *
4 * Created on: 08-12-2014
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TwoTrackPhiCut.h"
10
11#include "Track.h"
12#include "TwoTrack.h"
13namespace Hal {
14 TwoTrackPhiCut::TwoTrackPhiCut() : TwoTrackCut(1) {}
15
16 Bool_t TwoTrackPhiCut::Pass(TwoTrack* pair) {
17 Double_t px, py;
18 switch (pair->GetPairType()) {
19 case TwoTrack::kRotated:
20 px = pair->GetTrack1()->GetPx() - pair->GetTrack2()->GetPx();
21 py = pair->GetTrack1()->GetPy() - pair->GetTrack2()->GetPy();
22 break;
23 case TwoTrack::kHemishpere:
24 px = pair->GetTrack1()->GetPx() - pair->GetTrack2()->GetPx();
25 py = pair->GetTrack1()->GetPy() - pair->GetTrack2()->GetPy();
26 break;
27 default:
28 px = pair->GetTrack1()->GetPx() + pair->GetTrack2()->GetPx();
29 py = pair->GetTrack1()->GetPy() + pair->GetTrack2()->GetPy();
30 break;
31 }
32 SetValue(TMath::ATan2(py, px));
33 return Validate();
34 }
35
36 TwoTrackPhiCut::~TwoTrackPhiCut() {}
37} // 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