00001 // -*- C++ -*- 00002 // 00003 // SubProcessHandler.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_SubProcessHandler_H 00010 #define ThePEG_SubProcessHandler_H 00011 // This is the declaration of the SubProcessHandler class. 00012 00013 #include "ThePEG/Config/ThePEG.h" 00014 #include "ThePEG/Utilities/Interval.h" 00015 #include "ThePEG/Handlers/HandlerGroup.h" 00016 #include "ThePEG/Handlers/HandlerBase.h" 00017 #include "ThePEG/MatrixElement/MEBase.fh" 00018 #include "ThePEG/Cuts/Cuts.fh" 00019 #include "SubProcessHandler.fh" 00020 00021 namespace ThePEG { 00022 00049 class SubProcessHandler: public HandlerBase { 00050 00051 public: 00052 00054 typedef vector<HandlerGroupBase *> GroupVector; 00055 00057 typedef vector<ReweightPtr> ReweightVector; 00058 00059 public: 00060 00066 SubProcessHandler(); 00067 00071 SubProcessHandler(const SubProcessHandler &); 00072 00076 virtual ~SubProcessHandler(); 00078 00079 public: 00080 00086 tPExtrPtr pExtractor() const { return thePartonExtractor; } 00087 00091 const MEVector & MEs() const { return theMEs; } 00092 00096 tCutsPtr cuts() const { return theCuts; } 00097 00102 tCascHdlPtr CKKWHandler() const; 00103 00107 const HandlerGroupBase & handlerGroup(Group::Handler) const; 00108 00112 const GroupVector & groups() const { return theGroups; } 00113 00117 MEVector & MEs() { return theMEs; } 00119 00120 public: 00121 00128 void persistentOutput(PersistentOStream & os) const; 00129 00135 void persistentInput(PersistentIStream & is, int version); 00137 00141 static void Init(); 00142 00143 protected: 00144 00151 virtual IBPtr clone() const; 00152 00157 virtual IBPtr fullclone() const; 00159 00162 00168 virtual void doinit(); 00169 00174 virtual void doinitrun(); 00176 00177 private: 00178 00182 void setupGroups(); 00183 00184 private: 00185 00189 PExtrPtr thePartonExtractor; 00190 00194 MEVector theMEs; 00195 00199 CutsPtr theCuts; 00200 00204 HandlerGroup<SubProcessHandler> theSubprocessGroup; 00205 00209 HandlerGroup<CascadeHandler> theCascadeGroup; 00210 00214 HandlerGroup<MultipleInteractionHandler> theMultiGroup; 00215 00219 HandlerGroup<HadronizationHandler> theHadronizationGroup; 00220 00224 HandlerGroup<DecayHandler> theDecayGroup; 00225 00229 GroupVector theGroups; 00230 00235 ReweightVector reweights; 00240 ReweightVector preweights; 00241 00242 private: 00243 00244 ThePEG_DECLARE_PREPOST_GROUP(SubProcessHandler,Post); 00245 ThePEG_DECLARE_GROUPINTERFACE(CascadeHandler,CascHdlPtr); 00246 ThePEG_DECLARE_GROUPINTERFACE(MultipleInteractionHandler,MIHdlPtr); 00247 ThePEG_DECLARE_GROUPINTERFACE(HadronizationHandler,HadrHdlPtr); 00248 ThePEG_DECLARE_GROUPINTERFACE(DecayHandler,DecayHdlPtr); 00249 00253 static ClassDescription<SubProcessHandler> initSubProcessHandler; 00254 00255 private: 00256 00260 const SubProcessHandler & operator=(const SubProcessHandler &); 00261 00262 }; 00263 00268 template <> 00269 struct BaseClassTrait<SubProcessHandler,1>: public ClassTraitsType { 00271 typedef HandlerBase NthBase; 00272 }; 00273 00276 template <> 00277 struct ClassTraits<SubProcessHandler>: 00278 public ClassTraitsBase<SubProcessHandler> { 00280 static string className() { return "ThePEG::SubProcessHandler"; } 00281 }; 00282 00285 } 00286 00287 #endif /* ThePEG_SubProcessHandler_H */