32 for (
unsigned int i = 0;
i < 4;
i++) {
47 sprintf(name,
"hDT%iNumSegments",
station+1);
48 sprintf(title,
"DT Station %i Number of Segments (No Arbitration)",
station+1);
51 sprintf(name,
"hDT%iDx",
station+1);
52 sprintf(title,
"DT Station %i Delta X",
station+1);
55 sprintf(name,
"hDT%iPullx",
station+1);
56 sprintf(title,
"DT Station %i Pull X",
station+1);
59 sprintf(name,
"hDT%iDdXdZ",
station+1);
60 sprintf(title,
"DT Station %i Delta DxDz",
station+1);
63 sprintf(name,
"hDT%iPulldXdZ",
station+1);
64 sprintf(title,
"DT Station %i Pull DxDz",
station+1);
68 sprintf(name,
"hDT%iDy",
station+1);
69 sprintf(title,
"DT Station %i Delta Y",
station+1);
72 sprintf(name,
"hDT%iPully",
station+1);
73 sprintf(title,
"DT Station %i Pull Y",
station+1);
76 sprintf(name,
"hDT%iDdYdZ",
station+1);
77 sprintf(title,
"DT Station %i Delta DyDz",
station+1);
80 sprintf(name,
"hDT%iPulldYdZ",
station+1);
81 sprintf(title,
"DT Station %i Pull DyDz",
station+1);
85 sprintf(name,
"hCSC%iNumSegments",
station+1);
86 sprintf(title,
"CSC Station %i Number of Segments (No Arbitration)",
station+1);
89 sprintf(name,
"hCSC%iDx",
station+1);
90 sprintf(title,
"CSC Station %i Delta X",
station+1);
93 sprintf(name,
"hCSC%iPullx",
station+1);
94 sprintf(title,
"CSC Station %i Pull X",
station+1);
97 sprintf(name,
"hCSC%iDdXdZ",
station+1);
98 sprintf(title,
"CSC Station %i Delta DxDz",
station+1);
101 sprintf(name,
"hCSC%iPulldXdZ",
station+1);
102 sprintf(title,
"CSC Station %i Pull DxDz",
station+1);
105 sprintf(name,
"hCSC%iDy",
station+1);
106 sprintf(title,
"CSC Station %i Delta Y",
station+1);
109 sprintf(name,
"hCSC%iPully",
station+1);
110 sprintf(title,
"CSC Station %i Pull Y",
station+1);
113 sprintf(name,
"hCSC%iDdYdZ",
station+1);
114 sprintf(title,
"CSC Station %i Delta DyDz",
station+1);
117 sprintf(name,
"hCSC%iPulldYdZ",
station+1);
118 sprintf(title,
"CSC Station %i Pull DyDz",
station+1);
127 using namespace reco;
138 for (
unsigned int i = 0;
i < 4;
i++) {
184 LocalPoint segmentLocalPosition = segment->localPosition();
185 LocalVector segmentLocalDirection = segment->localDirection();
186 LocalError segmentLocalPositionError = segment->localPositionError();
187 LocalError segmentLocalDirectionError = segment->localDirectionError();
188 bool segmentFound =
false;
193 if (!
muon->isMatchesValid())
196 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
197 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
198 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
199 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
201 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
202 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
203 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
204 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
205 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
206 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
207 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
208 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
214 if (segmentFound)
break;
216 if (segmentFound)
break;
228 LocalPoint segmentLocalPosition = segment->localPosition();
229 LocalVector segmentLocalDirection = segment->localDirection();
230 LocalError segmentLocalPositionError = segment->localPositionError();
231 LocalError segmentLocalDirectionError = segment->localDirectionError();
232 bool segmentFound =
false;
237 if (!
muon->isMatchesValid())
240 for(std::vector<MuonChamberMatch>::const_iterator chamberMatch =
muon->matches().begin();
241 chamberMatch !=
muon->matches().end(); ++chamberMatch) {
242 for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
243 segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
245 if (fabs(segmentMatch->x - segmentLocalPosition.
x() ) < 1E-6 &&
246 fabs(segmentMatch->y - segmentLocalPosition.
y() ) < 1E-6 &&
247 fabs(segmentMatch->dXdZ - segmentLocalDirection.
x()/segmentLocalDirection.
z()) < 1E-6 &&
248 fabs(segmentMatch->dYdZ - segmentLocalDirection.
y()/segmentLocalDirection.
z()) < 1E-6 &&
249 fabs(segmentMatch->xErr -
sqrt(segmentLocalPositionError.
xx()) ) < 1E-6 &&
250 fabs(segmentMatch->yErr -
sqrt(segmentLocalPositionError.
yy()) ) < 1E-6 &&
251 fabs(segmentMatch->dXdZErr -
sqrt(segmentLocalDirectionError.
xx()) ) < 1E-6 &&
252 fabs(segmentMatch->dYdZErr -
sqrt(segmentLocalDirectionError.
yy()) ) < 1E-6)
258 if (segmentFound)
break;
260 if (segmentFound)
break;
274 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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void cd(void)
go to top directory (ie. root)
#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 &)
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 * hNumMatches[4]
MonitorElement * hDTDdXdZ[4][4]
edm::Handle< reco::MuonCollection > muonCollectionH_
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollection_
MonitorElement * hDTDx[4][4]
MonitorElement * hDTPulldYdZ[4][3]
MonitorElement * hDTDy[4][3]
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
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]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hNumChambers[4]
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_