test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetMatchingMGFastJet.h
Go to the documentation of this file.
1 #ifndef gen_JetMatchingMGFastJet_h
2 #define gen_JetMatchingMGFastJet_h
3 
4 //
5 // Julia V. Yarba, Feb.10, 2013
6 //
7 // This code takes inspirations in the original implemetation
8 // by Steve Mrenna of FNAL (example main32), but is structured
9 // somewhat differently, and is also using FastJet package
10 // instead of Pythia8's native SlowJet
11 //
12 
15 
17 
20 
21 //
22 // FastJet package/tools
23 // Also gives PseudoJet & JetDefinition
24 //
25 #include "fastjet/ClusterSequence.hh"
26 
27 #include <iostream>
28 #include <fstream>
29 
30 namespace gen
31 {
33 {
34 
35  public:
36 
38 
40 
41  const std::vector<int>* getPartonList() { return typeIdx; }
42 
43  protected:
44 
45  virtual void init( const lhef::LHERunInfo* runInfo );
46 
47  virtual bool initAfterBeams();
48  virtual void beforeHadronisation( const lhef::LHEEvent* );
49  virtual void beforeHadronisationExec() { return; }
50 
51  virtual int match( const lhef::LHEEvent* partonLevel, const std::vector<fastjet::PseudoJet>* jetInput );
52 
53  virtual double getJetEtaMax() const;
54 
55  private:
56 
57  //parameters staff from Madgraph
58 
59  template<typename T>
60  static T parseParameter(const std::string &value);
61  template<typename T>
62  static T getParameter(const std::map<std::string, std::string> &params,
63  const std::string &var, const T &defValue = T());
64  template<typename T>
65  T getParameter(const std::string &var, const T &defValue = T()) const;
66 
67  template<typename T>
68  static void updateOrDie(
69  const std::map<std::string, std::string> &params,
70  T &param, const std::string &name);
71 
72  std::map<std::string, std::string> mgParams;
73 
74  // ----------------------------
75 
77  enum partonTypes { ID_TOP=6, ID_GLUON=21, ID_PHOTON=22 };
78 
79  double qCut, qCutSq;
80  double clFact;
81  int nQmatch;
82 
83  // Master switch for merging
84  bool doMerge;
85 
86  // Maximum and current number of jets
88 
89  // Jet algorithm parameters
90  int jetAlgoPower; // similar to memain_.mektsc ?
92 
93  // Merging procedure control flag(s)
94  // (there're also inclusive, exclusive, and soup/auto in JetMatchingMGFastJet)
95  //
96  bool fExcLocal; // this is similar to memaev_.iexc
97 
98  // Sort final-state of incoming process into light/heavy jets and 'other'
99  std::vector < int > typeIdx[3];
100 
102  bool soup;
103  bool exclusive;
104 
105  //
106  // FastJets tool(s)
107  //
108  fastjet::JetDefinition* fJetFinder;
109  std::vector<fastjet::PseudoJet> fClusJets, fPtSortedJets;
110 
111  // output for DJR analysis
112  //
113  std::ofstream fDJROutput;
115 
116  bool fIsInit;
117 
118 };
119 
120 } // end namespace
121 
122 #endif
fastjet::JetDefinition * fJetFinder
JetMatchingMGFastJet(const edm::ParameterSet &params)
const std::vector< int > * getPartonList()
static T getParameter(const std::map< std::string, std::string > &params, const std::string &var, const T &defValue=T())
virtual double getJetEtaMax() const
static void updateOrDie(const std::map< std::string, std::string > &params, T &param, const std::string &name)
virtual void beforeHadronisationExec()
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
std::vector< fastjet::PseudoJet > fClusJets
static T parseParameter(const std::string &value)
std::vector< fastjet::PseudoJet > fPtSortedJets
std::map< std::string, std::string > mgParams
std::vector< int > typeIdx[3]
virtual void beforeHadronisation(const lhef::LHEEvent *)
long double T
virtual void init(const lhef::LHERunInfo *runInfo)
virtual int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)