CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ParticleReplacerClass.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Replacer
4 // Class: Replacer
5 //
13 //
14 // Original Author: Manuel Zeise
15 //
16 //
17 
18 
19 // system include files
21 
22 #include <stack>
23 #include <queue>
24 
25 #include "Math/LorentzVector.h"
26 #include "Math/VectorUtil.h"
28 
31 
32 /*
33 #include "HepMC/IO_HEPEVT.h"
34 #include "HepMC/GenParticle.h"
35 #include "HepMC/GenVertex.h"
36 #include "HepMC/PythiaWrapper.h"
37 */
38 
42 
44 
46 #include "HepPDT/ParticleDataTable.hh"
47 
49 
52 #include "TTree.h"
53 
54 #include<string>
55 
57 {
58 public:
59  explicit ParticleReplacerClass(const edm::ParameterSet&, bool);
61 
62  virtual std::auto_ptr<HepMC::GenEvent> produce(const reco::MuonCollection& muons, const reco::Vertex *pvtx=0, const HepMC::GenEvent *genEvt=0);
63  virtual void beginRun(const edm::Run& iRun,const edm::EventSetup& iSetup);
64  virtual void endJob();
65 
66 private:
67  void transformMuMu2TauTau(reco::Particle * muon1, reco::Particle * muon2);
68  void transformMuMu2TauNu(reco::Particle * muon1, reco::Particle * muon2);
69 
70  HepMC::GenEvent * processEventWithTauola(HepMC::GenEvent * evt);
71  HepMC::GenEvent * processEventWithPythia(HepMC::GenEvent * evt);
72 
73  bool testEvent(HepMC::GenEvent * evt);
74 
75  void cleanEvent(HepMC::GenEvent * evt, HepMC::GenVertex * vtx);
76  void repairBarcodes(HepMC::GenEvent * evt);
77 
80 
81  // this variable defines the type of decay to simulate
82  // 0 - mumu->mumu (i.e. no transformation)
83  // 1 - mumu->tautau (default value)
84  unsigned int transformationMode_;
85 
88  bool useTauola_ ;
90 
92 
94 
95  struct MinVisPtCut { enum { ELEC, MU, HAD, TAU } type_; unsigned int index_; double pt_; };
96  std::vector<std::vector<MinVisPtCut> > minVisPtCuts_;
97 // double minVisibleTransverseMomentum_;
98 
101 
102  TTree * outTree;
103  int attempts;
105 };
106 
107 
HepMC::GenEvent * processEventWithPythia(HepMC::GenEvent *evt)
void repairBarcodes(HepMC::GenEvent *evt)
gen::TauolaInterface * tauola_
ParticleReplacerClass(const edm::ParameterSet &, bool)
bool testEvent(HepMC::GenEvent *evt)
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
enum ParticleReplacerClass::MinVisPtCut::@519 type_
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
void cleanEvent(HepMC::GenEvent *evt, HepMC::GenVertex *vtx)
void transformMuMu2TauNu(reco::Particle *muon1, reco::Particle *muon2)
transform a muon pair into tau nu (as coming from a W boson)
tuple muons
Definition: patZpeak.py:38
void transformMuMu2TauTau(reco::Particle *muon1, reco::Particle *muon2)
transform a muon pair into a tau pair
virtual std::auto_ptr< HepMC::GenEvent > produce(const reco::MuonCollection &muons, const reco::Vertex *pvtx=0, const HepMC::GenEvent *genEvt=0)
HepMC::GenEvent * processEventWithTauola(HepMC::GenEvent *evt)
std::vector< std::vector< MinVisPtCut > > minVisPtCuts_
Definition: Run.h:36