CMS 3D CMS Logo

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::one::SharedResources>{
50 public:
51  explicit TauSpinnerCMS( const edm::ParameterSet& ) ;
52  virtual ~TauSpinnerCMS(){}; // no need to delete ROOT stuff
53 
54  virtual void produce( edm::Event&, const edm::EventSetup&) override final;
55  virtual void beginJob() override final;
56  virtual void endJob() override final;
57  static double flat();
58  void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
59  virtual void initialize();
60 
61 private:
62  bool isReco_;
66  double CMSEnergy_;
69  static bool isTauSpinnerConfigure;
70 
71  // Additional funtionms for Reco (not provided by Tauola/TauSpinner authors)
73  TauSpinner::SimpleParticle &X,
74  TauSpinner::SimpleParticle &tau,
75  TauSpinner::SimpleParticle &tau2,
76  std::vector<TauSpinner::SimpleParticle> &tau_daughters,
77  std::vector<TauSpinner::SimpleParticle> &tau2_daughters);
80  std::vector<TauSpinner::SimpleParticle> &daughters,
81  int parentpdgid);
82  bool isFirst(const reco::GenParticle *Particle);
83  double roundOff_;
84 
85  static CLHEP::HepRandomEngine* fRandomEngine;
88  static bool fInitialized;
89 };
90 #endif
void GetLastSelf(const reco::GenParticle *Particle)
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
Definition: TauSpinnerCMS.h:86
virtual void beginJob() override final
virtual void initialize()
static double flat()
bool isFirst(const reco::GenParticle *Particle)
#define X(str)
Definition: MuonsGrabber.cc:48
double roundOff_
Definition: TauSpinnerCMS.h:83
static CLHEP::HepRandomEngine * fRandomEngine
Definition: TauSpinnerCMS.h:85
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: TauSpinnerCMS.h:58
edm::EDGetTokenT< reco::GenParticleCollection > GenParticleCollectionToken_
Definition: TauSpinnerCMS.h:87
void GetRecoDaughters(const reco::GenParticle *Particle, std::vector< TauSpinner::SimpleParticle > &daughters, int parentpdgid)
static bool isTauSpinnerConfigure
Definition: TauSpinnerCMS.h:69
virtual void produce(edm::Event &, const edm::EventSetup &) override final
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)
virtual void endJob() override final
bool isTauolaConfigured_
Definition: TauSpinnerCMS.h:63
std::string LHAPDFname_
Definition: TauSpinnerCMS.h:65
static bool fInitialized
Definition: TauSpinnerCMS.h:88
edm::InputTag gensrc_
Definition: TauSpinnerCMS.h:67
TauSpinnerCMS(const edm::ParameterSet &)
double CMSEnergy_
Definition: TauSpinnerCMS.h:66
virtual ~TauSpinnerCMS()
Definition: TauSpinnerCMS.h:52
bool isLHPDFConfigured_
Definition: TauSpinnerCMS.h:64