CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TauSpinnerCMS.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TauSpinnerInterface
4 // Class: TauSpinnerCMS
5 //
9 //
10 // Original Author: Ian Nugent
11 // Created: Fri Feb 15 2013
12 
13 #ifndef TauSpinnerCMS_h
14 #define TauSpinnerCMS_h
15 
16 
17 #include <iostream>
18 
20 
21 // essentials !!!
25 
28 #include "TH1.h"
29 
31 //#include "FWCore/Framework/interface/one/EDFilter.h"
42 
45 #include "TauSpinner/SimpleParticle.h"
46 
48 
49 class TauSpinnerCMS : public edm::one::EDProducer<edm::EndRunProducer,edm::one::SharedResources>{
50 public:
51  explicit TauSpinnerCMS( const edm::ParameterSet& ) ;
52  virtual ~TauSpinnerCMS(){}; // no need to delete ROOT stuff
53 
54  virtual void beginRun(edm::Run const&, edm::EventSetup const&){}
56  virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) {};
57  virtual void endRunProduce(edm::Run&, edm::EventSetup const&){};
58  virtual void produce( edm::Event&, const edm::EventSetup&) override final;
59  virtual void beginJob() override final;
60  virtual void endRun( const edm::Run&, const edm::EventSetup& ){};
61  virtual void endJob() override final;
62  virtual void endLuminosityBlockProduce(edm::LuminosityBlock& lumiSeg, const edm::EventSetup& iSetup){};
63  static double flat();
64  void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
65  virtual void initialize();
66 
67 private:
68  bool isReco_;
72  double CMSEnergy_;
75  static bool isTauSpinnerConfigure;
76 
77  // Additional funtionms for Reco (not provided by Tauola/TauSpinner authors)
79  TauSpinner::SimpleParticle &X,
80  TauSpinner::SimpleParticle &tau,
81  TauSpinner::SimpleParticle &tau2,
82  std::vector<TauSpinner::SimpleParticle> &tau_daughters,
83  std::vector<TauSpinner::SimpleParticle> &tau2_daughters);
84  void GetLastSelf(const reco::GenParticle *Particle);
85  void GetRecoDaughters(const reco::GenParticle *Particle,
86  std::vector<TauSpinner::SimpleParticle> &daughters,
87  int parentpdgid);
88  bool isFirst(const reco::GenParticle *Particle);
89  double roundOff_;
90 
91  static CLHEP::HepRandomEngine* fRandomEngine;
94  static bool fInitialized;
95 };
96 #endif
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: TauSpinnerCMS.h:56
void GetLastSelf(const reco::GenParticle *Particle)
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
Definition: TauSpinnerCMS.h:92
virtual void initialize()
static double flat()
bool isFirst(const reco::GenParticle *Particle)
#define X(str)
Definition: MuonsGrabber.cc:48
virtual void produce(edm::Event &, const edm::EventSetup &) overridefinal
double roundOff_
Definition: TauSpinnerCMS.h:89
static CLHEP::HepRandomEngine * fRandomEngine
Definition: TauSpinnerCMS.h:91
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: TauSpinnerCMS.h:64
edm::EDGetTokenT< reco::GenParticleCollection > GenParticleCollectionToken_
Definition: TauSpinnerCMS.h:93
virtual void endRunProduce(edm::Run &, edm::EventSetup const &)
Definition: TauSpinnerCMS.h:57
void GetRecoDaughters(const reco::GenParticle *Particle, std::vector< TauSpinner::SimpleParticle > &daughters, int parentpdgid)
static bool isTauSpinnerConfigure
Definition: TauSpinnerCMS.h:75
virtual void beginJob() overridefinal
virtual void endRun(const edm::Run &, const edm::EventSetup &)
Definition: TauSpinnerCMS.h:60
int readParticlesfromReco(edm::Event &e, TauSpinner::SimpleParticle &X, TauSpinner::SimpleParticle &tau, TauSpinner::SimpleParticle &tau2, std::vector< TauSpinner::SimpleParticle > &tau_daughters, std::vector< TauSpinner::SimpleParticle > &tau2_daughters)
bool isTauolaConfigured_
Definition: TauSpinnerCMS.h:69
std::string LHAPDFname_
Definition: TauSpinnerCMS.h:71
static bool fInitialized
Definition: TauSpinnerCMS.h:94
string const
Definition: compareJSON.py:14
edm::InputTag gensrc_
Definition: TauSpinnerCMS.h:73
TauSpinnerCMS(const edm::ParameterSet &)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
Definition: TauSpinnerCMS.h:54
virtual void endJob() overridefinal
double CMSEnergy_
Definition: TauSpinnerCMS.h:72
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: TauSpinnerCMS.h:55
virtual ~TauSpinnerCMS()
Definition: TauSpinnerCMS.h:52
bool isLHPDFConfigured_
Definition: TauSpinnerCMS.h:70
virtual void endLuminosityBlockProduce(edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup)
Definition: TauSpinnerCMS.h:62
Definition: Run.h:41