forked from cms-sw/cmssw
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#5287 from inugent/SpinUPforTauola_7_2_X_V2
GeneratorInterface -- Spin u pfor tauola 7 2 x v2 Resolved Conflicts: GeneratorInterface/Core/interface/HadronizerFilter.h GeneratorInterface/ExternalDecays/src/ExternalDecayDriver.cc
- Loading branch information
Showing
15 changed files
with
1,328 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 68 additions & 36 deletions
104
GeneratorInterface/TauolaInterface/interface/TauolappInterface.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,87 @@ | ||
#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 | ||
#include "TLorentzVector.h" | ||
#include "TVector.h" | ||
|
||
|
||
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() ; | ||
virtual void SetLHE(lhef::LHEEvent *l){lhe=l;} | ||
void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; } | ||
static double flat(); | ||
|
||
private: | ||
// member function(s) | ||
void decodeMDTAU( int ); | ||
void selectDecayByMDTAU(); | ||
int selectLeptonic(); | ||
int selectHadronic(); | ||
|
||
HepMC::GenEvent* make_simple_tau_event(const TLorentzVector &l,int pdgid,int status); | ||
void update_particles(HepMC::GenParticle* partHep,HepMC::GenEvent* theEvent,HepMC::GenParticle* p,TVector3 &boost); | ||
bool isLastTauInChain(const HepMC::GenParticle* tau); | ||
HepMC::GenParticle* GetMother(HepMC::GenParticle* tau); | ||
double MatchedLHESpinUp(HepMC::GenParticle* tau, std::vector<HepMC::GenParticle> &p, std::vector<double> &spinup,std::vector<int> &m_idx); | ||
HepMC::GenParticle* FirstTauInChain(HepMC::GenParticle* tau); | ||
void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle* p,TLorentzVector &lab, TLorentzVector &prod); | ||
|
||
// | ||
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; | ||
lhef::LHEEvent *lhe; | ||
|
||
double dmMatch; | ||
bool dolhe; | ||
bool dolheBosonCorr; | ||
int ntries; | ||
double lifetime; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.