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);
58  HepMC::GenEvent* theEvent,
60  TVector3& boost);
64  std::vector<HepMC::GenParticle>& p,
65  std::vector<double>& spinup,
66  std::vector<int>& m_idx);
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
gen::TauolappInterface::FirstTauInChain
HepMC::GenParticle * FirstTauInChain(HepMC::GenParticle *tau)
Definition: TauolappInterface.cc:777
ESHandle.h
metsig::tau
Definition: SignAlgoResolutions.h:49
gen::TauolappInterface::lifetime
double lifetime
Definition: TauolappInterface.h:90
mps_update.status
status
Definition: mps_update.py:69
gen::TauolappInterface::dolheBosonCorr
bool dolheBosonCorr
Definition: TauolappInterface.h:88
gen::TauolappInterface::fScaledLeptonBrRatios
std::vector< double > fScaledLeptonBrRatios
Definition: TauolappInterface.h:82
gen::TauolappInterface::dolhe
bool dolhe
Definition: TauolappInterface.h:87
boost
Definition: CLHEP.h:16
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
gen::TauolappInterface::disablePolarization
void disablePolarization() override
Definition: TauolappInterface.h:37
gen::TauolappInterface::selectDecayByMDTAU
void selectDecayByMDTAU()
Definition: TauolappInterface.cc:552
gen::TauolappInterface::fHadronModes
std::vector< int > fHadronModes
Definition: TauolappInterface.h:81
gen::TauolappInterface::make_simple_tau_event
HepMC::GenEvent * make_simple_tau_event(const TLorentzVector &l, int pdgid, int status)
Definition: TauolappInterface.cc:698
gen::TauolappInterface::flat
static double flat()
Definition: TauolappInterface.cc:215
gen::rmarin_
void rmarin_(int *, int *, int *)
Definition: TauolappInterface.cc:47
gen::TauolappInterface::dmMatch
double dmMatch
Definition: TauolappInterface.h:86
gen::p
double p[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:76
gen::TauolappInterface::BoostProdToLabLifeTimeInDecays
void BoostProdToLabLifeTimeInDecays(HepMC::GenParticle *p, TLorentzVector &lab, TLorentzVector &prod)
Definition: TauolappInterface.cc:804
gen::TauolappInterface::fIsInitialized
bool fIsInitialized
Definition: TauolappInterface.h:76
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::ESHandle< HepPDT::ParticleDataTable >
gen::TauolappInterface::operatesOnParticles
const std::vector< int > & operatesOnParticles() override
Definition: TauolappInterface.h:42
gen
Definition: PythiaDecays.h:13
gen::TauolappInterface::fScaledHadronBrRatios
std::vector< double > fScaledHadronBrRatios
Definition: TauolappInterface.h:83
CLHEP
Definition: CocoaGlobals.h:27
gen::TauolappInterface::lhe
lhef::LHEEvent * lhe
Definition: TauolappInterface.h:84
gen::TauolappInterface::fPolarization
bool fPolarization
Definition: TauolappInterface.h:73
TauolaInterfaceBase.h
edm::ParameterSet
Definition: ParameterSet.h:47
gen::TauolappInterface::SetLHE
void SetLHE(lhef::LHEEvent *l) override
Definition: TauolappInterface.h:45
lhef::LHEEvent
Definition: LHEEvent.h:23
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:76
gen::ranmar_
void ranmar_(float *rvec, int *lenv)
Definition: TauolappInterface.cc:41
gen::TauolappInterface::fPDGs
std::vector< int > fPDGs
Definition: TauolappInterface.h:72
gen::TauolappInterface::selectHadronic
int selectHadronic()
Definition: TauolappInterface.cc:677
gen::TauolappInterface::isLastTauInChain
bool isLastTauInChain(const HepMC::GenParticle *tau)
Definition: TauolappInterface.cc:740
gen::TauolappInterface::enablePolarization
void enablePolarization() override
Definition: TauolappInterface.h:33
edm::EventSetup
Definition: EventSetup.h:57
gen::TauolappInterface::GetMother
HepMC::GenParticle * GetMother(HepMC::GenParticle *tau)
Definition: TauolappInterface.cc:790
gen::TauolappInterface::fPSet
edm::ParameterSet * fPSet
Definition: TauolappInterface.h:75
gen::TauolappInterface::init
void init(const edm::EventSetup &) override
Definition: TauolappInterface.cc:72
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
gen::TauolappInterface::~TauolappInterface
~TauolappInterface() override
Definition: TauolappInterface.cc:67
gen::TauolappInterface::MatchedLHESpinUp
double MatchedLHESpinUp(HepMC::GenParticle *tau, std::vector< HepMC::GenParticle > &p, std::vector< double > &spinup, std::vector< int > &m_idx)
Definition: TauolappInterface.cc:754
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::TauolappInterface::selectLeptonic
int selectLeptonic()
Definition: TauolappInterface.cc:665
gen::TauolappInterface::decodeMDTAU
void decodeMDTAU(int)
Definition: TauolappInterface.cc:397
gen::TauolappInterface::fSelectDecayByEvent
bool fSelectDecayByEvent
Definition: TauolappInterface.h:79
gen::TauolappInterface::fRandomEngine
static CLHEP::HepRandomEngine * fRandomEngine
Definition: TauolappInterface.h:71
gen::TauolappInterface::fPDGTable
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
Definition: TauolappInterface.h:74
HepMC
Definition: GenParticle.h:15
gen::TauolappInterface::fMDTAU
int fMDTAU
Definition: TauolappInterface.h:78
EventSetup.h
gen::TauolappInterface::decay
HepMC::GenEvent * decay(HepMC::GenEvent *) override
Definition: TauolappInterface.cc:225
gen::TauolaInterfaceBase
Definition: TauolaInterfaceBase.h:19
gen::TauolappInterface::update_particles
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p, TVector3 &boost)
Definition: TauolappInterface.cc:711
ParameterSet.h
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
gen::TauolappInterface::TauolappInterface
TauolappInterface(const edm::ParameterSet &)
Definition: TauolappInterface.cc:50
gen::TauolappInterface::statistics
void statistics() override
Definition: TauolappInterface.cc:395
gen::TauolappInterface
Definition: TauolappInterface.h:27
gen::TauolappInterface::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: TauolappInterface.h:46
gen::TauolappInterface::fLeptonModes
std::vector< int > fLeptonModes
Definition: TauolappInterface.h:80
gen::TauolappInterface::ntries
int ntries
Definition: TauolappInterface.h:89