]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTLLWeights.h
Updates in GRP Preprocessor (Ernesto)
[u/mrichter/AliRoot.git] / HBTAN / AliHBTLLWeights.h
index d9495022742a5d2b856d730f439b8b8e64ec9c6b..47561f75a9ee5cf61f6811656e2cd1bd08fae153 100644 (file)
-//This class introduce the weights calculation according with Lednicky's algorithm.
-//The detailed description of the algorithm can be found in comments to fortran code:
-//fsiw.f, fsiini.f  
+/* $Id$ */
+
+//_________________________________________________________________
+///////////////////////////////////////////////////////////////////////
+//
+// class AliHBTLLWeights
+//
+// 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  
+//
+// Source simulation: Particle position/distance randomization
+// This class has functionality of randomizing particle positions / pair distances
+// so obtained correlation function follows a given shape, 
+// depending on a value of fRandomPosition member
+// By default this feature is switched off: fRandomPosition == AliHBTLLWeights::kNone
+// It can be: kGaussianQInv - so 1D Qinv correlation function has a Gaussian shape 
+//                            (and also Qlong and Qside, but not Qout)
+//            kGaussianOSL - so 3D Qout-Qside-Qlong correlation function has a Gaussian shape
+//
+// Ludmila Malinina, Piotr Krzysztof Skowronski
+//
+///////////////////////////////////////////////////////////////////////
+
 #ifndef ALIHBTLLWEIGHTS_H
 #define ALIHBTLLWEIGHTS_H
 
-#include <TObject.h>
-#include "WLedCOMMONS.h"
+#include "AliHBTWeights.h"
 
 class AliHBTPair;
