Skip to content

Commit

Permalink
Merge pull request #55 from cms-sw/CMSSW_6_2_X_SLHC
Browse files Browse the repository at this point in the history
Cmssw 6 2 x slhc
  • Loading branch information
jshlee committed Mar 22, 2014
2 parents ae7343e + a3db2e7 commit 06059dc
Show file tree
Hide file tree
Showing 18 changed files with 68 additions and 286 deletions.
4 changes: 0 additions & 4 deletions GeneratorInterface/LHEInterface/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
<use name="CommonTools/UtilAlgos"/>
<flags EDM_PLUGIN="1"/>
</library>
<library name="GeneratorInterfacePythia8Hadronisation" file="Pythia8Hadronisation.cc">
<use name="pythia8"/>
<flags EDM_PLUGIN="1"/>
</library>
<library name="GeneratorInterfaceLHECOMWeightProducer" file="LHECOMWeightProducer.cc">
<use name="FWCore/Framework"/>
<use name="SimDataFormats/GeneratorProducts"/>
Expand Down
228 changes: 0 additions & 228 deletions GeneratorInterface/LHEInterface/plugins/Pythia8Hadronisation.cc

This file was deleted.

4 changes: 2 additions & 2 deletions GeneratorInterface/Pythia8Interface/interface/Py8GunBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include <Pythia.h>
#include <HepMCInterface.h>
#include "Pythia8/Pythia.h"
#include "Pythia8/Pythia8ToHepMC.h"

// foward declarations
namespace edm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "GeneratorInterface/Core/interface/ParameterCollector.h"

#include <Pythia.h>
#include <HepMCInterface.h>
#include "Pythia8/Pythia.h"
#include "Pythia8/Pythia8ToHepMC.h"

namespace gen {

Expand All @@ -32,9 +32,9 @@ namespace gen {

std::auto_ptr<Pythia8::Pythia> fMasterGen;
std::auto_ptr<Pythia8::Pythia> fDecayer;
HepMC::I_Pythia8 toHepMC;
HepMC::Pythia8ToHepMC toHepMC;
ParameterCollector fParameters;

unsigned int pythiaPylistVerbosity;
bool pythiaHepMCVerbosity;
unsigned int maxEventsToPrint;
Expand Down
2 changes: 1 addition & 1 deletion GeneratorInterface/Pythia8Interface/interface/RandomP8.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <Pythia.h>
#include "Pythia8/Pythia.h"
#include "CLHEP/Random/RandomEngine.h"

extern CLHEP::HepRandomEngine* randomEngine;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <Pythia.h>
#include "Pythia8/Pythia.h"

class EmissionVetoHook : public Pythia8::UserHooks {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Pythia.h"
#include "Pythia8/Pythia.h"

class EmissionVetoHook1 : public Pythia8::UserHooks {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef gen_JetMatchinhHook_h
#define gen_JetMatchingHook_h

#include <Pythia.h>
#include "Pythia8/Pythia.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bool LHAupLesHouches::setInit()
}


bool LHAupLesHouches::setEvent(int inProcId)
bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
{
if (!event) return false;

Expand Down
14 changes: 7 additions & 7 deletions GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#include <memory>
#include <assert.h>

#include <boost/shared_ptr.hpp>
#include "boost/shared_ptr.hpp"

#include <HepMC/GenEvent.h>
#include <HepMC/GenParticle.h>
#include "HepMC/GenEvent.h"
#include "HepMC/GenParticle.h"

#include <Pythia.h>
#include <LesHouches.h>
#include <HepMCInterface.h>
#include "Pythia8/Pythia.h"
#include "Pythia8/LesHouches.h"
#include "Pythia8/Pythia8ToHepMC.h"

#include "SimDataFormats/GeneratorProducts/interface/LesHouches.h"
#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h"
Expand All @@ -34,7 +34,7 @@ class LHAupLesHouches : public Pythia8::LHAup {
private:

bool setInit();
bool setEvent(int idProcIn);
bool setEvent(int idProcIn, double mRecalculate = -1.);

//boost::shared_ptr<lhef::LHERunInfo> runInfo;
lhef::LHERunInfo* runInfo;
Expand Down
11 changes: 4 additions & 7 deletions GeneratorInterface/Pythia8Interface/plugins/Py8EGun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ bool Py8EGun::generatePartonsAndHadronize()
//
double phi = (fMaxPhi-fMinPhi) * randomEngine->flat() + fMinPhi;
double ee = (fMaxE-fMinE) * randomEngine->flat() + fMinE;
double eta = (fMaxEta-fMinEta) * randomEngine->flat() + fMinEta;
double the = 2.*atan(exp(-eta));
double eta = (fMaxEta-fMinEta) * randomEngine->flat() + fMinEta;
double the = 2.*atan(exp(-eta));

double mass = (fMasterGen->particleData).mass( particleID );
// double mass = (pythia->particleData).m0( particleID );
double mass = (fMasterGen->particleData).m0( particleID );

double pp = sqrt( ee*ee - mass*mass );
double px = pp * sin(the) * cos(phi);
Expand Down Expand Up @@ -99,9 +98,7 @@ bool Py8EGun::generatePartonsAndHadronize()
if ( !fMasterGen->next() ) return false;

event().reset(new HepMC::GenEvent);
toHepMC.fill_next_event( fMasterGen->event, event().get() );

return true;
return toHepMC.fill_next_event( fMasterGen->event, event().get() );

}

Expand Down
7 changes: 2 additions & 5 deletions GeneratorInterface/Pythia8Interface/plugins/Py8JetGun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ bool Py8JetGun::generatePartonsAndHadronize()
//
ee = (fMaxE-fMinE)*randomEngine->flat() + fMinE;

double mass = (fMasterGen->particleData).mass( particleID );
// double mass = (pythia->particleData).m0( particleID );
double mass = (fMasterGen->particleData).m0( particleID );

pp = sqrt( ee*ee - mass*mass );

Expand Down Expand Up @@ -123,9 +122,7 @@ bool Py8JetGun::generatePartonsAndHadronize()
if ( !fMasterGen->next() ) return false;

event().reset(new HepMC::GenEvent);
toHepMC.fill_next_event( fMasterGen->event, event().get() );

return true;
return toHepMC.fill_next_event( fMasterGen->event, event().get() );

}

Expand Down

0 comments on commit 06059dc

Please sign in to comment.