93 state[1] =
x ^ y ^ (
x >> 17) ^ (y >> 26);
99 : usePixel_(iConfig.getParameter<
bool>(
"usePixel")),
100 useStrip_(iConfig.getParameter<
bool>(
"useStrip")),
101 theMeVperADCPixel_(iConfig.getParameter<double>(
"MeVperADCPixel")),
102 theMeVperADCStrip_(iConfig.getParameter<double>(
"MeVperADCStrip")),
103 minTrackHits_(iConfig.getParameter<unsigned>(
"minTrackHits")),
104 minTrackPt_(iConfig.getParameter<double>(
"minTrackPt")),
105 minTrackPtPrescale_(iConfig.getParameter<double>(
"minTrackPtPrescale")),
106 maxTrackEta_(iConfig.getParameter<double>(
"maxTrackEta")),
107 calibrationPath_(iConfig.getParameter<
string>(
"calibrationPath")),
108 useCalibration_(iConfig.getParameter<
bool>(
"useCalibration")),
109 doShapeTest_(iConfig.getParameter<
bool>(
"shapeTest")),
110 lowPtTracksPrescalePass_(iConfig.getParameter<uint32_t>(
"lowPtTracksPrescalePass")),
111 lowPtTracksPrescaleFail_(iConfig.getParameter<uint32_t>(
"lowPtTracksPrescaleFail")),
112 lowPtTracksEstimator_(iConfig.getParameter<
edm::
ParameterSet>(
"lowPtTracksEstimatorParameters")),
113 lowPtTracksDeDxThreshold_(iConfig.getParameter<double>(
"lowPtTracksDeDxThreshold")),
114 usePixelForPrescales_(iConfig.getParameter<
bool>(
"usePixelForPrescales")),
117 produces<reco::DeDxHitInfoCollection>();
118 produces<reco::DeDxHitInfoAss>();
119 produces<edm::ValueMap<int>>(
"prescale");
122 edm::LogError(
"DeDxHitsProducer") <<
"No Pixel Hits NOR Strip Hits will be saved. Running this module is useless";
143 auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
152 bool passPt = (
track.pt() >=
minTrackPt_), passLowDeDx =
false, passHighDeDx =
false, pass = passPt;
160 pass = passHighDeDx || passLowDeDx;
168 auto const& trajParams =
track.extra()->trajParams();
169 auto hb =
track.recHitsBegin();
170 for (
unsigned int h = 0;
h <
track.recHitsSize();
h++) {
175 auto trackDirection = trajParams[
h].direction();
176 float cosine = trackDirection.z() / trackDirection.mag();
182 std::vector<DeDxHit>
hits;
184 for (
unsigned int i = 0,
n = hitDeDxInfo.
size();
i <
n; ++
i) {
218 indices.push_back(resultdedxHitColl->size());
219 resultdedxHitColl->push_back(hitDeDxInfo);
226 auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxHitCollHandle);
232 auto dedxPrescale = std::make_unique<edm::ValueMap<int>>();
251 auto const& clus = thit.firstClusterRef();
255 const auto* detUnit =
recHit->detUnit();
256 if (detUnit ==
nullptr) {
261 if (clus.isPixel()) {
265 float chargeAbs = clus.pixelCluster().charge();
266 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.pixelCluster());
267 }
else if (clus.isStrip() && !thit.isMatched()) {
273 hitDeDxInfo.
addHit(chargeAbs, pathLen, thit.geographicalId(), hitLocalPos, clus.stripCluster());
274 }
else if (clus.isStrip() && thit.isMatched()) {
282 if (detUnitM ==
nullptr)
291 if (detUnitS ==
nullptr)
float pathlength(size_t i) const
const unsigned int minTrackHits_
const std::string calibrationPath_
SiStripRecHit2D stereoHit() const
const GeomDetUnit * detUnit() const override
bool isFromDet(TrackingRecHit const &hit)
#define DEFINE_FWK_MODULE(type)
unsigned int offsetDU(SubDetector sid) const
T const * product() const
const unsigned int lowPtTracksPrescaleFail_
std::vector< Track > TrackCollection
collection of Tracks
void produce(edm::Event &, const edm::EventSetup &) override
Log< level::Error, false > LogError
const bool usePixelForPrescales_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
virtual float thickness() const =0
const unsigned int lowPtTracksPrescalePass_
DeDxHitInfoProducer(const edm::ParameterSet &)
const float theMeVperADCStrip_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
void processHit(const TrackingRecHit *recHit, const float trackMomentum, const float cosine, reco::DeDxHitInfo &hitDeDxInfo, const LocalPoint &hitLocalPos)
SiStripCluster const & stripCluster() const
Abs< T >::type abs(const T &t)
const SiStripCluster * stripCluster(size_t i) const
void addHit(const float charge, const float pathlength, const DetId &detId, const LocalPoint &pos, const SiStripCluster &stripCluster)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
edm::ESHandle< TrackerGeometry > tkGeom_
DetId detId(size_t i) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const bool useCalibration_
const TrackerGeomDet * idToDet(DetId) const override
const float theMeVperADCPixel_
uint64_t xorshift128p(uint64_t state[2])
const Plane & surface() const
The nominal surface of the GeomDet.
DetId geographicalId() const
unsigned long long uint64_t
const float minTrackPtPrescale_
~DeDxHitInfoProducer() override
GenericTruncatedAverageDeDxEstimator lowPtTracksEstimator_
SiStripRecHit2D monoHit() const
std::pair< float, float > dedx(const reco::DeDxHitCollection &Hits) override
float charge(size_t i) const
std::vector< std::vector< float > > calibGains_
void beginRun(edm::Run const &run, const edm::EventSetup &) override
const float lowPtTracksDeDxThreshold_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const Bounds & bounds() const