Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackRapidityCut.cxx
1/*
2 * TwoTrackRapidityCut.cxx
3 *
4 * Created on: 30-04-2015
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "TwoTrackRapidityCut.h"
11
12#include "Track.h"
13#include "TwoTrack.h"
14namespace Hal {
15 TwoTrackRapidityCut::TwoTrackRapidityCut() : TwoTrackCut(1) { SetUnitName("Y_{pair}"); }
16
17 Bool_t TwoTrackRapidityCut::Pass(TwoTrack* pair) {
18 Double_t e1 = pair->GetTrack1()->GetE();
19 Double_t e2 = pair->GetTrack2()->GetE();
20 Double_t pz1 = pair->GetTrack1()->GetPz();
21 Double_t pz2 = pair->GetTrack2()->GetPz();
22 if (pair->GetPairType() == TwoTrack::kHemishpere) { pz2 = -pz2; }
23 Double_t Y = 0.5 * TMath::Log((e1 + e2 + pz1 + pz2) / (e1 + e2 - pz1 - pz2));
24 SetValue(Y);
25 return Validate();
26 }
27
28 TwoTrackRapidityCut::~TwoTrackRapidityCut() {
29 // TODO Auto-generated destructor stub
30 }
31} // namespace Hal
Double_t GetPz() const
Definition Track.h:109
Double_t GetE() const
Definition Track.h:114
PairType GetPairType() const
Definition TwoTrack.h:70
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80