1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
// -*- C++ -*-
//
// ReweightConstant.cc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ReweightConstant class.
//
#include "ReweightConstant.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Interface/Parameter.h"
using namespace ThePEG;
IBPtr ReweightConstant::clone() const {
return new_ptr(*this);
}
IBPtr ReweightConstant::fullclone() const {
return new_ptr(*this);
}
double ReweightConstant::weight() const {
return C;
}
void ReweightConstant::persistentOutput(PersistentOStream & os) const {
os << C;
}
void ReweightConstant::persistentInput(PersistentIStream & is, int) {
is >> C;
}
ClassDescription<ReweightConstant> ReweightConstant::initReweightConstant;
// Definition of the static class description member.
void ReweightConstant::Init() {
static ClassDocumentation<ReweightConstant> documentation
("The ReweightConstant class is a simple ReweightBase sub-class which "
"simply reweight an event with a constant");
static Parameter<ReweightConstant,double> interfaceC
("C",
"The constant with which to reweight an event.",
&ReweightConstant::C, 1.0, 0, 0,
true, false, Interface::nolimits);
interfaceC.rank(10);
}
|