|
|
Go to the documentation of this file.
24 produces<TrackingRecHitCollection>();
25 produces<reco::TrackExtraCollection>();
50 multiply(revised_matrix, error_matrix);
52 return revised_matrix;
60 for (
int i = 0;
i != 5;
i++) {
61 for (
int j =
i;
j != 5;
j++) {
62 revised_matrix(
i,
j) *= scale_matrix(
i,
j);
71 for (
int i = 0;
i != 5;
i++) {
72 for (
int j =
i;
j != 5;
j++) {
73 if (denom_matrix(
i,
j) == 0)
75 num_matrix(
i,
j) /= denom_matrix(
i,
j);
93 <<
"\n charge: " <<
charge <<
"\n covariance:\n"
94 << recotrack_orig.
covariance() <<
"\n replaced by:\n"
111 if (trackExtra_orig.
isNull()) {
126 trackExtra_orig->outerMomentum(),
128 trackExtra_orig->innerPosition(),
129 trackExtra_orig->innerMomentum(),
132 trackExtra_orig->outerDetId(),
134 trackExtra_orig->innerDetId(),
135 trackExtra_orig->seedDirection()));
141 return &(TEcol.back());
151 auto const firstHitIndex =
theRHi;
189 auto Toutput = std::make_unique<reco::TrackCollection>();
190 auto TRHoutput = std::make_unique<TrackingRecHitCollection>();
191 auto TEoutput = std::make_unique<reco::TrackExtraCollection>();
197 for (
unsigned int it = 0; it !=
tracks->size(); it++) {
212 Toutput->push_back(recotrack);
225 if (!
attachRecHits(recotrack_orig, recotrackref, *extra, *TRHoutput, ttopo)) {
230 TEoutput->pop_back();
237 LogDebug(
theCategory) <<
"writing: " << Toutput->size() <<
" corrected reco::Track to the event.";
T const * product() const
GlobalVector momentum() const
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
const Point & referencePoint() const
Reference point on the track.
bool isNull() const
Checks for null.
MuonErrorMatrix * theMatrixProvider
void beginJob() override
framework method
~MuonErrorMatrixAdjuster() override
destructor
double ndof() const
number of degrees of freedom of the fit
GlobalPoint position() const
void produce(edm::Event &, const edm::EventSetup &) override
const TrackExtraRef & extra() const
reference to "extra" object
edm::RefProd< reco::TrackExtraCollection > theRefprodTE
get reference before put track extra to the event, in order to create edm::Ref
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
std::string theInstanceName
instrance name of the created track collecion. rechit and trackextra have no instance name
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
bool attachRecHits(const reco::Track &recotrack_orig, reco::Track &recotrack, reco::TrackExtra &trackextra, TrackingRecHitCollection &RHcol, const TrackerTopology &ttopo)
attached rechits to the newly created reco::Track and reco::TrackExtra
int charge() const
track electric charge
CovarianceMatrix covariance() const
return track covariance matrix
reco::Track makeTrack(const reco::Track &recotrack_orig, const FreeTrajectoryState &PCAstate)
create a corrected reco::Track from itself and trajectory state (redundant information)
bool theRescale
select the rescaling or replacing method to correct the error matrix
edm::InputTag theTrackLabel
input tag of the reco::Track collection to be corrected
XYZPointD XYZPoint
point in space with cartesian internal representation
std::string theCategory
log category: MuonErrorMatrixAdjuster
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
edm::ESHandle< MagneticField > theField
hold on to the magnetic field
void multiply(reco::TrackBase::CovarianceMatrix &revised_matrix, const reco::TrackBase::CovarianceMatrix &scale_matrix)
mutliply revised_matrix (first argument) by second matrix TERM by TERM
XYZVectorD XYZVector
spatial vector with cartesian internal representation
MuonErrorMatrixAdjuster(const edm::ParameterSet &)
constructor
bool divide(reco::TrackBase::CovarianceMatrix &num_matrix, const reco::TrackBase::CovarianceMatrix &denom_matrix)
divide the num_matrix (first argument) by second matrix, TERM by TERM
double chi2() const
chi-squared of the fit
Log< level::Error, false > LogError
edm::Ref< reco::TrackExtraCollection >::key_type theTEi
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
edm::RefProd< TrackingRecHitCollection > theRefprodRH
get reference before put rechit to the event, in order to create edm::Ref
T getParameter(std::string const &) const
edm::Ref< TrackingRecHitCollection >::key_type theRHi
reco::TrackExtra * makeTrackExtra(const reco::Track &recotrack_orig, reco::Track &recotrack, reco::TrackExtraCollection &TEcol)
create a track extra for the newly created recotrack, scaling the outer/inner measurment error matrix...
reco::TrackBase::CovarianceMatrix fix_cov_matrix(const reco::TrackBase::CovarianceMatrix &error_matrix, const GlobalVector &momentum)
return a corrected error matrix
bool selectTrack(const reco::Track &recotrack_orig)
make a selection on the reco:Track. (dummy for the moment)
edm::ParameterSet theMatrixProvider_pset
holds the error matrix parametrization
const Vector & momentum() const
track momentum vector
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix