+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//_________________________________________________________________________
+///////////////////////////////////////////////////////////////////////////
+//
+// class AliHBTLLWeights
+//
+// This class introduces the weight's calculation
+// according to the Lednicky's algorithm.
+//
+//
+// fsiw.f, fsiini.f
+//
+// Description from fortran code by author R. Lednicky
+//
+// Calculates final state interaction (FSI) weights
+// WEIF = weight due to particle - (effective) nucleus FSI (p-N)
+// WEI = weight due to p-p-N FSI
+// WEIN = weight due to p-p FSI; note that WEIN=WEI if I3C=0;
+// note that if I3C=1 the calculation of
+// WEIN can be skipped by putting J=0
+//.......................................................................
+// Correlation Functions:
+// CF(p-p-N) = sum(WEI)/sum(WEIF)
+// CF(p-p) = sum(WEIN)/sum(1); here the nucleus is completely
+// inactive
+// CF(p-p-"N") = sum(WEIN*WEIF')/sum(WEIF'), where WEIN and WEIF'
+// are not correlated (calculated at different emission
+// points, e.g., for different events);
+// thus here the nucleus affects one-particle
+// spectra but not the correlation
+//.......................................................................
+// User must supply data file <fn> on unit NUNIT (e.g. =11) specifying
+// LL : particle pair
+// NS : approximation used to calculate Bethe-Salpeter amplitude
+// ITEST: test switch
+// If ITEST=1 then also following parameters are required
+// ICH : 1(0) Coulomb interaction between the two particles ON (OFF)
+// IQS : 1(0) quantum statistics for the two particles ON (OFF)
+// ISI : 1(0) strong interaction between the two particles ON (OFF)
+// I3C : 1(0) Coulomb interaction with residual nucleus ON (OFF)
+// This data file can contain other information useful for the user.
+// It is read by subroutines READINT4 and READREA8(4) (or READ_FILE).
+// -------------------------------------------------------------------
+//- LL 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
+//- part. 1: n p n alfa pi+ pi0 pi+ n p pi+ pi+ pi+ pi- K+ K+ K+ K-
+//- part. 2: n p p alfa pi- pi0 pi+ d d K- K+ p p K- K+ p p
+// NS=1 y/n: + + + + + - - - - - - - - - - - -
+// -------------------------------------------------------------------
+//- LL 18 19 20 21 22 23 24 25 26 27 28
+//- part. 1: d d t t K0 K0 d p p p n
+//- part. 2: d alfa t alfa K0 K0b t t alfa lambda lambda
+// NS=1 y/n: - - - - - - - - - + +
+// -------------------------------------------------------------------
+// NS=1 Square well potential,
+// NS=3 not used
+// NS=4 scattered wave approximated by the spherical wave,
+// NS=2 same as NS=4 but the approx. of equal emission times in PRF
+// not required (t=0 approx. used in all other cases).
+// Note: if NS=2,4, the B-S amplitude diverges at zero distance r* in
+// the two-particle c.m.s.; user can specify a cutoff AA in
+// SUBROUTINE FSIINI, for example:
+// IF(NS.EQ.2.OR.NS.EQ.4)AA=5.D0 !! in 1/GeV --> AA=1. fm
+// ------------------------------------------------------------------
+// ITEST=1 any values of parameters ICH, IQS, ISI, I3C are allowed
+// and should be given in data file <fn>
+// ITEST=0 physical values of these parameters are put automatically
+// in FSIINI (their values are not required in data file)
+//=====================================================================
+// At the beginning of calculation user should call FSIINI,
+// which reads LL, NS, ITEST (and eventually ICH, IQS, ISI, I3C)
+// and ializes various parameters.
+// In particular the constants in
+// COMMON/FSI_CONS/PI,PI2,SPI,DR,W
+// may be useful for the user:
+// W=1/.1973D0 ! from fm to 1/GeV
+// PI=4*DATAN(1.D0)
+// PI2=2*PI
+// SPI=TMath::Sqrt(PI)
+// DR=180.D0/PI ! from radian to degree
+// _______________________________________________________
+// !! |Important note: all real quantities are assumed REAL*8 | !!
+// -------------------------------------------------------
+// For each event user should fill in the following information
+// in COMMONs (all COMMONs in FSI calculation start with FSI_):
+// ...................................................................
+// COMMON/FSI_POC/AMN,AM1,AM2,CN,C1,C2,AC1,AC2
+// Only
+// AMN = mass of the effective nucleus [GeV/c**2]
+// CN = charge of the effective nucleus [elem. charge units]
+// are required
+// ...................................................................
+// COMMON/FSI_MOM/P1X,P1Y,P1Z,E1,P1, !part. momenta in the rest frame
+// 1 P2X,P2Y,P2Z,E2,P2 !of effective nucleus (NRF)
+// Only the components
+// PiX,PiY,PiZ [GeV/c]
+// in NRF are required.
+// To make the corresponding Lorentz transformation user can use the
+// subroutines LTRAN and LTRANB
+// ...................................................................
+// COMMON/FSI_COOR/X1,Y1,Z1,T1,R1, ! 4-coord. of emission
+// 1 X2,Y2,Z2,T2,R2 ! points in NRF
+// The componets
+// Xi,Yi,Zi [fm]
+// and emission times
+// Ti [fm/c]
+// should be given in NRF with the origin assumed at the center
+// of the effective nucleus. If the effect of residual nucleus is
+// not calculated within FSIW, the NRF can be any fixed frame.
+// --------------------------------------------------------------------
+// Before calling FSIW the user must call
+// CALL LTRAN12
+// Besides Lorentz transformation to pair rest frame:
+// (p1-p2)/2 --> k* it also transforms 4-coordinates of
+// emission points from fm to 1/GeV and calculates Ei,Pi and Ri.
+// Note that |k*|=AK in COMMON/FSI_PRF/
+// --------------------------------------------------------------------
+// After making some additional filtering using k* (say k* < k*max)
+// or direction of vector k*,
+// user can finally call FSIW to calculate the FSI weights
+// to be used to construct the correlation function
+//======================================================================
+