00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_StandardXComb_H
00010 #define ThePEG_StandardXComb_H
00011
00012
00013 #include "ThePEG/Config/ThePEG.h"
00014 #include "SubProcessHandler.fh"
00015 #include "ThePEG/PDF/PartonExtractor.fh"
00016 #include "ThePEG/PDF/PartonBin.h"
00017 #include "ThePEG/PDF/PartonBinInstance.h"
00018 #include "ThePEG/Utilities/VSelector.h"
00019 #include "ThePEG/Utilities/ClassDescription.h"
00020 #include "ThePEG/Utilities/Maths.h"
00021 #include "ThePEG/Utilities/XSecStat.h"
00022 #include "ThePEG/EventRecord/Particle.h"
00023 #include "ThePEG/MatrixElement/MEBase.h"
00024 #include "ThePEG/Handlers/XComb.h"
00025 #include "ThePEG/Handlers/StandardEventHandler.h"
00026 #include "ThePEG/Handlers/SubProcessHandler.fh"
00027 #include "StandardXComb.fh"
00028
00029 namespace ThePEG {
00030
00051 class StandardXComb: public XComb {
00052
00053 public:
00054
00056 typedef MEBase::DiagramVector DiagramVector;
00057
00059 typedef MEBase::DiagramIndex DiagramIndex;
00060
00062 friend class MEBase;
00063
00064 public:
00065
00071 StandardXComb(Energy newMaxEnergy, const cPDPair & inc,
00072 tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
00073 tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
00074 const PBPair & newPartonBins, tCutsPtr newCuts, tMEPtr newME,
00075 const DiagramVector & newDiagrams, bool mir);
00076
00080 StandardXComb();
00081
00085 ~StandardXComb();
00086
00090 StandardXComb(tMEPtr me, const tPVector & parts, DiagramIndex i);
00091
00093
00100 tcSubHdlPtr subProcessHandler() const { return theSubProcessHandler; }
00101
00105 tMEPtr matrixElement() const { return theME; }
00107
00113 virtual bool checkInit();
00114
00119 int nDim() const { return theNDim; }
00120
00126 CrossSection dSigDR(const pair<double,double> ll, int nr, const double * r);
00127
00131 tSubProPtr construct();
00133
00139 const XSecStat & stats() const { return theStats; }
00140
00145 void select(double weight) { theStats.select(weight); }
00146
00150 void accept() { theStats.accept(); }
00151
00157 void reject(double weight = 1.0) { theStats.reject(weight); }
00158
00162 void reset() { theStats.reset(); }
00164
00170 const DiagramVector & diagrams() const { return theDiagrams; }
00171
00176 bool mirror() const { return isMirror; }
00177
00183 const vector<Lorentz5Momentum> & meMomenta() const { return theMEMomenta; }
00184
00188 tcDiagPtr lastDiagram() const { return diagrams()[lastDiagramIndex()]; }
00189
00195 const cPDVector & mePartonData() const { return theMEPartonData; }
00196
00200 DiagramIndex lastDiagramIndex() const { return theLastDiagramIndex; }
00201
00207 const DVector & meInfo() const { return theMEInfo; }
00208
00214 void meInfo(const DVector & info) { theMEInfo = info; }
00216
00217 protected:
00218
00223 void newSubProcess();
00224
00230 vector<Lorentz5Momentum> & meMomenta() { return theMEMomenta; }
00231
00237 cPDVector & mePartonData() { return theMEPartonData; }
00238
00242 void lastDiagramIndex(DiagramIndex i) { theLastDiagramIndex = i; }
00243
00244 public:
00245
00252 void persistentOutput(PersistentOStream & os) const;
00253
00259 void persistentInput(PersistentIStream & is, int version);
00261
00265 static void Init();
00266
00267 private:
00268
00272 tSubHdlPtr theSubProcessHandler;
00273
00277 tMEPtr theME;
00278
00282 XSecStat theStats;
00283
00287 DiagramVector theDiagrams;
00288
00293 bool isMirror;
00294
00299 int theNDim;
00300
00305 pair<int,int> partonDims;
00306
00312 vector<Lorentz5Momentum> theMEMomenta;
00313
00319 cPDVector theMEPartonData;
00320
00324 DiagramIndex theLastDiagramIndex;
00325
00331 DVector theMEInfo;
00332
00333 private:
00334
00338 static ClassDescription<StandardXComb> initStandardXComb;
00339
00343 StandardXComb & operator=(const StandardXComb &);
00344
00345 };
00346
00353 template <>
00354 struct BaseClassTrait<StandardXComb,1>: public ClassTraitsType {
00356 typedef XComb NthBase;
00357 };
00358
00363 template <>
00364 struct ClassTraits<StandardXComb>:
00365 public ClassTraitsBase<StandardXComb> {
00367 static string className() { return "ThePEG::StandardXComb"; }
00368 };
00369
00372 }
00373
00374 #endif