CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DeDxHitInfoProducer Class Reference

#include <RecoTracker/DeDx/plugins/DeDxHitInfoProducer.cc>

Inheritance diagram for DeDxHitInfoProducer:
edm::stream::EDProducer<>

Public Member Functions

 DeDxHitInfoProducer (const edm::ParameterSet &)
 
 ~DeDxHitInfoProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void beginRun (edm::Run const &run, const edm::EventSetup &) override
 
void makeCalibrationMap (const TrackerGeometry &tkGeom_)
 
void processHit (const TrackingRecHit *recHit, const float trackMomentum, const LocalVector &trackDirection, reco::DeDxHitInfo &hitDeDxInfo, std::vector< float > &hitMomentum, const LocalPoint &hitLocalPos)
 
void processRec (reco::DeDxHitInfo &, const SiStripRecHit2D &, const LocalPoint &, const LocalVector &, const float &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
uint64_t xorshift128p (uint64_t state[2])
 

Private Attributes

std::vector< std::vector< float > > calibGains_
 
const std::string calibrationPath_
 
edm::ESHandle< ClusterShapeHitFilterclShape_
 
const edm::ESGetToken< ClusterShapeHitFilter, CkfComponentsRecordclShapeToken_
 
const bool doShapeTest_
 
const float lowPtTracksDeDxThreshold_
 
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator_
 
const unsigned int lowPtTracksPrescaleFail_
 
const unsigned int lowPtTracksPrescalePass_
 
const float maxTrackEta_
 
const unsigned int minTrackHits_
 
const float minTrackPt_
 
const float minTrackPtPrescale_
 
unsigned int offsetDU_
 
edm::Handle< SiPixelClusterShapeCachepixShapeCache_
 
const edm::EDGetTokenT< SiPixelClusterShapeCachepixShapeCacheToken_
 
const bool storeMomentumAtHit_
 
const float theMeVperADCPixel_
 
const float theMeVperADCStrip_
 
edm::ESHandle< TrackerGeometrytkGeom_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
const edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 
const bool useCalibration_
 
const bool usePixel_
 
const bool usePixelForPrescales_
 
const bool usePixelShape_
 
const bool useStrip_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 47 of file DeDxHitInfoProducer.cc.

Constructor & Destructor Documentation

◆ DeDxHitInfoProducer()

DeDxHitInfoProducer::DeDxHitInfoProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 108 of file DeDxHitInfoProducer.cc.

References edm::BeginRun, storeMomentumAtHit_, usePixel_, and useStrip_.

109  : usePixel_(iConfig.getParameter<bool>("usePixel")),
110  useStrip_(iConfig.getParameter<bool>("useStrip")),
111  theMeVperADCPixel_(iConfig.getParameter<double>("MeVperADCPixel")),
112  theMeVperADCStrip_(iConfig.getParameter<double>("MeVperADCStrip")),
113  minTrackHits_(iConfig.getParameter<unsigned>("minTrackHits")),
114  minTrackPt_(iConfig.getParameter<double>("minTrackPt")),
115  minTrackPtPrescale_(iConfig.getParameter<double>("minTrackPtPrescale")),
116  maxTrackEta_(iConfig.getParameter<double>("maxTrackEta")),
117  calibrationPath_(iConfig.getParameter<string>("calibrationPath")),
118  useCalibration_(iConfig.getParameter<bool>("useCalibration")),
119  doShapeTest_(iConfig.getParameter<bool>("shapeTest")),
120  usePixelShape_(not iConfig.getParameter<edm::InputTag>("clusterShapeCache").label().empty()),
121  storeMomentumAtHit_(iConfig.getParameter<bool>("storeMomentumAtHit")),
122  lowPtTracksPrescalePass_(iConfig.getParameter<uint32_t>("lowPtTracksPrescalePass")),
123  lowPtTracksPrescaleFail_(iConfig.getParameter<uint32_t>("lowPtTracksPrescaleFail")),
124  lowPtTracksEstimator_(iConfig.getParameter<edm::ParameterSet>("lowPtTracksEstimatorParameters")),
125  lowPtTracksDeDxThreshold_(iConfig.getParameter<double>("lowPtTracksDeDxThreshold")),
126  usePixelForPrescales_(iConfig.getParameter<bool>("usePixelForPrescales")),
127  tracksToken_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
128  pixShapeCacheToken_(consumes<SiPixelClusterShapeCache>(iConfig.getParameter<edm::InputTag>("clusterShapeCache"))),
129  tkGeomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
131  esConsumes<ClusterShapeHitFilter, CkfComponentsRecord>(edm::ESInputTag("", "ClusterShapeHitFilter"))) {
132  produces<reco::DeDxHitInfoCollection>();
133  produces<reco::DeDxHitInfoAss>();
134  produces<edm::ValueMap<int>>("prescale");
136  produces<edm::ValueMap<std::vector<float>>>("momentumAtHit");
137 
138  if (!usePixel_ && !useStrip_)
139  edm::LogError("DeDxHitsProducer") << "No Pixel Hits NOR Strip Hits will be saved. Running this module is useless";
140 }
const unsigned int minTrackHits_
const std::string calibrationPath_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< SiPixelClusterShapeCache > pixShapeCacheToken_
const unsigned int lowPtTracksPrescaleFail_
std::string const & label() const
Definition: InputTag.h:36
Log< level::Error, false > LogError
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
const unsigned int lowPtTracksPrescalePass_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
const edm::ESGetToken< ClusterShapeHitFilter, CkfComponentsRecord > clShapeToken_
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator_
const float lowPtTracksDeDxThreshold_

