CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TauolaInterface.h
Go to the documentation of this file.
1 #ifndef gen_ExternalDecays_TauolaInterface_h
2 #define gen_ExternalDecays_TauolaInterface_h
3 
4 // #include "HepPDT/defs.h"
5 // #include "HepPDT/TableBuilder.hh"
6 #include "HepPDT/ParticleDataTable.hh"
7 
11 
12 namespace HepMC
13 {
14 class GenEvent;
15 }
16 
17 namespace CLHEP
18 {
19 class HepRandomEngine;
20 }
21 
22 namespace gen {
23 
24 /* for old tauola27
25  class TauolaInterface
26  {
27  public:
28 
29  // ctor & dtor
30  TauolaInterface( const edm::ParameterSet& );
31  ~TauolaInterface();
32 
33  void enablePolarization() { fPolarization = 1; return; }
34  void disablePolarization() { fPolarization = 0; return; }
35  void init( const edm::EventSetup& );
36  const std::vector<int>& operatesOnParticles() { return fPDGs; }
37  HepMC::GenEvent* decay( HepMC::GenEvent* );
38  void statistics() ;
39 
40  private:
41 
42  //
43  std::vector<int> fPDGs;
44  int fPolarization;
45 
46  edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
47  Pythia6Service* fPy6Service;
48  bool fIsInitialized;
49  //CLHEP::HepRandomEngine* fRandomEngine;
50  //CLHEP::RandFlat* fRandomGenerator;
51 
52  };
53 */
54 
55 /* this is the code for new Tauola++ */
56 
57  extern "C" {
58  void ranmar_( float *rvec, int *lenv );
59  void rmarin_( int*, int*, int* );
60  }
61 
63 
65  {
66  public:
67 
68  // ctor & dtor
69  // TauolaInterface( const edm::ParameterSet& );
70  static TauolaInterface* getInstance() ;
72 
73  void setPSet( const edm::ParameterSet& );
74  void enablePolarization() { fPolarization = true; return; }
75  void disablePolarization() { fPolarization = false; return; }
76  void init( const edm::EventSetup& );
77  const std::vector<int>& operatesOnParticles() { return fPDGs; }
78  HepMC::GenEvent* decay( HepMC::GenEvent* );
79  void statistics() ;
80 
81  void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
82 
83  private:
84 
85  friend void gen::ranmar_( float *rvec, int *lenv );
86  friend double gen::TauolappInterface_RandGetter();
87  // ctor
89 
90  // member function(s)
91  float flat();
92  void decodeMDTAU( int );
93  void selectDecayByMDTAU();
94  int selectLeptonic();
95  int selectHadronic();
96 
97 
98  //
99  CLHEP::HepRandomEngine* fRandomEngine;
100  std::vector<int> fPDGs;
105 
106  int fMDTAU;
108  std::vector<int> fLeptonModes;
109  std::vector<int> fHadronModes;
110  std::vector<double> fScaledLeptonBrRatios;
111  std::vector<double> fScaledHadronBrRatios;
112 
114 
115  };
116 
117 
118 /* */
119 
120 }
121 
122 #endif
HepMC::GenEvent * decay(HepMC::GenEvent *)
void setPSet(const edm::ParameterSet &)
const std::vector< int > & operatesOnParticles()
void rmarin_(int *, int *, int *)
std::vector< double > fScaledLeptonBrRatios
double v[5][pyjets_maxn]
std::vector< int > fLeptonModes
static TauolaInterface * fInstance
double TauolappInterface_RandGetter()
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
void ranmar_(float *rvec, int *lenv)
CLHEP::HepRandomEngine * fRandomEngine
edm::ParameterSet * fPSet
std::vector< int > fPDGs
static TauolaInterface * getInstance()
std::vector< double > fScaledHadronBrRatios
void init(const edm::EventSetup &)
std::vector< int > fHadronModes
void setRandomEngine(CLHEP::HepRandomEngine *v)