CbmRoot
Loading...
Searching...
No Matches
PairAnalysisPairKF.h
Go to the documentation of this file.
1#ifndef PAIRANALYSISPAIRKF_H
2#define PAIRANALYSISPAIRKF_H
3/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//#############################################################
7//# #
8//# PairAnalysisPairKF #
9//# Class to store pair information #
10//# #
11//# #
12//# Authors: #
13//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
14//# #
15//#############################################################
16
17#include <TLorentzVector.h>
18#include <TMath.h>
19
20#include <KFParticle.h>
21
22#include "PairAnalysisPair.h"
23#include "PairAnalysisTrack.h"
25
26class CbmVertex;
27class CbmMCTrack;
28
30public:
32 virtual ~PairAnalysisPairKF();
34
35 PairAnalysisPairKF(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 // kinematics
43 virtual Double_t Px() const { return fPair.GetPx(); }
44 virtual Double_t Py() const { return fPair.GetPy(); }
45 virtual Double_t Pz() const { return fPair.GetPz(); }
46 virtual Double_t Pt() const { return fPair.GetPt(); }
47 virtual Double_t P() const { return fPair.GetP(); }
48 virtual Bool_t PxPyPz(Double_t p[3]) const
49 {
50 p[0] = Px();
51 p[1] = Py();
52 p[2] = Pz();
53 return kTRUE;
54 }
55
56 virtual Double_t Xv() const { return fPair.GetX(); }
57 virtual Double_t Yv() const { return fPair.GetY(); }
58 virtual Double_t Zv() const { return fPair.GetZ(); }
59 virtual Bool_t XvYvZv(Double_t x[3]) const
60 {
61 x[0] = Xv();
62 x[1] = Yv();
63 x[2] = Zv();
64 return kTRUE;
65 }
66
67 virtual Double_t OneOverPt() const { return Pt() > 0. ? 1. / Pt() : 0.; } //TODO: check
68 virtual Double_t Phi() const { return fPair.GetPhi(); }
69 virtual Double_t Theta() const { return Pz() != 0 ? TMath::ATan(Pt() / Pz()) : 0.; } //TODO: check
70
71
72 virtual Double_t E() const { return fPair.GetE(); }
73 virtual Double_t M() const { return fPair.GetMass(); }
74
75 virtual Double_t Eta() const { return fPair.GetEta(); }
76 virtual Double_t Y() const
77 {
78 if ((E() * E() - Px() * Px() - Py() * Py() - Pz() * Pz()) > 0.)
79 return TLorentzVector(Px(), Py(), Pz(), E()).Rapidity();
80 else
81 return -1111.;
82 }
83
84 // virtual Short_t Charge() const { return fPair.GetQ();}
85 // void SetProductionVertex(const KFParticle &Vtx) { fPair.SetProductionVertex(Vtx); }
86
87 //inter leg information
88 Double_t GetChi2() const { return fPair.GetChi2(); }
89 Int_t GetNdf() const { return fPair.GetNDF(); }
90 Double_t GetDecayLength() const { return fPair.GetDecayLength(); }
91 Double_t GetR() const { return fPair.GetR(); }
92 Double_t OpeningAngle() const { return fD1.GetAngle(fD2); }
93 Double_t OpeningAngleXY() const { return fD1.GetAngleXY(fD2); }
94 Double_t OpeningAngleRZ() const { return fD1.GetAngleRZ(fD2); }
95 Double_t DistanceDaughters() const { return fD1.GetDistanceFromParticle(fD2); }
96 Double_t DistanceDaughtersXY() const { return fD1.GetDistanceFromParticleXY(fD2); }
97 Double_t DeviationDaughters() const { return fD1.GetDeviationFromParticle(fD2); }
98 Double_t DeviationDaughtersXY() const { return fD1.GetDeviationFromParticleXY(fD2); }
99 Double_t DeltaEta() const { return TMath::Abs(fD1.GetEta() - fD2.GetEta()); }
100 Double_t DeltaPhi() const { return fD1.GetAngleXY(fD2); }
101 Double_t DaughtersP() const { return fD1.GetP() * fD2.GetP(); }
102
103 // calculate cos(theta*) and phi* in HE and CS pictures
104 void GetThetaPhiCM(Double_t& thetaHE, Double_t& phiHE, Double_t& thetaCS, Double_t& phiCS) const;
105
106 Double_t PsiPair(Double_t MagField) const; //Angle cut w.r.t. to magnetic field
107 Double_t PhivPair(Double_t MagField) const; //Angle of ee plane w.r.t. to magnetic field
108
109 // TODO: replace by KFParticleBase functions?
110 Double_t GetArmAlpha() const;
111 Double_t GetArmPt() const;
112
113 // internal KF particle
114 const KFParticle& GetKFParticle() const { return fPair; }
115 const KFParticle& GetKFFirstDaughter() const { return fD1; }
116 const KFParticle& GetKFSecondDaughter() const { return fD2; }
117
118 // rotations
119 virtual void RotateTrack(PairAnalysisTrackRotator* /*rot*/) { return; }
120
121
122private:
123 KFParticle fPair; // KF particle internally used for pair calculation
124 KFParticle fD1; // KF particle first daughter
125 KFParticle fD2; // KF particle1 second daughter
126
127 ClassDef(PairAnalysisPairKF, 1)
128};
129
130#endif
void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)
virtual Double_t M() const
virtual Double_t Xv() const
void SetMCTracks(const CbmMCTrack *const particle1, const CbmMCTrack *const particle2)
Double_t DistanceDaughters() const
virtual Double_t Pt() const
virtual Double_t Yv() const
virtual Double_t Theta() const
const KFParticle & GetKFFirstDaughter() const
virtual Double_t E() const
Double_t DeviationDaughters() const
Double_t DistanceDaughtersXY() const
virtual Double_t Phi() const
Double_t OpeningAngleXY() const
Double_t DaughtersP() const
virtual Double_t Pz() const
const KFParticle & GetKFParticle() const
virtual Double_t Y() const
Double_t GetR() const
virtual Double_t OneOverPt() const
Double_t GetDecayLength() const
Double_t GetChi2() const
Double_t DeltaEta() const
Double_t GetArmPt() const
void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const
virtual Double_t Eta() const
virtual Double_t Px() const
Double_t OpeningAngle() const
Double_t PhivPair(Double_t MagField) const
virtual Double_t Zv() const
Double_t DeltaPhi() const
virtual Bool_t PxPyPz(Double_t p[3]) const
virtual void RotateTrack(PairAnalysisTrackRotator *)
const KFParticle & GetKFSecondDaughter() const
Double_t OpeningAngleRZ() const
Double_t GetArmAlpha() const
virtual Bool_t XvYvZv(Double_t x[3]) const
virtual Double_t Py() const
Double_t DeviationDaughtersXY() const
virtual Double_t P() const
Double_t PsiPair(Double_t MagField) const