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  private:
82 
83  friend void gen::ranmar_( float *rvec, int *lenv );
84  friend double gen::TauolappInterface_RandGetter();
85  // ctor
87 
88  // member function(s)
89  float flat();
90  void decodeMDTAU( int );
91  void selectDecayByMDTAU();
92  int selectLeptonic();
93  int selectHadronic();
94 
95 
96  //
97  CLHEP::HepRandomEngine* fRandomEngine;
98  std::vector<int> fPDGs;
103 
104  int fMDTAU;
106  std::vector<int> fLeptonModes;
107  std::vector<int> fHadronModes;
108  std::vector<double> fScaledLeptonBrRatios;
109  std::vector<double> fScaledHadronBrRatios;
110 
112 
113  };
114 
115 
116 /* */
117 
118 }
119 
120 #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
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