CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonErrorMatrixAdjuster Class Reference

#include <MuonErrorMatrixAdjuster.h>

Inheritance diagram for MuonErrorMatrixAdjuster:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MuonErrorMatrixAdjuster (const edm::ParameterSet &)
 constructor More...
 
 ~MuonErrorMatrixAdjuster () override
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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 More...
 
void beginJob () override
 framework method More...
 
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 More...
 
void endJob () override
 
reco::TrackBase::CovarianceMatrix fix_cov_matrix (const reco::TrackBase::CovarianceMatrix &error_matrix, const GlobalVector &momentum)
 return a corrected error matrix More...
 
reco::Track makeTrack (const reco::Track &recotrack_orig, const FreeTrajectoryState &PCAstate)
 create a corrected reco::Track from itself and trajectory state (redundant information) More...
 
reco::TrackExtramakeTrackExtra (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 by the scale matrix recotrack/recotrack_orig More...
 
void multiply (reco::TrackBase::CovarianceMatrix &revised_matrix, const reco::TrackBase::CovarianceMatrix &scale_matrix)
 mutliply revised_matrix (first argument) by second matrix TERM by TERM More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 
bool selectTrack (const reco::Track &recotrack_orig)
 make a selection on the reco:Track. (dummy for the moment) More...
 

Private Attributes

std::string theCategory
 log category: MuonErrorMatrixAdjuster More...
 
edm::ESHandle< MagneticFieldtheField
 hold on to the magnetic field More...
 
std::string theInstanceName
 instrance name of the created track collecion. rechit and trackextra have no instance name More...
 
MuonErrorMatrixtheMatrixProvider
 
edm::ParameterSet theMatrixProvider_pset
 holds the error matrix parametrization More...
 
edm::RefProd< TrackingRecHitCollectiontheRefprodRH
 get reference before put rechit to the event, in order to create edm::Ref More...
 
edm::RefProd< reco::TrackExtraCollectiontheRefprodTE
 get reference before put track extra to the event, in order to create edm::Ref More...
 
bool theRescale
 select the rescaling or replacing method to correct the error matrix More...
 
edm::Ref< TrackingRecHitCollection >::key_type theRHi
 
edm::Ref< reco::TrackExtraCollection >::key_type theTEi
 
edm::InputTag theTrackLabel
 input tag of the reco::Track collection to be corrected More...
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

EDProducer which duplicatesa collection of track, adjusting their error matrix

track collection is retrieve from the event, duplicated, while the error matrix is corrected rechit are copied into a new collection track extra is also copied and error matrix are corrected by the same scale factors

Author
Jean-Roch Vlimant UCSB
Finn Rebassoo UCSB

Definition at line 44 of file MuonErrorMatrixAdjuster.h.

Constructor & Destructor Documentation

◆ MuonErrorMatrixAdjuster()

MuonErrorMatrixAdjuster::MuonErrorMatrixAdjuster ( const edm::ParameterSet iConfig)
explicit

constructor

Definition at line 19 of file MuonErrorMatrixAdjuster.cc.

19  {
20  theCategory = "MuonErrorMatrixAdjuster";
21  theInstanceName = iConfig.getParameter<std::string>("instanceName");
22  //register your products
23  produces<reco::TrackCollection>(theInstanceName);
24  produces<TrackingRecHitCollection>();
25  produces<reco::TrackExtraCollection>();
26 
27  theTrackLabel = iConfig.getParameter<edm::InputTag>("trackLabel");
28  theRescale = iConfig.getParameter<bool>("rescale");
29 
30  theMatrixProvider_pset = iConfig.getParameter<edm::ParameterSet>("errorMatrix_pset");
31 }

References edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theCategory, theInstanceName, theMatrixProvider_pset, theRescale, and theTrackLabel.

◆ ~MuonErrorMatrixAdjuster()

MuonErrorMatrixAdjuster::~MuonErrorMatrixAdjuster ( )
override

destructor

Definition at line 33 of file MuonErrorMatrixAdjuster.cc.

33  {
34  // do anything here that needs to be done at desctruction time
35  // (e.g. close files, deallocate resources etc.)
36 }

Member Function Documentation

◆ attachRecHits()

bool MuonErrorMatrixAdjuster::attachRecHits ( const reco::Track recotrack_orig,
reco::Track recotrack,
reco::TrackExtra trackextra,
TrackingRecHitCollection RHcol,
const TrackerTopology ttopo 
)
private

attached rechits to the newly created reco::Track and reco::TrackExtra

Definition at line 144 of file MuonErrorMatrixAdjuster.cc.

148  {
149  //loop over the hits of the original track
150  trackingRecHit_iterator recHit = recotrack_orig.recHitsBegin();
151  auto const firstHitIndex = theRHi;
152  for (; recHit != recotrack_orig.recHitsEnd(); ++recHit) {
153  //clone it. this is meandatory
154  TrackingRecHit* hit = (*recHit)->clone();
155 
156  //put it on the new track
157  recotrack.appendHitPattern(*hit, ttopo);
158  //copy them in the new collection
159  RHcol.push_back(hit);
160  ++theRHi;
161 
162  } //loop over original rechits
163  //do something with the trackextra
164  trackextra.setHits(theRefprodRH, firstHitIndex, theRHi - firstHitIndex);
165 
166  return true; //if nothing fails
167 }

References reco::TrackBase::appendHitPattern(), edm::OwnVector< T, P >::push_back(), rpcPointValidation_cfi::recHit, reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), reco::TrackExtraBase::setHits(), theRefprodRH, and theRHi.

