CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerParticleGun.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef TauAnalysis_MCEmbeddingTools_ParticleReplacerParticleGun_h
00003 #define TauAnalysis_MCEmbeddingTools_ParticleReplacerParticleGun_h
00004 
00005 //
00006 // Package:    MCEmbeddingtools
00007 // Class:      ParticleReplacerBase
00008 //
00016 //
00017 // Original Author:  Sami Lehti
00018 //
00019 //
00020 
00021 #include "TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerBase.h"
00022 
00023 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h"
00024 #include "GeneratorInterface/ExternalDecays/interface/TauolaInterface.h"
00025 
00026 #include<string>
00027 #include<vector>
00028 
00029 class ParticleReplacerParticleGun: public ParticleReplacerBase {
00030 public:
00031   explicit ParticleReplacerParticleGun(const edm::ParameterSet&, bool);
00032   virtual ~ParticleReplacerParticleGun();
00033 
00034   virtual void beginJob();
00035   virtual void endJob();
00036 
00037   std::auto_ptr<HepMC::GenEvent> produce(const reco::MuonCollection& muons, const reco::Vertex *pvtx=0, const HepMC::GenEvent *genEvt=0);
00038 
00039 protected:
00040 
00041 private:
00042   void correctTauMass(const reco::MuonCollection& muons, std::vector<HepMC::FourVector>& corrected);
00043   void forceTauolaTauDecays();
00044   void tauola_forParticleGun(int tau_idx, int pdg_id, const HepMC::FourVector& particle_momentum);
00045   float tauHelicity(int pdg_id);
00046   float randomPolarization();
00047 
00048   gen::TauolaInterface* tauola_;
00049   gen::Pythia6Service pythia_;
00050 
00051   std::string particleOrigin_;
00052   std::string forceTauPolarization_;
00053   std::string forceTauDecay_;
00054   std::string generatorMode_;
00055   int gunParticle_;
00056   int forceTauPlusHelicity_;
00057   int forceTauMinusHelicity_;
00058 
00059   float pol1_[4];
00060   float pol2_[4];
00061 
00062   bool printout_;
00063 
00064 };
00065 
00066 #endif