◆ ~DeDxHitInfoProducer()

DeDxHitInfoProducer::~DeDxHitInfoProducer ( )
overridedefault

Member Function Documentation

◆ beginRun()

void DeDxHitInfoProducer::beginRun ( edm::Run const &  run,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 145 of file DeDxHitInfoProducer.cc.

References calibGains_, calibrationPath_, edm::EventSetup::getHandle(), deDxTools::makeCalibrationMap(), TrackerGeometry::offsetDU(), offsetDU_, GeomDetEnumerators::PixelBarrel, tkGeom_, tkGeomToken_, and useCalibration_.

145  {
146  tkGeom_ = iSetup.getHandle(tkGeomToken_);
147  if (useCalibration_ && calibGains_.empty()) {
148  offsetDU_ = tkGeom_->offsetDU(GeomDetEnumerators::PixelBarrel); //index start at the first pixel
149 
151  }
152 }
const std::string calibrationPath_
unsigned int offsetDU(SubDetector sid) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESHandle< TrackerGeometry > tkGeom_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
void makeCalibrationMap(const std::string &m_calibrationPath, const TrackerGeometry &tkGeom, std::vector< std::vector< float >> &calibGains, const unsigned int &m_off)
std::vector< std::vector< float > > calibGains_

◆ makeCalibrationMap()

void DeDxHitInfoProducer::makeCalibrationMap ( const TrackerGeometry tkGeom_)
private

◆ processHit()

void DeDxHitInfoProducer::processHit ( const TrackingRecHit recHit,
const float  trackMomentum,
const LocalVector trackDirection,
reco::DeDxHitInfo hitDeDxInfo,
std::vector< float > &  hitMomentum,
const LocalPoint hitLocalPos 
)
private

Definition at line 297 of file DeDxHitInfoProducer.cc.

References funct::abs(), reco::DeDxHitInfo::addHit(), Surface::bounds(), reco::DeDxHitInfo::Calibration, clShape_, reco::DeDxHitInfo::Compatible, reco::DeDxHitInfo::Complete, runTheMatrix::const, data, f, TrackerGeometry::idToDet(), ClusterShapeHitFilter::isCompatible(), PV3DBase< T, PVType, FrameType >::mag(), SiStripPI::max, SiStripMatchedRecHit2D::monoHit(), pixShapeCache_, processRec(), rpcPointValidation_cfi::recHit, SiStripMatchedRecHit2D::stereoHit(), storeMomentumAtHit_, GeomDet::surface(), Bounds::thickness(), tkGeom_, reco::btau::trackMomentum, usePixel_, usePixelShape_, useStrip_, and PV3DBase< T, PVType, FrameType >::z().

Referenced by produce().

302  {
303  auto const& thit = static_cast<BaseTrackerRecHit const&>(*recHit);
304  if (!thit.isValid())
305  return;
306 
307  //make sure cosine is not 0
308  float cosine = trackDirection.z() / trackDirection.mag();
309  float cosineAbs = std::max(0.00000001f, std::abs(cosine));
310 
311  auto const& clus = thit.firstClusterRef();
312  if (!clus.isValid())
313  return;
314 
315  const auto* detUnit = recHit->detUnit();
316  if (detUnit == nullptr) {
317  detUnit = tkGeom_->idToDet(thit.geographicalId());
318  }
319  float pathLen = detUnit->surface().bounds().thickness() / cosineAbs;
320 
321  if (clus.isPixel()) {
322  if (!usePixel_)
323  return;
324 
325  uint8_t type(0);
326  const auto& pixelDet = *dynamic_cast<const PixelGeomDetUnit*>(detUnit);
327  const auto& pixelRecHit = *dynamic_cast<const SiPixelRecHit*>(recHit);
329  ClusterShape().determineShape(pixelDet, clus.pixelCluster(), data);
330  if (data.isComplete)
332  if (usePixelShape_ && clShape_->isCompatible(pixelRecHit, trackDirection, *pixShapeCache_))
334  if (data.isComplete && data.isStraight && data.hasBigPixelsOnlyInside)
336 
337  float chargeAbs = clus.pixelCluster().charge();
338  hitDeDxInfo.addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, type, clus.pixelCluster());
339  } else if (clus.isStrip() && !thit.isMatched()) {
340  if (!useStrip_)
341  return;
342 
343  processRec(hitDeDxInfo, {thit.geographicalId(), clus}, hitLocalPos, trackDirection, cosineAbs);
344  } else if (clus.isStrip() && thit.isMatched()) {
345  if (!useStrip_)
346  return;
347  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(recHit);
348  if (!matchedHit)
349  return;
351  hitMomentum.push_back(trackMomentum);
352 
353  processRec(hitDeDxInfo, matchedHit->monoHit(), hitLocalPos, trackDirection, cosineAbs);
354  processRec(hitDeDxInfo, matchedHit->stereoHit(), hitLocalPos, trackDirection, cosineAbs);
355  }
356  if (storeMomentumAtHit_ && (clus.isPixel() || clus.isStrip()))
357  hitMomentum.push_back(trackMomentum);
358 }
SiStripRecHit2D stereoHit() const
T z() const
Definition: PV3DBase.h:61
void processRec(reco::DeDxHitInfo &, const SiStripRecHit2D &, const LocalPoint &, const LocalVector &, const float &)
edm::ESHandle< ClusterShapeHitFilter > clShape_
static constexpr int Compatible
Definition: DeDxHitInfo.h:40
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=nullptr) const
virtual float thickness() const =0
void addHit(const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const uint8_t &type, const SiStripCluster &stripCluster)
Definition: DeDxHitInfo.h:94
T mag() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
edm::ESHandle< TrackerGeometry > tkGeom_
static constexpr int Calibration
Definition: DeDxHitInfo.h:40
const TrackerGeomDet * idToDet(DetId) const override
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
static constexpr int Complete
Definition: DeDxHitInfo.h:40
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
edm::Handle< SiPixelClusterShapeCache > pixShapeCache_
SiStripRecHit2D monoHit() const
Our base class.
Definition: SiPixelRecHit.h:23
const Bounds & bounds() const
Definition: Surface.h:87

◆ processRec()

void DeDxHitInfoProducer::processRec ( reco::DeDxHitInfo hitDeDxInfo,
const SiStripRecHit2D recHit,
const LocalPoint lpos,
const LocalVector ldir,
const float &  cos 
)
private

Definition at line 271 of file DeDxHitInfoProducer.cc.

References funct::abs(), reco::DeDxHitInfo::addHit(), Surface::bounds(), calibGains_, reco::DeDxHitInfo::Calibration, clShape_, reco::DeDxHitInfo::Compatible, reco::DeDxHitInfo::Complete, funct::cos(), hcalRecHitTable_cff::detId, deDxTools::getCharge(), ClusterShapeHitFilter::getSizes(), TrackerGeometry::idToDet(), ClusterShapeHitFilter::isCompatible(), offsetDU_, rpcPointValidation_cfi::recHit, GeomDet::surface(), Bounds::thickness(), and tkGeom_.

Referenced by processHit().

275  {
276  uint8_t type(0);
277  int meas;
278  float pred;
279  const auto& usable = clShape_->getSizes(recHit, {}, ldir, meas, pred);
280  if (usable && meas <= int(std::abs(pred)) + 4)
282  if (clShape_->isCompatible(recHit, ldir))
284  if (usable)
286 
287  int NSaturating(0);
288  const auto& detId = recHit.geographicalId();
289  const auto* detUnit = recHit.detUnit();
290  if (detUnit == nullptr)
291  detUnit = tkGeom_->idToDet(detId);
292  const auto pathLen = detUnit->surface().bounds().thickness() / cos;
293  float chargeAbs = deDxTools::getCharge(&(recHit.stripCluster()), NSaturating, *detUnit, calibGains_, offsetDU_);
294  hitDeDxInfo.addHit(chargeAbs, pathLen, detId, lpos, type, recHit.stripCluster());
295 }
edm::ESHandle< ClusterShapeHitFilter > clShape_
static constexpr int Compatible
Definition: DeDxHitInfo.h:40
int getCharge(const SiStripCluster *cluster, int &nSatStrip, const GeomDetUnit &detUnit, const std::vector< std::vector< float >> &calibGains, const unsigned int &m_off)
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=nullptr) const
virtual float thickness() const =0
void addHit(const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const uint8_t &type, const SiStripCluster &stripCluster)
Definition: DeDxHitInfo.h:94
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::ESHandle< TrackerGeometry > tkGeom_
static constexpr int Calibration
Definition: DeDxHitInfo.h:40
const TrackerGeomDet * idToDet(DetId) const override
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
bool getSizes(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, int &part, ClusterData::ArrayType &meas, std::pair< float, float > &predr, PixelData const *pd=nullptr) const
static constexpr int Complete
Definition: DeDxHitInfo.h:40
std::vector< std::vector< float > > calibGains_
const Bounds & bounds() const
Definition: Surface.h:87

