CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/GeneratorInterface/PartonShowerVeto/interface/JetMatching.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_PartonShowerVeto_JetMatching_h
00002 #define GeneratorInterface_PartonShowerVeto_JetMatching_h
00003 
00004 #include <memory>
00005 #include <vector>
00006 #include <string>
00007 #include <set>
00008 
00009 #include <boost/shared_ptr.hpp>
00010 
00011 // #include <HepMC/GenEvent.h>
00012 // #include <HepMC/SimpleVector.h>
00013 
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 #include "fastjet/ClusterSequence.hh"   // gives both PseudoJet & JetDefinition
00017 // #include "fastjet/Selector.hh"
00018 
00019 namespace lhef {
00020 
00021 class LHERunInfo;
00022 class LHEEvent;
00023 class JetInput;
00024 // class JetClustering;
00025 }
00026 
00027 namespace gen {
00028 
00029 class JetMatching {
00030     public:
00031         JetMatching(const edm::ParameterSet &params);
00032         virtual ~JetMatching();
00033 
00034 /*
00035         struct JetPartonMatch {
00036                 JetPartonMatch(const HepMC::FourVector  &parton,
00037                                const HepMC::FourVector  &jet,
00038                                double                   delta,
00039                                int                      pdgId) :
00040                         parton(parton), jet(jet),
00041                         delta(delta), pdgId(pdgId) {}
00042 
00043                 JetPartonMatch(const HepMC::FourVector  &parton,
00044                                int                      pdgId) :
00045                         parton(parton), delta(-1.0), pdgId(pdgId) {}
00046 
00047                 JetPartonMatch(const HepMC::FourVector &jet) :
00048                         jet(jet), delta(-1.0), pdgId(0) {}
00049 
00050                 inline bool isMatch() const { return delta >= 0 && pdgId; }
00051                 inline bool hasParton() const { return pdgId; }
00052                 inline bool hasJet() const { return delta >= 0 || !pdgId; }
00053 
00054                 HepMC::FourVector       parton;
00055                 HepMC::FourVector       jet;
00056                 double                  delta;
00057                 int                     pdgId;
00058         };
00059 */
00060         virtual void init(const lhef::LHERunInfo* runInfo);
00061         virtual bool initAfterBeams() { return true; }
00062         virtual void beforeHadronisation(const lhef::LHEEvent* event);
00063         virtual void beforeHadronisationExec();
00064         
00065         // void setJetInput( const std::vector<fastjet::PseudoJet> input ) { fJetInput=input; return; }
00066 
00067         virtual int match( const lhef::LHEEvent* partonLevel, const std::vector<fastjet::PseudoJet>* jetInput ) = 0;
00068 /*
00069         virtual int match(const HepMC::GenEvent *partonLevel,
00070                           const HepMC::GenEvent *finalState,
00071                           bool showeredFinalState = false) = 0;
00072 */
00073         virtual std::set<std::string> capabilities() const;
00074         
00075         void resetMatchingStatus() { fMatchingStatus = false; }
00076         bool isMatchingDone() { return fMatchingStatus; }
00077         
00078         virtual const std::vector<int>* getPartonList()      { return 0; }
00079         virtual double                  getJetEtaMax() const = 0;
00080 
00081 /*
00082         const std::vector<JetPartonMatch> &getMatchSummary() const
00083         { return matchSummary; }
00084 */
00085         static std::auto_ptr<JetMatching> create(
00086                                         const edm::ParameterSet &params);
00087 
00088     protected:
00089         bool fMatchingStatus;
00090 /*      std::vector<JetPartonMatch>     matchSummary; */
00091         // std::vector<fastjet::PseudoJet> fJetInput;
00092 
00093 };
00094 
00095 } // namespace gen
00096 
00097 
00098 #endif // GeneratorCommon_PartonShowerVeto_JetMatching_h