CMS 3D CMS Logo

MuonRecoAnalyzer.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Muon_MuonRecoAnalyzer_h
2 #define DQMOffline_Muon_MuonRecoAnalyzer_h
3 
10 #include <memory>
11 #include <fstream>
18 
21 
28 
30 public:
33 
35  ~MuonRecoAnalyzer() override;
36 
38  void analyze(const edm::Event&, const edm::EventSetup&) override;
39  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
40 
41  //calculate residual & pull:
42  void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float& res, float& pull);
43 
44  //Functions needed by the SoftMuon MVA monitoring
45  double getDeltaR(reco::Track track1, reco::Track track2);
46 
47  int getPv(int tidx, const reco::VertexCollection* vc);
48 
49 private:
50  // ----------member data ---------------------------
52 
57 
58  // Switch for verbosity
60  bool doMVA;
61  bool useGEM;
63 
64  //histo binning parameters
65  int etaBin;
66  double etaMin;
67  double etaMax;
68 
69  int thetaBin;
70  double thetaMin;
71  double thetaMax;
72 
73  int phiBin;
74  double phiMin;
75  double phiMax;
76 
77  int chi2Bin;
78  double chi2Min;
79  double chi2Max;
80 
81  int pBin;
82  double pMin;
83  double pMax;
84 
85  int ptBin;
86  double ptMin;
87  double ptMax;
88 
89  int pResBin;
90  double pResMin;
91  double pResMax;
92 
93  int rhBin;
94  double rhMin;
95  double rhMax;
96 
97  int tunePBin;
98  double tunePMin;
99  double tunePMax;
100 
101  //the histos
103  // global muon
104  std::vector<MonitorElement*> etaGlbTrack;
105  std::vector<MonitorElement*> etaResolution;
106  std::vector<MonitorElement*> thetaGlbTrack;
107  std::vector<MonitorElement*> thetaResolution;
108  std::vector<MonitorElement*> phiGlbTrack;
109  std::vector<MonitorElement*> phiResolution;
110  std::vector<MonitorElement*> chi2OvDFGlbTrack;
111  std::vector<MonitorElement*> probchi2GlbTrack;
112  std::vector<MonitorElement*> pGlbTrack;
113  std::vector<MonitorElement*> ptGlbTrack;
114  std::vector<MonitorElement*> qGlbTrack;
115  std::vector<MonitorElement*> qOverpResolution;
116  std::vector<MonitorElement*> qOverptResolution;
117  std::vector<MonitorElement*> oneOverpResolution;
118  std::vector<MonitorElement*> oneOverptResolution;
119  std::vector<MonitorElement*> rhAnalysis;
120  std::vector<MonitorElement*> muVStkSytemRotation;
121  std::vector<MonitorElement*> phiVsetaGlbTrack;
122  std::vector<MonitorElement*> phiVsetaGlbTrack_badlumi;
123 
124  //Soft MVA Muon
156 
158 
166 
167  // tracker muon
176  // sta muon
185  // efficiency
186  std::vector<MonitorElement*> etaEfficiency;
187  std::vector<MonitorElement*> phiEfficiency;
188 
189  bool IsminiAOD;
191 };
192 #endif // DQMOffline_Muon_MuonRecoAnalyzer_h
MuonRecoAnalyzer::gNchi2SoftMuonMVA
MonitorElement * gNchi2SoftMuonMVA
Definition: MuonRecoAnalyzer.h:127
MuonRecoAnalyzer::pMax
double pMax
Definition: MuonRecoAnalyzer.h:83
MuonRecoAnalyzer::qOverptPull
MonitorElement * qOverptPull
Definition: MuonRecoAnalyzer.h:163
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MuonRecoAnalyzer::vDThitsSoftMuonMVA
MonitorElement * vDThitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:149
MuonRecoAnalyzer::pBin
int pBin
Definition: MuonRecoAnalyzer.h:81
MuonRecoAnalyzer::thetaResolution
std::vector< MonitorElement * > thetaResolution
Definition: MuonRecoAnalyzer.h:107
MuonRecoAnalyzer::etaEfficiency
std::vector< MonitorElement * > etaEfficiency
Definition: MuonRecoAnalyzer.h:186
Muon.h
MuonRecoAnalyzer::ptMax
double ptMax
Definition: MuonRecoAnalyzer.h:87
MuonRecoAnalyzer::oneOverptResolution
std::vector< MonitorElement * > oneOverptResolution
Definition: MuonRecoAnalyzer.h:118
MuonRecoAnalyzer::pResMax
double pResMax
Definition: MuonRecoAnalyzer.h:91
MuonRecoAnalyzer::ptTrack
MonitorElement * ptTrack
Definition: MuonRecoAnalyzer.h:174
MuonRecoAnalyzer::thetaStaTrack
MonitorElement * thetaStaTrack
Definition: MuonRecoAnalyzer.h:178
DcsStatus.h
MuonRecoAnalyzer::dcsStatusCollection_
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: MuonRecoAnalyzer.h:56
MuonRecoAnalyzer::phiStaTrack
MonitorElement * phiStaTrack
Definition: MuonRecoAnalyzer.h:179
MuonRecoAnalyzer::rhAnalysis
std::vector< MonitorElement * > rhAnalysis
Definition: MuonRecoAnalyzer.h:119
MuonRecoAnalyzer
Definition: MuonRecoAnalyzer.h:29
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
MuonRecoAnalyzer::doMVA
bool doMVA
Definition: MuonRecoAnalyzer.h:60
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
MuonRecoAnalyzer::chi2Max
double chi2Max
Definition: MuonRecoAnalyzer.h:79
MuonRecoAnalyzer::pMin
double pMin
Definition: MuonRecoAnalyzer.h:82
MuonRecoAnalyzer::theVertexLabel_
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
Definition: MuonRecoAnalyzer.h:54
MuonRecoAnalyzer::phiMin
double phiMin
Definition: MuonRecoAnalyzer.h:74
MuonRecoAnalyzer::dzRefSoftMuonMVA
MonitorElement * dzRefSoftMuonMVA
Definition: MuonRecoAnalyzer.h:131
MuonRecoAnalyzer::deltaRSoftMuonMVA
MonitorElement * deltaRSoftMuonMVA
Definition: MuonRecoAnalyzer.h:126
MuonRecoAnalyzer::chi2LocPosSoftMuonMVA
MonitorElement * chi2LocPosSoftMuonMVA
Definition: MuonRecoAnalyzer.h:139
DQMStore.h
MuonRecoAnalyzer::chi2OvDFTrack
MonitorElement * chi2OvDFTrack
Definition: MuonRecoAnalyzer.h:171
MuonRecoAnalyzer::phiTrack
MonitorElement * phiTrack
Definition: MuonRecoAnalyzer.h:170
MuonRecoAnalyzer::phiMax
double phiMax
Definition: MuonRecoAnalyzer.h:75
MuonRecoAnalyzer::vRPChitsSoftMuonMVA
MonitorElement * vRPChitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:143
MuonRecoAnalyzer::chi2OvDFGlbTrack
std::vector< MonitorElement * > chi2OvDFGlbTrack
Definition: MuonRecoAnalyzer.h:110
MuonRecoAnalyzer::oneOverpResolution
std::vector< MonitorElement * > oneOverpResolution
Definition: MuonRecoAnalyzer.h:117
edm::Ref< TrackCollection >
MuonRecoAnalyzer::etaResolution
std::vector< MonitorElement * > etaResolution
Definition: MuonRecoAnalyzer.h:105
MuonRecoAnalyzer::GetRes
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
Definition: MuonRecoAnalyzer.cc:537
MuonRecoAnalyzer::getPv
int getPv(int tidx, const reco::VertexCollection *vc)
Definition: MuonRecoAnalyzer.cc:1010
MuonRecoAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Inizialize parameters for histo binning.
Definition: MuonRecoAnalyzer.cc:585
MakerMacros.h
MuonRecoAnalyzer::outerChi2SoftMuonMVA
MonitorElement * outerChi2SoftMuonMVA
Definition: MuonRecoAnalyzer.h:135
MuonRecoAnalyzer::staRelChi2SoftMuonMVA
MonitorElement * staRelChi2SoftMuonMVA
Definition: MuonRecoAnalyzer.h:146
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
MuonRecoAnalyzer::getDeltaR
double getDeltaR(reco::Track track1, reco::Track track2)
Definition: MuonRecoAnalyzer.cc:1003
MuonRecoAnalyzer::muReco
MonitorElement * muReco
Definition: MuonRecoAnalyzer.h:102
BeamSpot.h
MuonRecoAnalyzer::glbKinkFinderSoftMuonMVA
MonitorElement * glbKinkFinderSoftMuonMVA
Definition: MuonRecoAnalyzer.h:144
MuonRecoAnalyzer::vMuHitsSoftMuonMVA
MonitorElement * vMuHitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:128
MuonRecoAnalyzer::rhMax
double rhMax
Definition: MuonRecoAnalyzer.h:95
Service.h
MuonRecoAnalyzer::etaGlbTrack
std::vector< MonitorElement * > etaGlbTrack
Definition: MuonRecoAnalyzer.h:104
MuonFwd.h
MuonRecoAnalyzer::pResBin
int pResBin
Definition: MuonRecoAnalyzer.h:89
MuonRecoAnalyzer::qTrack
MonitorElement * qTrack
Definition: MuonRecoAnalyzer.h:175
reco::Track
Definition: Track.h:27
MuonRecoAnalyzer::vGEMhitsSoftMuonMVA
MonitorElement * vGEMhitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:151
MuonRecoAnalyzer::tunePMin
double tunePMin
Definition: MuonRecoAnalyzer.h:98
MuonRecoAnalyzer::segCompSoftMuonMVA
MonitorElement * segCompSoftMuonMVA
Definition: MuonRecoAnalyzer.h:137
MuonRecoAnalyzer::thetaTrack
MonitorElement * thetaTrack
Definition: MuonRecoAnalyzer.h:169
MuonRecoAnalyzer::chi2Min
double chi2Min
Definition: MuonRecoAnalyzer.h:78
MuonRecoAnalyzer::MuonRecoAnalyzer
MuonRecoAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: MuonRecoAnalyzer.cc:18
MuonRecoAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MuonRecoAnalyzer.cc:66
MuonRecoAnalyzer::chi2Bin
int chi2Bin
Definition: MuonRecoAnalyzer.h:77
MuonRecoAnalyzer::timeAtIpInOutErrSoftMuonMVA
MonitorElement * timeAtIpInOutErrSoftMuonMVA
Definition: MuonRecoAnalyzer.h:153
MuonRecoAnalyzer::qOverptResolution
std::vector< MonitorElement * > qOverptResolution
Definition: MuonRecoAnalyzer.h:116
MuonRecoAnalyzer::LWHSoftMuonMVA
MonitorElement * LWHSoftMuonMVA
Definition: MuonRecoAnalyzer.h:132
MuonRecoAnalyzer::etaBin
int etaBin
Definition: MuonRecoAnalyzer.h:65
DQMEDAnalyzer.h
MuonRecoAnalyzer::ptSoftMuonMVA
MonitorElement * ptSoftMuonMVA
Definition: MuonRecoAnalyzer.h:125
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
MuonRecoAnalyzer::theBeamSpotLabel_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
Definition: MuonRecoAnalyzer.h:55
MuonRecoAnalyzer::QprodSoftMuonMVA
MonitorElement * QprodSoftMuonMVA
Definition: MuonRecoAnalyzer.h:155
MuonRecoAnalyzer::glbDeltaEtaPhiSoftMuonMVA
MonitorElement * glbDeltaEtaPhiSoftMuonMVA
Definition: MuonRecoAnalyzer.h:147
MuonRecoAnalyzer::NTrkVHitsSoftMuonMVA
MonitorElement * NTrkVHitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:141
MuonRecoAnalyzer::etaMin
double etaMin
Definition: MuonRecoAnalyzer.h:66
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MuonRecoAnalyzer::theFolder
std::string theFolder
Definition: MuonRecoAnalyzer.h:190
MuonRecoAnalyzer::phiVsetaGlbTrack_badlumi
std::vector< MonitorElement * > phiVsetaGlbTrack_badlumi
Definition: MuonRecoAnalyzer.h:122
MuonRecoAnalyzer::mNuStationsSoftMuonMVA
MonitorElement * mNuStationsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:129
MuonRecoAnalyzer::pTrack
MonitorElement * pTrack
Definition: MuonRecoAnalyzer.h:173
MuonRecoAnalyzer::phiEfficiency
std::vector< MonitorElement * > phiEfficiency
Definition: MuonRecoAnalyzer.h:187
MuonRecoAnalyzer::qGlbTrack
std::vector< MonitorElement * > qGlbTrack
Definition: MuonRecoAnalyzer.h:114
MuonRecoAnalyzer::etaTrack
MonitorElement * etaTrack
Definition: MuonRecoAnalyzer.h:168
MuonRecoAnalyzer::tunePBin
int tunePBin
Definition: MuonRecoAnalyzer.h:97
MuonRecoAnalyzer::dxyRefSoftMuonMVA
MonitorElement * dxyRefSoftMuonMVA
Definition: MuonRecoAnalyzer.h:130
MuonRecoAnalyzer::glbKinkFinderLogSoftMuonMVA
MonitorElement * glbKinkFinderLogSoftMuonMVA
Definition: MuonRecoAnalyzer.h:145
MuonRecoAnalyzer::oneOverptPull
MonitorElement * oneOverptPull
Definition: MuonRecoAnalyzer.h:165
MuonRecoAnalyzer::probchi2GlbTrack
std::vector< MonitorElement * > probchi2GlbTrack
Definition: MuonRecoAnalyzer.h:111
MuonRecoAnalyzer::ptBin
int ptBin
Definition: MuonRecoAnalyzer.h:85
MuonRecoAnalyzer::theMuonCollectionLabel_
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
Definition: MuonRecoAnalyzer.h:53
MuonRecoAnalyzer::vCSChitsSoftMuonMVA
MonitorElement * vCSChitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:150
MuonRecoAnalyzer::pGlbTrack
std::vector< MonitorElement * > pGlbTrack
Definition: MuonRecoAnalyzer.h:112
edm::EventSetup
Definition: EventSetup.h:58
MuonRecoAnalyzer::pStaTrack
MonitorElement * pStaTrack
Definition: MuonRecoAnalyzer.h:182
res
Definition: Electron.h:6
MuonRecoAnalyzer::qOverpResolution
std::vector< MonitorElement * > qOverpResolution
Definition: MuonRecoAnalyzer.h:115
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonRecoAnalyzer::trkRelChi2SoftMuonMVA
MonitorElement * trkRelChi2SoftMuonMVA
Definition: MuonRecoAnalyzer.h:148
InputTag.h
MuonRecoAnalyzer::thetaGlbTrack
std::vector< MonitorElement * > thetaGlbTrack
Definition: MuonRecoAnalyzer.h:106
MuonRecoAnalyzer::iValFracSoftMuonMVA
MonitorElement * iValFracSoftMuonMVA
Definition: MuonRecoAnalyzer.h:136
MuonRecoAnalyzer::~MuonRecoAnalyzer
~MuonRecoAnalyzer() override
Destructor.
Definition: MuonRecoAnalyzer.cc:65
VertexFwd.h
MuonRecoAnalyzer::pResMin
double pResMin
Definition: MuonRecoAnalyzer.h:90
MuonRecoAnalyzer::phiPull
MonitorElement * phiPull
Definition: MuonRecoAnalyzer.h:161
MuonRecoAnalyzer::timeAtIpInOutSoftMuonMVA
MonitorElement * timeAtIpInOutSoftMuonMVA
Definition: MuonRecoAnalyzer.h:152
MuonRecoAnalyzer::oneOverpPull
MonitorElement * oneOverpPull
Definition: MuonRecoAnalyzer.h:164
MuonRecoAnalyzer::IsminiAOD
bool IsminiAOD
Definition: MuonRecoAnalyzer.h:189
MuonRecoAnalyzer::muVStkSytemRotation
std::vector< MonitorElement * > muVStkSytemRotation
Definition: MuonRecoAnalyzer.h:120
MuonRecoAnalyzer::etaPull
MonitorElement * etaPull
Definition: MuonRecoAnalyzer.h:159
MuonRecoAnalyzer::qOverpPull
MonitorElement * qOverpPull
Definition: MuonRecoAnalyzer.h:162
MuonRecoAnalyzer::chi2LocMomSoftMuonMVA
MonitorElement * chi2LocMomSoftMuonMVA
Definition: MuonRecoAnalyzer.h:138
MuonRecoAnalyzer::probchi2Track
MonitorElement * probchi2Track
Definition: MuonRecoAnalyzer.h:172
Vertex.h
Frameworkfwd.h
MuonRecoAnalyzer::thetaMin
double thetaMin
Definition: MuonRecoAnalyzer.h:70
MuonRecoAnalyzer::thetaBin
int thetaBin
Definition: MuonRecoAnalyzer.h:69
MuonRecoAnalyzer::ptGlbTrack
std::vector< MonitorElement * > ptGlbTrack
Definition: MuonRecoAnalyzer.h:113
MuonRecoAnalyzer::glbTrackTailProbSoftMuonMVA
MonitorElement * glbTrackTailProbSoftMuonMVA
Definition: MuonRecoAnalyzer.h:140
MuonRecoAnalyzer::etaMax
double etaMax
Definition: MuonRecoAnalyzer.h:67
dqm::implementation::IBooker
Definition: DQMStore.h:43
MuonRecoAnalyzer::metname
std::string metname
Definition: MuonRecoAnalyzer.h:59
MuonRecoAnalyzer::phiResolution
std::vector< MonitorElement * > phiResolution
Definition: MuonRecoAnalyzer.h:109
MuonRecoAnalyzer::kinkFinderSoftMuonMVA
MonitorElement * kinkFinderSoftMuonMVA
Definition: MuonRecoAnalyzer.h:142
MuonRecoAnalyzer::rhBin
int rhBin
Definition: MuonRecoAnalyzer.h:93
MuonRecoAnalyzer::phiBin
int phiBin
Definition: MuonRecoAnalyzer.h:73
MuonRecoAnalyzer::rhMin
double rhMin
Definition: MuonRecoAnalyzer.h:94
MuonRecoAnalyzer::probchi2StaTrack
MonitorElement * probchi2StaTrack
Definition: MuonRecoAnalyzer.h:181
MuonRecoAnalyzer::ptStaTrack
MonitorElement * ptStaTrack
Definition: MuonRecoAnalyzer.h:183
MuonRecoAnalyzer::thetaMax
double thetaMax
Definition: MuonRecoAnalyzer.h:71
ParameterSet.h
MuonRecoAnalyzer::thetaPull
MonitorElement * thetaPull
Definition: MuonRecoAnalyzer.h:160
MuonRecoAnalyzer::phiVsetaGlbTrack
std::vector< MonitorElement * > phiVsetaGlbTrack
Definition: MuonRecoAnalyzer.h:121
MuonRecoAnalyzer::phiGlbTrack
std::vector< MonitorElement * > phiGlbTrack
Definition: MuonRecoAnalyzer.h:108
MuonRecoAnalyzer::tunePResolution
MonitorElement * tunePResolution
Definition: MuonRecoAnalyzer.h:157
MuonRecoAnalyzer::getMuonHitsPerStationSoftMuonMVA
MonitorElement * getMuonHitsPerStationSoftMuonMVA
Definition: MuonRecoAnalyzer.h:154
MuonRecoAnalyzer::useGEM
bool useGEM
Definition: MuonRecoAnalyzer.h:61
edm::Event
Definition: Event.h:73
MuonRecoAnalyzer::parameters
edm::ParameterSet parameters
Definition: MuonRecoAnalyzer.h:51
MuonRecoAnalyzer::qStaTrack
MonitorElement * qStaTrack
Definition: MuonRecoAnalyzer.h:184
MuonRecoAnalyzer::tunePMax
double tunePMax
Definition: MuonRecoAnalyzer.h:99
MuonRecoAnalyzer::maxGEMhitsSoftMuonMVA
int maxGEMhitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:62
MuonRecoAnalyzer::valPixHitsSoftMuonMVA
MonitorElement * valPixHitsSoftMuonMVA
Definition: MuonRecoAnalyzer.h:133
MuonRecoAnalyzer::chi2OvDFStaTrack
MonitorElement * chi2OvDFStaTrack
Definition: MuonRecoAnalyzer.h:180
MuonRecoAnalyzer::innerChi2SoftMuonMVA
MonitorElement * innerChi2SoftMuonMVA
Definition: MuonRecoAnalyzer.h:134
MuonRecoAnalyzer::etaStaTrack
MonitorElement * etaStaTrack
Definition: MuonRecoAnalyzer.h:177
MuonRecoAnalyzer::ptMin
double ptMin
Definition: MuonRecoAnalyzer.h:86