CbmRoot
Loading...
Searching...
No Matches
PairAnalysisPairLV.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2016 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Julian Book [committer] */
4
5#ifndef PAIRANALYSISPAIRLV_H
6#define PAIRANALYSISPAIRLV_H
7
8//#############################################################
9//# #
10//# PairAnalysisPairLV #
11//# Class to store pair information #
12//# #
13//# #
14//# Authors: #
15//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
16//# #
17//#############################################################
18
19#include <TLorentzVector.h>
20#include <TMath.h>
21
22#include "PairAnalysisPair.h"
23#include "PairAnalysisTrack.h"
25
26class CbmVertex;
27class CbmMCTrack;
28
30public:
32 virtual ~PairAnalysisPairLV();
34
35 PairAnalysisPairLV(PairAnalysisTrack* const particle1, Int_t pid1, PairAnalysisTrack* const particle2, Int_t pid2,
36 Char_t type);
37
38 void SetTracks(PairAnalysisTrack* const particle1, Int_t pid1, PairAnalysisTrack* const particle2, Int_t pid2);
39
40 void SetMCTracks(const CbmMCTrack* const particle1, const CbmMCTrack* const particle2);
41
42
43 // kinematics
44 virtual Double_t Px() const { return fPair.Px(); }
45 virtual Double_t Py() const { return fPair.Py(); }
46 virtual Double_t Pz() const { return fPair.Pz(); }
47 virtual Double_t Pt() const { return fPair.Pt(); }
48 virtual Double_t P() const { return fPair.P(); }
49 virtual Bool_t PxPyPz(Double_t p[3]) const
50 {
51 p[0] = Px();
52 p[1] = Py();
53 p[2] = Pz();
54 return kTRUE;
55 }
56
57 virtual Double_t Xv() const { return fPairPos.X(); }
58 virtual Double_t Yv() const { return fPairPos.Y(); }
59 virtual Double_t Zv() const { return fPairPos.Z(); }
60 virtual Bool_t XvYvZv(Double_t x[3]) const
61 {
62 x[0] = Xv();
63 x[1] = Yv();
64 x[2] = Zv();
65 return kTRUE;
66 }
67
68 virtual Double_t OneOverPt() const { return Pt() > 0. ? 1. / Pt() : 0.; } //TODO: check
69 virtual Double_t Phi() const { return fPair.Phi(); }
70 virtual Double_t Theta() const { return Pz() != 0 ? TMath::ATan(Pt() / Pz()) : 0.; } //TODO: check
71
72
73 virtual Double_t E() const { return fPair.E(); }
74 virtual Double_t M() const { return fPair.M(); }
75
76 // virtual Double_t Eta() const { return fPair.Eta();}
77 virtual Double_t Y() const { return fPair.Rapidity(); }
78
79 // virtual Int_t Charge() const {return fCharge; }
80
81 //inter leg information
82 Double_t GetR() const { return fPairPos.Vect().Perp(); }
83 Double_t OpeningAngle() const { return fD1.Angle(fD2.Vect()); }
84 Double_t DeltaEta() const { return TMath::Abs(fD1.Eta() - fD2.Eta()); }
85 Double_t DeltaPhi() const { return fD1.DeltaPhi(fD2); }
86 Double_t DaughtersP() const { return fD1.P() * fD2.P(); }
87
88 // calculate cos(theta*) and phi* in HE and CS pictures
89 void GetThetaPhiCM(Double_t& thetaHE, Double_t& phiHE, Double_t& thetaCS, Double_t& phiCS) const;
90
91 Double_t PsiPair(Double_t MagField) const; //Angle cut w.r.t. to magnetic field
92 Double_t PhivPair(Double_t MagField) const; //Angle of ee plane w.r.t. to magnetic field
93
94 Double_t GetArmAlpha() const;
95 Double_t GetArmPt() const;
96
97 // internal Lorentz vector particle
98 const TLorentzVector& GetLVParticle() const { return fPair; }
99 const TLorentzVector& GetLVFirstDaughter() const { return fD1; }
100 const TLorentzVector& GetLVSecondDaughter() const { return fD2; }
101
102 // rotations
103 virtual void RotateTrack(PairAnalysisTrackRotator* rot);
104
105private:
106 TLorentzVector fPairPos; // lorentz vector position
107 TLorentzVector fPair; // lorentz vector internaly used for pair calculation
108 TLorentzVector fD1; // lorentz vector first daughter
109 TLorentzVector fD2; // lorentz vector second daughter
110
111 ClassDef(PairAnalysisPairLV, 2) // Lorentz vector pairs
112};
113
114#endif
void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)
Double_t DeltaPhi() const
const TLorentzVector & GetLVFirstDaughter() const
virtual Double_t OneOverPt() const
Double_t DaughtersP() const
const TLorentzVector & GetLVSecondDaughter() const
virtual Double_t Zv() const
virtual Double_t Py() const
virtual Double_t Pt() const
virtual Double_t Pz() const
virtual Double_t P() const
virtual Bool_t PxPyPz(Double_t p[3]) const
virtual Double_t Px() const
virtual Double_t M() const
void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const
virtual void RotateTrack(PairAnalysisTrackRotator *rot)
virtual Double_t E() const
Double_t GetArmAlpha() const
Double_t GetArmPt() const
Double_t PhivPair(Double_t MagField) const
virtual Double_t Theta() const
virtual Bool_t XvYvZv(Double_t x[3]) const
virtual Double_t Y() const
Double_t GetR() const
Double_t OpeningAngle() const
void SetMCTracks(const CbmMCTrack *const particle1, const CbmMCTrack *const particle2)
virtual Double_t Yv() const
virtual Double_t Phi() const
const TLorentzVector & GetLVParticle() const
Double_t PsiPair(Double_t MagField) const
virtual Double_t Xv() const
Double_t DeltaEta() const