Referenced by produce().

◆ beginJob()

void MuonErrorMatrixAdjuster::beginJob ( void  )
overrideprivatevirtual

framework method

Reimplemented from edm::EDProducer.

Definition at line 245 of file MuonErrorMatrixAdjuster.cc.

References theMatrixProvider, and theMatrixProvider_pset.

◆ divide()

bool MuonErrorMatrixAdjuster::divide ( reco::TrackBase::CovarianceMatrix num_matrix,
const reco::TrackBase::CovarianceMatrix denom_matrix 
)
private

divide the num_matrix (first argument) by second matrix, TERM by TERM

Definition at line 66 of file MuonErrorMatrixAdjuster.cc.

67  {
68  //divide term by term the matrix
69  // the true type of the matrix is such that [i][j] is the same memory object as [j][i]: looping i:0-5, j:0-5 double multiply the terms
70  // need to loop only on i:0-5, j:i-5
71  for (int i = 0; i != 5; i++) {
72  for (int j = i; j != 5; j++) {
73  if (denom_matrix(i, j) == 0)
74  return false;
75  num_matrix(i, j) /= denom_matrix(i, j);
76  }
77  }
78  return true;
79 }

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by makeTrackExtra().

◆ endJob()

void MuonErrorMatrixAdjuster::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 248 of file MuonErrorMatrixAdjuster.cc.

248  {
249  if (theMatrixProvider)
250  delete theMatrixProvider;
251 }

References theMatrixProvider.

◆ fix_cov_matrix()

reco::TrackBase::CovarianceMatrix MuonErrorMatrixAdjuster::fix_cov_matrix ( const reco::TrackBase::CovarianceMatrix error_matrix,
const GlobalVector momentum 
)
private

return a corrected error matrix

Definition at line 43 of file MuonErrorMatrixAdjuster.cc.

44  {
45  //CovarianceMatrix is template for SMatrix
46  reco::TrackBase::CovarianceMatrix revised_matrix(theMatrixProvider->get(momentum));
47 
48  if (theRescale) {
49  //rescale old error matrix up by a factor
50  multiply(revised_matrix, error_matrix);
51  }
52  return revised_matrix;
53 }

References MuonErrorMatrix::get(), multiply(), theMatrixProvider, and theRescale.

Referenced by makeTrack().

◆ makeTrack()

reco::Track MuonErrorMatrixAdjuster::makeTrack ( const reco::Track recotrack_orig,
const FreeTrajectoryState PCAstate 
)
private

create a corrected reco::Track from itself and trajectory state (redundant information)

Definition at line 81 of file MuonErrorMatrixAdjuster.cc.

