CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <boost/shared_ptr.hpp>
10 
11 // #include <HepMC/GenEvent.h>
12 // #include <HepMC/SimpleVector.h>
13 
15 
16 #include "fastjet/ClusterSequence.hh" // gives both PseudoJet & JetDefinition
17 // #include "fastjet/Selector.hh"
18 
19 namespace lhef {
20 
21 class LHERunInfo;
22 class LHEEvent;
23 class JetInput;
24 // class JetClustering;
25 }
26 
27 namespace gen {
28 
29 class JetMatching {
30  public:
31  JetMatching(const edm::ParameterSet &params);
32  virtual ~JetMatching();
33 
34 /*
35  struct JetPartonMatch {
36  JetPartonMatch(const HepMC::FourVector &parton,
37  const HepMC::FourVector &jet,
38  double delta,
39  int pdgId) :
40  parton(parton), jet(jet),
41  delta(delta), pdgId(pdgId) {}
42 
43  JetPartonMatch(const HepMC::FourVector &parton,
44  int pdgId) :
45  parton(parton), delta(-1.0), pdgId(pdgId) {}
46 
47  JetPartonMatch(const HepMC::FourVector &jet) :
48  jet(jet), delta(-1.0), pdgId(0) {}
49 
50  inline bool isMatch() const { return delta >= 0 && pdgId; }
51  inline bool hasParton() const { return pdgId; }
52  inline bool hasJet() const { return delta >= 0 || !pdgId; }
53 
54  HepMC::FourVector parton;
55  HepMC::FourVector jet;
56  double delta;
57  int pdgId;
58  };
59 */
60  virtual void init(const lhef::LHERunInfo* runInfo);
61  virtual bool initAfterBeams() { return true; }
62  virtual void beforeHadronisation(const lhef::LHEEvent* event);
63  virtual void beforeHadronisationExec();
64 
65  // void setJetInput( const std::vector<fastjet::PseudoJet> input ) { fJetInput=input; return; }
66 
67  virtual int match( const lhef::LHEEvent* partonLevel, const std::vector<fastjet::PseudoJet>* jetInput ) = 0;
68 /*
69  virtual int match(const HepMC::GenEvent *partonLevel,
70  const HepMC::GenEvent *finalState,
71  bool showeredFinalState = false) = 0;
72 */
73  virtual std::set<std::string> capabilities() const;
74 
76  bool isMatchingDone() { return fMatchingStatus; }
77 
78  virtual const std::vector<int>* getPartonList() { return 0; }
79  virtual double getJetEtaMax() const = 0;
80 
81 /*
82  const std::vector<JetPartonMatch> &getMatchSummary() const
83  { return matchSummary; }
84 */
85  static std::auto_ptr<JetMatching> create(
86  const edm::ParameterSet &params);
87 
88  protected:
90 /* std::vector<JetPartonMatch> matchSummary; */
91  // std::vector<fastjet::PseudoJet> fJetInput;
92 
93 };
94 
95 } // namespace gen
96 
97 
98 #endif // GeneratorCommon_PartonShowerVeto_JetMatching_h
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:27
virtual void beforeHadronisationExec()
Definition: JetMatching.cc:35
static std::auto_ptr< JetMatching > create(const edm::ParameterSet &params)
Definition: JetMatching.cc:47
virtual ~JetMatching()
Definition: JetMatching.cc:23
virtual int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)=0
void resetMatchingStatus()
Definition: JetMatching.h:75
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual const std::vector< int > * getPartonList()
Definition: JetMatching.h:78
virtual double getJetEtaMax() const =0
virtual bool initAfterBeams()
Definition: JetMatching.h:61
bool isMatchingDone()
Definition: JetMatching.h:76
virtual std::set< std::string > capabilities() const
Definition: JetMatching.cc:39
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:31
JetMatching(const edm::ParameterSet &params)
Definition: JetMatching.cc:18