70 if (!tagSiStripTrack.label().empty())
75 if (!tagDiamondTrack.label().empty())
84 produces<CTPPSLocalTrackLiteCollection>();
92 auto pOut = std::make_unique<CTPPSLocalTrackLiteCollection>();
102 for (
const auto &rpv : *inputSiStripTracks) {
103 const uint32_t rpId = rpv.detId();
104 for (
const auto &trk : rpv) {
109 MiniFloatConverter::reduceMantissaToNbitsRounding<14>(trk.getX0());
110 float roundedX0Sigma =
111 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
114 MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.getY0());
115 float roundedY0Sigma =
116 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
119 MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.getTx());
120 float roundedTxSigma =
121 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
124 MiniFloatConverter::reduceMantissaToNbitsRounding<11>(trk.getTy());
125 float roundedTySigma =
126 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
128 float roundedChiSquaredOverNDF =
129 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
130 trk.getChiSquaredOverNDF());
132 pOut->emplace_back(rpId,
134 roundedX0, roundedX0Sigma, roundedY0, roundedY0Sigma,
136 roundedTx, roundedTxSigma, roundedTy, roundedTySigma,
138 roundedChiSquaredOverNDF,
140 trk.getNumberOfPointsUsedForFit(),
155 for (
const auto &rpv : *inputDiamondTracks) {
156 const unsigned int rpId = rpv.detId();
157 for (
const auto &trk : rpv) {
161 const float abs_time =
167 MiniFloatConverter::reduceMantissaToNbitsRounding<16>(trk.getX0());
168 float roundedX0Sigma =
169 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
172 MiniFloatConverter::reduceMantissaToNbitsRounding<13>(trk.getY0());
173 float roundedY0Sigma =
174 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
177 MiniFloatConverter::reduceMantissaToNbitsRounding<16>(abs_time);
178 float roundedTSigma =
179 MiniFloatConverter::reduceMantissaToNbitsRounding<13>(
182 pOut->emplace_back(rpId,
184 roundedX0, roundedX0Sigma, roundedY0, roundedY0Sigma,
189 trk.getNumOfPlanes(),
191 roundedT, roundedTSigma);
204 for (
const auto &rpv : *inputPixelTracks) {
205 const uint32_t rpId = rpv.detId();
206 for (
const auto &trk : rpv) {
214 MiniFloatConverter::reduceMantissaToNbitsRounding<16>(
216 float roundedX0Sigma =
217 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
220 MiniFloatConverter::reduceMantissaToNbitsRounding<13>(
222 float roundedY0Sigma =
223 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
226 MiniFloatConverter::reduceMantissaToNbitsRounding<11>(
228 float roundedTxSigma =
229 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
232 MiniFloatConverter::reduceMantissaToNbitsRounding<11>(
234 float roundedTySigma =
235 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
237 float roundedChiSquaredOverNDF =
238 MiniFloatConverter::reduceMantissaToNbitsRounding<8>(
239 trk.getChiSquaredOverNDF());
244 roundedX0, roundedX0Sigma, roundedY0, roundedY0Sigma,
246 roundedTx, roundedTxSigma, roundedTy, roundedTySigma,
248 roundedChiSquaredOverNDF, trk.getRecoInfo(),
249 trk.getNumberOfPointsUsedForFit(),
273 desc.
add<
bool>(
"includeStrips",
false)
274 ->setComment(
"whether tracks from Si strips should be included");
277 ->setComment(
"input TOTEM strips' local tracks collection to retrieve");
279 desc.
add<
bool>(
"includeDiamonds",
false)
280 ->setComment(
"whether tracks from diamonds strips should be included");
284 "input diamond detectors' local tracks collection to retrieve");
286 desc.
add<
bool>(
"includePixels",
false)
287 ->setComment(
"whether tracks from pixels should be included");
291 "input pixel detectors' local tracks collection to retrieve");
292 desc.
add<
double>(
"timingTrackTMin", -12.5)
293 ->
setComment(
"minimal track time selection for timing detectors, in ns");
294 desc.
add<
double>(
"timingTrackTMax", +12.5)
295 ->
setComment(
"maximal track time selection for timing detectors, in ns");
297 desc.
add<
double>(
"pixelTrackTxMin", -10.0);
298 desc.
add<
double>(
"pixelTrackTxMax", 10.0);
299 desc.
add<
double>(
"pixelTrackTyMin", -10.0);
300 desc.
add<
double>(
"pixelTrackTyMax", 10.0);
302 descr.
add(
"ctppsLocalTrackLiteDefaultProducer", desc);
T getParameter(std::string const &) const
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static float HPTDC_TIME_SLICE_WIDTH
HPTDC time slice width, in ns.
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) override
CTPPSLocalTrackLiteProducer(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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.
bool isUninitialized() const
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > siStripTrackToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)