class AliHBTOutSideLongFctn: Added switch for steering o if Abs values are histogrammed
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jun 2004 15:05:12 +0000 (15:05 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Jun 2004 15:05:12 +0000 (15:05 +0000)
HBTAN/AliHBTCorrelFctn.cxx
HBTAN/AliHBTCorrelFctn.h

index 3992048..bea1535 100644 (file)
@@ -49,7 +49,8 @@ ClassImp(AliHBTOutSideLongFctn)
 AliHBTOutSideLongFctn::AliHBTOutSideLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
                                                    Int_t nYbins, Double_t maxYval, Double_t minYval,
                                                    Int_t nZbins, Double_t maxZval, Double_t minZval):
- AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
+ AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval),
+ fAbs(kTRUE)
 {
 //ctor
   fWriteNumAndDen = kTRUE;//change default behaviour
@@ -64,6 +65,23 @@ TH1* AliHBTOutSideLongFctn::GetResult()
  fRatio = GetRatio(Scale());
  return fRatio;
 }
+
+void AliHBTOutSideLongFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
+{ 
+  //calculates values of that function
+  //qout qside and qlong
+  
+  x=pair->GetQOutCMSLC(); 
+  y=pair->GetQSideCMSLC(); 
+  z=pair->GetQLongCMSLC();
+  if (fAbs)
+   {
+     x = TMath::Abs(x);
+     y = TMath::Abs(y);
+     z = TMath::Abs(z);
+   }
+} 
+
 /*************************************************************************************/ 
 
 ClassImp(AliHBTQOutCMSLCCorrelFctn)
index 24f5377..1841f17 100644 (file)
@@ -49,11 +49,12 @@ class AliHBTOutSideLongFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelFunc
     virtual  ~AliHBTOutSideLongFctn(){}
 
     TH1* GetResult();
+    void UseAbsoluteValues(Bool_t flag){fAbs = flag;}
  
   protected:
-    void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
-      { x=TMath::Abs(pair->GetQOutCMSLC()); y=TMath::Abs(pair->GetQSideCMSLC()); z=TMath::Abs(pair->GetQLongCMSLC());} 
-
+    void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const;
+    
+    Bool_t fAbs;//flag indicating if absolute values of qout, qside and qlong should be histogrammed
   ClassDef(AliHBTOutSideLongFctn,1)
 };