81  {
82  //get the parameters of the track so I can reconstruct it
83  double chi2 = recotrack_orig.chi2();
84  double ndof = recotrack_orig.ndof();
85  const math::XYZPoint& refpos = recotrack_orig.referencePoint();
86  const math::XYZVector& mom = recotrack_orig.momentum();
87  int charge = recotrack_orig.charge();
88 
89  reco::TrackBase::CovarianceMatrix covariance_matrix =
90  fix_cov_matrix(recotrack_orig.covariance(), PCAstate.momentum());
91 
92  LogDebug(theCategory) << "chi2: " << chi2 << "\n ndof: " << ndof << "\n refpos: " << refpos << "\n mom: " << mom
93  << "\n charge: " << charge << "\n covariance:\n"
94  << recotrack_orig.covariance() << "\n replaced by:\n"
95  << covariance_matrix;
96 
97  return reco::Track(chi2, ndof, refpos, mom, charge, covariance_matrix);
98 }

References ALCARECOTkAlJpsiMuMu_cff::charge, reco::TrackBase::charge(), hltPixelTracks_cff::chi2, reco::TrackBase::chi2(), reco::TrackBase::covariance(), fix_cov_matrix(), LogDebug, FreeTrajectoryState::momentum(), reco::TrackBase::momentum(), ndof, reco::TrackBase::ndof(), reco::TrackBase::referencePoint(), and theCategory.

Referenced by produce().

◆ makeTrackExtra()

reco::TrackExtra * MuonErrorMatrixAdjuster::makeTrackExtra ( const reco::Track recotrack_orig,
reco::Track recotrack,
reco::TrackExtraCollection TEcol 
)
private

create a track extra for the newly created recotrack, scaling the outer/inner measurment error matrix by the scale matrix recotrack/recotrack_orig

Definition at line 100 of file MuonErrorMatrixAdjuster.cc.

102  {
103  //get the 5x5 matrix of recotrack/recotrack_orig
104  reco::TrackBase::CovarianceMatrix scale_matrix(recotrack.covariance());
105  if (!divide(scale_matrix, recotrack_orig.covariance())) {
106  edm::LogError(theCategory) << "original track error matrix has term ==0... skipping.";
107  return nullptr;
108  }
109 
110  const reco::TrackExtraRef& trackExtra_orig = recotrack_orig.extra();
111  if (trackExtra_orig.isNull()) {
112  edm::LogError(theCategory) << "original track has no track extra... skipping.";
113  return nullptr;
114  }
115 
116  //copy the outer state. rescaling the error matrix
117  reco::TrackBase::CovarianceMatrix outerCov(trackExtra_orig->outerStateCovariance());
118  multiply(outerCov, scale_matrix);
119 
120  //copy the inner state, rescaling the error matrix
121  reco::TrackBase::CovarianceMatrix innerCov(trackExtra_orig->innerStateCovariance());
122  multiply(innerCov, scale_matrix);
123 
124  //put the trackExtra
125  TEcol.push_back(reco::TrackExtra(trackExtra_orig->outerPosition(),
126  trackExtra_orig->outerMomentum(),
127  true,
128  trackExtra_orig->innerPosition(),
129  trackExtra_orig->innerMomentum(),
130  true,
131  outerCov,
132  trackExtra_orig->outerDetId(),
133  innerCov,
134  trackExtra_orig->innerDetId(),
135  trackExtra_orig->seedDirection()));
136 
137  //add a reference to the trackextra on the track
139 
140  //return the reference to the last inserted then
141  return &(TEcol.back());
142 }

References reco::TrackBase::covariance(), divide(), reco::Track::extra(), edm::Ref< C, T, F >::isNull(), multiply(), reco::Track::setExtra(), theCategory, theRefprodTE, and theTEi.

Referenced by produce().

◆ multiply()

void MuonErrorMatrixAdjuster::multiply ( reco::TrackBase::CovarianceMatrix revised_matrix,
const reco::TrackBase::CovarianceMatrix scale_matrix 
)
private

mutliply revised_matrix (first argument) by second matrix TERM by TERM