-class AliHBTLLWeights: public TObject
+class AliVAODParticle;
+class AliHBTLLWeights: public AliHBTWeights
  {
    public:
+     AliHBTLLWeights();
      virtual ~AliHBTLLWeights(){;}
      static AliHBTLLWeights* Instance();
      
-     void Init(); //put the initial values in fortran commons fsiini, led_bldata
-     Double_t GetWeight(const AliHBTPair* partpair); //get weight calculated by Lednicky's algorithm
-
-     void SetTest(Bool_t rtest = kTRUE){ftest = rtest;} //if ftest=0: 
-     //physical values of the following  parameters are put automatically                       
-     //            in FSIINI (their values are not required)          
-     // ftest=1: any values of the following parameters are allowed,    
-     //the following parameters are required:                           
-
-     void SetColoumb(Bool_t col = kTRUE){fColoumbSwitch = col;}//: (ICH in fortran code) Coulomb interaction between the two particles ON (OFF)
-     void SetQuantumStatistics(Bool_t qss = kTRUE){fQuantStatSwitch = qss;}//IQS: quantum statistics for the two particles ON (OFF) //if non-identical particles automatically off
-     void SetStrongInterSwitch(Bool_t sis = kTRUE){fStrongInterSwitch = sis;}//ISI: strong interaction between the two particles ON (OFF)
-     void SetColWithResidNuclSwitch(Bool_t crn = kTRUE){fColWithResidNuclSwitch = crn;}//I3C: Coulomb interaction with residual nucleus ON (OFF)  
-     void SetApproxModel(Int_t ap){approximationModel=ap;}//NS in Fortran code, 
-     //   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).      
-
+     void Set();
      
-     void SetRandomPosition(Bool_t rp = kTRUE){fRandomPosition = rp;} //ON=kTRUE(OFF=kFALSE)
-     // ON -- calculation of the Gauss source radii if the generator don't allows the source generation (for example MeVSim)
-     //if ON the following parameters are requested:
-     void SetR1dw(Double_t R){fRadius=R;}   //spherical source model radii                                                                                                                                                                                             
-     void SetLambdaw(Double_t la){flambda=la;}  //lambda=haoticity                                                   
+     Double_t GetWeight(AliHBTPair* partpair); //get weight calculated by Lednicky's algorithm
 
+     void Init(); //put the initial values in fortran commons fsiini, led_bldata
+     void SetTest(Bool_t rtest = kTRUE);//Sets fTest member
+
+     void SetColoumb(Bool_t col = kTRUE);//: (ICH in fortran code) Coulomb interaction between the two particles ON (OFF)
+     void SetQuantumStatistics(Bool_t qss = kTRUE);//IQS: quantum statistics for the two particles ON (OFF) //if non-identical particles automatically off
+     void SetStrongInterSwitch(Bool_t sis = kTRUE);//ISI: strong interaction between the two particles ON (OFF)
+     void SetColWithResidNuclSwitch(Bool_t crn = kTRUE);//I3C: Coulomb interaction with residual nucleus ON (OFF)  
+     void SetLambda(Double_t la){fOneMinusLambda=1.-la;}  //lambda=haoticity
+     void SetApproxModel(Int_t ap);//sets  Model of Approximation (NS in Fortran code)
+     void SetParticlesTypes(Int_t pid1, Int_t pid2); //set AliRoot particles types   
+     void SetNucleusCharge(Double_t ch); // not used now  (see comments in fortran code)
+     void SetNucleusMass(Double_t mass); // (see comments in fortran code)
      
-     void SetParticlesTypes(Int_t pid1, Int_t pid2){fPID1 = pid1; fPID2 = pid2;} //set AliRoot particles types   
-    
-     void SetNucleusCharge(Double_t ch){fNuclCharge=ch;} // not used now  (see comments in fortran code)
-     void SetNucleusMass(Double_t mass){fNuclMass=mass;} // (see comments in fortran code)
-
+     enum ERandomizationWay {kNone = 0, kGaussianQInv, kGaussianOSL};
 
+     void SetRandomPosition(ERandomizationWay rw = kNone); //Choose if, and if yes, how to randomize distance between particles
+     void SetR1dw(Double_t R);   //spherical source model radii                                                                                                                                                                                                
+     
    protected:
      
-     Bool_t ftest; 
-     Bool_t fColoumbSwitch; 
-     Bool_t fQuantStatSwitch; 
+     Bool_t fTest;           //flag indicating if parameters listed below are to be calculated automatically (0)
+                             //or 
+     Bool_t fColoumbSwitch;   //switches on/off Coulumb effect
+     Bool_t fQuantStatSwitch; //switches on/off Quantum Statistics effect
      Bool_t fStrongInterSwitch;//Switches strong interactions TRUE=ON
      Bool_t fColWithResidNuclSwitch;//Switches couloumb interaction 
                                     //with residual nucleus TRUE=ON          
-     Double_t fNuclMass; //mass 
-     Double_t fNuclCharge; //charge    
+     Double_t fNuclMass;   //mass of nucleus
+     Double_t fNuclCharge; //charge of nucleus
      
-     Bool_t  fRandomPosition;
-     Double_t fRadius;
-     Double_t flambda;
-
+     ERandomizationWay   fRandomPosition;//flag indicating if positions of particles shuold be randomized according to parameters below
+     Double_t fRadius;        //radius used for randomizing particle vertex position
      
-     Double_t wein;
-
-     Int_t approximationModel; //approximation used to calculate Bethe-Salpeter amplitude
-                             //   ==1  Square well potential,
-                             //   ==3  not used
-                             //   ==4  scattered wave approximated by the spherical wave,
-                             //   ==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 ==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
+     Double_t fOneMinusLambda; //1 - intercept parameter
      
-     Int_t fPID1;
-     Int_t fPID2;
+     Int_t fApproximationModel; //approximation used to calculate Bethe-Salpeter amplitude see SetApproxModel for more comments
 
-     static  AliHBTLLWeights *fgLLWeights;// pointer to wrapper of Fortran Lednicky code
+     Int_t fPID1;  //Pdg Code of the first particle in the pair
+     Int_t fPID2;  //Pdg Code of the second particle in the pair
+     Double_t fSigma; //constants for spherical source model in cm
+     static const Double_t fgkWcons; //constant for fm->GeV conversion 1/0.1973
 
+     static  AliHBTLLWeights *fgLLWeights;// pointer to wrapper of Fortran Lednicky code
 
      static Int_t GetPairCode(Int_t pid1,Int_t pid2);
-     static Int_t GetPairCode(const AliHBTPair* partpair);//calculate automatically internal FSIW 
-         //     C----------------------------------------------------------------------               
-         //     C-   LL       1  2  3  4   5    6   7  8  9 10  11  12  13  14 15 16 17               
-         //     C-   part. 1: n  p  n alfa pi+ pi0 pi+ n  p pi+ pi+ pi+ pi- K+ K+ K+ K-               
-         //     C-   part. 2: n  p  p alfa pi- pi0 pi+ d  d  K-  K+  p   p  K- K+ p  p                
-         //     C   NS=1 y/n: +  +  +  +   +    -   -  -  -  -   -   -   -  -  -  -  -                
-         //     C----------------------------------------------------------------------               
-         //     C-   LL       18  19 20  21  22 23 24 25 26    27     28                              
-         //     C-   part. 1:  d  d   t  t   K0 K0  d p  p      p      n                              
-         //     C-   part. 2:  d alfa t alfa K0 K0b t t alfa lambda lambda                            
-         //     C   NS=1 y/n:  -  -   -  -   -  -   - -  -      +      +                              
-         //     C----------------------------------------------------------------------               
-                                                                                  
+     static Int_t GetPairCode(const AliHBTPair* partpair);//calculate automatically internal code 
 
-     Double_t fsigma; //constants for spherical source model 
-     Double_t fwcons; //
-     
    private:
-   AliHBTLLWeights();
-
-   public:
-     ClassDef(AliHBTLLWeights,1)
+     AliHBTLLWeights(const AliHBTLLWeights &/*source*/);
+     AliHBTLLWeights & operator=(const AliHBTLLWeights& /*source*/);
+     
+     Int_t SetMomentaInLCMS(AliVAODParticle* part1, AliVAODParticle* part2);
+     void  RandomPairDistances();
+     
+          
+     void Rotate(Double_t x, Double_t y, Double_t sphi, Double_t cphi, Double_t& xr, Double_t& yr);
+     void Boost (Double_t z, Double_t t, Double_t beta, Double_t gamma, Double_t& zt, Double_t& yt);
+     ClassDef(AliHBTLLWeights,2)
  };
 
 #endif