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 
11 #include "TLorentzVector.h"
12 #include "TVector.h"
13 
14 namespace HepMC {
15  class GenEvent;
16 }
17 
18 namespace CLHEP {
19  class HepRandomEngine;
20 }
21 
22 namespace gen {
23  extern "C" {
24  void ranmar_(float* rvec, int* lenv);
25  void rmarin_(int*, int*, int*);
26  }
27 
29  public:
30  // ctor & dtor
32  ~TauolappInterface() override;
33 
34  void enablePolarization() override {
35  fPolarization = true;
36  return;
37  }
38  void disablePolarization() override {
39  fPolarization = false;
40  return;
41  }
42  void init(const edm::EventSetup&) override;
43  const std::vector<int>& operatesOnParticles() override { return fPDGs; }
45  void statistics() override;
46  void SetLHE(lhef::LHEEvent* l) override { lhe = l; }
47  void setRandomEngine(CLHEP::HepRandomEngine* v) override { fRandomEngine = v; }
48  static double flat();
49 
50  private:
51  // member function(s)
52  void decodeMDTAU(int);
53  void selectDecayByMDTAU();
54  int selectLeptonic();
55  int selectHadronic();
56 
57  HepMC::GenEvent* make_simple_tau_event(const TLorentzVector& l, int pdgid, int status);
59  HepMC::GenEvent* theEvent,
61  TVector3& boost);
65  std::vector<HepMC::GenParticle>& p,
66  std::vector<double>& spinup,
67  std::vector<int>& m_idx);
69  void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle* p, TLorentzVector& lab, TLorentzVector& prod);
70 
71  //
72  static CLHEP::HepRandomEngine* fRandomEngine;
73  std::vector<int> fPDGs;
79 
80  int fMDTAU;
82  std::vector<int> fLeptonModes;
83  std::vector<int> fHadronModes;
84  std::vector<double> fScaledLeptonBrRatios;
85  std::vector<double> fScaledHadronBrRatios;
87 
88  double dmMatch;
89  bool dolhe;
91  int ntries;
92  double lifetime;
93  };
94 
95 } // namespace gen
96 
97 #endif
edm::ParameterSet * fPSet
void disablePolarization() override
void setRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: CLHEP.h:16
HepMC::GenEvent * decay(HepMC::GenEvent *) override
std::vector< double > fScaledHadronBrRatios
HepMC::GenEvent * make_simple_tau_event(const TLorentzVector &l, int pdgid, int status)
TauolappInterface(const edm::ParameterSet &, edm::ConsumesCollector)
const std::vector< int > & operatesOnParticles() override
double v[5][pyjets_maxn]
void init(const edm::EventSetup &) override
double p[5][pyjets_maxn]
std::vector< int > fPDGs
void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle *p, TLorentzVector &lab, TLorentzVector &prod)
std::vector< int > fLeptonModes
void SetLHE(lhef::LHEEvent *l) override
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > fPDGTableToken
void rmarin_(int *, int *, int *)
void enablePolarization() override
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p, TVector3 &boost)
HepMC::GenParticle * FirstTauInChain(HepMC::GenParticle *tau)
bool isLastTauInChain(const HepMC::GenParticle *tau)
std::vector< double > fScaledLeptonBrRatios
static CLHEP::HepRandomEngine * fRandomEngine
std::vector< int > fHadronModes
void ranmar_(float *rvec, int *lenv)
HepMC::GenParticle * GetMother(HepMC::GenParticle *tau)
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
double MatchedLHESpinUp(HepMC::GenParticle *tau, std::vector< HepMC::GenParticle > &p, std::vector< double > &spinup, std::vector< int > &m_idx)