69 : verbosity_(conf.getParameter<
int>(
"verbosity")), fitter_(conf) {
72 geometryToken = esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>();
74 produces<DetSetVector<TotemRPLocalTrack>>();
81 LogVerbatim(
"TotemRPLocalTrackFitter") <<
">> TotemRPLocalTrackFitter::produce";
96 for (
const auto &rpv : *
input) {
100 unsigned int n_U = 0, n_V = 0;
101 unsigned int idx_U = 0, idx_V = 0;
102 for (
unsigned int pi = 0;
pi < rpv.size();
pi++) {
112 switch (
pattern.projection()) {
128 if (n_U != 1 || n_V != 1) {
131 <<
">> TotemRPLocalTrackFitter::produce > Impossible to combine U and V patterns in RP " << rpId
132 <<
" (n_U=" << n_U <<
", n_V=" << n_V <<
").";
138 if (!rpv[idx_U].fittable() || !rpv[idx_V].fittable())
143 for (
auto &ids : rpv[idx_U].
hits()) {
144 auto &ods =
hits.find_or_insert(ids.detId());
149 for (
auto &ids : rpv[idx_V].
hits()) {
150 auto &ods =
hits.find_or_insert(ids.detId());
156 double z0 =
geometry->rpTranslation(rpId).z();
165 unsigned int n_hits = 0;
166 for (
auto &hds :
track.hits())
167 n_hits += hds.size();
170 <<
" track in RP " << rpId <<
": valid = " <<
track.isValid() <<
", hits = " << n_hits;
184 ->setComment(
"input U-V patterns collection to retrieve");
185 desc.add<
int>(
"verbosity", 0);
187 descr.
add(
"totemRPLocalTrackFitter",
desc);
Log< level::Info, true > LogVerbatim
TotemRPLocalTrackFitter(const edm::ParameterSet &conf)
T getParameter(std::string const &) const
void push_back(const T &t)
void produce(edm::Event &e, const edm::EventSetup &c) override
edm::ESWatcher< VeryForwardRealGeometryRecord > geometryWatcher
A watcher to detect geometry changes.
~TotemRPLocalTrackFitter() override
void reset()
Resets the reconstruction-data cache.
Fits tracks trough a single RP.
A track fit through a single RP.
static std::string const input
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken
#define DEFINE_FWK_MODULE(type)
A linear pattern in U or V projection. The intercept b is taken at the middle of a RP: (geometry->Get...
TotemRPLocalTrackFitterAlgorithm fitter_
The instance of the fitter module.
bool fitTrack(const edm::DetSetVector< TotemRPRecHit > &hits, double z_0, const CTPPSGeometry &tot_geom, TotemRPLocalTrack &fitted_track)
performs the track fit, returns true if successful
Algorithm for fitting tracks through a single RP.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
Base class for CTPPS detector IDs.
edm::InputTag tagUVPattern
Selection of the pattern-recognition module.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
edm::EDGetTokenT< edm::DetSetVector< TotemRPUVPattern > > patternCollectionToken