CbmRoot
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 <KFParticle.h>
18 #include <TLorentzVector.h>
19 #include <TMath.h>
20 
21 #include "PairAnalysisPair.h"
22 #include "PairAnalysisTrack.h"
24 
25 class CbmVertex;
26 class CbmMCTrack;
27 
29 public:
31  virtual ~PairAnalysisPairKF();
33 
34  PairAnalysisPairKF(PairAnalysisTrack* const particle1,
35  Int_t pid1,
36  PairAnalysisTrack* const particle2,
37  Int_t pid2,
38  Char_t type);
39 
40  void SetTracks(PairAnalysisTrack* const particle1,
41  Int_t pid1,
42  PairAnalysisTrack* const particle2,
43  Int_t pid2);
44 
45  void SetMCTracks(const CbmMCTrack* const particle1,
46  const CbmMCTrack* const particle2);
47 
48  // kinematics
49  virtual Double_t Px() const { return fPair.GetPx(); }
50  virtual Double_t Py() const { return fPair.GetPy(); }
51  virtual Double_t Pz() const { return fPair.GetPz(); }
52  virtual Double_t Pt() const { return fPair.GetPt(); }
53  virtual Double_t P() const { return fPair.GetP(); }
54  virtual Bool_t PxPyPz(Double_t p[3]) const {
55  p[0] = Px();
56  p[1] = Py();
57  p[2] = Pz();
58  return kTRUE;
59  }
60 
61  virtual Double_t Xv() const { return fPair.GetX(); }
62  virtual Double_t Yv() const { return fPair.GetY(); }
63  virtual Double_t Zv() const { return fPair.GetZ(); }
64  virtual Bool_t XvYvZv(Double_t x[3]) const {
65  x[0] = Xv();
66  x[1] = Yv();
67  x[2] = Zv();
68  return kTRUE;
69  }
70 
71  virtual Double_t OneOverPt() const {
72  return Pt() > 0. ? 1. / Pt() : 0.;
73  } //TODO: check
74  virtual Double_t Phi() const { return fPair.GetPhi(); }
75  virtual Double_t Theta() const {
76  return Pz() != 0 ? TMath::ATan(Pt() / Pz()) : 0.;
77  } //TODO: check
78 
79 
80  virtual Double_t E() const { return fPair.GetE(); }
81  virtual Double_t M() const { return fPair.GetMass(); }
82 
83  virtual Double_t Eta() const { return fPair.GetEta(); }
84  virtual Double_t Y() const {
85  if ((E() * E() - Px() * Px() - Py() * Py() - Pz() * Pz()) > 0.)
86  return TLorentzVector(Px(), Py(), Pz(), E()).Rapidity();
87  else
88  return -1111.;
89  }
90 
91  // virtual Short_t Charge() const { return fPair.GetQ();}
92  // void SetProductionVertex(const KFParticle &Vtx) { fPair.SetProductionVertex(Vtx); }
93 
94  //inter leg information
95  Double_t GetChi2() const { return fPair.GetChi2(); }
96  Int_t GetNdf() const { return fPair.GetNDF(); }
97  Double_t GetDecayLength() const { return fPair.GetDecayLength(); }
98  Double_t GetR() const { return fPair.GetR(); }
99  Double_t OpeningAngle() const { return fD1.GetAngle(fD2); }
100  Double_t OpeningAngleXY() const { return fD1.GetAngleXY(fD2); }
101  Double_t OpeningAngleRZ() const { return fD1.GetAngleRZ(fD2); }
102  Double_t DistanceDaughters() const {
103  return fD1.GetDistanceFromParticle(fD2);
104  }
105  Double_t DistanceDaughtersXY() const {
106  return fD1.GetDistanceFromParticleXY(fD2);
107  }
108  Double_t DeviationDaughters() const {
109  return fD1.GetDeviationFromParticle(fD2);
110  }
111  Double_t DeviationDaughtersXY() const {
112  return fD1.GetDeviationFromParticleXY(fD2);
113  }
114  Double_t DeltaEta() const { return TMath::Abs(fD1.GetEta() - fD2.GetEta()); }
115  Double_t DeltaPhi() const { return fD1.GetAngleXY(fD2); }
116  Double_t DaughtersP() const { return fD1.GetP() * fD2.GetP(); }
117 
118  // calculate cos(theta*) and phi* in HE and CS pictures
119  void GetThetaPhiCM(Double_t& thetaHE,
120  Double_t& phiHE,
121  Double_t& thetaCS,
122  Double_t& phiCS) const;
123 
124  Double_t
125  PsiPair(Double_t MagField) const; //Angle cut w.r.t. to magnetic field
126  Double_t PhivPair(
127  Double_t MagField) const; //Angle of ee plane w.r.t. to magnetic field
128 
129  // TODO: replace by KFParticleBase functions?
130  Double_t GetArmAlpha() const;
131  Double_t GetArmPt() const;
132 
133  // internal KF particle
134  const KFParticle& GetKFParticle() const { return fPair; }
135  const KFParticle& GetKFFirstDaughter() const { return fD1; }
136  const KFParticle& GetKFSecondDaughter() const { return fD2; }
137 
138  // rotations
139  virtual void RotateTrack(PairAnalysisTrackRotator* /*rot*/) { return; }
140 
141 
142 private:
143  KFParticle fPair; // KF particle internally used for pair calculation
144  KFParticle fD1; // KF particle first daughter
145  KFParticle fD2; // KF particle1 second daughter
146 
147  ClassDef(PairAnalysisPairKF, 1)
148 };
149 
150 #endif
PairAnalysisPairKF::GetArmAlpha
Double_t GetArmAlpha() const
Definition: PairAnalysisPairKF.cxx:270
PairAnalysisPairKF::Theta
virtual Double_t Theta() const
Definition: PairAnalysisPairKF.h:75
PairAnalysisPairKF::Phi
virtual Double_t Phi() const
Definition: PairAnalysisPairKF.h:74
PairAnalysisPairKF::Pt
virtual Double_t Pt() const
Definition: PairAnalysisPairKF.h:52
PairAnalysisPairKF::GetDecayLength
Double_t GetDecayLength() const
Definition: PairAnalysisPairKF.h:97
PairAnalysisPairKF::PhivPair
Double_t PhivPair(Double_t MagField) const
Definition: PairAnalysisPairKF.cxx:306
PairAnalysisPairKF::DeviationDaughters
Double_t DeviationDaughters() const
Definition: PairAnalysisPairKF.h:108
PairAnalysisPairKF::OpeningAngleRZ
Double_t OpeningAngleRZ() const
Definition: PairAnalysisPairKF.h:101
PairAnalysisPairKF::fPair
KFParticle fPair
Definition: PairAnalysisPairKF.h:143
PairAnalysisTrackRotator
Definition: PairAnalysisTrackRotator.h:17
PairAnalysisTrackRotator.h
PairAnalysisTrack
Definition: PairAnalysisTrack.h:37
PairAnalysisPairKF::Eta
virtual Double_t Eta() const
Definition: PairAnalysisPairKF.h:83
PairAnalysisPairKF::RotateTrack
virtual void RotateTrack(PairAnalysisTrackRotator *)
Definition: PairAnalysisPairKF.h:139
PairAnalysisPair
Definition: PairAnalysisPair.h:25
PairAnalysisPairKF::GetNdf
Int_t GetNdf() const
Definition: PairAnalysisPairKF.h:96
PairAnalysisPairKF::DaughtersP
Double_t DaughtersP() const
Definition: PairAnalysisPairKF.h:116
PairAnalysisPairKF::GetKFParticle
const KFParticle & GetKFParticle() const
Definition: PairAnalysisPairKF.h:134
PairAnalysisPairKF::DistanceDaughters
Double_t DistanceDaughters() const
Definition: PairAnalysisPairKF.h:102
PairAnalysisPairKF::PairAnalysisPairKF
PairAnalysisPairKF()
PairAnalysisPairKF::Px
virtual Double_t Px() const
Definition: PairAnalysisPairKF.h:49
PairAnalysisPairKF::Y
virtual Double_t Y() const
Definition: PairAnalysisPairKF.h:84
PairAnalysisPairKF::Py
virtual Double_t Py() const
Definition: PairAnalysisPairKF.h:50
PairAnalysisPairKF::GetArmPt
Double_t GetArmPt() const
Definition: PairAnalysisPairKF.cxx:291
PairAnalysisPairKF::DistanceDaughtersXY
Double_t DistanceDaughtersXY() const
Definition: PairAnalysisPairKF.h:105
PairAnalysisPairKF::GetKFSecondDaughter
const KFParticle & GetKFSecondDaughter() const
Definition: PairAnalysisPairKF.h:136
CbmVertex
Definition: CbmVertex.h:26
PairAnalysisPairKF::GetThetaPhiCM
void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const
Definition: PairAnalysisPairKF.cxx:173
PairAnalysisPairKF::Zv
virtual Double_t Zv() const
Definition: PairAnalysisPairKF.h:63
PairAnalysisPairKF::fD2
KFParticle fD2
Definition: PairAnalysisPairKF.h:145
PairAnalysisPairKF::OpeningAngle
Double_t OpeningAngle() const
Definition: PairAnalysisPairKF.h:99
PairAnalysisTrack.h
PairAnalysisPairKF::Yv
virtual Double_t Yv() const
Definition: PairAnalysisPairKF.h:62
PairAnalysisPairKF::E
virtual Double_t E() const
Definition: PairAnalysisPairKF.h:80
PairAnalysisPairKF::GetChi2
Double_t GetChi2() const
Definition: PairAnalysisPairKF.h:95
PairAnalysisPairKF::XvYvZv
virtual Bool_t XvYvZv(Double_t x[3]) const
Definition: PairAnalysisPairKF.h:64
PairAnalysisPairKF::SetMCTracks
void SetMCTracks(const CbmMCTrack *const particle1, const CbmMCTrack *const particle2)
Definition: PairAnalysisPairKF.cxx:134
PairAnalysisPairKF::Pz
virtual Double_t Pz() const
Definition: PairAnalysisPairKF.h:51
PairAnalysisPairKF::Xv
virtual Double_t Xv() const
Definition: PairAnalysisPairKF.h:61
PairAnalysisPairKF::fD1
KFParticle fD1
Definition: PairAnalysisPairKF.h:144
CbmMCTrack
Definition: CbmMCTrack.h:34
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
PairAnalysisPairKF::PxPyPz
virtual Bool_t PxPyPz(Double_t p[3]) const
Definition: PairAnalysisPairKF.h:54
PairAnalysisPairKF::DeltaPhi
Double_t DeltaPhi() const
Definition: PairAnalysisPairKF.h:115
PairAnalysisPair.h
PairAnalysisPairKF::OneOverPt
virtual Double_t OneOverPt() const
Definition: PairAnalysisPairKF.h:71
PairAnalysisPairKF::OpeningAngleXY
Double_t OpeningAngleXY() const
Definition: PairAnalysisPairKF.h:100
PairAnalysisPairKF::GetKFFirstDaughter
const KFParticle & GetKFFirstDaughter() const
Definition: PairAnalysisPairKF.h:135
PairAnalysisPairKF::~PairAnalysisPairKF
virtual ~PairAnalysisPairKF()
Definition: PairAnalysisPairKF.cxx:64
PairAnalysisPairKF::SetTracks
void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)
Definition: PairAnalysisPairKF.cxx:71
PairAnalysisPairKF::DeviationDaughtersXY
Double_t DeviationDaughtersXY() const
Definition: PairAnalysisPairKF.h:111
PairAnalysisPairKF::M
virtual Double_t M() const
Definition: PairAnalysisPairKF.h:81
PairAnalysisPairKF
Definition: PairAnalysisPairKF.h:28
PairAnalysisPairKF::GetR
Double_t GetR() const
Definition: PairAnalysisPairKF.h:98
PairAnalysisPairKF::PsiPair
Double_t PsiPair(Double_t MagField) const
Definition: PairAnalysisPairKF.cxx:209
PairAnalysisPairKF::P
virtual Double_t P() const
Definition: PairAnalysisPairKF.h:53
PairAnalysisPairKF::DeltaEta
Double_t DeltaEta() const
Definition: PairAnalysisPairKF.h:114