◆ produce()

void DeDxHitInfoProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 154 of file DeDxHitInfoProducer.cc.

References funct::abs(), cms::cuda::assert(), reco::DeDxHitInfo::charge(), clShape_, clShapeToken_, GenericTruncatedAverageDeDxEstimator::dedx(), reco::DeDxHitInfo::detId(), doShapeTest_, trigObjTnPSource_cfi::filler, edm::EventSetup::getHandle(), h, hcalSimParameters_cfi::hb, hfClusterShapes_cfi::hits, mps_fire::i, iEvent, dqmdumpme::indices, trackerHitRTTI::isFromDet(), dqmiolumiharvest::j, lowPtTracksDeDxThreshold_, lowPtTracksEstimator_, lowPtTracksPrescaleFail_, lowPtTracksPrescalePass_, maxTrackEta_, minTrackHits_, minTrackPt_, minTrackPtPrescale_, eostools::move(), dqmiodumpmetadata::n, reco::DeDxHitInfo::pathlength(), pixShapeCache_, pixShapeCacheToken_, hltrates_dqm_sourceclient-live_cfg::prescales, processHit(), edm::Handle< T >::product(), rpcPointValidation_cfi::recHit, deDxTools::shapeSelection(), reco::DeDxHitInfo::size(), jetUpdater_cfi::sort, storeMomentumAtHit_, reco::DeDxHitInfo::stripCluster(), DetId::subdetId(), theMeVperADCPixel_, theMeVperADCStrip_, HLT_2024v13_cff::track, JetHT_cfg::trackCollection, tracksToken_, usePixelForPrescales_, usePixelShape_, and xorshift128p().

