CMS 3D CMS Logo

TauolappInterface.h
Go to the documentation of this file.
1 #ifndef gen_TauolaInterface_TauolappInterface_h
2 #define gen_TauolaInterface_TauolappInterface_h
3 
4 #include "HepPDT/ParticleDataTable.hh"
5 
10 #include "TLorentzVector.h"
11 #include "TVector.h"
12 
13 
14 namespace HepMC
15 {
16 class GenEvent;
17 }
18 
19 namespace CLHEP
20 {
21 class HepRandomEngine;
22 }
23 
24 namespace gen {
25  extern "C" {
26  void ranmar_( float *rvec, int *lenv );
27  void rmarin_( int*, int*, int* );
28  }
29 
31  public:
32 
33  // ctor & dtor
35  ~TauolappInterface() override;
36 
37  void enablePolarization() override { fPolarization = true; return; }
38  void disablePolarization() override { fPolarization = false; return; }
39  void init( const edm::EventSetup& ) override;
40  const std::vector<int>& operatesOnParticles() override { return fPDGs; }
41  HepMC::GenEvent* decay( HepMC::GenEvent* ) override;
42  void statistics() override ;
43  void SetLHE(lhef::LHEEvent *l) override{lhe=l;}
44  void setRandomEngine(CLHEP::HepRandomEngine* v) override { fRandomEngine = v; }
45  static double flat();
46 
47  private:
48  // member function(s)
49  void decodeMDTAU( int );
50  void selectDecayByMDTAU();
51  int selectLeptonic();
52  int selectHadronic();
53 
54  HepMC::GenEvent* make_simple_tau_event(const TLorentzVector &l,int pdgid,int status);
55  void update_particles(HepMC::GenParticle* partHep,HepMC::GenEvent* theEvent,HepMC::GenParticle* p,TVector3 &boost);
56  bool isLastTauInChain(const HepMC::GenParticle* tau);
57  HepMC::GenParticle* GetMother(HepMC::GenParticle* tau);
58  double MatchedLHESpinUp(HepMC::GenParticle* tau, std::vector<HepMC::GenParticle> &p, std::vector<double> &spinup,std::vector<int> &m_idx);
59  HepMC::GenParticle* FirstTauInChain(HepMC::GenParticle* tau);
60  void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle* p,TLorentzVector &lab, TLorentzVector &prod);
61 
62  //
63  static CLHEP::HepRandomEngine* fRandomEngine;
64  std::vector<int> fPDGs;
69 
70  int fMDTAU;
72  std::vector<int> fLeptonModes;
73  std::vector<int> fHadronModes;
74  std::vector<double> fScaledLeptonBrRatios;
75  std::vector<double> fScaledHadronBrRatios;
77 
78  double dmMatch;
79  bool dolhe;
81  int ntries;
82  double lifetime;
83  };
84 
85 }
86 
87 #endif
edm::ParameterSet * fPSet
void disablePolarization() override
void setRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: CLHEP.h:16
int init
Definition: HydjetWrapper.h:67
std::vector< double > fScaledHadronBrRatios
const std::vector< int > & operatesOnParticles() override
std::vector< int > fPDGs
std::vector< int > fLeptonModes
void SetLHE(lhef::LHEEvent *l) override
void ranmar_(float *, int *)
void rmarin_(int *, int *, int *)
void enablePolarization() override
std::vector< double > fScaledLeptonBrRatios
static CLHEP::HepRandomEngine * fRandomEngine
std::vector< int > fHadronModes
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable