CbmRoot
CbmTofTrackletParam.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- FairTrackParam source file -----
3 // ----- Created 27/01/05 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
6 #include "CbmTofTrackletParam.h"
7 
8 #include <FairLogger.h> // for Logger, LOG
9 
10 Double_t CbmTofTrackletParam::GetZr(Double_t R) const {
11  Double_t P = (fTx + fTy);
12  Double_t Q = 0.5 * (fX * fX + fY * fY - R * R);
13  Double_t Arg = P * P * 0.25 - Q;
14  LOG(info) << " GetZr " << R << ", P " << P << ", Q " << Q << ", Arg " << Arg;
15 
16  if (Arg > 0.) {
17  Double_t z = -P * 0.5 + std::sqrt(Arg);
18  LOG(info) << " GetZr " << R << ", P " << P << ", Q " << Q << ", Arg " << Arg
19  << ", z " << z;
20  return z;
21  }
22  return 0.;
23 }
24 
25 
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmTofTrackletParam
Definition: CbmTofTrackletParam.h:27
CbmTofTrackletParam::fTx
Double_t fTx
Definition: CbmTofTrackletParam.h:142
CbmTofTrackletParam::fX
Double_t fX
Definition: CbmTofTrackletParam.h:141
CbmTofTrackletParam::GetZr
Double_t GetZr(Double_t R) const
Definition: CbmTofTrackletParam.cxx:10
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmTofTrackletParam::fY
Double_t fY
Definition: CbmTofTrackletParam.h:141
CbmTofTrackletParam.h
CbmTofTrackletParam::fTy
Double_t fTy
Definition: CbmTofTrackletParam.h:142