Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:23

0001 #ifndef PhysicsTools_HepMCCandAlgos_interface_FlavorHistorySelectorUtil_h
0002 #define PhysicsTools_HepMCCandAlgos_interface_FlavorHistorySelectorUtil_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    FlavorHistorySelectorUtil
0007 // Class:      FlavorHistorySelectorUtil
0008 //
0009 /**\class FlavorHistorySelectorUtil FlavorHistorySelectorUtil.cc PhysicsTools/FlavorHistorySelectorUtil/src/FlavorHistorySelectorUtil.cc
0010 
0011  Description: <one line class summary>
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  "Salvatore Rappoccio"
0018 //         Created:  Sat Jun 28 00:41:21 CDT 2008
0019 //
0020 //
0021 
0022 //---------------------------------------------------------------------------
0023 //   FlavorHistorySelectorUtil
0024 //   This will filter events as follows:
0025 //   - Inputs number of b and c jets (at the generator level), the highest
0026 //     flavor in the event, the flavor source, and the delta R between the
0027 //     two jets (if applicable)
0028 //   - If there are no FlavorHistory's that have flavorSource of "type",
0029 //     then the event is rejected.
0030 //   - If there is at least one FlavorHistory that has flavorSource of "type",
0031 //     then we examine the kinematic criteria:
0032 //        - For delta R method, if there is a sister of the parton
0033 //          that is within "minDR" of "this" parton, the event is rejected,
0034 //          otherwise it is passed.
0035 //        - For the pt method, if the parton itself is less than a pt
0036 //          threshold, it is rejected, and if it is above, it is passed
0037 //---------------------------------------------------------------------------
0038 
0039 // system include files
0040 #include <memory>
0041 
0042 #include "DataFormats/HepMCCandidate/interface/FlavorHistoryEvent.h"
0043 #include "DataFormats/HepMCCandidate/interface/FlavorHistory.h"
0044 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0045 
0046 //
0047 // class declaration
0048 //
0049 
0050 namespace reco {
0051 
0052   class FlavorHistorySelectorUtil {
0053   public:
0054     typedef reco::FlavorHistory::FLAVOR_T flavor_type;
0055     typedef std::vector<int> flavor_vector;
0056 
0057     FlavorHistorySelectorUtil(unsigned int flavor,
0058                               unsigned int noutput,
0059                               flavor_vector const& flavorSource,
0060                               double minDR,
0061                               double maxDR,
0062                               bool verbose);
0063     ~FlavorHistorySelectorUtil() {}
0064 
0065     bool select(unsigned int nb,
0066                 unsigned int nc,
0067                 unsigned int highestFlavor,
0068                 FlavorHistory::FLAVOR_T flavorSource,
0069                 double dr) const;
0070 
0071   private:
0072     // ----------member data ---------------------------
0073     int flavor_;                  // Flavor to examine
0074     int noutput_;                 // Required number of output HF jets
0075     flavor_vector flavorSource_;  // which type to filter on
0076     double minDR_;                // For deltaR scheme
0077     double maxDR_;                // For deltaR scheme
0078     bool verbose_;                // verbosity
0079   };
0080 
0081 }  // namespace reco
0082 
0083 #endif