|
|
#include <RecoTracker/DeDx/plugins/DeDxHitInfoProducer.cc>
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 35 of file DeDxHitInfoProducer.h.
◆ DeDxHitInfoProducer()
◆ ~DeDxHitInfoProducer()
DeDxHitInfoProducer::~DeDxHitInfoProducer |
( |
| ) |
|
|
override |
◆ beginRun()
◆ makeCalibrationMap()
void DeDxHitInfoProducer::makeCalibrationMap |
( |
const TrackerGeometry & |
tkGeom | ) |
|
|
private |
◆ processHit()
Definition at line 161 of file DeDxHitInfoProducer.cc.
166 auto const& thit = static_cast<BaseTrackerRecHit const&>(*
recHit);
172 auto const& clus = thit.firstClusterRef();
176 if (clus.isPixel()) {
180 const auto* detUnit =
recHit->detUnit();
181 if (detUnit ==
nullptr)
184 float chargeAbs = clus.pixelCluster().charge();
185 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.pixelCluster());
186 }
else if (clus.isStrip() && !thit.isMatched()) {
190 const auto* detUnit =
recHit->detUnit();
191 if (detUnit ==
nullptr)
196 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.stripCluster());
197 }
else if (clus.isStrip() && thit.isMatched()) {
205 if (detUnitM ==
nullptr)
214 if (detUnitS ==
nullptr)
References funct::abs(), reco::DeDxHitInfo::addHit(), Surface::bounds(), calibGains, TrackerSingleRecHit::detUnit(), f, TrackingRecHit::geographicalId(), DeDxTools::getCharge(), TrackerGeometry::idToDet(), m_off, SiStripPI::max, SiStripMatchedRecHit2D::monoHit(), rpcPointValidation_cfi::recHit, SiStripMatchedRecHit2D::stereoHit(), TrackerSingleRecHit::stripCluster(), GeomDet::surface(), Bounds::thickness(), tkGeom, usePixel, and useStrip.
Referenced by produce().
◆ produce()
Definition at line 65 of file DeDxHitInfoProducer.cc.
71 auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
80 bool passPt = (
track.pt() >=
minTrackPt), passLowDeDx =
false, passHighDeDx =
false, pass = passPt;
88 pass = passHighDeDx || passLowDeDx;
96 auto const& trajParams =
track.extra()->trajParams();
98 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
103 auto trackDirection = trajParams[
h].direction();
104 float cosine = trackDirection.z() / trackDirection.mag();
110 std::vector<DeDxHit>
hits;
111 hits.reserve(hitDeDxInfo.size());
112 for (
unsigned int i = 0,
n = hitDeDxInfo.size();
i <
n; ++
i) {
113 if (hitDeDxInfo.detId(
i).subdetId() <= 2) {
140 indices.push_back(resultdedxHitColl->size());
141 resultdedxHitColl->push_back(hitDeDxInfo);
148 auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxHitCollHandle);
154 auto dedxPrescale = std::make_unique<edm::ValueMap<int>>();
References funct::abs(), reco::DeDxHitInfo::charge(), GenericTruncatedAverageDeDxEstimator::dedx(), reco::DeDxHitInfo::detId(), trigObjTnPSource_cfi::filler, h, hcalSimParameters_cfi::hb, hfClusterShapes_cfi::hits, mps_fire::i, iEvent, dqmdumpme::indices, trackerHitRTTI::isFromDet(), dqmiolumiharvest::j, lowPtTracksDeDxThreshold, lowPtTracksEstimator, lowPtTracksPrescaleFail, lowPtTracksPrescalePass, m_tracksTag, maxTrackEta, MeVperADCPixel, MeVperADCStrip, minTrackHits, minTrackPt, minTrackPtPrescale, eostools::move(), dqmiodumpmetadata::n, reco::DeDxHitInfo::pathlength(), hltrates_dqm_sourceclient-live_cfg::prescales, processHit(), edm::Handle< T >::product(), rpcPointValidation_cfi::recHit, DeDxTools::shapeSelection(), shapetest, reco::DeDxHitInfo::size(), jetUpdater_cfi::sort, reco::DeDxHitInfo::stripCluster(), DetId::subdetId(), HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, and xorshift128p().
◆ xorshift128p()
uint64_t DeDxHitInfoProducer::xorshift128p |
( |
uint64_t |
state[2] | ) |
|
|
inlineprivate |
◆ calibGains
std::vector<std::vector<float> > DeDxHitInfoProducer::calibGains |
|
private |
◆ lowPtTracksDeDxThreshold
const float DeDxHitInfoProducer::lowPtTracksDeDxThreshold |
|
private |
◆ lowPtTracksEstimator
◆ lowPtTracksPrescaleFail
const unsigned int DeDxHitInfoProducer::lowPtTracksPrescaleFail |
|
private |
◆ lowPtTracksPrescalePass
const unsigned int DeDxHitInfoProducer::lowPtTracksPrescalePass |
|
private |
◆ m_calibrationPath
const std::string DeDxHitInfoProducer::m_calibrationPath |
|
private |
◆ m_off
unsigned int DeDxHitInfoProducer::m_off |
|
private |
◆ m_tkGeomToken
◆ m_tracksTag
◆ maxTrackEta
const float DeDxHitInfoProducer::maxTrackEta |
|
private |
◆ MeVperADCPixel
const float DeDxHitInfoProducer::MeVperADCPixel |
|
private |
◆ MeVperADCStrip
const float DeDxHitInfoProducer::MeVperADCStrip |
|
private |
◆ minTrackHits
const unsigned int DeDxHitInfoProducer::minTrackHits |
|
private |
◆ minTrackPt
const float DeDxHitInfoProducer::minTrackPt |
|
private |
◆ minTrackPtPrescale
const float DeDxHitInfoProducer::minTrackPtPrescale |
|
private |
◆ shapetest
const bool DeDxHitInfoProducer::shapetest |
|
private |
◆ tkGeom
◆ useCalibration
const bool DeDxHitInfoProducer::useCalibration |
|
private |
◆ usePixel
const bool DeDxHitInfoProducer::usePixel |
|
private |
◆ useStrip
const bool DeDxHitInfoProducer::useStrip |
|
private |
const float MeVperADCPixel
const TrackerGeomDet * idToDet(DetId) const override
const bool useCalibration
T const * product() const
void processHit(const TrackingRecHit *recHit, const float trackMomentum, const float cosine, reco::DeDxHitInfo &hitDeDxInfo, const LocalPoint &hitLocalPos)
uint64_t xorshift128p(uint64_t state[2])
SiStripCluster const & stripCluster() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const unsigned int lowPtTracksPrescaleFail
const float minTrackPtPrescale
DetId geographicalId() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > m_tkGeomToken
const Plane & surface() const
The nominal surface of the GeomDet.
const Bounds & bounds() const
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
SiStripRecHit2D stereoHit() const
const float MeVperADCStrip
virtual float thickness() const =0
edm::ESHandle< TrackerGeometry > tkGeom
SiStripRecHit2D monoHit() const
bool isFromDet(TrackingRecHit const &hit)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Error, false > LogError
std::vector< std::vector< float > > calibGains
edm::EDGetTokenT< reco::TrackCollection > m_tracksTag
const float lowPtTracksDeDxThreshold
T getParameter(std::string const &) const
const unsigned int lowPtTracksPrescalePass
const unsigned int minTrackHits
unsigned long long uint64_t
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator
Abs< T >::type abs(const T &t)
unsigned int offsetDU(SubDetector sid) const
std::vector< Track > TrackCollection
collection of Tracks
void addHit(const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const SiStripCluster &stripCluster)
const std::string m_calibrationPath
const GeomDetUnit * detUnit() const override