DESY Hbb Analysis Framework
Tools/interface/Utils.h
Go to the documentation of this file.
1 #ifndef Analysis_Tools_Utils_h
2 #define Analysis_Tools_Utils_h 1
3 
4 #include <boost/algorithm/string/classification.hpp> // Include boost::for is_any_of
5 #include <boost/algorithm/string/split.hpp> // Include for boost::split
7 
8 namespace analysis {
9  namespace tools {
10 
12  {
13  int total;
14  int filtered;
15  float efficiency;
16  };
17 
18  struct PDF
19  {
20  std::pair<int,int> id;
21  std::pair<double,double> x;
22  };
23 
24  template <typename T>
25  struct less_than_pt
26  {
27  inline bool operator() (const T& gp1, const T& gp2)
28  {
29  return (gp1.pt() < gp2.pt());
30  }
31  };
32 
33  template <typename T>
35  {
36  inline bool operator() (const T& gp1, const T& gp2)
37  {
38  return (gp1.pt() > gp2.pt());
39  }
40  };
41 
42 
43  inline std::vector<std::string> getWords(const std::string & line)
44  {
45  std::vector<std::string> words;
46  boost::split(words, line, boost::is_any_of(" "), boost::token_compress_on);
47  return words;
48  }
49 
51  {
52  };
53 
55  {
56 // JetResolutionInfo(JME::JetResolution r, JME::JetResolutionScaleFactor s) :
57 // resolution(r), scalefactor(s)
58 // {}
61  };
62 
63  struct ScaleFactors
64  {
65  float nominal;
66  float up;
67  float down;
68  };
69 
70  }
71 }
72 
73 
74 
75 
76 #endif // Analysis_Tools_Utils_h
std::pair< double, double > x
std::pair< int, int > id
float T
Definition: PlotsCompare.cc:18
std::vector< std::string > getWords(const std::string &line)
JME::JetResolutionScaleFactor scalefactor