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 namespace HepMC {
14  class GenEvent;
15 }
16 
17 namespace CLHEP {
18  class HepRandomEngine;
19 }
20 
21 namespace gen {
22  extern "C" {
23  void ranmar_(float* rvec, int* lenv);
24  void rmarin_(int*, int*, int*);
25  }
26 
28  public:
29  // ctor & dtor
31  ~TauolappInterface() override;
32 
33  void enablePolarization() override {
34  fPolarization = true;
35  return;
36  }
37  void disablePolarization() override {
38  fPolarization = false;
39  return;
40  }
41  void init(const edm::EventSetup&) override;
42  const std::vector<int>& operatesOnParticles() override { return fPDGs; }
44  void statistics() override;
45  void SetLHE(lhef::LHEEvent* l) override { lhe = l; }
46  void setRandomEngine(CLHEP::HepRandomEngine* v) override { fRandomEngine = v; }
47  static double flat();
48 
49  private:
50  // member function(s)
51  void decodeMDTAU(int);
52  void selectDecayByMDTAU();
53  int selectLeptonic();
54  int selectHadronic();
55 
56  HepMC::GenEvent* make_simple_tau_event(const TLorentzVector& l, int pdgid, int status);
57  void update_particles(HepMC::GenParticle* partHep,
58  HepMC::GenEvent* theEvent,
60  TVector3& boost);
61  bool isLastTauInChain(const HepMC::GenParticle* tau);
62  HepMC::GenParticle* GetMother(HepMC::GenParticle* tau);
63  double MatchedLHESpinUp(HepMC::GenParticle* tau,
64  std::vector<HepMC::GenParticle>& p,
65  std::vector<double>& spinup,
66  std::vector<int>& m_idx);
67  HepMC::GenParticle* FirstTauInChain(HepMC::GenParticle* tau);
68  void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle* p, TLorentzVector& lab, TLorentzVector& prod);
69 
70  //
71  static CLHEP::HepRandomEngine* fRandomEngine;
72  std::vector<int> fPDGs;
77 
78  int fMDTAU;
80  std::vector<int> fLeptonModes;
81  std::vector<int> fHadronModes;
82  std::vector<double> fScaledLeptonBrRatios;
83  std::vector<double> fScaledHadronBrRatios;
85 
86  double dmMatch;
87  bool dolhe;
89  int ntries;
90  double lifetime;
91  };
92 
93 } // namespace gen
94 
95 #endif
edm::ParameterSet * fPSet
void disablePolarization() override
void setRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: CLHEP.h:16
int init
Definition: HydjetWrapper.h:64
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