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 
48 #include "HepPDT/ParticleDataTable.hh"
49 
51 
54 #include "TTree.h"
55 
56 #include<string>
57 
59 {
60 public:
61  explicit ParticleReplacerClass(const edm::ParameterSet&, bool);
63 
64  virtual std::auto_ptr<HepMC::GenEvent> produce(const reco::MuonCollection& muons, const reco::Vertex *pvtx=0, const HepMC::GenEvent *genEvt=0);
65  virtual void beginRun(const edm::Run& iRun,const edm::EventSetup& iSetup);
66  virtual void endJob();
67 
68 private:
69  void transformMuMu2TauTau(reco::Particle * muon1, reco::Particle * muon2);
70  void transformMuMu2TauNu(reco::Particle * muon1, reco::Particle * muon2);
71 
72  HepMC::GenEvent * processEventWithTauola(HepMC::GenEvent * evt);
73  HepMC::GenEvent * processEventWithPythia(HepMC::GenEvent * evt);
74 
75  bool testEvent(HepMC::GenEvent * evt);
76 
77  void cleanEvent(HepMC::GenEvent * evt, HepMC::GenVertex * vtx);
78  void repairBarcodes(HepMC::GenEvent * evt);
79 
82 
83  // this variable defines the type of decay to simulate
84  // 0 - mumu->mumu (i.e. no transformation)
85  // 1 - mumu->tautau (default value)
86  unsigned int transformationMode_;
87 
90  bool useTauola_ ;
92 
94 
96 
97  struct MinVisPtCut { enum { ELEC, MU, HAD, TAU } type_; unsigned int index_; double pt_; };
98  std::vector<std::vector<MinVisPtCut> > minVisPtCuts_;
99 // double minVisibleTransverseMomentum_;
100 
103 
104  TTree * outTree;
105  int attempts;
107 };
108 
109 
HepMC::GenEvent * processEventWithPythia(HepMC::GenEvent *evt)
void repairBarcodes(HepMC::GenEvent *evt)
ParticleReplacerClass(const edm::ParameterSet &, bool)
bool testEvent(HepMC::GenEvent *evt)
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
gen::TauolaInterfaceBase * tauola_
enum ParticleReplacerClass::MinVisPtCut::@520 type_
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