StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtFsiQuantStat.cxx
1 /***************************************************************************
2  *
3  *
4  *
5  * Author: Laurent Conin, Fabrice Retiere, Subatech, France
6  ***************************************************************************
7  *
8  * Description: Calculate the quantum statistic only
9  *
10  ***************************************************************************
11  *
12  *
13  *
14  **************************************************************************/
15 
16 
17 #include "StHbtMaker/Base/StHbtThPair.hh"
18 #include "StHbtMaker/ThCorrFctn/StHbtFsiQuantStat.h"
19 #include "StarClassLibrary/PhysicalConstants.h"
20 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
21 
22 #ifdef __ROOT__
23 ClassImp(StHbtFsiQuantStat)
24 #endif
25 double StHbtFsiQuantStat::GetWeight(const StHbtThPair* aThPair){
26 
27  if (aThPair->GetPid1()==aThPair->GetPid2()){
28  int tSpin=abs(aThPair->GetPid1())%10; // tSpin=2J+1
29  if (tSpin==0) return 1; // non identified particle
30  double tSpinFactor=-::pow(-1.,tSpin)/tSpin; //for non polarised particle
31  StHbtLorentzVector q= *(aThPair->GetRealMomentum1())-
32  *(aThPair->GetRealMomentum2());
33  StHbtLorentzVector r=*(aThPair->GetEmPoint1())-
34  *(aThPair->GetEmPoint2());
35  double wei=(1.+tSpinFactor*cos((double)(q*r)*fermi/hbarc));
36  return wei;
37  } else {
38  return 1;
39  }
40 }
41 
42 //inline double StHbtFsiQuantStat::GetWeightDen() {return mWeightDen;}
43