|
|
#include <RecoTracker/DeDxEstimatorProducer/src/DeDxEstimatorProducer.cc>
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 45 of file DeDxEstimatorProducer.h.
◆ DeDxEstimatorProducer()
Definition at line 47 of file DeDxEstimatorProducer.cc.
48 produces<ValueMap<DeDxData>>();
50 string estimatorName = iConfig.
getParameter<
string>(
"estimator");
51 if (estimatorName ==
"median")
53 else if (estimatorName ==
"generic")
55 else if (estimatorName ==
"truncated")
57 else if (estimatorName ==
"genericTruncated")
59 else if (estimatorName ==
"unbinnedFit")
61 else if (estimatorName ==
"productDiscrim")
63 else if (estimatorName ==
"btagDiscrim")
65 else if (estimatorName ==
"smirnovDiscrim")
67 else if (estimatorName ==
"asmirnovDiscrim")
86 <<
"Pixel Hits AND Strip Hits will not be used to estimate dEdx --> BUG, Please Update the config file";
References edm::ParameterSet::getParameter(), dedxEstimators_cff::useCalibration, dedxEstimators_cff::usePixel, and dedxEstimators_cff::useStrip.
◆ ~DeDxEstimatorProducer()
DeDxEstimatorProducer::~DeDxEstimatorProducer |
( |
| ) |
|
|
override |
◆ beginRun()
◆ fillDescriptions()
Definition at line 28 of file DeDxEstimatorProducer.cc.
30 desc.
add<
string>(
"estimator",
"generic");
32 desc.
add<
bool>(
"UsePixel",
false);
33 desc.
add<
bool>(
"UseStrip",
true);
34 desc.
add<
double>(
"MeVperADCPixel", 3.61e-06);
35 desc.
add<
double>(
"MeVperADCStrip", 3.61e-06 * 265);
36 desc.
add<
bool>(
"ShapeTest",
true);
37 desc.
add<
bool>(
"UseCalibration",
false);
38 desc.
add<
string>(
"calibrationPath",
"");
39 desc.
add<
string>(
"Reccord",
"SiStripDeDxMip_3D_Rcd");
40 desc.
add<
string>(
"ProbabilityMode",
"Accumulation");
41 desc.
add<
double>(
"fraction", 0.4);
42 desc.add<
double>(
"exponent", -2.0);
44 descriptions.
add(
"DeDxEstimatorProducer", desc);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLT_2018_cff::InputTag.
◆ makeCalibrationMap()
void DeDxEstimatorProducer::makeCalibrationMap |
( |
const TrackerGeometry & |
tkGeom | ) |
|
|
private |
◆ processHit()
Definition at line 149 of file DeDxEstimatorProducer.cc.
154 auto const& thit = static_cast<BaseTrackerRecHit const&>(*
recHit);
158 auto const& clus = thit.firstClusterRef();
162 if (clus.isPixel()) {
166 const auto* detUnit =
recHit->detUnit();
167 if (detUnit ==
nullptr)
170 float chargeAbs = clus.pixelCluster().charge();
173 }
else if (clus.isStrip() && !thit.isMatched()) {
177 const auto* detUnit =
recHit->detUnit();
178 if (detUnit ==
nullptr)
187 NClusterSaturating++;
189 }
else if (clus.isStrip() && thit.isMatched()) {
195 const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(matchedHit->
det());
197 gdet = static_cast<const GluedGeomDet*>(
tkGeom->
idToDet(thit.geographicalId()));
199 auto& detUnitM = *(gdet->
monoDet());
201 float pathLen = detUnitM.surface().bounds().thickness() / fabs(cosine);
207 NClusterSaturating++;
212 pathLen = detUnitS.surface().bounds().thickness() / fabs(cosine);
218 NClusterSaturating++;
References ALCARECOTkAlJpsiMuMu_cff::charge, TrackingRecHit::det(), DeDxTools::getCharge(), SiStripMatchedRecHit2D::monoCluster(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoId(), rpcPointValidation_cfi::recHit, DeDxTools::shapeSelection(), SiStripMatchedRecHit2D::stereoCluster(), GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoId(), reco::btau::trackMomentum, dedxEstimators_cff::usePixel, and dedxEstimators_cff::useStrip.
◆ produce()
Definition at line 103 of file DeDxEstimatorProducer.cc.
104 auto trackDeDxEstimateAssociation = std::make_unique<ValueMap<DeDxData>>();
110 std::vector<DeDxData> dedxEstimate(trackCollectionHandle->size());
112 for (
unsigned int j = 0;
j < trackCollectionHandle->size();
j++) {
115 int NClusterSaturating = 0;
118 auto const& trajParams =
track->extra()->trajParams();
120 auto hb =
track->recHitsBegin();
121 dedxHits.reserve(
track->recHitsSize() / 2);
122 for (
unsigned int h = 0;
h <
track->recHitsSize();
h++) {
127 auto trackDirection = trajParams[
h].direction();
128 float cosine = trackDirection.z() / trackDirection.mag();
132 sort(dedxHits.begin(), dedxHits.end(), less<DeDxHit>());
137 val_and_error.second = NClusterSaturating;
138 dedxEstimate[
j] =
DeDxData(val_and_error.first, val_and_error.second, dedxHits.size());
142 filler.insert(trackCollectionHandle, dedxEstimate.begin(), dedxEstimate.end());
References cms::cuda::assert(), trigObjTnPSource_cfi::filler, h, hcalSimParameters_cfi::hb, iEvent, trackerHitRTTI::isFromDet(), dqmiolumiharvest::j, eostools::move(), edm::Handle< T >::product(), rpcPointValidation_cfi::recHit, and HLT_2018_cff::track.
◆ calibGains
std::vector<std::vector<float> > DeDxEstimatorProducer::calibGains |
|
private |
◆ m_calibrationPath
std::string DeDxEstimatorProducer::m_calibrationPath |
|
private |
◆ m_estimator
◆ m_off
unsigned int DeDxEstimatorProducer::m_off |
|
private |
◆ m_tracksTag
◆ MaxNrStrips
unsigned int DeDxEstimatorProducer::MaxNrStrips |
|
private |
◆ meVperADCPixel
float DeDxEstimatorProducer::meVperADCPixel |
|
private |
◆ meVperADCStrip
float DeDxEstimatorProducer::meVperADCStrip |
|
private |
◆ shapetest
bool DeDxEstimatorProducer::shapetest |
|
private |
◆ tkGeom
◆ useCalibration
bool DeDxEstimatorProducer::useCalibration |
|
private |
◆ usePixel
bool DeDxEstimatorProducer::usePixel |
|
private |
◆ useStrip
bool DeDxEstimatorProducer::useStrip |
|
private |
const TrackerGeomDet * idToDet(DetId) const override
unsigned int monoId() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
virtual std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits)=0
SiStripCluster const & stereoCluster() const
std::vector< std::vector< float > > calibGains
std::string m_calibrationPath
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const GeomDet * det() const
std::vector< DeDxHit > DeDxHitCollection
const GeomDetUnit * monoDet() const
edm::EDGetTokenT< reco::TrackCollection > m_tracksTag
const Plane & surface() const
The nominal surface of the GeomDet.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const Bounds & bounds() const
edm::ESHandle< TrackerGeometry > tkGeom
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
virtual float thickness() const =0
unsigned int stereoId() const
bool isFromDet(TrackingRecHit const &hit)
const GeomDetUnit * stereoDet() const
T getParameter(std::string const &) const
SiStripCluster const & monoCluster() const
BaseDeDxEstimator * m_estimator
void processHit(const TrackingRecHit *recHit, float trackMomentum, float &cosine, reco::DeDxHitCollection &dedxHits, int &NClusterSaturating)
virtual void beginRun(edm::Run const &run, const edm::EventSetup &iSetup)
unsigned int offsetDU(SubDetector sid) const