26 for (
unsigned int i = 0;
i < 4;
i++) {
40 sprintf(name,
"hDT%iNumSegments",
station+1);
41 sprintf(title,
"DT Station %i Number of Segments (No Arbitration)",
station+1);
44 sprintf(name,
"hDT%iDx",
station+1);
45 sprintf(title,
"DT Station %i Delta X",
station+1);
48 sprintf(name,
"hDT%iPullx",
station+1);
49 sprintf(title,
"DT Station %i Pull X",
station+1);
52 sprintf(name,
"hDT%iDdXdZ",
station+1);
53 sprintf(title,
"DT Station %i Delta DxDz",
station+1);
56 sprintf(name,
"hDT%iPulldXdZ",
station+1);
57 sprintf(title,
"DT Station %i Pull DxDz",
station+1);
61 sprintf(name,
"hDT%iDy",
station+1);
62 sprintf(title,
"DT Station %i Delta Y",
station+1);
65 sprintf(name,
"hDT%iPully",
station+1);
66 sprintf(title,
"DT Station %i Pull Y",
station+1);
69 sprintf(name,
"hDT%iDdYdZ",
station+1);
70 sprintf(title,
"DT Station %i Delta DyDz",
station+1);
73 sprintf(name,
"hDT%iPulldYdZ",
station+1);
74 sprintf(title,
"DT Station %i Pull DyDz",
station+1);
78 sprintf(name,
"hCSC%iNumSegments",
station+1);
79 sprintf(title,
"CSC Station %i Number of Segments (No Arbitration)",
station+1);
82 sprintf(name,
"hCSC%iDx",
station+1);
83 sprintf(title,
"CSC Station %i Delta X",
station+1);
86 sprintf(name,
"hCSC%iPullx",
station+1);
87 sprintf(title,
"CSC Station %i Pull X",
station+1);
90 sprintf(name,
"hCSC%iDdXdZ",
station+1);
91 sprintf(title,
"CSC Station %i Delta DxDz",
station+1);
94 sprintf(name,
"hCSC%iPulldXdZ",
station+1);
95 sprintf(title,
"CSC Station %i Pull DxDz",
station+1);
98 sprintf(name,
"hCSC%iDy",
station+1);
99 sprintf(title,
"CSC Station %i Delta Y",
station+1);
102 sprintf(name,
"hCSC%iPully",
station+1);
103 sprintf(title,
"CSC Station %i Pull Y",
station+1);
106 sprintf(name,
"hCSC%iDdYdZ",
station+1);
107 sprintf(title,
"CSC Station %i Delta DyDz",
station+1);
110 sprintf(name,
"hCSC%iPulldYdZ",
station+1);
111 sprintf(title,
"CSC Station %i Pull DyDz",
station+1);
124 using namespace reco;
135 for (
unsigned int i = 0;
i < 4;
i++) {
180 LocalPoint segmentLocalPosition = segment->localPosition();
181 LocalVector segmentLocalDirection = segment->localDirection();
182 LocalError segmentLocalPositionError = segment->localPositionError();
183 LocalError segmentLocalDirectionError = segment->localDirectionError();
184 bool segmentFound =
false;
189 if (!
muon->isMatchesValid())
192 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
193 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
194 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
195 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
197 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
198 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
199 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
200 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
201 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
202 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
203 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
204 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
210 if (segmentFound)
break;
212 if (segmentFound)
break;
224 LocalPoint segmentLocalPosition = segment->localPosition();
225 LocalVector segmentLocalDirection = segment->localDirection();
226 LocalError segmentLocalPositionError = segment->localPositionError();
227 LocalError segmentLocalDirectionError = segment->localDirectionError();
228 bool segmentFound =
false;
233 if (!
muon->isMatchesValid())
236 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
237 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
238 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
239 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
241 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
242 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
243 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
244 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
245 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
246 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
247 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
248 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
254 if (segmentFound)
break;
256 if (segmentFound)
break;
270 if (fabs(f) > 900000)
return;
T getParameter(std::string const &) const
MonitorElement * hCSCDx[4][4]
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#define DEFINE_FWK_MODULE(type)
MonitorElement * hCSCDdYdZ[4][4]
MuonIdDQM(const edm::ParameterSet &)
MonitorElement * hCSCDdXdZ[4][4]
MonitorElement * hCSCPulldXdZ[4][4]
virtual void analyze(const edm::Event &, const edm::EventSetup &)
bool useGlobalMuonsNotTrackerMuons_
edm::InputTag inputDTRecSegment4DCollection_
edm::InputTag inputCSCSegmentCollection_
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]
edm::InputTag inputMuonCollection_
MonitorElement * hNumMatches[4]
MonitorElement * hDTDdXdZ[4][4]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::Handle< reco::MuonCollection > muonCollectionH_
MonitorElement * hDTDx[4][4]
MonitorElement * hDTPulldYdZ[4][3]
MonitorElement * hDTDy[4][3]
MonitorElement * hCSCPulldYdZ[4][4]
virtual void Fill(MonitorElement *, float)
MonitorElement * hDTNumSegments[4][4]
MonitorElement * hCSCNumSegments[4][4]
edm::ESHandle< GlobalTrackingGeometry > geometry_
MonitorElement * hDTPulldXdZ[4][4]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hNumChambers[4]
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_