|
|
#include <RecoTracker/DeDx/plugins/DeDxHitInfoProducer.cc>
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 34 of file DeDxHitInfoProducer.h.
◆ DeDxHitInfoProducer()
◆ ~DeDxHitInfoProducer()
DeDxHitInfoProducer::~DeDxHitInfoProducer |
( |
| ) |
|
|
override |
◆ beginRun()
◆ makeCalibrationMap()
void DeDxHitInfoProducer::makeCalibrationMap |
( |
const TrackerGeometry & |
tkGeom | ) |
|
|
private |
◆ processHit()
Definition at line 160 of file DeDxHitInfoProducer.cc.
165 auto const& thit = static_cast<BaseTrackerRecHit const&>(*
recHit);
171 auto const& clus = thit.firstClusterRef();
175 if (clus.isPixel()) {
179 const auto* detUnit =
recHit->detUnit();
180 if (detUnit ==
nullptr)
183 float chargeAbs = clus.pixelCluster().charge();
184 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.pixelCluster());
185 }
else if (clus.isStrip() && !thit.isMatched()) {
189 const auto* detUnit =
recHit->detUnit();
190 if (detUnit ==
nullptr)
195 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.stripCluster());
196 }
else if (clus.isStrip() && thit.isMatched()) {
204 if (detUnitM ==
nullptr)
213 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 64 of file DeDxHitInfoProducer.cc.
70 auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
79 bool passPt = (
track.pt() >=
minTrackPt), passLowDeDx =
false, passHighDeDx =
false, pass = passPt;
87 pass = passHighDeDx || passLowDeDx;
95 auto const& trajParams =
track.extra()->trajParams();
97 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
102 auto trackDirection = trajParams[
h].direction();
103 float cosine = trackDirection.z() / trackDirection.mag();
109 std::vector<DeDxHit>
hits;
110 hits.reserve(hitDeDxInfo.size());
111 for (
unsigned int i = 0,
n = hitDeDxInfo.size();
i <
n; ++
i) {
112 if (hitDeDxInfo.detId(
i).subdetId() <= 2) {
120 std::sort(
hits.begin(),
hits.end(), std::less<DeDxHit>());
139 indices.push_back(resultdedxHitColl->size());
140 resultdedxHitColl->push_back(hitDeDxInfo);
147 auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxHitCollHandle);
153 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, bTagCombinedSVVariables_cff::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(), reco::DeDxHitInfo::stripCluster(), DetId::subdetId(), HLT_2018_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_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
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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
const unsigned int lowPtTracksPrescaleFail
const float minTrackPtPrescale
DetId geographicalId() const
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)
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