]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding Violations Corrected.
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Jan 2004 15:51:27 +0000 (15:51 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Jan 2004 15:51:27 +0000 (15:51 +0000)
HBTAN/AliHBTCrab.cxx
HBTAN/AliHBTCrab.h

index 165c9f65fab9156de2f9f49109da557965f9025f..b91bfef0aef1e69a19a9acdb568edbf2a1845efd 100644 (file)
 #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;
@@ -25,7 +22,7 @@ const Double_t AliHBTCrab::fgkROOT2=1.41421356237309504880;
 #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
 
 /************************************************************/
@@ -65,8 +62,25 @@ fMaxMomentum(100.0)
   //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;
@@ -78,6 +92,7 @@ void AliHBTCrab::Init(Int_t pid1,Int_t pid2)
   fPid1 = pid1;   
   fPid2 = pid2;
 }
+//===================================================================
 
 Bool_t AliHBTCrab::SetConfig(const AliHBTPair* pair)
 {
@@ -114,7 +129,7 @@ Double_t AliHBTCrab::GetWeight(const AliHBTPair* partpair)
 
 void AliHBTCrab::GetComQuantities(const AliHBTPair* pair, 
        double *qred,double *r,double *qdotr,double *mom, int *test)
- {
+{
 //************************************
 //  ALICE //
 
@@ -263,13 +278,13 @@ double  AliHBTCrab::CorrCalc(double trueqred,double trueqdotr,double truer)
 //  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()));
@@ -306,13 +321,13 @@ double  AliHBTCrab::CorrCalc(double trueqred,double trueqdotr,double truer)
   /* 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
@@ -324,17 +339,21 @@ OUTSIDE_INTERACTION_RANGE:
 
 #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;
index fe344148bcdea8378cc57b8bc7db73449e3ceb15..1a8b18f4265555ee93ea615beb8f03d54ff19dcf 100644 (file)
@@ -1,10 +1,18 @@
 /* $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;
 
@@ -36,7 +44,7 @@ class AliHBTCrab: public AliHBTWeights
    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);
@@ -63,7 +71,7 @@ class AliHBTCrab: public AliHBTWeights
 #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
@@ -71,10 +79,10 @@ class AliHBTCrab: public AliHBTWeights
 #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)
  };