00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_ClusterCollapser_H
00010 #define ThePEG_ClusterCollapser_H
00011
00012
00013 #include "ThePEG/Handlers/StepHandler.h"
00014 #include "ThePEG/Handlers/FlavourGenerator.h"
00015 #include "ThePEG/EventRecord/ColourSinglet.h"
00016 #include "ClusterCollapser.fh"
00017
00018
00019
00020 namespace ThePEG {
00021
00035 class ClusterCollapser: public StepHandler {
00036
00037 public:
00038
00040 typedef Ptr<FlavourGenerator>::pointer FlavGenPtr;
00041
00043 typedef multimap<Energy,ColourSinglet> SingletMap;
00044
00045 public:
00046
00052 ClusterCollapser()
00053 : theEnergyCut(1.0*GeV), theNTry2(2), errorlevel(Exception::eventerror),
00054 pStrange(1.0/3.0) {}
00055
00059 virtual ~ClusterCollapser();
00061
00062 public:
00063
00079 virtual void handle(EventHandler & eh, const tPVector & tagged,
00080 const Hint & hint);
00082
00086 virtual vector<ColourSinglet> collapse(tPVector tagged,
00087 tStepPtr newstep);
00088
00094 virtual SingletMap getSinglets(const tPVector & tagged) const;
00095
00100 virtual ColourSinglet splitDiQuarkJunction(ColourSinglet & cs,
00101 tStepPtr newStep) const;
00102
00107 virtual ColourSinglet splitDiDiQuark(ColourSinglet & cs,
00108 tStepPtr newStep) const;
00109
00114 static bool diQuarkJunction(const ColourSinglet & cs);
00115
00120 static bool diDiQuark(const ColourSinglet & cs);
00121
00127 Energy cut() const { return theEnergyCut; }
00128
00133 int nTry2() const { return theNTry2; }
00134
00139 static Energy mass(const ColourSinglet & cl);
00140
00144 static void insert(SingletMap & mmap, const ColourSinglet & cl);
00145
00150 virtual tcPDPtr pickFlavour() const;
00151
00152 protected:
00153
00160 virtual void collapse(tStepPtr newStep, const ColourSinglet & cs,
00161 const tPVector & tagged) const;
00169 virtual bool collapse2(tStepPtr newStep, const ColourSinglet & cs) const;
00170
00178 virtual tPVector getCompensators(Energy mh, const ColourSinglet & cs,
00179 const tPVector & tagged,
00180 tStepPtr newStep) const;
00181
00185 virtual tcPDPtr getHadron(const ColourSinglet & cs) const;
00186
00190 virtual tcPDPair getHadrons(const ColourSinglet & cs) const;
00191
00192 public:
00193
00200 void persistentOutput(PersistentOStream & os) const;
00201
00207 void persistentInput(PersistentIStream & is, int version);
00209
00213 static void Init();
00214
00215 protected:
00216
00223 virtual IBPtr clone() const;
00224
00229 virtual IBPtr fullclone() const;
00231
00234 class ClusterException: public Exception {
00235 public:
00237 ClusterException(const ClusterCollapser & cc) {
00238 theMessage << "In ClusterCollapser '" << cc.name() << "': ";
00239 }
00240 };
00243 private:
00244
00250 Energy theEnergyCut;
00251
00256 int theNTry2;
00257
00262 FlavGenPtr flavGen;
00263
00264 protected:
00265
00272 Exception::Severity errorlevel;
00273
00278 double pStrange;
00279
00280 private:
00281
00285 static ClassDescription<ClusterCollapser> initClusterCollapser;
00286
00290 ClusterCollapser & operator=(const ClusterCollapser &);
00291
00292 };
00293
00294 }
00295
00296
00297 namespace ThePEG {
00298
00305 template <>
00306 struct BaseClassTrait<ClusterCollapser,1>: public ClassTraitsType {
00308 typedef StepHandler NthBase;
00309 };
00310
00316 template <>
00317 struct ClassTraits<ClusterCollapser>:
00318 public ClassTraitsBase<ClusterCollapser> {
00322 static string className() { return "ThePEG::ClusterCollapser"; }
00323
00324 };
00325
00328 }
00329
00330 #endif