31 m_digiMaxDistanceX(iConfig.getParameter<double>(
"digiMaxDistanceX")),
32 m_dtDigisToken(iC.consumes<
DTDigiCollection>(iConfig.getParameter<
edm::InputTag>(
"dtDigiCollectionLabel"))),
65 int nDigisInRange = 0;
70 double xTrack = muChMatch.
x;
80 for (
auto digiIt = range.first ;digiIt!=range.second; ++digiIt)
85 double dX =
std::abs(xWire - xTrack);
97 double xTrack = muChMatch.
x;
98 double yTrack = muChMatch.
y;
103 const CSCDetId layerId(chId.endcap(), chId.station(),
104 chId.ring(), chId.chamber(),
109 for (
auto digiIt = range.first ;digiIt!=range.second; ++digiIt)
112 std::vector<int> adcVals = digiIt->getADCCounts();
113 bool hasFired =
false;
117 for (
const auto & adcVal : adcVals)
119 diff = (
float)adcVal - pedestal;
120 if (diff > threshold)
127 if (!hasFired)
continue;
131 Float_t xStrip = layerGeom->
xOfStrip(digiIt->getStrip(), yTrack);
132 float dX =
std::abs(xStrip - xTrack);
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
MuonShowerDigiFiller(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr uint32_t rawId() const
get the raw id
edm::Handle< DTDigiCollection > m_dtDigis
void getDigis(edm::Event &iEvent)
edm::EDGetTokenT< CSCStripDigiCollection > m_cscDigisToken
float xOfStrip(int strip, float y=0.) const
const DTTopology & specificTopology() const
edm::ESHandle< DTGeometry > m_dtGeometry
static const int maxLayerId
highest layer id
Abs< T >::type abs(const T &t)
static const int maxSuperLayerId
highest superlayer id
edm::EDGetTokenT< DTDigiCollection > m_dtDigisToken
void fillDefault(reco::MuonChamberMatch &muChMatch) const
void getES(const edm::EventSetup &iSetup)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
edm::ESHandle< CSCGeometry > m_cscGeometry
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
edm::Handle< CSCStripDigiCollection > m_cscDigis
double m_digiMaxDistanceX
const CSCLayerGeometry * geometry() const
void fill(reco::MuonChamberMatch &muChMatch) const