]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MFT/AliMuonForwardTrack.cxx
Updated AliMuonForwardTrack
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrack.cxx
index 17ef3292666018aa6040b2b3041a0d5247791eb5..04881e15dcdc90e06d08a96c1e033d3bff1f3e6b 100644 (file)
@@ -34,6 +34,7 @@
 #include "AliMFTConstants.h"
 #include "TLorentzVector.h"
 #include "TDatabasePDG.h"
+#include "AliMUONConstants.h"
 
 ClassImp(AliMuonForwardTrack)
 
@@ -431,6 +432,49 @@ Double_t AliMuonForwardTrack::GetOffset(Double_t x, Double_t y, Double_t z) {
 
 //====================================================================================================================================================
 
+Double_t AliMuonForwardTrack::GetDCA(Double_t x, Double_t y, Double_t z) {
+
+  // Distance of Closest Approach, according to the standard MUON terminology. Actually, the offset of the track w.r.t. the primary vertex,
+  // where the extrapolation of the track DOES NOT include the MFT information
+
+  AliMUONTrackParam *param = GetTrackParamAtMUONCluster(0);
+  AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(param, z);
+  Double_t dX = param->GetNonBendingCoor() - x;
+  Double_t dY = param->GetBendingCoor()    - y;
+  return TMath::Sqrt(dX*dX + dY*dY);
+
+}
+
+//====================================================================================================================================================
+
+Double_t AliMuonForwardTrack::GetMomentumSpectrometer(Double_t z) {
+
+  // Momentum of the track at the primary vertex plane, where the extrapolation of the track DOES NOT include the MFT information
+
+  AliMUONTrackParam *param = GetTrackParamAtMUONCluster(0);
+  AliMUONTrackExtrap::ExtrapToVertexWithoutBranson(param, z);
+  return param->P();
+
+}
+
+//====================================================================================================================================================
+
+Double_t AliMuonForwardTrack::GetThetaAbs() {
+
+  // it is the angle defined by the imaginary line goingo from the vertex to the exit point of the track at the end of the hadron absorber
+  
+  Double_t z = AliMUONConstants::AbsZEnd();
+  AliMUONTrackParam *param = GetTrackParamAtMFTCluster(0);
+  AliMUONTrackExtrap::ExtrapToZ(param, z);
+  Double_t x = param->GetNonBendingCoor();
+  Double_t y = param->GetBendingCoor();
+
+  return 180. +TMath::ATan(TMath::Sqrt(x*x + y*y)/z)*TMath::RadToDeg();
+
+}
+
+//====================================================================================================================================================
+
 Bool_t AliMuonForwardTrack::IsFromResonance() {
 
   Bool_t result = kFALSE;