76 tracks_pixel.getParameter<std::vector<unsigned int>>(
"forbidden_RecoInfo_values");
83 consumes<reco::ForwardProtonCollection>(protons_single_rp.getParameter<
edm::InputTag>(
"input_tag"));
86 const auto &protons_multi_rp = iConfig.
getParameterSet(
"protons_multi_rp");
89 consumes<reco::ForwardProtonCollection>(protons_multi_rp.getParameter<
edm::InputTag>(
"input_tag"));
107 desc.
addUntracked<
bool>(
"verbosity",
false)->setComment(
"verbosity");
110 tracks_all.
add<
double>(
"local_angle_x_max", 0.020)
111 ->
setComment(
"maximum absolute value of local horizontal angle, in rad");
112 tracks_all.
add<
double>(
"local_angle_y_max", 0.020)
113 ->
setComment(
"maximum absolute value of local horizontal angle, in rad");
117 const std::vector<unsigned int> def_for_RecoInfo_vals = {
120 tracks_pixel.
add<std::vector<unsigned int>>(
"forbidden_RecoInfo_values", def_for_RecoInfo_vals)
121 ->setComment(
"list of forbidden RecoInfo values");
122 tracks_pixel.
add<
unsigned int>(
"number_of_hits_min", 0)->setComment(
"minimum required number of hits");
123 tracks_pixel.
add<
double>(
"normalised_chi_sq_max", 1E100)->setComment(
"maximum tolerated chi square / ndof");
125 ->setComment(
"specific settings for pixel-RP tracks");
128 protons_single_rp.
add<
bool>(
"include",
true)->setComment(
"flag whether single-RP protons should be processed");
130 protons_single_rp.
add<
std::string>(
"output_label",
"singleRP")->setComment(
"output label");
132 ->setComment(
"settings for single-RP protons");
135 protons_multi_rp.
add<
bool>(
"include",
true)->setComment(
"flag whether multi-RP protons should be processed");
137 protons_multi_rp.
add<
std::string>(
"output_label",
"multiRP")->setComment(
"output label");
138 protons_multi_rp.
add<
bool>(
"check_valid_fit",
true)->setComment(
"flag whether validFit should be checked");
139 protons_multi_rp.
add<
double>(
"chi_sq_max", 1E-4)->setComment(
"maximum tolerated value of chi square");
140 protons_multi_rp.
add<
double>(
"normalised_chi_sq_max", 1E100)
141 ->setComment(
"maximum tolerated value of chi square / ndof, applied only if ndof > 0");
143 ->setComment(
"settings for multi-RP protons");
145 descriptions.
add(
"ppsFilteredProtonProducer", desc);
168 log <<
"track idx=" << idx <<
" does not fulfil criteria." << std::endl;
176 std::ostringstream ssLog;
183 for (
const auto &proton : hInputProtons) {
189 for (
const auto &tr_ref : proton.contributingLocalTracks()) {
193 keep &=
IsTrackOK(*tr_ref, tr_ref.key(), ssLog);
200 pOutputProtons->push_back(proton);
203 ssLog <<
"single-RP proton idx=" << n_protons_single_rp_all - 1 <<
" excluded." << std::endl;
215 for (
const auto &proton : hInputProtons) {
220 keep &= proton.validFit();
224 if (proton.ndof() > 0)
228 for (
const auto &tr_ref : proton.contributingLocalTracks()) {
232 keep &=
IsTrackOK(*tr_ref, tr_ref.key(), ssLog);
239 pOutputProtons->push_back(proton);
242 ssLog <<
"multi-RP proton idx=" << n_protons_multi_rp_all - 1 <<
" excluded." << std::endl;
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
double tracks_pixel_normalised_chi_sq_max_
Local (=single RP) track with essential information only.
edm::EDGetTokenT< reco::ForwardProtonCollection > protons_single_rp_input_token_
float getTx() const
returns the track horizontal angle
unsigned int n_protons_multi_rp_all
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double protons_multi_rp_normalised_chi_sq_max_
CTPPSpixelLocalTrackReconstructionInfo getPixelTrackRecoInfo() const
returns the track reconstruction info byte
uint32_t getRPId() const
returns the RP id
PPSFilteredProtonProducer(const edm::ParameterSet &)
float getChiSquaredOverNDF() const
returns the track fit chi Squared over NDF
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< CTPPSLocalTrackLiteCollection > tracksToken_
double tracks_all_local_angle_y_max_
void endStream() override
std::string protons_multi_rp_output_label_
Abs< T >::type abs(const T &t)
bool get(ProductID const &oid, Handle< PROD > &result) const
unsigned int n_protons_single_rp_all
counters
edm::EDGetTokenT< reco::ForwardProtonCollection > protons_multi_rp_input_token_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool protons_multi_rp_include_
bool IsTrackOK(const CTPPSLocalTrackLite &tr, unsigned int idx, std::ostringstream &log)
check one track
ParameterSet const & getParameterSet(std::string const &) const
unsigned int n_protons_single_rp_kept
unsigned int tracks_pixel_number_of_hits_min_
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool protons_single_rp_include_
Base class for CTPPS detector IDs.
double tracks_all_local_angle_x_max_
std::string protons_single_rp_output_label_
unsigned short getNumberOfPointsUsedForFit() const
returns the number of points used for fit
~PPSFilteredProtonProducer() override=default
unsigned int n_protons_multi_rp_kept
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< ForwardProton > ForwardProtonCollection
Collection of ForwardProton objects.
std::vector< unsigned int > tracks_pixel_forbidden_RecoInfo_values_
float getTy() const
returns the track vertical angle
Module to apply Proton POG quality criteria.
double protons_multi_rp_chi_sq_max_
bool protons_multi_rp_check_valid_fit_