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 //
6 // Julia V. Yarba, Feb.10, 2013
7 //
8 // This code takes inspirations in the original implemetation
9 // by Steve Mrenna of FNAL (example main32), but is structured
10 // somewhat differently, and is also using FastJet package
11 // instead of Pythia8's native SlowJet
12 //
13 // At this point, we inherit from JetMatchingMadgraph,
14 // mainly to use parameters input machinery
15 //
16 
19 
21 
24 
25 //
26 // FastJet package/tools
27 // Also gives PseudoJet & JetDefinition
28 //
29 #include "fastjet/ClusterSequence.hh"
30 
31 #include <iostream>
32 #include <fstream>
33 
34 namespace gen
35 {
37 {
38 
39  public:
40 
42  fJetFinder(0),
43  fIsInit(false)
44  { fDJROutFlag = params.getParameter<int>("outTree_flag"); }
46 
47  const std::vector<int>* getPartonList() { return typeIdx; }
48 
49  protected:
50  virtual void init( const lhef::LHERunInfo* runInfo ) { if (fIsInit) return; JetMatchingMadgraph::init(runInfo);
51  initAfterBeams(); fIsInit=true; return; }
52  bool initAfterBeams();
53  void beforeHadronisation( const lhef::LHEEvent* );
54  void beforeHadronisationExec() { return; }
55 
56  int match( const lhef::LHEEvent* partonLevel, const std::vector<fastjet::PseudoJet>* jetInput );
57 
58  private:
59 
61  enum partonTypes { ID_TOP=6, ID_GLUON=21, ID_PHOTON=22 };
62 
63  double qCut, qCutSq;
64  double clFact;
65  int nQmatch;
66 
67  //
68  // these 2 below are legacy but keep here for now
69  //
70  //int ktScheme;
71  //int showerKt;
72 
73  // Master switch for merging
74  bool doMerge;
75 
76  // Maximum and current number of jets
78 
79  // Jet algorithm parameters
80  int jetAlgoPower; // similar to memain_.mektsc ?
82 
83  // Merging procedure control flag(s)
84  // (there're also inclusive, exclusive, and soup/auto in JetMatchingMadgraph)
85  //
86  bool fExcLocal; // this is similar to memaev_.iexc
87 
88  // Sort final-state of incoming process into light/heavy jets and 'other'
89  std::vector < int > typeIdx[3];
90 
91  //
92  // FastJets tool(s)
93  //
94  fastjet::JetDefinition* fJetFinder;
95  std::vector<fastjet::PseudoJet> fClusJets, fPtSortedJets;
96 
97  // output for DJR analysis
98  //
99  std::ofstream fDJROutput;
101 
102  bool fIsInit;
103 
104 };
105 
106 } // end namespace
107 
108 #endif
T getParameter(std::string const &) const
fastjet::JetDefinition * fJetFinder
JetMatchingMGFastJet(const edm::ParameterSet &params)
virtual void init(const lhef::LHERunInfo *runInfo)
virtual void init(const lhef::LHERunInfo *runInfo)
const std::vector< int > * getPartonList()
std::vector< fastjet::PseudoJet > fClusJets
std::vector< fastjet::PseudoJet > fPtSortedJets
std::vector< int > typeIdx[3]
void beforeHadronisation(const lhef::LHEEvent *)
int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)