30 for (
unsigned int i = 0;
i < 4;
i++) {
45 sprintf(name,
"hDT%iNumSegments",
station+1);
46 sprintf(title,
"DT Station %i Number of Segments (No Arbitration)",
station+1);
49 sprintf(name,
"hDT%iDx",
station+1);
50 sprintf(title,
"DT Station %i Delta X",
station+1);
53 sprintf(name,
"hDT%iPullx",
station+1);
54 sprintf(title,
"DT Station %i Pull X",
station+1);
57 sprintf(name,
"hDT%iDdXdZ",
station+1);
58 sprintf(title,
"DT Station %i Delta DxDz",
station+1);
61 sprintf(name,
"hDT%iPulldXdZ",
station+1);
62 sprintf(title,
"DT Station %i Pull DxDz",
station+1);
66 sprintf(name,
"hDT%iDy",
station+1);
67 sprintf(title,
"DT Station %i Delta Y",
station+1);
70 sprintf(name,
"hDT%iPully",
station+1);
71 sprintf(title,
"DT Station %i Pull Y",
station+1);
74 sprintf(name,
"hDT%iDdYdZ",
station+1);
75 sprintf(title,
"DT Station %i Delta DyDz",
station+1);
78 sprintf(name,
"hDT%iPulldYdZ",
station+1);
79 sprintf(title,
"DT Station %i Pull DyDz",
station+1);
83 sprintf(name,
"hCSC%iNumSegments",
station+1);
84 sprintf(title,
"CSC Station %i Number of Segments (No Arbitration)",
station+1);
87 sprintf(name,
"hCSC%iDx",
station+1);
88 sprintf(title,
"CSC Station %i Delta X",
station+1);
91 sprintf(name,
"hCSC%iPullx",
station+1);
92 sprintf(title,
"CSC Station %i Pull X",
station+1);
95 sprintf(name,
"hCSC%iDdXdZ",
station+1);
96 sprintf(title,
"CSC Station %i Delta DxDz",
station+1);
99 sprintf(name,
"hCSC%iPulldXdZ",
station+1);
100 sprintf(title,
"CSC Station %i Pull DxDz",
station+1);
103 sprintf(name,
"hCSC%iDy",
station+1);
104 sprintf(title,
"CSC Station %i Delta Y",
station+1);
107 sprintf(name,
"hCSC%iPully",
station+1);
108 sprintf(title,
"CSC Station %i Pull Y",
station+1);
111 sprintf(name,
"hCSC%iDdYdZ",
station+1);
112 sprintf(title,
"CSC Station %i Delta DyDz",
station+1);
115 sprintf(name,
"hCSC%iPulldYdZ",
station+1);
116 sprintf(title,
"CSC Station %i Pull DyDz",
station+1);
125 using namespace reco;
136 for (
unsigned int i = 0;
i < 4;
i++) {
182 LocalPoint segmentLocalPosition = segment->localPosition();
183 LocalVector segmentLocalDirection = segment->localDirection();
184 LocalError segmentLocalPositionError = segment->localPositionError();
185 LocalError segmentLocalDirectionError = segment->localDirectionError();
186 bool segmentFound =
false;
191 if (!
muon->isMatchesValid())
194 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
195 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
196 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
197 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
199 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
200 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
201 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
202 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
203 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
204 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
205 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
206 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
212 if (segmentFound)
break;
214 if (segmentFound)
break;
226 LocalPoint segmentLocalPosition = segment->localPosition();
227 LocalVector segmentLocalDirection = segment->localDirection();
228 LocalError segmentLocalPositionError = segment->localPositionError();
229 LocalError segmentLocalDirectionError = segment->localDirectionError();
230 bool segmentFound =
false;
235 if (!
muon->isMatchesValid())
238 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
239 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
240 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
241 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
243 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
244 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
245 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
246 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
247 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
248 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
249 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
250 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
256 if (segmentFound)
break;
258 if (segmentFound)
break;
269 if (fabs(f) > 900000)
return;
T getParameter(std::string const &) const
MonitorElement * hCSCDx[4][4]
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * hCSCDdYdZ[4][4]
MuonIdDQM(const edm::ParameterSet &)
MonitorElement * hCSCDdXdZ[4][4]
MonitorElement * hCSCPulldXdZ[4][4]
edm::EDGetTokenT< DTRecSegment4DCollection > inputDTRecSegment4DCollection_
bool useGlobalMuonsNotTrackerMuons_
bool useTrackerMuonsNotGlobalMuons_
MonitorElement * hDTDdYdZ[4][3]
MonitorElement * hDTPully[4][3]
MonitorElement * hCSCDy[4][4]
edm::Handle< DTRecSegment4DCollection > dtSegmentCollectionH_
MonitorElement * hCSCPully[4][4]
MonitorElement * hSegmentIsAssociatedBool
MonitorElement * hDTPullx[4][4]
MonitorElement * hCSCPullx[4][4]
MonitorElement * book1D(Args &&...args)
MonitorElement * hNumMatches[4]
MonitorElement * hDTDdXdZ[4][4]
edm::Handle< reco::MuonCollection > muonCollectionH_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollection_
MonitorElement * hDTDx[4][4]
MonitorElement * hDTPulldYdZ[4][3]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hDTDy[4][3]
MonitorElement * hCSCPulldYdZ[4][4]
virtual void Fill(MonitorElement *, float)
MonitorElement * hDTNumSegments[4][4]
MonitorElement * hCSCNumSegments[4][4]
MonitorElement * hNumChambersNoRPC[4]
edm::ESHandle< GlobalTrackingGeometry > geometry_
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollection_
MonitorElement * hDTPulldXdZ[4][4]
MonitorElement * hNumChambers[4]
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_