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")) {
46 for (
auto& imuon : *muons)
47 for (
const auto& ch : imuon.matches()) {
48 DetId chId(ch.id.rawId());
51 if (imuon.pt() < 15 || !imuon.isGlobalMuon())
54 int nsegs = ch.segmentMatches.size();
59 float dx = (posHit.
x() ? posHit.
x() - ch.x : 0);
60 float dy = (posHit.
y() ? posHit.
y() - ch.y : 0);
61 float dr =
sqrt(dx * dx + dy * dy);
76 bool segmentNoisyPhi =
false;
80 nPhiHits = phiRecHits.size();
87 bool segmentNoisyZ =
false;
91 nZHits = zRecHits.size();
98 if (segmentNoisyPhi || segmentNoisyZ)
115 double angleZ = fabs(atan(segment4DLocalDir.
y() / segment4DLocalDir.
z()) * 180. /
Geom::pi());
119 double anglePhi = fabs(atan(segment4DLocalDir.
x() / segment4DLocalDir.
z()) * 180. /
Geom::pi());
127 std::vector<DTRecHit1D>
const& dtHits) {
128 bool segmentNoisy =
false;
130 std::vector<DTRecHit1D>::const_iterator dtHit = dtHits.begin();
131 std::vector<DTRecHit1D>::const_iterator dtHits_end = dtHits.end();
132 for (; dtHit != dtHits_end; ++dtHit) {
135 bool isNoisy =
false, isFEMasked =
false, isTDCMasked =
false, isTrigMask =
false, isDead =
false, isNohv =
false;
136 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
138 LogTrace(
"Calibration") <<
"Wire: " << wireId <<
" is noisy, skipping!";
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
DTSegmentSelector(edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
LocalVector localDirection() const override
Local direction in Chamber frame.
LocalPoint localPosition() const override
Local position in Chamber frame.
std::vector< Muon > MuonCollection
collection of Muon objects
bool operator()(DTRecSegment4D const &, edm::Event const &, edm::EventSetup const &)
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > theStatusMapToken_
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 degreesOfFreedom() const override
Degrees of freedom of the segment fit.
bool checkNoisySegment(edm::ESHandle< DTStatusFlag > const &, std::vector< DTRecHit1D > const &)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
double chi2() const override
Chi2 of the segment fit.