154  {
155  edm::Handle<reco::TrackCollection> trackCollectionHandle;
156  iEvent.getByToken(tracksToken_, trackCollectionHandle);
157  const TrackCollection& trackCollection(*trackCollectionHandle.product());
158 
159  clShape_ = iSetup.getHandle(clShapeToken_);
160  if (usePixelShape_)
162 
163  // creates the output collection
164  auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
165 
166  std::vector<int> indices;
167  std::vector<int> prescales;
168  std::vector<std::vector<float>> hitMomenta;
169  uint64_t state[2] = {iEvent.id().event(), iEvent.id().luminosityBlock()};
170  for (unsigned int j = 0; j < trackCollection.size(); j++) {
172 
173  //track selection
174  bool passPt = (track.pt() >= minTrackPt_), passLowDeDx = false, passHighDeDx = false, pass = passPt;
175  if (!pass && (track.pt() >= minTrackPtPrescale_)) {
176  if (lowPtTracksPrescalePass_ > 0) {
177  passHighDeDx = ((xorshift128p(state) % lowPtTracksPrescalePass_) == 0);
178  }
179  if (lowPtTracksPrescaleFail_ > 0) {
180  passLowDeDx = ((xorshift128p(state) % lowPtTracksPrescaleFail_) == 0);
181  }
182  pass = passHighDeDx || passLowDeDx;
183  }
184  if (!pass || std::abs(track.eta()) > maxTrackEta_ || track.numberOfValidHits() < minTrackHits_) {
185  indices.push_back(-1);
186  continue;
187  }
188 
189  reco::DeDxHitInfo hitDeDxInfo;
190  std::vector<float> hitMomentum;
191  auto const& trajParams = track.extra()->trajParams();
192  auto hb = track.recHitsBegin();
193  for (unsigned int h = 0; h < track.recHitsSize(); h++) {
194  auto recHit = *(hb + h);
196  continue;
197 
198  const auto& traj = trajParams[h];
199  processHit(recHit, traj.momentum().mag(), traj.direction(), hitDeDxInfo, hitMomentum, traj.position());
200  }
201  assert(!storeMomentumAtHit_ || hitMomentum.size() == hitDeDxInfo.size());
202 
203  if (!passPt) {
204  std::vector<DeDxHit> hits;
205  hits.reserve(hitDeDxInfo.size());
206  for (unsigned int i = 0, n = hitDeDxInfo.size(); i < n; ++i) {
207  if (hitDeDxInfo.detId(i).subdetId() <= 2 && usePixelForPrescales_) {
208  hits.push_back(DeDxHit(hitDeDxInfo.charge(i) / hitDeDxInfo.pathlength(i) * theMeVperADCPixel_, 0, 0, 0));
209  } else if (hitDeDxInfo.detId(i).subdetId() > 2) {
210  if (doShapeTest_ && !deDxTools::shapeSelection(*hitDeDxInfo.stripCluster(i)))
211  continue;
212  hits.push_back(DeDxHit(hitDeDxInfo.charge(i) / hitDeDxInfo.pathlength(i) * theMeVperADCStrip_, 0, 0, 0));
213  }
214  }
215 
216  // In case we have a pixel only track, but usePixelForPrescales_ is false
217  if (hits.empty()) {
218  indices.push_back(-1);
219  continue;
220  }
221  std::sort(hits.begin(), hits.end(), std::less<DeDxHit>());
223  if (passLowDeDx) {
225  } else {
226  indices.push_back(-1);
227  continue;
228  }
229  } else {
230  if (passHighDeDx) {
232  } else {
233  indices.push_back(-1);
234  continue;
235  }
236  }
237  } else {
238  prescales.push_back(1);
239  }
240  indices.push_back(resultdedxHitColl->size());
241  resultdedxHitColl->push_back(hitDeDxInfo);
243  hitMomenta.push_back(hitMomentum);
244  }
246 
247  edm::OrphanHandle<reco::DeDxHitInfoCollection> dedxHitCollHandle = iEvent.put(std::move(resultdedxHitColl));
248 
249  //create map passing the handle to the matched collection
250  auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxHitCollHandle);
252  filler.insert(trackCollectionHandle, indices.begin(), indices.end());
253  filler.fill();
254  iEvent.put(std::move(dedxMatch));
255 
256  auto dedxPrescale = std::make_unique<edm::ValueMap<int>>();
257  edm::ValueMap<int>::Filler pfiller(*dedxPrescale);
258  pfiller.insert(dedxHitCollHandle, prescales.begin(), prescales.end());
259  pfiller.fill();
260  iEvent.put(std::move(dedxPrescale), "prescale");
261 
262  if (storeMomentumAtHit_) {
263  auto dedxMomenta = std::make_unique<edm::ValueMap<std::vector<float>>>();
264  edm::ValueMap<std::vector<float>>::Filler mfiller(*dedxMomenta);
265  mfiller.insert(dedxHitCollHandle, hitMomenta.begin(), hitMomenta.end());
266  mfiller.fill();
267  iEvent.put(std::move(dedxMomenta), "momentumAtHit");
268  }
269 }
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:47
const unsigned int minTrackHits_
const edm::EDGetTokenT< SiPixelClusterShapeCache > pixShapeCacheToken_
bool isFromDet(TrackingRecHit const &hit)
T const * product() const
Definition: Handle.h:70
const unsigned int lowPtTracksPrescaleFail_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ESHandle< ClusterShapeHitFilter > clShape_
assert(be >=bs)
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
int iEvent
Definition: GenABIO.cc:224
const unsigned int lowPtTracksPrescalePass_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const SiStripCluster * stripCluster(size_t i) const
Definition: DeDxHitInfo.h:71
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
DetId detId(size_t i) const
Definition: DeDxHitInfo.h:48
trackCollection
Definition: JetHT_cfg.py:51
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
uint64_t xorshift128p(uint64_t state[2])
unsigned long long uint64_t
Definition: Time.h:13
bool shapeSelection(const SiStripCluster &ampls)
Definition: DeDxTools.cc:13
size_t size() const
Definition: DeDxHitInfo.h:45
const edm::ESGetToken< ClusterShapeHitFilter, CkfComponentsRecord > clShapeToken_
void processHit(const TrackingRecHit *recHit, const float trackMomentum, const LocalVector &trackDirection, reco::DeDxHitInfo &hitDeDxInfo, std::vector< float > &hitMomentum, const LocalPoint &hitLocalPos)
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator_
edm::Handle< SiPixelClusterShapeCache > pixShapeCache_
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
float charge(size_t i) const
Definition: DeDxHitInfo.h:46
const float lowPtTracksDeDxThreshold_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
def move(src, dest)
Definition: eostools.py:511

