Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:43

0001 //-*-c++-*-
0002 //-*-QQ.cpp-*-
0003 //   Written by James Monk and Andrew Pilkington
0004 ////////////////////////////////////////////////////////////////////////////////
0005 
0006 #include "GeneratorInterface/ExhumeInterface/interface/QQ.h"
0007 
0008 ////////////////////////////////////////////////////////////////////////////////
0009 Exhume::QQ::QQ(const edm::ParameterSet& pset) : TwoSpace(pset) {
0010   std::cout << std::endl << "   =QQ production selected=" << std::endl << std::endl;
0011   SetThetaMin(acos(0.95));
0012   Partons[0].Colour = 101;
0013   Partons[0].AntiColour = 0;
0014   Partons[1].Colour = 0;
0015   Partons[1].AntiColour = 101;
0016   //set default to bb production
0017   SetQuarkType(5);
0018 
0019   Name = "di-quark";
0020 }
0021 ////////////////////////////////////////////////////////////////////////////////
0022 double Exhume::QQ::SubProcess() {
0023   double qMassSq = PartonMass * PartonMass;
0024   double sintheta = 1.0 / InvSinTheta;
0025   double etsq = qMassSq * CosTheta * CosTheta + sintheta * sintheta * sHat / 4.0;
0026   double _Sigma = AlphaS(0.5 * SqrtsHat) * AlphaS(0.5 * SqrtsHat) * qMassSq * pow((1 - 4 * qMassSq * InvsHat), 1.5) /
0027                   (24.0 * etsq * etsq);
0028 
0029   _Sigma = _Sigma * Gev2fb;
0030   //val / by 2Pi so that integrate over Phi later
0031 
0032   return (_Sigma);
0033 }
0034 
0035 void Exhume::QQ::LIPS2Amp() {
0036   double Theta = acos(CosTheta);
0037   InvSinTheta = 1.0 / sin(Theta);
0038 
0039   return;
0040 }
0041 
0042 void Exhume::QQ::Amp2LIPS() { return; }
0043 
0044 /*
0045 ////////////////////////////////////////////////////////////////////////////////
0046 void Exhume::QQ::SetSubParameters(){
0047   double ThetaRand = double(rand())/RAND_MAX;
0048   CosTheta = GetValue(ThetaRand);
0049   Theta = acos(CosTheta);
0050   SinTheta = sin(Theta);
0051   InvSinTheta = 1.0/sin(Theta);
0052 }
0053 ////////////////////////////////////////////////////////////////////////////////
0054 double Exhume::QQ::SubParameterRange(){
0055   return(TotalIntegral);
0056 }
0057 ////////////////////////////////////////////////////////////////////////////////
0058 void Exhume::QQ::MaximiseSubParameters(){
0059   WeightInit(CosThetaMin,CosThetaMax);
0060   Theta = ThetaMin;
0061   InvSinTheta = 1.0/SinThetaMin;
0062 }
0063 ////////////////////////////////////////////////////////////////////////////////
0064 double Exhume::QQ::SubParameterWeight(){
0065   SubWgt = GetFunc(CosTheta);
0066   return(SubWgt);
0067 }
0068 ////////////////////////////////////////////////////////////////////////////////
0069 void Exhume::QQ::SetPartons(){
0070   E = 0.5*SqrtsHat;
0071   Phi = 2*PI*double(rand())/RAND_MAX;
0072   P = sqrt(E*E-qMassSq);
0073     Px = P*SinTheta*cos(Phi);
0074   Py = P*SinTheta*sin(Phi);
0075   Pz = P*CosTheta;
0076   
0077     Partons[0].p.setPx(Px);
0078   Partons[0].p.setPy(Py);
0079   Partons[0].p.setPz(Pz);
0080   Partons[0].p.setE(E);
0081 
0082   Partons[1].p.setPx(-Px);
0083   Partons[1].p.setPy(-Py);
0084   Partons[1].p.setPz(-Pz);
0085   Partons[1].p.setE(E);
0086 
0087   Partons[0].p.boost(CentralVector.boostVector());
0088   Partons[1].p.boost(CentralVector.boostVector());
0089   
0090   return;
0091 
0092 }
0093 /////////////////////////////////////////////////////////////////////////////// 
0094 void Exhume::QQ::SetThetaMin(const double& ThetaMin_){
0095   ThetaMin = ThetaMin_;
0096   ThetaMax = PI - ThetaMin_;
0097   SinThetaMin = sin(ThetaMin);
0098   CosThetaMin = cos(ThetaMax);
0099   CosThetaMax = cos(ThetaMin); 
0100   return;
0101 }
0102 ////////////////////////////////////////////////////////////////////////////////
0103 double Exhume::QQ::WeightFunc(const double& CosTheta_){
0104   InvSinTheta = 1.0/sin(acos(CosTheta_));
0105   return(SinThetaMin*SinThetaMin*SinThetaMin*SinThetaMin
0106      *InvSinTheta*InvSinTheta*InvSinTheta*InvSinTheta);
0107 }
0108 
0109 */
0110 ////////////////////////////////////////////////////////////////////////////////
0111 void Exhume::QQ::SetQuarkType(const int& _id) {
0112   Partons[0].id = _id;
0113   Partons[1].id = -_id;
0114   switch (_id) {
0115     case 1:
0116       PartonMass = 0.0;
0117       break;
0118     case 2:
0119       PartonMass = 0.0;
0120       break;
0121     case 3:
0122       PartonMass = StrangeMass;
0123       break;
0124     case 4:
0125       PartonMass = CharmMass;
0126       break;
0127     case 5:
0128       PartonMass = BottomMass;
0129       break;
0130     case 6:
0131       PartonMass = TopMass;
0132       break;
0133     default:
0134       std::cout << "\tYou have not entered a quark KF code" << std::endl;
0135       std::cout << "\tBottom Production Chosen" << std::endl;
0136       PartonMass = BottomMass;
0137       Partons[0].id = 5;
0138       Partons[1].id = -5;
0139       break;
0140   }
0141   return;
0142 }