Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TwoTrackLCMSCut.cxx
1/*
2 * TwoTrackLCMSCut.cxx
3 *
4 * Created on: 3 kwi 2019
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "TwoTrackLCMSCut.h"
10
11#include "Const.h"
12#include "Track.h"
13#include "TwoTrack.h"
14
15namespace Hal {
16 TwoTrackLCMSCut::TwoTrackLCMSCut() : TwoTrackCut(3) {
17 SetUnitName("q_{out} [GeV/c]", Rout());
18 SetUnitName("q_{side} [GeV/c]", Rside());
19 SetUnitName("q_{long} [GeV/c]", Rlong());
20 fM = Const::PionPlusMass() * Const::PionPlusMass();
21 }
22
23 Bool_t TwoTrackLCMSCut::Pass(TwoTrack* pair) {
24 Track* tr1 = pair->GetTrack1();
25 Track* tr2 = pair->GetTrack2();
26 Double_t px1, py1, pz1, e1;
27 Double_t px2, py2, pz2, e2;
28 switch (pair->GetPairType()) {
29 case TwoTrack::kRotated:
30 px1 = tr1->GetPx();
31 py1 = tr1->GetPy();
32 pz1 = tr1->GetPz();
33 px2 = -tr2->GetPx();
34 py2 = -tr2->GetPy();
35 pz2 = tr2->GetPz();
36 break;
37 case TwoTrack::kHemishpere:
38 px1 = tr1->GetPx();
39 py1 = tr1->GetPy();
40 pz1 = tr1->GetPz();
41 px2 = -tr2->GetPx();
42 py2 = -tr2->GetPy();
43 pz2 = -tr2->GetPz();
44 break;
45 default:
46 px1 = tr1->GetPx();
47 py1 = tr1->GetPy();
48 pz1 = tr1->GetPz();
49 px2 = tr2->GetPx();
50 py2 = tr2->GetPy();
51 pz2 = tr2->GetPz();
52 break;
53 }
54 e1 = TMath::Sqrt(px1 * px1 + py1 * py1 + pz1 * pz1 + fM);
55 e2 = TMath::Sqrt(px2 * px2 + py2 * py2 + pz2 * pz2 + fM);
56 Double_t tPx = px1 + px2;
57 Double_t tPy = py1 + py2;
58 Double_t tPz = pz1 + pz2;
59 Double_t tE = e1 + e2;
60 Double_t tPt = tPx * tPx + tPy * tPy;
61 Double_t tMt = tE * tE - tPz * tPz; // mCVK;
62 tMt = TMath::Sqrt(tMt);
63 tPt = TMath::Sqrt(tPt);
64 Double_t tBeta = tPz / tE;
65 Double_t tGamma = tE / tMt;
66
67 // Transform to LCMS
68
69 Double_t particle1lcms_pz = tGamma * (pz1 - tBeta * e1);
70 Double_t particle2lcms_pz = tGamma * (pz2 - tBeta * e2);
71
72 // Rotate in transverse plane
73
74 Double_t particle1lcms_px = (px1 * tPx + py1 * tPy) / tPt;
75 Double_t particle1lcms_py = (-px1 * tPy + py1 * tPx) / tPt;
76
77 Double_t particle2lcms_px = (px2 * tPx + py2 * tPy) / tPt;
78 Double_t particle2lcms_py = (-px2 * tPy + py2 * tPx) / tPt;
79 SetValue(particle1lcms_px - particle2lcms_px, Rout());
80 SetValue(particle1lcms_py - particle2lcms_py, Rside());
81 SetValue(particle1lcms_pz - particle2lcms_pz, Rlong());
82 return Validate();
83 }
84
85 TwoTrackLCMSCut::~TwoTrackLCMSCut() {}
86} // 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
PairType GetPairType() const
Definition TwoTrack.h:70
Track * GetTrack1() const
Definition TwoTrack.h:75
Track * GetTrack2() const
Definition TwoTrack.h:80