CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEMEfficiencyHarvester.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Muon_GEMEfficiencyHarvester_h
2 #define DQMOffline_Muon_GEMEfficiencyHarvester_h
3 
16 
17 #include <vector>
18 #include <string>
19 
21 public:
23  ~GEMEfficiencyHarvester() override;
26 
27 private:
28  TProfile* computeEfficiency(const TH1F*, const TH1F*, const char*, const char*, const double confidence_level = 0.683);
29  TH2F* computeEfficiency(const TH2F*, const TH2F*, const char*, const char*);
30  std::vector<std::string> splitString(std::string, const std::string);
31  std::tuple<std::string, int, int> parseResidualName(std::string, const std::string);
34 
35  template <typename T>
36  int findResolutionBin(const T&, const std::vector<T>&);
37 
40 };
41 
42 template <typename T>
43 int GEMEfficiencyHarvester::findResolutionBin(const T& elem, const std::vector<T>& vec) {
44  auto iter = std::find(vec.begin(), vec.end(), elem);
45  int bin = (iter != vec.end()) ? std::distance(vec.begin(), iter) + 1 : -1;
46  return bin;
47 }
48 
49 #endif // DQMOffline_Muon_GEMEfficiencyHarvester_h
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
GEMEfficiencyHarvester(const edm::ParameterSet &)
std::tuple< std::string, int, int > parseResidualName(std::string, const std::string)
static void fillDescriptions(edm::ConfigurationDescriptions &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< std::string > splitString(std::string, const std::string)
void doResolution(DQMStore::IBooker &, DQMStore::IGetter &, const std::string)
void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &)
TProfile * computeEfficiency(const TH1F *, const TH1F *, const char *, const char *, const double confidence_level=0.683)
int findResolutionBin(const T &, const std::vector< T > &)
long double T