CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryProducer.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_HepMCCandAlgos_interface_FlavorHistoryProducer_h
00002 #define PhysicsTools_HepMCCandAlgos_interface_FlavorHistoryProducer_h
00003 
00013 // -------------------------------------------------------------
00014 // Identify the ancestry of the Quark
00015 // 
00016 // 
00017 // Matrix Element:
00018 //    Status 3 parent with precisely 2 "grandparents" that
00019 //    is outside of the "initial" section (0-5) that has the
00020 //    same ID as the status 2 parton in question. 
00021 //
00022 // Flavor excitation:
00023 //    Almost the same as the matrix element classification,
00024 //    but has only one outgoing parton product instead of two.
00025 //
00026 // Gluon splitting:
00027 //    Parent is a quark of a different flavor than the parton
00028 //    in question, or a gluon. Can come from either ISR or FSR.
00029 //
00030 // True decay:
00031 //    Decays from a resonance like top, Higgs, etc.
00032 // -------------------------------------------------------------
00033 
00034 #include "FWCore/Framework/interface/EDProducer.h"
00035 #include <string>
00036 #include <vector>
00037 #include <set>
00038 #include <utility>
00039 #include <algorithm>
00040 
00041 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
00042 #include "DataFormats/Common/interface/Ptr.h"
00043 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00044 #include "DataFormats/Candidate/interface/ShallowClonePtrCandidate.h"
00045 #include "DataFormats/HepMCCandidate/interface/FlavorHistory.h"
00046 #include "DataFormats/HepMCCandidate/interface/FlavorHistoryEvent.h"
00047 #include "DataFormats/Common/interface/Handle.h"
00048 #include "FWCore/Framework/interface/ESHandle.h"
00049 #include "FWCore/Framework/interface/Event.h"
00050 #include "FWCore/Framework/interface/EventSetup.h"
00051 #include "FWCore/Utilities/interface/EDMException.h"
00052 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00053 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00054 #include <fstream>
00055 
00056 
00057 class FlavorHistoryProducer : public edm::EDProducer {
00058  public:
00060   FlavorHistoryProducer( const edm::ParameterSet & );
00062   ~FlavorHistoryProducer();
00063 
00064  private:
00066   void produce( edm::Event& e, const edm::EventSetup& );
00067 
00068   void getAncestors(const reco::Candidate &c,
00069                     std::vector<reco::Candidate const * > & moms );
00070 
00071   reco::Candidate const * getSister(const reco::Candidate &c);
00072 
00073   
00074   reco::CandidateView::const_iterator 
00075     getClosestJet( edm::Handle<reco::CandidateView> const & pJets,
00076                    reco::Candidate const & parton ) const ;
00077   
00078   edm::InputTag src_;               // GenParticles source collection name 
00079   edm::InputTag matchedSrc_;        // matched particles source collection name
00080   double matchDR_;                  // delta r to match matched particles
00081   int    pdgIdToSelect_;            // pdg of hf partons to select
00082   double ptMinParticle_;            // minimum pt of the partons
00083   double ptMinShower_;              // minimum pt of the shower
00084   double etaMaxParticle_;           // max eta of the parton
00085   double etaMaxShower_;             // max eta of the shower
00086   std::string flavorHistoryName_;   // name to give flavor history
00087   bool verbose_;                    // verbose flag
00088 };
00089 
00090 #endif