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