00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef THEPEG_Cuts_H
00010 #define THEPEG_Cuts_H
00011
00012
00013
00014
00015 #include "ThePEG/Interface/Interfaced.h"
00016 #include "Cuts.fh"
00017 #include "OneCutBase.h"
00018 #include "TwoCutBase.h"
00019 #include "MultiCutBase.h"
00020
00021 namespace ThePEG {
00022
00051 class Cuts: public Interfaced {
00052
00053 public:
00054
00058 typedef vector<OneCutPtr> OneCutVector;
00059
00063 typedef vector<TwoCutPtr> TwoCutVector;
00064
00068 typedef vector<MultiCutPtr> MultiCutVector;
00069
00070 public:
00071
00077 Cuts(Energy MhatMin=2*GeV);
00078
00082 virtual ~Cuts();
00084
00085 public:
00086
00097 virtual void initialize(Energy2 smax, double Y);
00098
00105 virtual void initEvent();
00106
00122 virtual bool
00123 initSubProcess(Energy2 shat, double yhat, bool mirror = false) const;
00125
00135 bool passCuts(const tcPDVector & ptype, const vector<LorentzMomentum> & p,
00136 tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const;
00137
00145 bool passCuts(const tcPVector & p,
00146 tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const;
00147
00153 bool passCuts(const SubProcess & sub) const;
00154
00159 bool passCuts(const Collision & coll) const;
00161
00171 Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const;
00172
00181 Energy2 minTij(tcPDPtr pi, tcPDPtr po) const;
00182
00190 double minDeltaR(tcPDPtr pi, tcPDPtr pj) const;
00191
00204 Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const;
00205
00213 double minDurham(tcPDPtr pi, tcPDPtr pj) const;
00214
00221 Energy minKT(tcPDPtr p) const;
00222
00229 double minEta(tcPDPtr p) const;
00230
00237 double maxEta(tcPDPtr p) const;
00238
00244 double minYStar(tcPDPtr p) const;
00245
00251 double maxYStar(tcPDPtr p) const;
00252
00260 Energy2 minS(const tcPDVector & pv) const;
00261
00269 Energy2 maxS(const tcPDVector & pv) const;
00271
00278 template <typename T>
00279 vector<typename Ptr<T>::transient_const_pointer>
00280 oneCutObjects() const;
00281
00286 template <typename T>
00287 vector<typename Ptr<T>::transient_const_pointer>
00288 twoCutObjects() const;
00289
00294 template <typename T>
00295 vector<typename Ptr<T>::transient_const_pointer>
00296 multiCutObjects() const;
00297
00301 void add(tOneCutPtr c) { theOneCuts.push_back(c); }
00302
00306 void add(tTwoCutPtr c) { theTwoCuts.push_back(c); }
00307
00311 void add(tMultiCutPtr c) { theMultiCuts.push_back(c); }
00313
00314 public:
00315
00322 Energy2 SMax() const { return theSMax; }
00323
00324
00329 double Y() const { return theY; }
00330
00335 Energy2 currentSHat() const { return theCurrentSHat; }
00336
00342 double currentYHat() const { return theCurrentYHat; }
00343
00345
00351 Energy2 sHatMin() const { return max(sqr(theMHatMin), theX1Min*theX2Min*SMax()); }
00352
00356 Energy2 sHatMax() const { return min(sqr(theMHatMax), theX1Max*theX2Max*SMax()); }
00357
00361 bool sHat(Energy2 sh) const {
00362 return sh > sHatMin() && sh <= sHatMax()*(1.0 + 10.0*Constants::epsilon);
00363 }
00364
00368 Energy mHatMin() const { return max(theMHatMin, sqrt(theX1Min*theX2Min*SMax())); }
00369
00373 Energy mHatMax() const { return min(theMHatMax, sqrt(theX1Max*theX2Max*SMax())); }
00374
00379 double yHatMin() const;
00380
00385 double yHatMax() const;
00386
00390 bool yHat(double y) const;
00391
00396 double x1Min() const;
00397
00402 double x1Max() const;
00403
00407 bool x1(double x) const;
00408
00413 double x2Min() const;
00414
00419 double x2Max() const;
00420
00424 bool x2(double x) const;
00425
00430 Energy2 scaleMin() const { return theScaleMin; }
00431
00436 Energy2 scaleMax() const { return theScaleMax; }
00437
00441 bool scale(Energy2 Q2) const { return Q2 > scaleMin() && Q2 < scaleMax(); }
00442
00447 bool subMirror() const { return theSubMirror; }
00449
00450 public:
00451
00455 virtual void describe() const;
00456
00457 protected:
00458
00465 virtual void doinitrun();
00467
00468 public:
00469
00476 void persistentOutput(PersistentOStream & os) const;
00477
00483 void persistentInput(PersistentIStream & is, int version);
00485
00492 static void Init();
00493
00494 protected:
00495
00502 virtual IBPtr clone() const;
00503
00508 virtual IBPtr fullclone() const;
00510
00511 private:
00512
00516 Energy maxMHatMin() const;
00517
00521 Energy minMHatMax() const;
00522
00526 double maxYHatMin() const;
00527
00531 double minYHatMax() const;
00532
00536 double maxX1Min() const;
00537
00541 double minX1Max() const;
00542
00546 double maxX2Min() const;
00547
00551 double minX2Max() const;
00552
00556 Energy2 maxScaleMin() const;
00557
00561 Energy2 minScaleMax() const;
00562
00563 private:
00564
00569 Energy2 theSMax;
00570
00575 double theY;
00576
00581 mutable Energy2 theCurrentSHat;
00582
00588 mutable double theCurrentYHat;
00589
00593 Energy theMHatMin;
00594
00598 Energy theMHatMax;
00599
00604 double theYHatMin;
00605
00610 double theYHatMax;
00611
00616 double theX1Min;
00617
00622 double theX1Max;
00623
00628 double theX2Min;
00629
00634 double theX2Max;
00635
00640 Energy2 theScaleMin;
00641
00646 Energy2 theScaleMax;
00647
00652 OneCutVector theOneCuts;
00653
00658 TwoCutVector theTwoCuts;
00659
00664 MultiCutVector theMultiCuts;
00665
00670 mutable bool theSubMirror;
00671
00672 private:
00673
00678 static ClassDescription<Cuts> initCuts;
00679
00684 Cuts & operator=(const Cuts &);
00685
00686 };
00687
00688 }
00689
00690 #include "ThePEG/Utilities/ClassTraits.h"
00691
00692 namespace ThePEG {
00693
00698 template <>
00699 struct BaseClassTrait<Cuts,1> {
00701 typedef Interfaced NthBase;
00702 };
00703
00706 template <>
00707 struct ClassTraits<Cuts>
00708 : public ClassTraitsBase<Cuts> {
00710 static string className() { return "ThePEG::Cuts"; }
00711 };
00712
00715 }
00716
00717 #endif