00001
00002 #ifndef PYTHIA7_LundFlavourGenerator_H
00003 #define PYTHIA7_LundFlavourGenerator_H
00004
00005
00006 #include "FragConfig.h"
00007
00008
00009 #include "ThePEG/PDT/ParticleData.h"
00010 #include "ThePEG/Handlers/FlavourGenerator.h"
00011 #include "ThePEG/Repository/EventGenerator.h"
00012
00013 namespace Pythia7 {
00014
00043 class LundFlavourGenerator: public ThePEG::FlavourGenerator {
00044
00045 public:
00046
00048 typedef vector<double> WeightsVec;
00049
00051 typedef WeightsVec::const_iterator WeightsVecPtr;
00052
00054 typedef vector< WeightsVec > WeightsTable;
00055
00056 public:
00057
00058
00064 LundFlavourGenerator();
00065
00069 LundFlavourGenerator(const LundFlavourGenerator &);
00070
00074 inline virtual ~LundFlavourGenerator();
00076
00077 public:
00078
00092 virtual tcPDPair generateHadron(tcPDPtr quark) const;
00093
00104 virtual tcPDPtr getHadron(tcPDPtr inPD1, tcPDPtr inPD2) const;
00105
00118 virtual tcPDPtr getBaryon(long q1, long q2, long q3) const;
00119
00123 virtual long selectQuark() const;
00124
00128 virtual long selectFlavour() const;
00130
00143 virtual PDPtr generateHadron(tcPDPtr inPD, cPDPtr& newPD,
00144 long curtainQid=0) const;
00145
00146 public:
00147
00154 void initialize();
00155
00160 inline virtual PDPtr getRandomFlavour() const;
00161
00162
00168 inline int BaryonMod() const;
00169
00174 inline double strangeQSup() const;
00175
00180 inline bool extraSuppressed() const;
00181
00183
00192 inline int PopMesonN(tcPDPtr inDQ) const;
00193
00200 int PopMesonN(long inDQ) const;
00201
00206 inline long PopSelectCurtainFlavour(tcPDPtr inDQ) const;
00207
00212 long PopSelectCurtainFlavour(long inDQ) const;
00213
00221 inline bool PopGenRejected() const;
00223
00224
00231 void persistentOutput(PersistentOStream & os) const;
00232
00238 void persistentInput(PersistentIStream & is, int version);
00240
00244 static void Init();
00245
00249 void DBprint();
00250
00251 protected:
00252
00253
00254 protected:
00255
00262 inline virtual IBPtr clone() const;
00263
00268 inline virtual IBPtr fullclone() const;
00270
00271
00272 protected:
00273
00279 inline virtual void doupdate() throw(UpdateException);
00280
00286 inline virtual void doinit() throw(InitException);
00287
00292 inline virtual void dofinish();
00293
00295
00296 private:
00297
00298
00307 void Q2MesonQ(long inQ) const;
00308
00313 long formMeson(long inQ, long newQ) const;
00314
00320 int selectMesonMultiplet(long Hfl) const;
00321
00326 inline int MesonSpin(int multipletIdx) const;
00327
00337 inline int RandomFlavourMixing(long Qid, int multipletIdx, double rnd) const;
00339
00347 inline bool DQproduction() const;
00348
00353 inline bool DQspinSup(int DQspin) const;
00355
00366 void Q2BaryonDQ(long inQ) const;
00367
00374 void DQ2BaryonQ(long inDQ) const;
00375
00380 long formBaryon(long Q, long DQ, WeightsVecPtr theWeights) const;
00381
00389 WeightsVecPtr getSU6MultWeightVec(long Qid, long DQid) const;
00390
00396 inline double OctetWT(WeightsVecPtr wtIt) const;
00397
00403 inline double DecupletWT(WeightsVecPtr wtIt) const;
00405
00412 double PopDQweight(long inDQ) const;
00413
00424 void PopDQ2MesonDQ(long inDQ, long absCurtainQ ) const;
00425
00431 bool PopConsistentDQ(long q1, long q2) const;
00433
00440 bool consistentJoin(long fl1, long fl2) const;
00442
00449 inline bool isQuark(long fl) const;
00450
00455 inline bool isDiquark(long fl) const;
00456
00457
00462 inline void getDQcontent(int inDQ, int& hq, int& lq, int& s) const;
00464
00465
00466
00476 void initGenPar();
00477
00482 void setDefaultMixingAnglesVec();
00483
00491 void setMesonFlavourMixingProbs();
00492
00497 void setSU6weights();
00498
00504 void setPopDQweights();
00506
00507
00508 private:
00509
00513 mutable long newFl;
00514
00518 mutable long theHadron;
00519
00524 mutable bool extraSup;
00525
00531 mutable bool thePopRejection;
00532
00537 int theBaryonMod;
00538
00543 double DQsup;
00544
00549 double IS1DQsup;
00550
00555 double BaryonDecupletSup;
00556
00561 double extraEtaSup;
00562
00567 double extraEtapSup;
00568
00573 double MesonP;
00574
00579 double BssBsup;
00580
00585 double BMsBsup;
00586
00591 double sQsup;
00592
00597 double sDQvQsup;
00598
00603 double S1lightMesonP;
00604
00609 double S1sMesonP;
00610
00615 double S1hqMesonP;
00616
00621 double P_S0L1J1;
00622
00627 double P_S1L1J0;
00628
00633 double P_S1L1J1;
00634
00639 double P_S1L1J2;
00640
00644 vector<double> theMixingAngles;
00645
00651 vector<double> DQweight;
00652
00656 double S1DQsup;
00657
00661 double POP_sDQvQsup;
00662
00666 double POP_S1DQsup;
00667
00671 double POP_delta;
00672
00676 double DQmaxWeight;
00677
00681 WeightsTable theSU6WeightsTable;
00682
00686 WeightsTable theMixingProbVec;
00687
00691 static ClassDescription<LundFlavourGenerator> initLundFlavourGenerator;
00692
00693 };
00694
00695 }
00696
00697 namespace ThePEG {
00698
00705 template <>
00706 struct BaseClassTrait<Pythia7::LundFlavourGenerator,1>: public ClassTraitsType {
00708 typedef FlavourGenerator NthBase;
00709 };
00710
00716 template <>
00717 struct ClassTraits<Pythia7::LundFlavourGenerator>
00718 : public ClassTraitsBase<Pythia7::LundFlavourGenerator> {
00720 static string className() { return "Pythia7::LundFlavourGenerator"; }
00726 static string library() { return "libP7String.so"; }
00727 };
00728
00731 }
00732
00733 #include "LundFlavourGenerator.icc"
00734 #ifndef PYTHIA7_TEMPLATES_IN_CC_FILE
00735
00736 #endif
00737
00738 #endif
00739
00740
00741
00742