CMS 3D CMS Logo

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