File indexing completed on 2024-04-06 12:32:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #include "FWCore/Utilities/interface/InputTag.h"
0031 #include "DQMServices/Core/interface/DQMStore.h"
0032 #include "FWCore/ServiceRegistry/interface/Service.h"
0033
0034
0035 #include "DataFormats/MuonReco/interface/Muon.h"
0036 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0037 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0038 #include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
0039
0040 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0041
0042
0043
0044
0045 class TH1;
0046 class TH1I;
0047 class TH1D;
0048 class TH2;
0049 class TProfile;
0050
0051
0052
0053
0054
0055 class MuIsoValidation : public DQMEDAnalyzer {
0056
0057 typedef edm::View<reco::Muon>::const_iterator MuonIterator;
0058 typedef edm::RefToBase<reco::Muon> MuonBaseRef;
0059 typedef edm::Handle<reco::IsoDepositMap> MuIsoDepHandle;
0060 typedef const reco::IsoDeposit MuIsoDepRef;
0061
0062 public:
0063
0064 explicit MuIsoValidation(const edm::ParameterSet&);
0065 ~MuIsoValidation() override;
0066
0067 private:
0068
0069 void analyze(const edm::Event&, const edm::EventSetup&) override;
0070 void InitStatics();
0071 void RecordData(MuonIterator muon);
0072 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0073
0074 void MakeLogBinsForProfile(Double_t* bin_edges, const double min, const double max);
0075 void FillHistos();
0076
0077
0078
0079
0080 edm::InputTag Muon_Tag;
0081 edm::EDGetTokenT<edm::View<reco::Muon> > Muon_Token;
0082 edm::InputTag tkIsoDeposit_Tag;
0083 edm::InputTag hcalIsoDeposit_Tag;
0084 edm::InputTag ecalIsoDeposit_Tag;
0085 edm::InputTag hoIsoDeposit_Tag;
0086
0087
0088 std::string rootfilename;
0089
0090 std::string dirName;
0091 std::string subDirName;
0092
0093 std::string subsystemname_;
0094
0095
0096 static const int NUM_VARS = 21;
0097 double L_BIN_WIDTH;
0098 double S_BIN_WIDTH;
0099 int LOG_BINNING_ENABLED;
0100 int NUM_LOG_BINS;
0101 double LOG_BINNING_RATIO;
0102 bool requireCombinedMuon;
0103
0104 std::string title_sam;
0105 std::string title_cone;
0106 std::string title_cd;
0107
0108 std::vector<std::string> main_titles;
0109 std::vector<std::string> axis_titles;
0110 std::vector<std::string> names;
0111 std::vector<std::vector<double> > param;
0112 std::vector<int> isContinuous;
0113 std::vector<int> cdCompNeeded;
0114
0115
0116
0117
0118
0119 edm::ParameterSet iConfig;
0120
0121 int theMuonData;
0122 double theData[NUM_VARS];
0123
0124
0125 MonitorElement* h_nMuons;
0126 std::vector<MonitorElement*> h_1D;
0127 std::vector<MonitorElement*> cd_plots;
0128
0129 std::vector<std::vector<MonitorElement*> > p_2D;
0130
0131
0132 int nEvents;
0133 int nIncMuons;
0134
0135
0136
0137 enum { NOAXIS, XAXIS, YAXIS, ZAXIS };
0138 };