◆ xorshift128p()

uint64_t DeDxHitInfoProducer::xorshift128p ( uint64_t  state[2])
inlineprivate

Definition at line 98 of file DeDxHitInfoProducer.cc.

References x.

Referenced by produce().

98  {
99  uint64_t x = state[0];
100  uint64_t const y = state[1];
101  state[0] = y;
102  x ^= x << 23; // a
103  state[1] = x ^ y ^ (x >> 17) ^ (y >> 26); // b, c
104  return state[1] + y;
105  }
unsigned long long uint64_t
Definition: Time.h:13

Member Data Documentation

◆ calibGains_

std::vector<std::vector<float> > DeDxHitInfoProducer::calibGains_
private

Definition at line 95 of file DeDxHitInfoProducer.cc.

Referenced by beginRun(), and processRec().

◆ calibrationPath_

const std::string DeDxHitInfoProducer::calibrationPath_
private

Definition at line 76 of file DeDxHitInfoProducer.cc.

Referenced by beginRun().

◆ clShape_

edm::ESHandle<ClusterShapeHitFilter> DeDxHitInfoProducer::clShape_
private

Definition at line 92 of file DeDxHitInfoProducer.cc.

Referenced by processHit(), processRec(), and produce().

◆ clShapeToken_

const edm::ESGetToken<ClusterShapeHitFilter, CkfComponentsRecord> DeDxHitInfoProducer::clShapeToken_
private

