1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
#ifndef DQMOFFLINE_JETMET_BEAMHALO_ANALYZER_H
#define DQMOFFLINE_JETMET_BEAMHALO_ANALYZER_H (1)
//authors: Ronny Remington, University of Florida
//date: 08/01/09
//Included Classes (semi-alphabetical)
#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
#include "DataFormats/Candidate/interface/CandidateFwd.h"
#include "DataFormats/Candidate/interface/Candidate.h"
#include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Common/interface/View.h"
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DataFormats/CSCRecHit/interface/CSCRecHit2D.h"
#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
#include "DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h"
#include "DataFormats/CSCRecHit/interface/CSCSegment.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
#include "DataFormats/DTRecHit/interface/DTRecSegment4D.h"
#include "DataFormats/DTRecHit/interface/DTRecHitCollection.h"
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "DataFormats/EcalDetId/interface/ESDetId.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
#include "DataFormats/EgammaCandidates/interface/Conversion.h"
#include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/GeometrySurface/interface/Cone.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "DataFormats/GeometryVector/interface/LocalPoint.h"
#include "DataFormats/GeometryVector/interface/LocalVector.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
#include "DataFormats/HcalRecHit/interface/HFRecHit.h"
#include "DataFormats/HcalRecHit/interface/HORecHit.h"
#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCStatusDigiCollection.h"
#include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
#include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutRecord.h"
#include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
#include "DataFormats/Math/interface/LorentzVector.h"
#include "DataFormats/METReco/interface/CSCHaloData.h"
#include "DataFormats/METReco/interface/EcalHaloData.h"
#include "DataFormats/METReco/interface/HcalHaloData.h"
#include "DataFormats/METReco/interface/GlobalHaloData.h"
#include "DataFormats/METReco/interface/BeamHaloSummary.h"
#include "DataFormats/METReco/interface/CaloMET.h"
#include "DataFormats/METReco/interface/CaloMETFwd.h"
#include "DataFormats/METReco/interface/GenMET.h"
#include "DataFormats/METReco/interface/MET.h"
#include "DataFormats/METReco/interface/METFwd.h"
#include "DataFormats/MuonDetId/interface/CSCIndexer.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/DTWireId.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonTimeExtra.h"
#include "DataFormats/MuonReco/interface/MuonTimeExtraMap.h"
#include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
#include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
#include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
#include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "Geometry/CommonTopologies/interface/PixelTopology.h"
#include "Geometry/CommonTopologies/interface/StripTopology.h"
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include "Geometry/CSCGeometry/interface/CSCChamber.h"
#include "Geometry/CSCGeometry/interface/CSCLayer.h"
#include "Geometry/CSCGeometry/interface/CSCLayerGeometry.h"
#include "Geometry/DTGeometry/interface/DTGeometry.h"
#include "Geometry/DTGeometry/interface/DTLayer.h"
#include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
#include "Geometry/RPCGeometry/interface/RPCRoll.h"
#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "RecoMuon/MuonIdentification/interface/TimeMeasurementSequence.h"
#include "RecoMuon/TrackingTools/interface/MuonSegmentMatcher.h"
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
//Root Classes
#include "TH1F.h"
#include "TH2F.h"
#include "TH1I.h"
#include "TFile.h"
#include "TDirectory.h"
#include "TTree.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "TString.h"
#include "TMath.h"
#include "TLorentzVector.h"
#include "TLegend.h"
//Standard C++ classes
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <ostream>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <memory>
#include <iomanip>
class MuonServiceProxy;
class BeamHaloAnalyzer : public DQMEDAnalyzer {
public:
explicit BeamHaloAnalyzer(const edm::ParameterSet&);
~BeamHaloAnalyzer() override;
private:
void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
edm::InputTag IT_L1MuGMTReadout;
//RecHit Level
edm::EDGetTokenT<CSCRecHit2DCollection> IT_CSCRecHit;
edm::EDGetTokenT<EBRecHitCollection> IT_EBRecHit;
edm::EDGetTokenT<EERecHitCollection> IT_EERecHit;
edm::EDGetTokenT<ESRecHitCollection> IT_ESRecHit;
edm::EDGetTokenT<HBHERecHitCollection> IT_HBHERecHit;
edm::EDGetTokenT<HORecHitCollection> IT_HORecHit;
edm::EDGetTokenT<HFRecHitCollection> IT_HFRecHit;
//Higher Level Reco
edm::EDGetTokenT<CSCSegmentCollection> IT_CSCSegment;
edm::EDGetTokenT<reco::MuonCollection> IT_CollisionMuon;
edm::EDGetTokenT<reco::MuonCollection> IT_CollisionStandAloneMuon;
edm::EDGetTokenT<reco::MuonCollection> IT_BeamHaloMuon;
edm::EDGetTokenT<reco::MuonCollection> IT_CosmicStandAloneMuon;
edm::EDGetTokenT<reco::CaloMETCollection> IT_met;
edm::EDGetTokenT<edm::View<reco::Candidate> > IT_CaloTower;
edm::EDGetTokenT<reco::SuperClusterCollection> IT_SuperCluster;
edm::EDGetTokenT<reco::PhotonCollection> IT_Photon;
// Halo Data
edm::EDGetTokenT<reco::CSCHaloData> IT_CSCHaloData;
edm::EDGetTokenT<reco::EcalHaloData> IT_EcalHaloData;
edm::EDGetTokenT<reco::HcalHaloData> IT_HcalHaloData;
edm::EDGetTokenT<reco::GlobalHaloData> IT_GlobalHaloData;
edm::EDGetTokenT<reco::BeamHaloSummary> IT_BeamHaloSummary;
edm::EDGetTokenT<reco::MuonTimeExtraMap> IT_CSCTimeMapToken;
edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscGeomToken_;
//Output File
std::string OutputFileName;
std::string TextFileName;
std::string FolderName;
std::ofstream* out;
double DumpMET;
//Muon-Segment Matching
MuonServiceProxy* TheService;
MuonSegmentMatcher* TheMatcher;
bool StandardDQM;
MonitorElement* hEcalHaloData_PhiWedgeMultiplicity;
MonitorElement* hEcalHaloData_PhiWedgeConstituents;
MonitorElement* hEcalHaloData_PhiWedgeZDirectionConfidence;
MonitorElement* hEcalHaloData_SuperClusterShowerShapes;
MonitorElement* hEcalHaloData_SuperClusterEnergy;
MonitorElement* hEcalHaloData_SuperClusterNHits;
MonitorElement* hEcalHaloData_PhiWedgeEnergy;
MonitorElement* hEcalHaloData_PhiWedgeMinTime;
MonitorElement* hEcalHaloData_PhiWedgeMaxTime;
MonitorElement* hEcalHaloData_PhiWedgeiPhi;
MonitorElement* hEcalHaloData_PhiWedgePlusZDirectionConfidence;
MonitorElement* hEcalHaloData_PhiWedgeMinVsMaxTime;
MonitorElement* hEcalHaloData_SuperClusterPhiVsEta;
MonitorElement* hHcalHaloData_PhiWedgeMultiplicity;
MonitorElement* hHcalHaloData_PhiWedgeConstituents;
MonitorElement* hHcalHaloData_PhiWedgeZDirectionConfidence;
MonitorElement* hHcalHaloData_PhiWedgeEnergy;
MonitorElement* hHcalHaloData_PhiWedgeiPhi;
MonitorElement* hHcalHaloData_PhiWedgeMinTime;
MonitorElement* hHcalHaloData_PhiWedgeMaxTime;
MonitorElement* hHcalHaloData_PhiWedgePlusZDirectionConfidence;
MonitorElement* hHcalHaloData_PhiWedgeMinVsMaxTime;
MonitorElement* hCSCHaloData_TrackMultiplicity;
MonitorElement* hCSCHaloData_TrackMultiplicityMEPlus;
MonitorElement* hCSCHaloData_TrackMultiplicityMEMinus;
MonitorElement* hCSCHaloData_InnerMostTrackHitR;
MonitorElement* hCSCHaloData_InnerMostTrackHitPhi;
MonitorElement* hCSCHaloData_L1HaloTriggersMEPlus;
MonitorElement* hCSCHaloData_L1HaloTriggersMEMinus;
MonitorElement* hCSCHaloData_L1HaloTriggers;
MonitorElement* hCSCHaloData_HLHaloTriggers;
MonitorElement* hCSCHaloData_NOutOfTimeTriggersvsL1HaloExists;
MonitorElement* hCSCHaloData_NOutOfTimeTriggersMEPlus;
MonitorElement* hCSCHaloData_NOutOfTimeTriggersMEMinus;
MonitorElement* hCSCHaloData_NOutOfTimeTriggers;
MonitorElement* hCSCHaloData_NOutOfTimeHits;
MonitorElement* hCSCHaloData_NTracksSmalldT;
MonitorElement* hCSCHaloData_NTracksSmallBeta;
MonitorElement* hCSCHaloData_NTracksSmallBetaAndSmalldT;
MonitorElement* hCSCHaloData_NTracksSmalldTvsNHaloTracks;
MonitorElement* hCSCHaloData_InnerMostTrackHitXY;
MonitorElement* hCSCHaloData_InnerMostTrackHitRPlusZ;
MonitorElement* hCSCHaloData_InnerMostTrackHitRMinusZ;
MonitorElement* hCSCHaloData_InnerMostTrackHitiPhi;
MonitorElement* hCSCHaloData_SegmentdT;
MonitorElement* hCSCHaloData_FreeInverseBeta;
MonitorElement* hCSCHaloData_FreeInverseBetaVsSegmentdT;
// MLR
MonitorElement* hCSCHaloData_NFlatHaloSegments;
MonitorElement* hCSCHaloData_SegmentsInBothEndcaps;
MonitorElement* hCSCHaloData_NFlatSegmentsInBothEndcaps;
// End MLR
MonitorElement* hGlobalHaloData_MExCorrection;
MonitorElement* hGlobalHaloData_MEyCorrection;
MonitorElement* hGlobalHaloData_SumEtCorrection;
MonitorElement* hGlobalHaloData_HaloCorrectedMET;
MonitorElement* hGlobalHaloData_RawMETMinusHaloCorrectedMET;
MonitorElement* hGlobalHaloData_RawMETOverSumEt;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMultiplicity;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeEnergy;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeConstituents;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeiPhi;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMinTime;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMaxTime;
MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeZDirectionConfidence;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMultiplicity;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeEnergy;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeConstituents;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeiPhi;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMinTime;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMaxTime;
MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeZDirectionConfidence;
MonitorElement* hBeamHaloSummary_Id;
MonitorElement* hBeamHaloSummary_BXN;
MonitorElement* hExtra_InnerMostTrackHitR;
MonitorElement* hExtra_CSCActivityWithMET;
MonitorElement* hExtra_HcalToF;
MonitorElement* hExtra_HcalToF_HaloId;
MonitorElement* hExtra_EcalToF;
MonitorElement* hExtra_EcalToF_HaloId;
MonitorElement* hExtra_CSCTrackInnerOuterDPhi;
MonitorElement* hExtra_CSCTrackInnerOuterDEta;
MonitorElement* hExtra_CSCTrackChi2Ndof;
MonitorElement* hExtra_CSCTrackNHits;
MonitorElement* hExtra_InnerMostTrackHitXY;
MonitorElement* hExtra_InnerMostTrackHitRPlusZ;
MonitorElement* hExtra_InnerMostTrackHitRMinusZ;
MonitorElement* hExtra_InnerMostTrackHitiPhi;
MonitorElement* hExtra_InnerMostTrackHitPhi;
MonitorElement* hExtra_BXN;
};
#endif
|