#include "AliHBTPair.h"
#include <TMath.h>
-#include <TPDGCode.h>
#include "volya_complex.h"
-//#include <complex>
-//using namespace std;
AliHBTCrab* AliHBTCrab::fgCrab = 0x0;
const Double_t AliHBTCrab::fgkWcons = 1./0.1973;
#ifdef __DECCXX
const complex AliHBTCrab::fgkCI(0.0,1.0);
#else
-const double_complex AliHBTCrab::fgkCI(0.0,1.0);
+const doublecomplex AliHBTCrab::fgkCI(0.0,1.0);
#endif
/************************************************************/
//ctor
}
//===================================================================
+
+AliHBTCrab::AliHBTCrab(const AliHBTCrab &/*source*/):
+AliHBTWeights(),
+fBreitWigner(kFALSE),
+fReducedMom(kTRUE),
+fMaxMomentum(100.0)
+{
+ //ctor
+}
+//===================================================================
+const AliHBTCrab & AliHBTCrab::operator=(const AliHBTCrab& /*source*/)
+{
+//cpy constructor
+ return *AliHBTCrab::Instance();
+}
+
void AliHBTCrab::Init(Int_t pid1,Int_t pid2)
{
+//Initialization method
fMass1 = TDatabasePDG::Instance()->GetParticle(pid1)->Mass();
fMass2 = TDatabasePDG::Instance()->GetParticle(pid2)->Mass();
fInteractionWsym = 1.0;
fPid1 = pid1;
fPid2 = pid2;
}
+//===================================================================
Bool_t AliHBTCrab::SetConfig(const AliHBTPair* pair)
{
void AliHBTCrab::GetComQuantities(const AliHBTPair* pair,
double *qred,double *r,double *qdotr,double *mom, int *test)
- {
+{
//************************************
// ALICE //
// double xx,xxprime,xxjj,p1,zk;
// int jj,kk,ipart,ipartcount,ispin;
int kk;
- double wsym_leftover,wanti_leftover,wnosym_leftover;
+ double wsymleftover,wantileftover,wnosymleftover;
double qred,qdotr,r;
// const double rmass=fMass1*fMass2/(fMass1+fMass2);
#ifdef __DECCXX
complex cphi1,cphi2,cphis,cphia;
#else
- double_complex cphi1,cphi2,cphis,cphia;
+ doublecomplex cphi1,cphi2,cphis,cphia;
#endif
arg=trueqdotr/197.323-2.0*TMath::Pi()*TMath::Floor(trueqdotr/(197.323*2.0*TMath::Pi()));
/* If there are corrections for strong interactions, add the
change for each partial wave. If npartial = 0 then there
are no strong int. corrections. */
- wsym_leftover=fInteractionWsym;
- wanti_leftover=fInteractionWanti;
- wnosym_leftover=fInteractionWnosym;
+ wsymleftover=fInteractionWsym;
+ wantileftover=fInteractionWanti;
+ wnosymleftover=fInteractionWnosym;
- corr0=corr0+real(wsym_leftover*cphis*conj(cphis)
- +wanti_leftover*cphia*conj(cphia)
- +wnosym_leftover*cphi1*conj(cphi1));
+ corr0=corr0+real(wsymleftover*cphis*conj(cphis)
+ +wantileftover*cphia*conj(cphia)
+ +wnosymleftover*cphi1*conj(cphi1));
OUTSIDE_INTERACTION_RANGE:
#ifdef BREIT_WIGNER
#ifdef __DECCXX
complex AliHBTCrab::CGamma(complex c){
+/* This calc.s gamma functions which are in the form gamma(n+i*y)
+ where n is an int and y is real. */
+// This code is written by Scott Pratt
+// taken from http://www.nscl.msu.edu/~pratt/freecodes/crab/home.html
#else
-double_complex AliHBTCrab::CGamma(double_complex c){
-#endif
- /* This calc.s gamma functions which are in the form gamma(n+i*y)
- where n is an int and y is real. */
+doublecomplex AliHBTCrab::CGamma(doublecomplex c){
+/* This calc.s gamma functions which are in the form gamma(n+i*y)
+ where n is an int and y is real. */
// This code is written by Scott Pratt
// taken from http://www.nscl.msu.edu/~pratt/freecodes/crab/home.html
+#endif
#ifdef __DECCXX
complex cg,cphase;
#else
- double_complex cg,cphase;
+ doublecomplex cg,cphase;
#endif
int mm,j;
double x,y,phase,delp,cgmag;
/* $Id$ */
+//__________________________________________________________________________
+////////////////////////////////////////////////////////////////////////////
+//
+// class AliHBTCrab
+//
// This class introduces the weight's calculation
// according to the Lednicky's algorithm.
// The detailed description of the algorithm can be found
// in comments to fortran code:
// fsiw.f, fsiini.f
+//
+// Piotr.Skowronski@cern.ch
+////////////////////////////////////////////////////////////////////////////
#ifndef ALIHBTCrab_H
#define ALIHBTCrab_H
#include <complex.h>
#else
class Complex;
- typedef Complex double_complex;
+ typedef Complex doublecomplex;
#endif
-#include <math.h>
+//#include <math.h>
class AliHBTPair;
private:
AliHBTCrab();
AliHBTCrab(const AliHBTCrab &/*source*/);
- AliHBTCrab & operator=(const AliHBTCrab& /*source*/);
+ const AliHBTCrab & operator=(const AliHBTCrab& /*source*/);
void GetComQuantities(const AliHBTPair* pair, double *qred,double *r,double *qdotr,double *mom, int *test);
double CorrCalc(double trueqred,double trueqdotr,double truer);
#ifdef __DECCXX
static const complex fgkCI;//complex (1,0)
#else
- static const double_complex fgkCI;//complex (1,0)
+ static const doublecomplex fgkCI;//complex (1,0)
#endif
static const Double_t fgkROOT2;//! some const
static const Double_t fgkWcons; //constant for fm->GeV conversion 1/0.1973
#ifdef __DECCXX
complex CGamma(complex c);
#else
- double_complex CGamma(double_complex c);
+ doublecomplex CGamma(doublecomplex c);
#endif
- static AliHBTCrab* fgCrab;
+ static AliHBTCrab* fgCrab; //pointer to instance of this class - singleton
ClassDef(AliHBTCrab,1)
};