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"))
40 if (muons->empty())
return false;
45 for (
auto &imuon : *muons)
46 for (
const auto &ch : imuon.matches()) {
47 DetId chId(ch.id.rawId());
48 if (chId!=segId)
continue;
49 if ( imuon.pt()<15 || !imuon.isGlobalMuon())
continue;
51 int nsegs=ch.segmentMatches.size();
55 float dx = (posHit.
x() ? posHit.
x()-ch.x : 0 );
56 float dy = (posHit.
y() ? posHit.
y()-ch.y : 0 );
57 float dr =
sqrt(dx*dx+dy*dy);
58 if (dr<5) matched=
true;
61 if (!matched) result=
false;
71 bool segmentNoisyPhi =
false;
75 nPhiHits = phiRecHits.size();
81 bool segmentNoisyZ =
false;
85 nZHits = zRecHits.size();
91 if(segmentNoisyPhi || segmentNoisyZ)
108 double angleZ = fabs( atan(segment4DLocalDir.
y()/segment4DLocalDir.
z())*180./
Geom::pi() );
112 double anglePhi = fabs( atan(segment4DLocalDir.
x()/segment4DLocalDir.
z())*180./
Geom::pi() );
121 bool segmentNoisy =
false;
123 std::vector<DTRecHit1D>::const_iterator dtHit = dtHits.begin();
124 std::vector<DTRecHit1D>::const_iterator dtHits_end = dtHits.end();
125 for(; dtHit != dtHits_end; ++dtHit){
128 bool isNoisy =
false, isFEMasked =
false, isTDCMasked =
false, isTrigMask =
false,
129 isDead =
false, isNohv =
false;
130 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
132 LogTrace(
"Calibration") <<
"Wire: " << wireId <<
" is noisy, skipping!";
133 segmentNoisy =
true;
break;
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.
def setup(process, global_tag, zero_tesla=False)
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.