CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FlavorHistorySelectorUtil.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_HepMCCandAlgos_interface_FlavorHistorySelectorUtil_h
2 #define PhysicsTools_HepMCCandAlgos_interface_FlavorHistorySelectorUtil_h
3 
4 
5 // -*- C++ -*-
6 //
7 // Package: FlavorHistorySelectorUtil
8 // Class: FlavorHistorySelectorUtil
9 //
17 //
18 // Original Author: "Salvatore Rappoccio"
19 // Created: Sat Jun 28 00:41:21 CDT 2008
20 //
21 //
22 
23 
24 //---------------------------------------------------------------------------
25 // FlavorHistorySelectorUtil
26 // This will filter events as follows:
27 // - Inputs number of b and c jets (at the generator level), the highest
28 // flavor in the event, the flavor source, and the delta R between the
29 // two jets (if applicable)
30 // - If there are no FlavorHistory's that have flavorSource of "type",
31 // then the event is rejected.
32 // - If there is at least one FlavorHistory that has flavorSource of "type",
33 // then we examine the kinematic criteria:
34 // - For delta R method, if there is a sister of the parton
35 // that is within "minDR" of "this" parton, the event is rejected,
36 // otherwise it is passed.
37 // - For the pt method, if the parton itself is less than a pt
38 // threshold, it is rejected, and if it is above, it is passed
39 //---------------------------------------------------------------------------
40 
41 // system include files
42 #include <memory>
43 
47 
48 //
49 // class declaration
50 //
51 
52 namespace reco {
53 
55  public:
57  typedef std::vector<int> flavor_vector;
58 
59  FlavorHistorySelectorUtil( unsigned int flavor,
60  unsigned int noutput,
61  flavor_vector const & flavorSource,
62  double minDR,
63  double maxDR,
64  bool verbose );
66 
67  bool select(unsigned int nb,
68  unsigned int nc,
69  unsigned int highestFlavor,
70  FlavorHistory::FLAVOR_T flavorSource,
71  double dr ) const;
72 
73  private:
74  // ----------member data ---------------------------
75  int flavor_; // Flavor to examine
76  int noutput_; // Required number of output HF jets
77  flavor_vector flavorSource_; // which type to filter on
78  double minDR_; // For deltaR scheme
79  double maxDR_; // For deltaR scheme
80  bool verbose_; // verbosity
81 
82 
83 };
84 
85 }
86 
87 #endif
reco::FlavorHistory::FLAVOR_T flavor_type
bool select(unsigned int nb, unsigned int nc, unsigned int highestFlavor, FlavorHistory::FLAVOR_T flavorSource, double dr) const
FlavorHistorySelectorUtil(unsigned int flavor, unsigned int noutput, flavor_vector const &flavorSource, double minDR, double maxDR, bool verbose)