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