Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tauola lifetime patch 7 2 x v2 #5128

Merged
merged 3 commits into from Sep 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 36 additions & 51 deletions GeneratorInterface/TauolaInterface/interface/TauolappInterface.h
@@ -1,70 +1,55 @@
#ifndef gen_TauolaInterface_TauolappInterface_h
#define gen_TauolaInterface_TauolappInterface_h

#include "HepPDT/ParticleDataTable.hh"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "GeneratorInterface/TauolaInterface/interface/TauolaInterfaceBase.h"

namespace HepMC
namespace HepMC
{
class GenEvent;
class GenEvent;
}

namespace CLHEP
{
class HepRandomEngine;
class HepRandomEngine;
}

namespace gen {
extern "C" {
void ranmar_( float *rvec, int *lenv );
void rmarin_( int*, int*, int* );
}

class TauolappInterface : public TauolaInterfaceBase {
public:

// ctor & dtor
TauolappInterface( const edm::ParameterSet& );
~TauolappInterface();

void enablePolarization() { fPolarization = true; return; }
void disablePolarization() { fPolarization = false; return; }
void init( const edm::EventSetup& );
const std::vector<int>& operatesOnParticles() { return fPDGs; }
HepMC::GenEvent* decay( HepMC::GenEvent* );
void statistics() ;

void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
static double flat();

private:
// member function(s)
void decodeMDTAU( int );
void selectDecayByMDTAU();
int selectLeptonic();
int selectHadronic();

//
static CLHEP::HepRandomEngine* fRandomEngine;
std::vector<int> fPDGs;
bool fPolarization;
edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
edm::ParameterSet* fPSet;
bool fIsInitialized;

int fMDTAU;
bool fSelectDecayByEvent;
std::vector<int> fLeptonModes;
std::vector<int> fHadronModes;
std::vector<double> fScaledLeptonBrRatios;
std::vector<double> fScaledHadronBrRatios;

};

class TauolappInterface : public TauolaInterfaceBase {
public:
// ctor & dtor
TauolappInterface( const edm::ParameterSet& );
~TauolappInterface();
void enablePolarization() { fPolarization = true; return; }
void disablePolarization() { fPolarization = false; return; }
void init( const edm::EventSetup& );
const std::vector<int>& operatesOnParticles() { return fPDGs; }
HepMC::GenEvent* decay( HepMC::GenEvent* );
void statistics() ;
void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
static double flat();
private:
// member function(s)
void decodeMDTAU( int );
void selectDecayByMDTAU();
int selectLeptonic();
int selectHadronic();
//
static CLHEP::HepRandomEngine* fRandomEngine;
std::vector<int> fPDGs;
bool fPolarization;
edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
edm::ParameterSet* fPSet;
bool fIsInitialized;
int fMDTAU;
bool fSelectDecayByEvent;
std::vector<int> fLeptonModes;
std::vector<int> fHadronModes;
std::vector<double> fScaledLeptonBrRatios;
std::vector<double> fScaledHadronBrRatios;
};
}

#endif