thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
LesHouches
MadGraphReader.h
1
// -*- C++ -*-
2
//
3
// MadGraphReader.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef THEPEG_MadGraphReader_H
10
#define THEPEG_MadGraphReader_H
11
// This is the declaration of the MadGraphReader class.
12
13
#include "ThePEG/LesHouches/LesHouchesFileReader.h"
14
15
namespace
ThePEG
{
16
24
class
MadGraphReader
:
public
LesHouchesFileReader
{
25
26
public
:
27
33
MadGraphReader
()
34
:
fixedScale
(91.188*GeV),
fixedAEM
(0.007546772),
fixedAS
(0.12),
35
doInitCuts
(false) {}
37
38
public
:
39
46
virtual
void
open
();
47
56
virtual
long
scan
();
57
63
virtual
bool
doReadEvent
();
65
66
public
:
67
74
void
persistentOutput
(
PersistentOStream
& os)
const
;
75
81
void
persistentInput
(
PersistentIStream
& is,
int
version);
83
87
static
void
Init
();
88
89
protected
:
90
97
virtual
IBPtr
clone
()
const
;
98
103
virtual
IBPtr
fullclone
()
const
;
105
106
protected
:
107
110
116
virtual
void
doinit
();
117
122
CutsPtr
initCuts
();
123
129
virtual
void
initPDFs
();
130
135
virtual
bool
preInitialize
()
const
;
136
141
virtual
void
dofinish
() {
142
LesHouchesFileReader::dofinish
();
143
if
(
stats
.
accepted
() > 0 )
useMe
();
144
}
146
147
protected
:
148
154
string
scanCuts
(
string
);
155
159
long
numberOfEvents
(
string
);
160
161
protected
:
162
168
Energy
fixedScale
;
169
175
double
fixedAEM
;
176
182
double
fixedAS
;
183
188
map<string,double>
cuts
;
189
193
bool
doInitCuts
;
194
195
public
:
196
201
struct
WeightedException
:
public
Exception
{};
202
203
private
:
204
208
static
ClassDescription<MadGraphReader>
initMadGraphReader
;
209
213
MadGraphReader
&
operator=
(
const
MadGraphReader
&) =
delete
;
214
215
};
216
217
}
218
219
220
#include "ThePEG/Utilities/ClassTraits.h"
221
222
namespace
ThePEG
{
223
230
template
<>
231
struct
BaseClassTrait<MadGraphReader,1>:
public
ClassTraitsType {
233
typedef
LesHouchesFileReader
NthBase
;
234
};
235
241
template
<>
242
struct
ClassTraits<MadGraphReader>
243
:
public
ClassTraitsBase<MadGraphReader> {
245
static
string
className
() {
return
"ThePEG::MadGraphReader"
; }
249
static
string
library
() {
return
"MadGraphReader.so"
; }
250
251
};
252
255
}
256
257
#endif
/* THEPEG_MadGraphReader_H */
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
ThePEG::Exception
Exception is the base class for all exceptions to be used in ThePEG.
Definition:
Exception.h:44
ThePEG::InterfacedBase::dofinish
virtual void dofinish()
Finalize this object.
Definition:
InterfacedBase.h:208
ThePEG::Interfaced::useMe
void useMe() const
Should be called to indicate that this object has actually been used.
Definition:
Interfaced.h:93
ThePEG::LesHouchesFileReader
LesHouchesFileReader is an base class to be used for objects which reads event files from matrix elem...
Definition:
LesHouchesFileReader.h:39
ThePEG::LesHouchesReader::stats
XSecStat stats
Collect statistics for this reader.
Definition:
LesHouchesReader.h:732
ThePEG::MadGraphReader
MadGraphReader inherits from LesHouchesFileReader and is able to read event files produced by the Mad...
Definition:
MadGraphReader.h:24
ThePEG::MadGraphReader::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::MadGraphReader::initMadGraphReader
static ClassDescription< MadGraphReader > initMadGraphReader
Describe a concrete class with persistent data.
Definition:
MadGraphReader.h:208
ThePEG::MadGraphReader::fixedScale
Energy fixedScale
Fixed scale.
Definition:
MadGraphReader.h:168
ThePEG::MadGraphReader::dofinish
virtual void dofinish()
Finalize this object.
Definition:
MadGraphReader.h:141
ThePEG::MadGraphReader::initPDFs
virtual void initPDFs()
Called from LesHouchesReader::doinit() to extract PDFs from the event file and add the corresponding ...
ThePEG::MadGraphReader::doInitCuts
bool doInitCuts
If true, cuts may be extracted from the event file during initialization.
Definition:
MadGraphReader.h:193
ThePEG::MadGraphReader::doReadEvent
virtual bool doReadEvent()
Read the next event form the file or stream into the corresponding protected variables.
ThePEG::MadGraphReader::Init
static void Init()
Standard Init function used to initialize the interfaces.
ThePEG::MadGraphReader::operator=
MadGraphReader & operator=(const MadGraphReader &)=delete
Private and non-existent assignment operator.
ThePEG::MadGraphReader::open
virtual void open()
Open a file or stream with events and read in the run information into the corresponding protected va...
ThePEG::MadGraphReader::scanCuts
string scanCuts(string)
Interface function to scan a madgraph file and extract information about used cuts.
ThePEG::MadGraphReader::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::MadGraphReader::initCuts
CutsPtr initCuts()
Called from doinit() to extract cuts from the event file and add the corresponding objects to the cur...
ThePEG::MadGraphReader::cuts
map< string, double > cuts
New MadGraph files contain suitable information about cuts used in the generation.
Definition:
MadGraphReader.h:188
ThePEG::MadGraphReader::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::MadGraphReader::fixedAS
double fixedAS
Fixed .
Definition:
MadGraphReader.h:182
ThePEG::MadGraphReader::preInitialize
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects because it needs to extra...
ThePEG::MadGraphReader::fixedAEM
double fixedAEM
Fixed .
Definition:
MadGraphReader.h:175
ThePEG::MadGraphReader::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::MadGraphReader::numberOfEvents
long numberOfEvents(string)
Function to extract the number of events from a string.
ThePEG::MadGraphReader::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
ThePEG::MadGraphReader::scan
virtual long scan()
Scan the file or stream to obtain information about cross section weights and particles etc.
ThePEG::MadGraphReader::MadGraphReader
MadGraphReader()
Default constructor.
Definition:
MadGraphReader.h:33
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG::Qty< 0, 1, 0 >
ThePEG::XSecStat::accepted
double accepted() const
Number of accepts so far.
Definition:
XSecStat.h:240
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsBase::library
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition:
ClassTraits.h:85
ThePEG::MadGraphReader::WeightedException
Exception class used to inform about inability to work with some weighted event files.
Definition:
MadGraphReader.h:201
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6