Skip to content

Commit

Permalink
Merge pull request #5128 from inugent/TauolaLifetimePatch_7_2_X_v2
Browse files Browse the repository at this point in the history
Tauola lifetime patch 7 2 x v2
  • Loading branch information
ktf committed Sep 2, 2014
2 parents dda95d0 + aadd2f1 commit 3b203e9
Show file tree
Hide file tree
Showing 2 changed files with 344 additions and 489 deletions.
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

0 comments on commit 3b203e9

Please sign in to comment.