CMS 3D CMS Logo

Public Member Functions | Private Attributes

ThePEGHadronizer Class Reference

Inheritance diagram for ThePEGHadronizer:
ThePEGInterface gen::BaseHadronizer

List of all members.

Public Member Functions

const char * classname () const
bool decay ()
bool declareSpecialSettings (const std::vector< std::string >)
bool declareStableParticles (const std::vector< int > &pdgIds)
void finalizeEvent ()
bool generatePartonsAndHadronize ()
bool initializeForInternalPartons ()
bool readSettings (int)
bool residualDecay ()
void statistics ()
 ThePEGHadronizer (const edm::ParameterSet &params)
virtual ~ThePEGHadronizer ()

Private Attributes

unsigned int eventsToPrint
ThePEG::EventPtr thepegEvent

Detailed Description

Definition at line 22 of file ThePEGHadronizer.cc.


Constructor & Destructor Documentation

ThePEGHadronizer::ThePEGHadronizer ( const edm::ParameterSet params)

Definition at line 49 of file ThePEGHadronizer.cc.

References ThePEGInterface::initRepository().

                                                              :
        ThePEGInterface(pset),
        BaseHadronizer(pset),
        eventsToPrint(pset.getUntrackedParameter<unsigned int>("eventsToPrint", 0))
{  
        initRepository(pset);

}
ThePEGHadronizer::~ThePEGHadronizer ( ) [virtual]

Definition at line 58 of file ThePEGHadronizer.cc.

{
}

Member Function Documentation

const char* ThePEGHadronizer::classname ( ) const [inline]

Definition at line 41 of file ThePEGHadronizer.cc.

{ return "ThePEGHadronizer"; }
bool ThePEGHadronizer::decay ( )

Definition at line 123 of file ThePEGHadronizer.cc.

{
        return true;
}
bool ThePEGHadronizer::declareSpecialSettings ( const std::vector< std::string >  ) [inline]

Definition at line 31 of file ThePEGHadronizer.cc.

{ return true; }
bool ThePEGHadronizer::declareStableParticles ( const std::vector< int > &  pdgIds)

Definition at line 68 of file ThePEGHadronizer.cc.

{
        return false;
}
void ThePEGHadronizer::finalizeEvent ( )

Definition at line 101 of file ThePEGHadronizer.cc.

References ThePEGInterface::clearAuxiliary(), gen::BaseHadronizer::event(), gen::BaseHadronizer::eventInfo(), eventsToPrint, ThePEGInterface::fillAuxiliary(), ThePEGInterface::iobc_, ThePEGInterface::pthat(), and thepegEvent.

{
        HepMC::PdfInfo pdf;
        clearAuxiliary(event().get(), &pdf);
        fillAuxiliary(event().get(), &pdf, thepegEvent);
        event()->set_pdf_info(pdf);

        eventInfo().reset(new GenEventInfoProduct(event().get()));
        eventInfo()->setBinningValues(
                        std::vector<double>(1, pthat(thepegEvent)));

        if (eventsToPrint) {
                eventsToPrint--;
                event()->print();
        }

        if (iobc_.get())
                iobc_->write_event(event().get());

        edm::LogInfo("Generator|ThePEGHadronizer") << "Event produced";
}
bool ThePEGHadronizer::generatePartonsAndHadronize ( )

Definition at line 80 of file ThePEGHadronizer.cc.

References ThePEGInterface::convert(), ThePEGInterface::eg_, gen::BaseHadronizer::event(), ThePEGInterface::flushRandomNumberGenerator(), and thepegEvent.

{
        edm::LogInfo("Generator|ThePEGHadronizer") << "Start production";

        flushRandomNumberGenerator();

        thepegEvent = eg_->shoot();
        if (!thepegEvent) {
                edm::LogWarning("Generator|ThePEGHadronizer") << "thepegEvent not initialized";
                return false;
        }

        event() = convert(thepegEvent);
        if (!event().get()) {
                edm::LogWarning("Generator|ThePEGHadronizer") << "genEvent not initialized";
                return false;
        }

        return true;
}
bool ThePEGHadronizer::initializeForInternalPartons ( )

Definition at line 62 of file ThePEGHadronizer.cc.

References ThePEGInterface::initGenerator().

{
        initGenerator();
        return true;
}
bool ThePEGHadronizer::readSettings ( int  ) [inline]

Definition at line 27 of file ThePEGHadronizer.cc.

{ return true; }
bool ThePEGHadronizer::residualDecay ( )

Definition at line 128 of file ThePEGHadronizer.cc.

{
        return true;
}
void ThePEGHadronizer::statistics ( )

Definition at line 73 of file ThePEGHadronizer.cc.

References ThePEGInterface::eg_, gen::BaseHadronizer::runInfo(), and GenRunInfoProduct::setInternalXSec().

{
        runInfo().setInternalXSec(GenRunInfoProduct::XSec(
                eg_->integratedXSec() / ThePEG::picobarn,
                eg_->integratedXSecErr() / ThePEG::picobarn));
}

Member Data Documentation

unsigned int ThePEGHadronizer::eventsToPrint [private]

Definition at line 44 of file ThePEGHadronizer.cc.

Referenced by finalizeEvent().

ThePEG::EventPtr ThePEGHadronizer::thepegEvent [private]

Definition at line 46 of file ThePEGHadronizer.cc.

Referenced by finalizeEvent(), and generatePartonsAndHadronize().