9 #ifndef ThePEG_StandardEventHandler_H
10 #define ThePEG_StandardEventHandler_H
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Handlers/EventHandler.h"
15 #include "ThePEG/Repository/Strategy.fh"
16 #include "ThePEG/Handlers/SamplerBase.fh"
17 #include "ThePEG/PDF/PartonBin.fh"
18 #include "ThePEG/MatrixElement/MEBase.fh"
19 #include "SubProcessHandler.fh"
20 #include "StandardXComb.fh"
21 #include "StandardEventHandler.fh"
224 int ibin,
int nr,
const double * r);
231 tStdXCombPtr
select(
int bin,
double & weight);
248 const PartonPairVec& allPBins);
385 void reject(
double weight);
498 class StandardEventHandlerUpdateException:
public UpdateException {};
504 class StandardEventHandlerInitError:
public Exception {};
523 struct BaseClassTrait<StandardEventHandler,1>:
public ClassTraitsType {
533 struct ClassTraits<StandardEventHandler>
534 :
public ClassTraitsBase<StandardEventHandler> {
538 static string className() {
return "ThePEG::StandardEventHandler"; }
virtual void doinitrun()
Initialize this object.
LorentzRotation theCurrentEventBoost
The boost needed to transform the current collision from the CMS system to the lab system...
map< tMEPtr, XVector > MEXMap
Map of pointers to StandardXComb objects indexed by pointers to the corresponding MEBase object...
PersistentIStream is used to read persistent objects from a stream where they were previously written...
int maxDim(int bin) const
Return the number of phase space dimensions needed for the sampling of indicated bin of StandardXComb...
virtual IBPtr clone() const
Make a simple clone of this object.
The EventHandler is the base class used to implement event handlers in ThePEG.
int lumiDim() const
The number of phase space dimensions used by the luminosity function.
const StandardEventHandler & operator=(const StandardEventHandler &)
Private and non-existent assignment operator.
XSVector & xSecs()
Return the vector of cross sections.
int nDim(int bin) const
The number of dimensions of the basic phase space to generate sub-processes in for a given bin of Sta...
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
virtual ~StandardEventHandler()
Destructor.
virtual CrossSection histogramScale() const
Histogram scale.
LorentzRotation & currentEventBoost()
Return the boost needed to transform the current collision from the CMS system to the lab system...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
StandardEventHandler()
Default constructor.
int binStrategy() const
Return the strategy to be used when sampling different StandardXComb objects.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
XVector theXCombs
The StandardXComb objects.
tCutsPtr cuts() const
Return a reference to the Cuts of this EventHandler.
virtual CrossSection integratedXSecErrNoReweight() const
The estimated error int total integrated cross section of the processes generated in this run...
This is the main namespace within which all identifiers in ThePEG are declared.
void addME(Energy maxEnergy, tSubHdlPtr sub, tPExtrPtr extractor, tCutsPtr cuts, tCascHdlPtr ckkw, tMEPtr me, const PBPair &pBins, const PartonPairVec &allPBins)
Create and add StandardXComb objects.
void setIncomingB(PDPtr)
Helper function for the interface.
SamplerPtr theSampler
The phase space sampler responsible for generating phase space points according to the cross section ...
virtual EventPtr continueEvent()
Continue generating an event if the generation has been stopped before finishing. ...
bool weightedEvents
True if this event handler should produce weightes events.
tcSamplerPtr sampler() const
Return the sampler assigned to this event handler.
virtual CrossSection dSigDR(const vector< double > &r)
Return the cross section for the chosen phase space point.
void setScale(Energy2)
Set information about the current sub-process.
static ClassDescription< StandardEventHandler > initStandardEventHandler
Standard Initialization object.
tSamplerPtr sampler()
Return the sampler assigned to this event handler.
QTY< 0, 1, 0 >::Type Energy
Energy.
CutsPtr theCuts
The kinematical cuts used for this collision handler.
XSVector theXSecs
The (incrementally summed) cross sections associated with the StandardXComb objects for the last sele...
void reject(double weight)
Reject a (partially) generated event.
vector< CrossSection > XSVector
A vector of cross sections.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
const LorentzRotation & currentEventBoost() const
Return the boost needed to transform the current event from the CMS system to the lab system...
PDPtr theIncomingA
The first of the incoming particle types.
vector< int > theMaxDims
The number of degrees of freedom needed to generate the phase space for the different bins...
virtual void select(tXCombPtr newXComb)
Change the XComb object.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
virtual CrossSection integratedXSec() const
The estimated total integrated cross section of the processes generated in this run.
virtual void initialize()
Initialize this event handler and all related objects needed to generate events.
bool weighted() const
Return true if this event handler should produce weightes events.
virtual CrossSection integratedXSecNoReweight() const
The estimated total integrated cross section of the processes generated in this run, excluding reweighting.
RCPtr is a reference counted (smart) pointer.
const XSVector & xSecs() const
Return the vector of cross sections.
int theLumiDim
The number of phase space dimensions used by the luminosity function.
PDPtr theIncomingB
The second of the incoming particle types.
Selector< StdXCombPtr > XSelector
A weighted list of pointers to StandardXComb objects.
virtual EventPtr generateEvent()
Generate an event.
void setIncomingA(PDPtr)
Helper function for the interface.
XVector & xCombs()
Return the vector of StandardXComb objects.
int nBins() const
Return the number of separate bins of StandardXComb objects to sample.
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
virtual void statistics(ostream &) const
Write out accumulated statistics about intergrated cross sections and stuff.
MEXMap theMEXMap
The map used to store all XBins with the same matrix element for option 1 in theBinStrategy.
const SubHandlerList & subProcesses() const
Access the list of sub-process handlers.
Exception is the base class for all exceptions to be used in ThePEG.
The StandardEventHandler class is the main class for generating simple events without overlayed colli...
Selector is a templated class for storing objects associated with probabilities in a way such that...
SubHandlerList theSubProcesses
The list of SubProcessHandlers.
virtual CrossSection integratedXSecErr() const
The estimated error int total integrated cross section of the processes generated in this run...
int theBinStrategy
The strategy to be used when sampling different StandardXComb objects.
const XVector & xCombs() const
Return the vector of StandardXComb objects.
static string className()
Return the name of class T.
This template class allows the compiler to check calculations with physical quantities for dimensiona...
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
virtual void dofinish()
Finalize this object.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
tCollPtr performCollision()
For the sub-procss and phase-space point selected in the previous call to dSigDR, produce the first s...
virtual void doupdate()
Check sanity of the object during the setup phase.
vector< SubHdlPtr > SubHandlerList
A vector of SubProcessHandlers.
virtual void initGroups()
Initialize groups of StepHandlers.
void reweight(double factor) const
Reweight a partially generated event.
SubHandlerList & subProcesses()
Access the list of sub-process handlers.
static void Init()
Standard Init function used to initialize the interface.
vector< StdXCombPtr > XVector
A vector of pointers to StandardXComb objects.