Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19252018
CrossSectionAnalysis.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
CrossSectionAnalysis.cc
View Options
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the CrossSectionAnalysis class.
//
#include
"CrossSectionAnalysis.h"
#include
"ThePEG/Interface/ClassDocumentation.h"
#include
"ThePEG/EventRecord/Particle.h"
#include
"ThePEG/Repository/UseRandom.h"
#include
"ThePEG/Repository/EventGenerator.h"
#include
"ThePEG/Utilities/DescribeClass.h"
#include
"ThePEG/Persistency/PersistentOStream.h"
#include
"ThePEG/Persistency/PersistentIStream.h"
#include
"ThePEG/Handlers/EventHandler.h"
#include
"ThePEG/Handlers/StandardEventHandler.h"
#include
"Herwig++/Sampling/GeneralSampler.h"
#include
"Herwig++/Utilities/XML/ElementIO.h"
using
namespace
Herwig
;
CrossSectionAnalysis
::
CrossSectionAnalysis
()
{}
CrossSectionAnalysis
::~
CrossSectionAnalysis
()
{}
#ifndef LWH_AIAnalysisFactory_H
#ifndef LWH
#define LWH ThePEGLWH
#endif
#include
"ThePEG/Analysis/LWH/AnalysisFactory.h"
#endif
void
CrossSectionAnalysis
::
dofinish
()
{
AnalysisHandler
::
dofinish
();
Ptr
<
StandardEventHandler
>::
tptr
seh
=
dynamic_ptr_cast
<
Ptr
<
StandardEventHandler
>::
tptr
>
(
generator
()
->
eventHandler
());
Ptr
<
GeneralSampler
>::
tptr
sampler
=
dynamic_ptr_cast
<
Ptr
<
GeneralSampler
>::
tptr
>
(
seh
->
sampler
());
unsigned
long
attemptedPoints
=
sampler
->
attempts
();
double
sumOfWeights
=
sampler
->
sumWeights
();
double
sumOfSquaredWeights
=
sampler
->
sumWeights2
();
CrossSection
maxXSection
=
sampler
->
maxXSec
();
XML
::
Element
elem
(
XML
::
ElementTypes
::
Element
,
"Run"
);
elem
.
appendAttribute
(
"name"
,
generator
()
->
runName
());
elem
.
appendAttribute
(
"attemptedPoints"
,
attemptedPoints
);
elem
.
appendAttribute
(
"sumOfWeights"
,
sumOfWeights
*
maxXSection
/
nanobarn
);
elem
.
appendAttribute
(
"sumOfSquaredWeights"
,
sumOfSquaredWeights
*
sqr
(
maxXSection
/
nanobarn
));
XML
::
Element
xhistos
(
XML
::
ElementTypes
::
Element
,
"Histograms"
);
elem
.
append
(
xhistos
);
string
fname
=
name
()
+
".xml"
;
ofstream
runXML
(
fname
.
c_str
());
XML
::
ElementIO
::
put
(
elem
,
runXML
);
}
IBPtr
CrossSectionAnalysis
::
clone
()
const
{
return
new_ptr
(
*
this
);
}
IBPtr
CrossSectionAnalysis
::
fullclone
()
const
{
return
new_ptr
(
*
this
);
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void
CrossSectionAnalysis
::
persistentOutput
(
PersistentOStream
&
)
const
{}
void
CrossSectionAnalysis
::
persistentInput
(
PersistentIStream
&
,
int
)
{}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass
<
CrossSectionAnalysis
,
AnalysisHandler
>
describeHerwigCrossSectionAnalysis
(
"Herwig::CrossSectionAnalysis"
,
"HwJetsAnalysis.so"
);
void
CrossSectionAnalysis
::
Init
()
{
static
ClassDocumentation
<
CrossSectionAnalysis
>
documentation
(
"There is no documentation for the CrossSectionAnalysis class"
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 6:13 AM (10 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6542395
Default Alt Text
CrossSectionAnalysis.cc (3 KB)
Attached To
Mode
rHERWIGHG herwighg
Attached
Detach File
Event Timeline
Log In to Comment