58 : includeStrips_(iConfig.getParameter<
bool>(
"includeStrips")),
59 includeDiamonds_(iConfig.getParameter<
bool>(
"includeDiamonds")),
60 includePixels_(iConfig.getParameter<
bool>(
"includePixels")),
61 pixelTrackTxMin_(iConfig.getParameter<double>(
"pixelTrackTxMin")),
62 pixelTrackTxMax_(iConfig.getParameter<double>(
"pixelTrackTxMax")),
63 pixelTrackTyMin_(iConfig.getParameter<double>(
"pixelTrackTyMin")),
64 pixelTrackTyMax_(iConfig.getParameter<double>(
"pixelTrackTyMax")),
65 timingTrackTMin_(iConfig.getParameter<double>(
"timingTrackTMin")),
66 timingTrackTMax_(iConfig.getParameter<double>(
"timingTrackTMax")) {
68 if (!tagSiStripTrack.label().empty())
72 if (!tagDiamondTrack.label().empty())
79 produces<CTPPSLocalTrackLiteCollection>();
86 auto pOut = std::make_unique<CTPPSLocalTrackLiteCollection>();
96 for (
const auto &rpv : *inputSiStripTracks) {
97 const uint32_t rpId = rpv.detId();
98 for (
const auto &trk : rpv) {
102 float roundedX0 = MiniFloatConverter::reduceMantissaToNbitsRounding<14>(trk.x0());
103 float roundedX0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.x0Sigma());
104 float roundedY0 = MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.y0());
105 float roundedY0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.y0Sigma());
106 float roundedTx = MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.tx());
107 float roundedTxSigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.txSigma());
108 float roundedTy = MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.ty());
109 float roundedTySigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.tySigma());
110 float roundedChiSquaredOverNDF = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.chiSquaredOverNDF());
112 pOut->emplace_back(rpId,
124 roundedChiSquaredOverNDF,
126 trk.numberOfPointsUsedForFit(),
142 for (
const auto &rpv : *inputDiamondTracks) {
143 const unsigned int rpId = rpv.detId();
144 for (
const auto &trk : rpv) {
152 float roundedX0 = MiniFloatConverter::reduceMantissaToNbitsRounding<16>(trk.x0());
153 float roundedX0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.x0Sigma());
154 float roundedY0 = MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.y0());
155 float roundedY0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.y0Sigma());
156 float roundedT = MiniFloatConverter::reduceMantissaToNbitsRounding<16>(abs_time);
157 float roundedTSigma = MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.timeSigma());
159 pOut->emplace_back(rpId,
173 trk.numberOfPlanes(),
189 for (
const auto &rpv : *inputPixelTracks) {
190 const uint32_t rpId = rpv.detId();
191 for (
const auto &trk : rpv) {
196 float roundedX0 = MiniFloatConverter::reduceMantissaToNbitsRounding<16>(trk.x0());
197 float roundedX0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.x0Sigma());
198 float roundedY0 = MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.y0());
199 float roundedY0Sigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.y0Sigma());
200 float roundedTx = MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.tx());
201 float roundedTxSigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.txSigma());
202 float roundedTy = MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.ty());
203 float roundedTySigma = MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.tySigma());
204 float roundedChiSquaredOverNDF =
205 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(trk.chiSquaredOverNDF());
207 pOut->emplace_back(rpId,
219 roundedChiSquaredOverNDF,
221 trk.numberOfPointsUsedForFit(),
245 desc.add<
bool>(
"includeStrips",
false)->setComment(
"whether tracks from Si strips should be included");
247 ->setComment(
"input TOTEM strips' local tracks collection to retrieve");
249 desc.add<
bool>(
"includeDiamonds",
false)->setComment(
"whether tracks from diamonds strips should be included");
251 ->setComment(
"input diamond detectors' local tracks collection to retrieve");
253 desc.add<
bool>(
"includePixels",
false)->setComment(
"whether tracks from pixels should be included");
255 ->setComment(
"input pixel detectors' local tracks collection to retrieve");
256 desc.add<
double>(
"timingTrackTMin", -12.5)->setComment(
"minimal track time selection for timing detectors, in ns");
257 desc.add<
double>(
"timingTrackTMax", +12.5)->setComment(
"maximal track time selection for timing detectors, in ns");
259 desc.add<
double>(
"pixelTrackTxMin", -10.0);
260 desc.add<
double>(
"pixelTrackTxMax", 10.0);
261 desc.add<
double>(
"pixelTrackTyMin", -10.0);
262 desc.add<
double>(
"pixelTrackTyMax", 10.0);
264 descr.
add(
"ctppsLocalTrackLiteDefaultProducer",
desc);
T getParameter(std::string const &) const
constexpr bool isUninitialized() const noexcept
static constexpr float HPTDC_TIME_SLICE_WIDTH
HPTDC time slice width, in ns.
void produce(edm::Event &, const edm::EventSetup &) override
CTPPSLocalTrackLiteProducer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > diamondTrackToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > pixelTrackToken_
Distills the essential track data from all RPs.
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > siStripTrackToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)