CMS 3D CMS Logo

JetMatching.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_PartonShowerVeto_JetMatching_h
2 #define GeneratorInterface_PartonShowerVeto_JetMatching_h
3 
4 #include <memory>
5 #include <vector>
6 #include <string>
7 #include <set>
8 
9 // #include <HepMC/GenEvent.h>
10 // #include <HepMC/SimpleVector.h>
11 
13 
14 #include "fastjet/ClusterSequence.hh" // gives both PseudoJet & JetDefinition
15 // #include "fastjet/Selector.hh"
16 
17 namespace lhef {
18 
19  class LHERunInfo;
20  class LHEEvent;
21  class JetInput;
22  // class JetClustering;
23 } // namespace lhef
24 
25 namespace gen {
26 
27  class JetMatching {
28  public:
30  virtual ~JetMatching();
31 
32  /*
33  struct JetPartonMatch {
34  JetPartonMatch(const HepMC::FourVector &parton,
35  const HepMC::FourVector &jet,
36  double delta,
37  int pdgId) :
38  parton(parton), jet(jet),
39  delta(delta), pdgId(pdgId) {}
40 
41  JetPartonMatch(const HepMC::FourVector &parton,
42  int pdgId) :
43  parton(parton), delta(-1.0), pdgId(pdgId) {}
44 
45  JetPartonMatch(const HepMC::FourVector &jet) :
46  jet(jet), delta(-1.0), pdgId(0) {}
47 
48  inline bool isMatch() const { return delta >= 0 && pdgId; }
49  inline bool hasParton() const { return pdgId; }
50  inline bool hasJet() const { return delta >= 0 || !pdgId; }
51 
52  HepMC::FourVector parton;
53  HepMC::FourVector jet;
54  double delta;
55  int pdgId;
56  };
57 */
58  virtual void init(const lhef::LHERunInfo* runInfo);
59  virtual bool initAfterBeams() { return true; }
60  virtual void beforeHadronisation(const lhef::LHEEvent* event);
61  virtual void beforeHadronisationExec();
62 
63  // void setJetInput( const std::vector<fastjet::PseudoJet> input ) { fJetInput=input; return; }
64 
65  virtual int match(const lhef::LHEEvent* partonLevel, const std::vector<fastjet::PseudoJet>* jetInput) = 0;
66  /*
67  virtual int match(const HepMC::GenEvent *partonLevel,
68  const HepMC::GenEvent *finalState,
69  bool showeredFinalState = false) = 0;
70 */
71  virtual std::set<std::string> capabilities() const;
72 
73  void resetMatchingStatus() { fMatchingStatus = false; }
74  bool isMatchingDone() { return fMatchingStatus; }
75 
76  virtual const std::vector<int>* getPartonList() { return nullptr; }
77  virtual double getJetEtaMax() const = 0;
78 
79  /*
80  const std::vector<JetPartonMatch> &getMatchSummary() const
81  { return matchSummary; }
82 */
83  static std::unique_ptr<JetMatching> create(const edm::ParameterSet& params);
84 
85  protected:
87  /* std::vector<JetPartonMatch> matchSummary; */
88  // std::vector<fastjet::PseudoJet> fJetInput;
89  };
90 
91 } // namespace gen
92 
93 #endif // GeneratorCommon_PartonShowerVeto_JetMatching_h
def create(alignables, pedeDump, additionalData, outputFile, config)
int init
Definition: HydjetWrapper.h:64
void resetMatchingStatus()
Definition: JetMatching.h:73
virtual const std::vector< int > * getPartonList()
Definition: JetMatching.h:76
virtual bool initAfterBeams()
Definition: JetMatching.h:59
bool isMatchingDone()
Definition: JetMatching.h:74
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
Definition: event.py:1