Definition at line 55 of file MuonErrorMatrixAdjuster.cc.

56  {
57  //scale term by term the matrix
58  // the true type of the matrix is such that [i][j] is the same memory object as [j][i]: looping i:0-5, j:0-5 double multiply the terms
59  // need to loop only on i:0-5, j:i-5
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);
63  }
64  }
65 }

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by fix_cov_matrix(), and makeTrackExtra().

◆ produce()

void MuonErrorMatrixAdjuster::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 172 of file MuonErrorMatrixAdjuster.cc.

172  {
173  using namespace edm;
174 
175  //open a collection of track
177  iEvent.getByLabel(theTrackLabel, tracks);
178  LogDebug(theCategory) << "considering: " << tracks->size() << " uncorrected reco::Track from the event.("
179  << theTrackLabel << ")";
180 
181  //get the mag field
183 
185  iSetup.get<TrackerTopologyRcd>().get(httopo);
186  const TrackerTopology& ttopo = *httopo;
187 
188  //prepare the output collection
189  auto Toutput = std::make_unique<reco::TrackCollection>();
190  auto TRHoutput = std::make_unique<TrackingRecHitCollection>();
191  auto TEoutput = std::make_unique<reco::TrackExtraCollection>();
192  theRefprodTE = iEvent.getRefBeforePut<reco::TrackExtraCollection>();
193  theTEi = 0;
194  theRefprodRH = iEvent.getRefBeforePut<TrackingRecHitCollection>();
195  theRHi = 0;
196 
197  for (unsigned int it = 0; it != tracks->size(); it++) {
198  const reco::Track& recotrack_orig = (*tracks)[it];
200  if (PCAstate.position().mag() == 0) {
201  edm::LogError(theCategory) << "invalid state from track initial state in " << theTrackLabel << ". skipping.";
202  continue;
203  }
204 
205  //create a reco::Track
206  reco::Track recotrack = makeTrack(recotrack_orig, PCAstate);
207 
208  //make a selection on the create reco::Track
209  if (!selectTrack(recotrack))
210  continue;
211 
212  Toutput->push_back(recotrack);
213  reco::Track& recotrackref = Toutput->back();
214 
215  //build the track extra
216  reco::TrackExtra* extra = makeTrackExtra(recotrack_orig, recotrackref, *TEoutput);
217  if (!extra) {
218  edm::LogError(theCategory) << "cannot create the track extra for this track.";
219  //pop the inserted track
220  Toutput->pop_back();
221  continue;
222  }
223 
224  //attach the collection of rechits
225  if (!attachRecHits(recotrack_orig, recotrackref, *extra, *TRHoutput, ttopo)) {
226  edm::LogError(theCategory) << "cannot attach any rechits on this track";
227  //pop the inserted track
228  Toutput->pop_back();
229  //pop the track extra
230  TEoutput->pop_back();
231  theTEi--;
232  continue;
233  }
234 
235  } //loop over the original reco tracks
236 
237  LogDebug(theCategory) << "writing: " << Toutput->size() << " corrected reco::Track to the event.";
238 
239  iEvent.put(std::move(Toutput), theInstanceName);
240  iEvent.put(std::move(TEoutput));
241  iEvent.put(std::move(TRHoutput));
242 }

References attachRecHits(), edm::EventSetup::get(), get, iEvent, trajectoryStateTransform::initialFreeState(), LogDebug, PV3DBase< T, PVType, FrameType >::mag(), makeTrack(), makeTrackExtra(), eostools::move(), FreeTrajectoryState::position(), edm::ESHandle< T >::product(), selectTrack(), theCategory, theField, theInstanceName, theRefprodRH, theRefprodTE, theRHi, theTEi, theTrackLabel, and tracks.

◆ selectTrack()

bool MuonErrorMatrixAdjuster::selectTrack ( const reco::Track recotrack_orig)
private

make a selection on the reco:Track. (dummy for the moment)

Definition at line 169 of file MuonErrorMatrixAdjuster.cc.

169 { return true; }

Referenced by produce().

Member Data Documentation

◆ theCategory

std::string MuonErrorMatrixAdjuster::theCategory
private

