30 for (
unsigned int i = 0;
i < 4;
i++) {
50 sprintf(name,
"hDT%iNumSegments",
station + 1);
51 sprintf(title,
"DT Station %i Number of Segments (No Arbitration)",
station + 1);
54 sprintf(name,
"hDT%iDx",
station + 1);
55 sprintf(title,
"DT Station %i Delta X",
station + 1);
58 sprintf(name,
"hDT%iPullx",
station + 1);
59 sprintf(title,
"DT Station %i Pull X",
station + 1);
62 sprintf(name,
"hDT%iDdXdZ",
station + 1);
63 sprintf(title,
"DT Station %i Delta DxDz",
station + 1);
66 sprintf(name,
"hDT%iPulldXdZ",
station + 1);
67 sprintf(title,
"DT Station %i Pull DxDz",
station + 1);
71 sprintf(name,
"hDT%iDy",
station + 1);
72 sprintf(title,
"DT Station %i Delta Y",
station + 1);
75 sprintf(name,
"hDT%iPully",
station + 1);
76 sprintf(title,
"DT Station %i Pull Y",
station + 1);
79 sprintf(name,
"hDT%iDdYdZ",
station + 1);
80 sprintf(title,
"DT Station %i Delta DyDz",
station + 1);
83 sprintf(name,
"hDT%iPulldYdZ",
station + 1);
84 sprintf(title,
"DT Station %i Pull DyDz",
station + 1);
88 sprintf(name,
"hCSC%iNumSegments",
station + 1);
89 sprintf(title,
"CSC Station %i Number of Segments (No Arbitration)",
station + 1);
92 sprintf(name,
"hCSC%iDx",
station + 1);
93 sprintf(title,
"CSC Station %i Delta X",
station + 1);
96 sprintf(name,
"hCSC%iPullx",
station + 1);
97 sprintf(title,
"CSC Station %i Pull X",
station + 1);
100 sprintf(name,
"hCSC%iDdXdZ",
station + 1);
101 sprintf(title,
"CSC Station %i Delta DxDz",
station + 1);
104 sprintf(name,
"hCSC%iPulldXdZ",
station + 1);
105 sprintf(title,
"CSC Station %i Pull DxDz",
station + 1);
108 sprintf(name,
"hCSC%iDy",
station + 1);
109 sprintf(title,
"CSC Station %i Delta Y",
station + 1);
112 sprintf(name,
"hCSC%iPully",
station + 1);
113 sprintf(title,
"CSC Station %i Pull Y",
station + 1);
116 sprintf(name,
"hCSC%iDdYdZ",
station + 1);
117 sprintf(title,
"CSC Station %i Delta DyDz",
station + 1);
120 sprintf(name,
"hCSC%iPulldYdZ",
station + 1);
121 sprintf(title,
"CSC Station %i Pull DyDz",
station + 1);
129 using namespace reco;
139 for (
unsigned int i = 0;
i < 4;
i++) {
196 LocalPoint segmentLocalPosition = segment->localPosition();
197 LocalVector segmentLocalDirection = segment->localDirection();
198 LocalError segmentLocalPositionError = segment->localPositionError();
199 LocalError segmentLocalDirectionError = segment->localDirectionError();
200 bool segmentFound =
false;
203 if (!
muon->isMatchesValid())
206 for (std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
207 chamberMatch !=
muon->matches().end();
209 for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
210 segmentMatch != chamberMatch->segmentMatches.end();
212 if (fabs(segmentMatch->x - segmentLocalPosition.
x()) < 1E-6 &&
213 fabs(segmentMatch->y - segmentLocalPosition.
y()) < 1E-6 &&
214 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x() / segmentLocalDirection.
z()) < 1E-6 &&
215 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y() / segmentLocalDirection.
z()) < 1E-6 &&
216 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx())) < 1E-6 &&
217 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy())) < 1E-6 &&
218 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx())) < 1E-6 &&
219 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy())) < 1E-6) {
240 LocalPoint segmentLocalPosition = segment->localPosition();
241 LocalVector segmentLocalDirection = segment->localDirection();
242 LocalError segmentLocalPositionError = segment->localPositionError();
243 LocalError segmentLocalDirectionError = segment->localDirectionError();
244 bool segmentFound =
false;
247 if (!
muon->isMatchesValid())
250 for (std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
251 chamberMatch !=
muon->matches().end();
253 for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
254 segmentMatch != chamberMatch->segmentMatches.end();
256 if (fabs(segmentMatch->x - segmentLocalPosition.
x()) < 1E-6 &&
257 fabs(segmentMatch->y - segmentLocalPosition.
y()) < 1E-6 &&
258 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x() / segmentLocalDirection.
z()) < 1E-6 &&
259 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y() / segmentLocalDirection.
z()) < 1E-6 &&
260 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx())) < 1E-6 &&
261 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy())) < 1E-6 &&
262 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx())) < 1E-6 &&
263 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy())) < 1E-6) {
283 if (fabs(f) > 900000)
MonitorElement * hCSCDx[4][4]
T getUntrackedParameter(std::string const &, T const &) const
virtual void setCurrentFolder(std::string const &fullpath)
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]
C::const_iterator const_iterator
constant access iterator type
MonitorElement * hCSCDy[4][4]
edm::Handle< DTRecSegment4DCollection > dtSegmentCollectionH_
MonitorElement * hCSCPully[4][4]
MonitorElement * hSegmentIsAssociatedBool
MonitorElement * hDTPullx[4][4]
MonitorElement * hCSCPullx[4][4]
MonitorElement * hNumMatches[4]
MonitorElement * hDTDdXdZ[4][4]
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeomToken_
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]
MonitorElement * hDTDy[4][3]
MonitorElement * hCSCPulldYdZ[4][4]
virtual void Fill(MonitorElement *, float)
T getParameter(std::string const &) const
MonitorElement * hDTNumSegments[4][4]
MonitorElement * hCSCNumSegments[4][4]
MonitorElement * hNumChambersNoRPC[4]
edm::ESHandle< GlobalTrackingGeometry > geometry_
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollection_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * hDTPulldXdZ[4][4]
MonitorElement * hNumChambers[4]
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_