00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef THEPEG_SimpleBaryonRemnantDecayer_H
00010 #define THEPEG_SimpleBaryonRemnantDecayer_H
00011
00012
00013
00014
00015 #include "ThePEG/PDT/RemnantDecayer.h"
00016 #include "ThePEG/Handlers/ZGenerator.h"
00017 #include "ThePEG/Handlers/FlavourGenerator.h"
00018 #include "ThePEG/Utilities/VSelector.h"
00019
00020 namespace ThePEG {
00021
00031 class SimpleBaryonRemnantDecayer: public RemnantDecayer {
00032
00033 public:
00034
00036 typedef Ptr<ZGenerator>::pointer ZGPtr;
00038 typedef Ptr<FlavourGenerator>::pointer FlGPtr;
00039
00040 public:
00041
00047 SimpleBaryonRemnantDecayer()
00048 : theMargin(1.0*GeV), useSpecialValence(false) {}
00049
00053 SimpleBaryonRemnantDecayer(const SimpleBaryonRemnantDecayer & x)
00054 : RemnantDecayer(x), theZGenerator(x.theZGenerator),
00055 theFlavourGenerator(x.theFlavourGenerator), theMargin(x.theMargin),
00056 useSpecialValence(x.useSpecialValence) {}
00057
00061 virtual ~SimpleBaryonRemnantDecayer();
00063
00064 public:
00065
00074 virtual bool accept(const DecayMode & dm) const;
00075
00089 virtual ParticleVector decay(const DecayMode & dm, const Particle & p,
00090 Step & step) const;
00091
00096 virtual bool canHandle(tcPDPtr parent, tcPDPtr extracted) const;
00097
00104 virtual bool checkExtract(tcPPtr parent, tcPPtr extracted,
00105 const LorentzMomentum & pnew) const;
00107
00108 protected:
00109
00117 virtual void doinit();
00118
00123 virtual bool preInitialize() const;
00125
00126 public:
00127
00134 void persistentOutput(PersistentOStream & os) const;
00135
00141 void persistentInput(PersistentIStream & is, int version);
00143
00150 static void Init();
00151
00152 public:
00153
00157 struct NoDISRespect: public Exception {};
00158
00162 struct DecayFailed: public Exception {};
00163
00164 protected:
00165
00170 ZGenerator & zGenerator() const { return *theZGenerator; }
00171
00176 FlavourGenerator & flavourGenerator() const { return *theFlavourGenerator; }
00177
00184 Energy margin() const { return theMargin; }
00185
00189 bool specialValence() const { return useSpecialValence; }
00190
00191 protected:
00192
00199 virtual IBPtr clone() const;
00200
00205 virtual IBPtr fullclone() const;
00207
00208 protected:
00209
00214 struct BaryonContent {
00216 vector<int> flav;
00219 VSelector< pair<int,int> > flavsel;
00221 int sign;
00222 };
00223
00227 const BaryonContent & getBaryonInfo(tcPDPtr baryon) const;
00228
00229 private:
00230
00235 ZGPtr theZGenerator;
00236
00241 FlGPtr theFlavourGenerator;
00242
00249 Energy theMargin;
00250
00254 bool useSpecialValence;
00255
00259 mutable map<tcPDPtr,BaryonContent> baryonmap;
00260
00261 private:
00262
00267 static ClassDescription<SimpleBaryonRemnantDecayer>
00268 initSimpleBaryonRemnantDecayer;
00269
00274 SimpleBaryonRemnantDecayer & operator=(const SimpleBaryonRemnantDecayer &);
00275
00276 };
00277
00278 }
00279
00280 #include "ThePEG/Utilities/ClassTraits.h"
00281
00282 namespace ThePEG {
00283
00288 template <>
00289 struct BaseClassTrait<SimpleBaryonRemnantDecayer,1> {
00291 typedef RemnantDecayer NthBase;
00292 };
00293
00297 template <>
00298 struct ClassTraits<SimpleBaryonRemnantDecayer>
00299 : public ClassTraitsBase<SimpleBaryonRemnantDecayer> {
00301 static string className() { return "ThePEG::SimpleBaryonRemnantDecayer"; }
00302 };
00303
00306 }
00307
00308 #endif