Definition at line 90 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ doShapeTest_

const bool DeDxHitInfoProducer::doShapeTest_
private

Definition at line 78 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ lowPtTracksDeDxThreshold_

const float DeDxHitInfoProducer::lowPtTracksDeDxThreshold_
private

Definition at line 84 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ lowPtTracksEstimator_

GenericTruncatedAverageDeDxEstimator DeDxHitInfoProducer::lowPtTracksEstimator_
private

Definition at line 83 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ lowPtTracksPrescaleFail_

const unsigned int DeDxHitInfoProducer::lowPtTracksPrescaleFail_
private

Definition at line 82 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ lowPtTracksPrescalePass_

const unsigned int DeDxHitInfoProducer::lowPtTracksPrescalePass_
private

Definition at line 82 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ maxTrackEta_

const float DeDxHitInfoProducer::maxTrackEta_
private

Definition at line 74 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ minTrackHits_

const unsigned int DeDxHitInfoProducer::minTrackHits_
private

Definition at line 71 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ minTrackPt_

const float DeDxHitInfoProducer::minTrackPt_
private

Definition at line 72 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ minTrackPtPrescale_

const float DeDxHitInfoProducer::minTrackPtPrescale_
private

Definition at line 73 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ offsetDU_

unsigned int DeDxHitInfoProducer::offsetDU_
private

Definition at line 96 of file DeDxHitInfoProducer.cc.

Referenced by beginRun(), and processRec().

◆ pixShapeCache_

edm::Handle<SiPixelClusterShapeCache> DeDxHitInfoProducer::pixShapeCache_
private

Definition at line 93 of file DeDxHitInfoProducer.cc.

Referenced by processHit(), and produce().

◆ pixShapeCacheToken_

const edm::EDGetTokenT<SiPixelClusterShapeCache> DeDxHitInfoProducer::pixShapeCacheToken_
private

Definition at line 88 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ storeMomentumAtHit_

const bool DeDxHitInfoProducer::storeMomentumAtHit_
private

Definition at line 80 of file DeDxHitInfoProducer.cc.

Referenced by DeDxHitInfoProducer(), processHit(), and produce().

◆ theMeVperADCPixel_

const float DeDxHitInfoProducer::theMeVperADCPixel_
private

Definition at line 68 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ theMeVperADCStrip_

const float DeDxHitInfoProducer::theMeVperADCStrip_
private

Definition at line 69 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ tkGeom_

edm::ESHandle<TrackerGeometry> DeDxHitInfoProducer::tkGeom_
private

Definition at line 91 of file DeDxHitInfoProducer.cc.

Referenced by beginRun(), processHit(), and processRec().

◆ tkGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> DeDxHitInfoProducer::tkGeomToken_
private

Definition at line 89 of file DeDxHitInfoProducer.cc.

Referenced by beginRun().

◆ tracksToken_

const edm::EDGetTokenT<reco::TrackCollection> DeDxHitInfoProducer::tracksToken_
private

Definition at line 87 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ useCalibration_

const bool DeDxHitInfoProducer::useCalibration_
private

Definition at line 77 of file DeDxHitInfoProducer.cc.

Referenced by beginRun().

◆ usePixel_

const bool DeDxHitInfoProducer::usePixel_
private

Definition at line 66 of file DeDxHitInfoProducer.cc.

Referenced by DeDxHitInfoProducer(), and processHit().

◆ usePixelForPrescales_

const bool DeDxHitInfoProducer::usePixelForPrescales_
private

Definition at line 85 of file DeDxHitInfoProducer.cc.

Referenced by produce().

◆ usePixelShape_

const bool DeDxHitInfoProducer::usePixelShape_
private

Definition at line 79 of file DeDxHitInfoProducer.cc.

Referenced by processHit(), and produce().

◆ useStrip_

const bool DeDxHitInfoProducer::useStrip_
private

Definition at line 67 of file DeDxHitInfoProducer.cc.

Referenced by DeDxHitInfoProducer(), and processHit().