From fb629e2dc5d9c974ca659a1d42d16330310d12b4 Mon Sep 17 00:00:00 2001 From: skowron Date: Thu, 15 Jul 2004 10:37:53 +0000 Subject: [PATCH] Bug Correction --- ANALYSIS/AliAODPair.cxx | 24 ++++++++++++++++++++++++ ANALYSIS/AliAODPair.h | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ANALYSIS/AliAODPair.cxx b/ANALYSIS/AliAODPair.cxx index acd30e75f4b..da609d3a056 100644 --- a/ANALYSIS/AliAODPair.cxx +++ b/ANALYSIS/AliAODPair.cxx @@ -29,6 +29,8 @@ AliAODPair::AliAODPair(Bool_t rev): fQLongLCMSNotCalc(kTRUE), fQtLCMS(0.0), fQtLCMSNotCalc(kTRUE), + fQt(0.0), + fQtNotCalc(kTRUE), fQInv(0.0), fQInvNotCalc(kTRUE), fInvMass(0.0), @@ -314,6 +316,28 @@ Double_t AliAODPair::GetQtLCMS() } return fQtLCMS; } +/************************************************************************/ + +Double_t AliAODPair::GetQt() +{ + //returns Q transverse CMS longitudionally co-moving + if (fQtNotCalc) + { + Double_t dotprod = fPxSum*fPxDiff + fPySum*fPyDiff + fPzSum*fPzDiff; + Double_t klen = fPxSum*fPxSum + fPySum*fPySum + fPzSum*fPzSum; + klen = TMath::Sqrt(klen); + Double_t qlen = fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff; + qlen = TMath::Sqrt(qlen); + + Double_t cosopenangle = dotprod/(klen*qlen); + Double_t sinopenangle = TMath::Sqrt(1.0 - cosopenangle*cosopenangle); + + fQt = sinopenangle*qlen; + fQtNotCalc = kFALSE; + } + return fQt; +} +/************************************************************************/ Double_t AliAODPair::GetKt() { diff --git a/ANALYSIS/AliAODPair.h b/ANALYSIS/AliAODPair.h index 83dab89b663..f8de3c9cbed 100644 --- a/ANALYSIS/AliAODPair.h +++ b/ANALYSIS/AliAODPair.h @@ -43,6 +43,7 @@ class AliAODPair: public TObject virtual Double_t GetQLongLCMS(); //returns Q Long CMS longitudionally co-moving virtual Double_t GetQtLCMS(); //returns Q transverse CMS longitudionally co-moving + virtual Double_t GetQt(); //returns Q transverse to Kt virtual Double_t GetKt(); //returns K transverse @@ -82,8 +83,12 @@ class AliAODPair: public TObject Double_t fQLongLCMS; //value of Q long CMS longitudially co-moving Bool_t fQLongLCMSNotCalc;//flag indicating if fQLongLCMS is already calculated for this pair - Double_t fQtLCMS; //value of Q long CMS longitudially co-moving + Double_t fQtLCMS; //value of Qt CMS longitudially co-moving (hypot(qsidelcms,qoutlcms)) Bool_t fQtLCMSNotCalc;//flag indicating if fQLongLCMS is already calculated for this pair + + Double_t fQt; //value of Qt, projection of 3-mom diff to Kt + Bool_t fQtNotCalc;//flag indicating if fQt is already calculated for this pair + /************************************************************/ /************************************************************/ Double_t fQInv; //half of differnece of 4-momenta @@ -173,6 +178,8 @@ void AliAODPair::Changed() fQSideLCMSNotCalc = kTRUE; fQOutLCMSNotCalc = kTRUE; fQLongLCMSNotCalc = kTRUE; + fQtLCMSNotCalc = kTRUE; + fQtNotCalc = kTRUE; fKtNotCalc = kTRUE; fKStarNotCalc = kTRUE; fQInvLNotCalc = kTRUE; -- 2.39.3