]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.h
Making the directory structure of AliFemto flat. All files go into one common directory
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / AliFemtoCoulomb.h
1 /***************************************************************************
2  *
3  * $Id$
4  *
5  * Author: Randy Wells, Ohio State, rcwells@mps.ohio-state.edu
6  ***************************************************************************
7  *
8  * Description: part of STAR HBT Framework: AliFemtoMaker package
9  *    This is a Coulomb correction class which
10  *  1. Reads in the dat from a file
11  *  2. Performs a linear interpolation in R and creates any array of interpolations
12  *  3. Interpolates in eta and returns the Coulomb correction to user
13  *
14  ***************************************************************************
15  *
16  * $Log$
17  * Revision 1.2  2007/05/03 09:42:29  akisiel
18  * Fixing Effective C++ warnings
19  *
20  * Revision 1.1.1.1  2007/04/25 15:38:41  panos
21  * Importing the HBT code dir
22  *
23  * Revision 1.1.1.1  2007/03/07 10:14:49  mchojnacki
24  * First version on CVS
25  *
26  * Revision 1.12  2000/10/26 19:48:54  rcwells
27  * Added functionality for Coulomb correction of <qInv> in 3D correltions
28  *
29  * Revision 1.11  2000/08/02 01:25:12  lisa
30  * Add Coulomb correction capability to 3D Bertsch-Pratt CorrFctn
31  *
32  * Revision 1.10  2000/07/16 21:38:22  laue
33  * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version
34  * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings
35  * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0
36  * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG
37  * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better
38  *                 solution
39  *
40  * Revision 1.9  2000/05/31 20:12:53  rcwells
41  * Modified AliFemtoCoulomb for Id and Log entries
42  *
43  *
44  **************************************************************************/
45
46 #ifndef AliFemtoCoulomb_HH
47 #define AliFemtoCoulomb_HH
48
49 #include <stdio.h>
50 #include "AliFemtoTypes.h"
51 #include "AliFemtoPair.h"
52 #include "AliFemtoParticle.h"
53 #include "TH1D.h"
54 #include "TH3D.h"
55
56 class AliFemtoCoulomb {
57
58 public:
59   AliFemtoCoulomb();
60   AliFemtoCoulomb(const char *readFile, const double& radius, const double& charge);
61   AliFemtoCoulomb(const AliFemtoCoulomb& aCoul);
62   virtual ~AliFemtoCoulomb();
63
64   AliFemtoCoulomb& operator=(const AliFemtoCoulomb& aCoul);
65
66   void SetRadius(const double& radius);
67   double GetRadius();
68   void SetFile(const char *readFile);
69   void SetChargeProduct(const double& charge);
70
71   // These have different names so eta/Qinv don't confuse the compiler
72   double CoulombCorrect(const double& eta);
73   double CoulombCorrect(const double& eta, const double& radius);
74   double CoulombCorrect(const AliFemtoPair* pair);
75   double CoulombCorrect(const AliFemtoPair* pair, const double& radius);
76   double CoulombCorrect(const double& mass, const double& charge,
77                         const double& radius, const double& qInv);
78   TH1D* CorrectionHistogram(const double& mass1, const double& mass2, const int& nBins, 
79                                     const double& low, const double& high);
80 #ifdef __ROOT__
81   TH1D* CorrectionHistogram(const TH1D*, const double);
82   TH3D* CorrectionHistogram(const TH3D*, const double);
83 #endif
84 private:
85   double Eta(const AliFemtoPair* pair);                // Calculates eta
86   void CreateLookupTable(const double& radius);  // Creates look-up table
87   const char* fFile;                             // File to interpolate corrections from    
88   double fRadius;                                // Radius from previous iteration
89   double fZ1Z2;                                  // Charge product of particles
90   double fEta[1000];                             // interpolated Coulomb correction table
91   double fCoulomb[1000];                         // interpolated Coulomb correction table
92   int fNLines;                                   // Number of Eta's in lookup-table
93
94 #ifdef __ROOT__
95   ClassDef(AliFemtoCoulomb, 0)
96 #endif
97 };
98
99
100 #endif