-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c5a655
commit c2c4005
Showing
19 changed files
with
1,281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#ifndef DQMOffline_Muon_GEMEfficiencyAnalyzer_h | ||
#define DQMOffline_Muon_GEMEfficiencyAnalyzer_h | ||
|
||
#include "DQMOffline/Muon/interface/GEMOfflineDQMBase.h" | ||
#include "FWCore/Utilities/interface/EDGetToken.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "DataFormats/GEMRecHit/interface/GEMRecHitCollection.h" | ||
#include "DataFormats/PatCandidates/interface/Muon.h" | ||
#include "DataFormats/MuonReco/interface/MuonSelectors.h" | ||
#include "Geometry/GEMGeometry/interface/GEMGeometry.h" | ||
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h" | ||
|
||
class GEMEfficiencyAnalyzer : public GEMOfflineDQMBase { | ||
public: | ||
explicit GEMEfficiencyAnalyzer(const edm::ParameterSet &); | ||
~GEMEfficiencyAnalyzer() override; | ||
|
||
protected: | ||
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; | ||
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override; | ||
|
||
private: | ||
void bookDetectorOccupancy( | ||
DQMStore::IBooker &, const GEMStation *, const MEMapKey1 &, const TString &, const TString &); | ||
void bookOccupancy(DQMStore::IBooker &, const MEMapKey2 &, const TString &, const TString &); | ||
void bookResolution(DQMStore::IBooker &, const MEMapKey3 &, const TString &, const TString &); | ||
|
||
const GEMRecHit *findMatchedHit(const float, const GEMRecHitCollection::range &); | ||
|
||
edm::EDGetTokenT<GEMRecHitCollection> rechit_token_; | ||
edm::EDGetTokenT<edm::View<reco::Muon> > muon_token_; | ||
|
||
MuonServiceProxy *muon_service_; | ||
|
||
bool use_global_muon_; | ||
float residual_x_cut_; | ||
|
||
std::vector<double> pt_binning_; | ||
int eta_nbins_; | ||
double eta_low_; | ||
double eta_up_; | ||
|
||
std::string folder_; | ||
|
||
TString title_; | ||
TString matched_title_; | ||
|
||
MEMap1 me_detector_; | ||
MEMap1 me_detector_matched_; | ||
|
||
MEMap2 me_muon_pt_; | ||
MEMap2 me_muon_eta_; | ||
MEMap2 me_muon_pt_matched_; | ||
MEMap2 me_muon_eta_matched_; | ||
|
||
MEMap3 me_residual_x_; // local | ||
MEMap3 me_residual_y_; // local | ||
MEMap3 me_residual_phi_; // global | ||
MEMap3 me_pull_x_; | ||
MEMap3 me_pull_y_; | ||
}; | ||
|
||
#endif // DQMOffline_Muon_GEMEfficiencyAnalyzer_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef DQMOffline_Muon_GEMEfficiencyHarvester_h | ||
#define DQMOffline_Muon_GEMEfficiencyHarvester_h | ||
|
||
#include "DQMServices/Core/interface/DQMEDHarvester.h" | ||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include <vector> | ||
#include <string> | ||
|
||
class GEMEfficiencyHarvester : public DQMEDHarvester { | ||
public: | ||
GEMEfficiencyHarvester(const edm::ParameterSet&); | ||
~GEMEfficiencyHarvester() override; | ||
void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; | ||
|
||
private: | ||
TProfile* computeEfficiency(const TH1F*, const TH1F*, const char*, const char*, const double confidence_level = 0.683); | ||
|
||
TH2F* computeEfficiency(const TH2F*, const TH2F*, const char*, const char*); | ||
|
||
std::vector<std::string> splitString(std::string, const std::string); | ||
std::tuple<std::string, int, bool, int> parseResidualName(std::string, const std::string); | ||
|
||
void doEfficiency(DQMStore::IBooker&, DQMStore::IGetter&); | ||
void doResolution(DQMStore::IBooker&, DQMStore::IGetter&, const std::string); | ||
|
||
std::string folder_; | ||
std::string log_category_; | ||
}; | ||
|
||
#endif // DQMOffline_Muon_GEMEfficiencyHarvester_h |
Oops, something went wrong.