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++) {
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()) {
149 for (
auto &ids : rpv[idx_V].hits()) {
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)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
~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
reference find_or_insert(det_id_type id)
static void fillDescriptions(edm::ConfigurationDescriptions &)
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken
const edm::DetSetVector< FittedRecHit > & hits() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
T getParameter(std::string const &) const
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.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
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.
ProjectionType projection() const
edm::EDGetTokenT< edm::DetSetVector< TotemRPUVPattern > > patternCollectionToken