Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
TrackV0MinvCut.cxx
1/*
2 * TrackV0MinvCut.cxx
3 *
4 * Created on: 10 cze 2024
5 * Author: daniel
6 */
7
8#include "TrackV0MinvCut.h"
9
10#include <TDatabasePDG.h>
11#include <TParticlePDG.h>
12
13#include "Cout.h"
14#include "V0Track.h"
15
16namespace Hal {
17
18 Bool_t TrackV0MinvCut::PassV0(V0Track* tr) {
19 SetValue(tr->GetHypoMass(fM1, fM2));
20 return Validate();
21 }
22
23 TrackV0MinvCut::TrackV0MinvCut() : TrackV0Cut(1) { SetUnitName("M_{inv} [GeV/c]", 0); }
24
25 void TrackV0MinvCut::SetDaughersPid(Int_t pos, Int_t neg) {
26 fPid1 = pos;
27 fPid2 = neg;
28 }
29
30 Bool_t TrackV0MinvCut::Init(Int_t taskid) {
31 TDatabasePDG* pid = TDatabasePDG::Instance();
32 auto p1 = pid->GetParticle(fPid1);
33 auto p2 = pid->GetParticle(fPid2);
34 if (!p1 || !p2) {
35 Hal::Cout::PrintInfo(Form("Cannot find particle with PID(%i,%i) in %s", fPid1, fPid2, ClassName()), EInfo::kError);
36 return kFALSE;
37 }
38 fM1 = p1->Mass();
39 fM2 = p2->Mass();
40
41 return TrackV0Cut::Init(taskid);
42 }
43 //===========================================================================
44
45 TrackV0InvMassLambdaCut::TrackV0InvMassLambdaCut() : TrackV0Cut(1) {
46 SetUnitName("M_{inv #Lambda#rightarrow p + #pi^{-}} [GeV/c^{2}]");
47 }
48
49 Bool_t TrackV0InvMassLambdaCut::PassV0(V0Track* tr) {
50 SetValue(tr->GetLambdaMass());
51 return Validate();
52 }
53
54 //===========================================================================
55
56 TrackV0InvMassAntiLambdaCut::TrackV0InvMassAntiLambdaCut() : TrackV0Cut(1) {
57 SetUnitName("M_{inv #Lambda#rightarrow #bar{p} + #pi^{+}} [GeV/c^{2}]");
58 }
59
60 Bool_t TrackV0InvMassAntiLambdaCut::PassV0(V0Track* tr) {
61 SetValue(tr->GetAntiLambdaMass());
62 return Validate();
63 }
64
65 //===========================================================================
66
67 TrackV0InvMassK0Cut::TrackV0InvMassK0Cut() : TrackV0Cut(1) {
68 SetUnitName("M_{inv K_{0s}#rightarrow #pi^{+} + #pi^{-}} [GeV/c^{2}]");
69 }
70
71
72 Bool_t TrackV0InvMassK0Cut::PassV0(V0Track* tr) {
73 SetValue(tr->GetK0Mass());
74 return Validate();
75 }
76
77} /* namespace Hal */
static void PrintInfo(TString text, Hal::EInfo status)
Definition Cout.cxx:370
void SetValue(Double_t val, Int_t i=0)
Definition Cut.h:235
Bool_t Validate()
Definition Cut.cxx:43
void SetUnitName(TString name, Int_t i=0)
Definition Cut.h:241