◆ theField

edm::ESHandle<MagneticField> MuonErrorMatrixAdjuster::theField
private

hold on to the magnetic field

Definition at line 102 of file MuonErrorMatrixAdjuster.h.

Referenced by produce().

◆ theInstanceName

std::string MuonErrorMatrixAdjuster::theInstanceName
private

instrance name of the created track collecion. rechit and trackextra have no instance name

Definition at line 92 of file MuonErrorMatrixAdjuster.h.

Referenced by MuonErrorMatrixAdjuster(), and produce().

◆ theMatrixProvider

MuonErrorMatrix* MuonErrorMatrixAdjuster::theMatrixProvider
private

Definition at line 99 of file MuonErrorMatrixAdjuster.h.

Referenced by beginJob(), endJob(), and fix_cov_matrix().

◆ theMatrixProvider_pset

edm::ParameterSet MuonErrorMatrixAdjuster::theMatrixProvider_pset
private

holds the error matrix parametrization

Definition at line 98 of file MuonErrorMatrixAdjuster.h.

Referenced by beginJob(), and MuonErrorMatrixAdjuster().

◆ theRefprodRH

edm::RefProd<TrackingRecHitCollection> MuonErrorMatrixAdjuster::theRefprodRH
private

get reference before put rechit to the event, in order to create edm::Ref

Definition at line 109 of file MuonErrorMatrixAdjuster.h.

Referenced by attachRecHits(), and produce().

◆ theRefprodTE

edm::RefProd<reco::TrackExtraCollection> MuonErrorMatrixAdjuster::theRefprodTE
private

get reference before put track extra to the event, in order to create edm::Ref

Definition at line 105 of file MuonErrorMatrixAdjuster.h.

Referenced by makeTrackExtra(), and produce().

◆ theRescale

bool MuonErrorMatrixAdjuster::theRescale
private

select the rescaling or replacing method to correct the error matrix

Definition at line 95 of file MuonErrorMatrixAdjuster.h.

Referenced by fix_cov_matrix(), and MuonErrorMatrixAdjuster().

◆ theRHi

edm::Ref<TrackingRecHitCollection>::key_type MuonErrorMatrixAdjuster::theRHi
private

Definition at line 110 of file MuonErrorMatrixAdjuster.h.

Referenced by attachRecHits(), and produce().

◆ theTEi

edm::Ref<reco::TrackExtraCollection>::key_type MuonErrorMatrixAdjuster::theTEi
private

Definition at line 106 of file MuonErrorMatrixAdjuster.h.

Referenced by makeTrackExtra(), and produce().

◆ theTrackLabel

edm::InputTag MuonErrorMatrixAdjuster::theTrackLabel
private

input tag of the reco::Track collection to be corrected

Definition at line 89 of file MuonErrorMatrixAdjuster.h.

