17 : muonTags_(pset.getParameter<
edm::
InputTag>(
"Muons")),
18 checkNoisyChannels_(pset.getParameter<
bool>(
"checkNoisyChannels")),
19 minHitsPhi_(pset.getParameter<
int>(
"minHitsPhi")),
20 minHitsZ_(pset.getParameter<
int>(
"minHitsZ")),
21 maxChi2_(pset.getParameter<double>(
"maxChi2")),
22 maxAnglePhi_(pset.getParameter<double>(
"maxAnglePhi")),
23 maxAngleZ_(pset.getParameter<double>(
"maxAngleZ")) {
45 for (
auto& imuon : *muons)
46 for (
const auto& ch : imuon.matches()) {
47 DetId chId(ch.id.rawId());
50 if (imuon.pt() < 15 || !imuon.isGlobalMuon())
53 int nsegs = ch.segmentMatches.size();
58 float dx = (posHit.
x() ? posHit.
x() - ch.x : 0);
59 float dy = (posHit.
y() ? posHit.
y() - ch.y : 0);
60 float dr =
sqrt(dx * dx + dy * dy);
75 bool segmentNoisyPhi =
false;
79 nPhiHits = phiRecHits.size();
86 bool segmentNoisyZ =
false;
90 nZHits = zRecHits.size();
97 if (segmentNoisyPhi || segmentNoisyZ)
114 double angleZ = fabs(atan(segment4DLocalDir.
y() / segment4DLocalDir.
z()) * 180. /
Geom::pi());
118 double anglePhi = fabs(atan(segment4DLocalDir.
x() / segment4DLocalDir.
z()) * 180. /
Geom::pi());
126 std::vector<DTRecHit1D>
const& dtHits) {
127 bool segmentNoisy =
false;
129 std::vector<DTRecHit1D>::const_iterator dtHit = dtHits.begin();
130 std::vector<DTRecHit1D>::const_iterator dtHits_end = dtHits.end();
131 for (; dtHit != dtHits_end; ++dtHit) {
134 bool isNoisy =
false, isFEMasked =
false, isTDCMasked =
false, isTrigMask =
false, isDead =
false, isNohv =
false;
135 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
137 LogTrace(
"Calibration") <<
"Wire: " << wireId <<
" is noisy, skipping!";
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
LocalPoint localPosition() const override
Local position in Chamber frame.
DTSegmentSelector(edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
LocalVector localDirection() const override
Local direction in Chamber frame.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
double chi2() const override
Chi2 of the segment fit.
std::vector< Muon > MuonCollection
collection of Muon objects
bool operator()(DTRecSegment4D const &, edm::Event const &, edm::EventSetup const &)
bool hasPhi() const
Does it have the Phi projection?
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
edm::EDGetTokenT< reco::MuonCollection > muonToken_
T const * product() const
int cellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
get content
bool checkNoisySegment(edm::ESHandle< DTStatusFlag > const &, std::vector< DTRecHit1D > const &)
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.