Referenced by MuonErrorMatrixAdjuster(), and produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
mps_fire.i
i
Definition: mps_fire.py:428
trajectoryStateTransform::initialFreeState
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:58
reco::Track::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
reco::TrackBase::referencePoint
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:667
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
MuonErrorMatrixAdjuster::theMatrixProvider
MuonErrorMatrix * theMatrixProvider
Definition: MuonErrorMatrixAdjuster.h:99
reco::TrackBase::ndof
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:590
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
edm::Handle< reco::TrackCollection >
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
edm::Ref< TrackExtraCollection >
MuonErrorMatrixAdjuster::theRefprodTE
edm::RefProd< reco::TrackExtraCollection > theRefprodTE
get reference before put track extra to the event, in order to create edm::Ref
Definition: MuonErrorMatrixAdjuster.h:105
ndof
Definition: HIMultiTrackSelector.h:49
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
reco::TrackExtra
Definition: TrackExtra.h:26
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
reco::Track::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
MuonErrorMatrixAdjuster::theInstanceName
std::string theInstanceName
instrance name of the created track collecion. rechit and trackextra have no instance name
Definition: MuonErrorMatrixAdjuster.h:92
reco::Track
Definition: Track.h:27
edm::ESHandle< TrackerTopology >
reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
MuonErrorMatrixAdjuster::attachRecHits
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
Definition: MuonErrorMatrixAdjuster.cc:144
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
reco::TrackBase::covariance
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
MuonErrorMatrixAdjuster::makeTrack
reco::Track makeTrack(const reco::Track &recotrack_orig, const FreeTrajectoryState &PCAstate)
create a corrected reco::Track from itself and trajectory state (redundant information)
Definition: MuonErrorMatrixAdjuster.cc:81
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
MuonErrorMatrixAdjuster::theRescale
bool theRescale
select the rescaling or replacing method to correct the error matrix
Definition: MuonErrorMatrixAdjuster.h:95
MuonErrorMatrixAdjuster::theTrackLabel
edm::InputTag theTrackLabel
input tag of the reco::Track collection to be corrected
Definition: MuonErrorMatrixAdjuster.h:89
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
MuonErrorMatrixAdjuster::theCategory
std::string theCategory
log category: MuonErrorMatrixAdjuster
Definition: MuonErrorMatrixAdjuster.h:86
MuonErrorMatrix::get
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
Definition: MuonErrorMatrix.cc:258
MuonErrorMatrixAdjuster::theField
edm::ESHandle< MagneticField > theField
hold on to the magnetic field
Definition: MuonErrorMatrixAdjuster.h:102
MuonErrorMatrixAdjuster::multiply
void multiply(reco::TrackBase::CovarianceMatrix &revised_matrix, const reco::TrackBase::CovarianceMatrix &scale_matrix)
mutliply revised_matrix (first argument) by second matrix TERM by TERM
Definition: MuonErrorMatrixAdjuster.cc:55
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
iEvent
int iEvent
Definition: GenABIO.cc:224
MuonErrorMatrixAdjuster::divide
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
Definition: MuonErrorMatrixAdjuster.cc:66
reco::TrackBase::chi2
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:587
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
MuonErrorMatrixAdjuster::theTEi
edm::Ref< reco::TrackExtraCollection >::key_type theTEi
Definition: MuonErrorMatrixAdjuster.h:106
reco::TrackBase::appendHitPattern
bool appendHitPattern(const TrackingRecHit &hit, const TrackerTopology &ttopo)
append a single hit to the HitPattern
Definition: TrackBase.h:510
reco::TrackExtraBase::setHits
void setHits(TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
Definition: TrackExtraBase.h:30
TrackingRecHit
Definition: TrackingRecHit.h:21
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
reco::Track::setExtra
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
Definition: Track.h:136
eostools.move
def move(src, dest)
Definition: eostools.py:511
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
MuonErrorMatrixAdjuster::theRefprodRH
edm::RefProd< TrackingRecHitCollection > theRefprodRH
get reference before put rechit to the event, in order to create edm::Ref
Definition: MuonErrorMatrixAdjuster.h:109
MuonErrorMatrix
Definition: MuonErrorMatrix.h:24
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MuonErrorMatrixAdjuster::theRHi
edm::Ref< TrackingRecHitCollection >::key_type theRHi
Definition: MuonErrorMatrixAdjuster.h:110
MuonErrorMatrixAdjuster::makeTrackExtra
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...
Definition: MuonErrorMatrixAdjuster.cc:100
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
MuonErrorMatrixAdjuster::fix_cov_matrix
reco::TrackBase::CovarianceMatrix fix_cov_matrix(const reco::TrackBase::CovarianceMatrix &error_matrix, const GlobalVector &momentum)
return a corrected error matrix
Definition: MuonErrorMatrixAdjuster.cc:43
MuonErrorMatrixAdjuster::selectTrack
bool selectTrack(const reco::Track &recotrack_orig)
make a selection on the reco:Track. (dummy for the moment)
Definition: MuonErrorMatrixAdjuster.cc:169
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
MuonErrorMatrixAdjuster::theMatrixProvider_pset
edm::ParameterSet theMatrixProvider_pset
holds the error matrix parametrization
Definition: MuonErrorMatrixAdjuster.h:98
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
reco::TrackBase::momentum
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
reco::TrackBase::CovarianceMatrix
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:74
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >