CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
GlobalTrackQualityProducer Class Reference

#include <GlobalTrackQualityProducer.h>

Inheritance diagram for GlobalTrackQualityProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalTrackQualityProducer (const edm::ParameterSet &iConfig)
 
virtual ~GlobalTrackQualityProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual std::pair< double, double > kink (Trajectory &muon) const
 
virtual std::pair< double, double > newChi2 (Trajectory &muon) const
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
virtual double trackProbability (Trajectory &track) const
 

Private Attributes

edm::EDGetTokenT
< reco::TrackCollection
glbMuonsToken
 
edm::InputTag inputCollection_
 
edm::InputTag inputLinksCollection_
 
edm::EDGetTokenT
< reco::MuonTrackLinksCollection
linkCollectionToken
 
MeasurementEstimatortheEstimator
 
GlobalMuonTrackMatchertheGlbMatcher
 
GlobalMuonRefittertheGlbRefitter
 
MuonServiceProxytheService
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 27 of file GlobalTrackQualityProducer.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file GlobalTrackQualityProducer.cc.

References edm::EDConsumerBase::consumesCollector(), edm::ParameterSet::getParameter(), glbMuonsToken, GlobalMuonRefitter_cff::GlobalMuonRefitter, GlobalMuonTrackMatcher_cff::GlobalMuonTrackMatcher, inputCollection_, inputLinksCollection_, linkCollectionToken, HLT_FULL_cff::maxChi2, MuonServiceProxy_cff::MuonServiceProxy, HLT_FULL_cff::nSigma, theEstimator, theGlbMatcher, theGlbRefitter, and theService.

27  :
28  inputCollection_(iConfig.getParameter<edm::InputTag>("InputCollection")),inputLinksCollection_(iConfig.getParameter<edm::InputTag>("InputLinksCollection")),theService(0),theGlbRefitter(0),theGlbMatcher(0)
29 {
30  // service parameters
31  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
32  theService = new MuonServiceProxy(serviceParameters);
33 
34  // TrackRefitter parameters
36  edm::ParameterSet refitterParameters = iConfig.getParameter<edm::ParameterSet>("RefitterParameters");
37  theGlbRefitter = new GlobalMuonRefitter(refitterParameters, theService, iC);
38 
39  edm::ParameterSet trackMatcherPSet = iConfig.getParameter<edm::ParameterSet>("GlobalMuonTrackMatcher");
40  theGlbMatcher = new GlobalMuonTrackMatcher(trackMatcherPSet,theService);
41 
42  double maxChi2 = iConfig.getParameter<double>("MaxChi2");
43  double nSigma = iConfig.getParameter<double>("nSigma");
44  theEstimator = new Chi2MeasurementEstimator(maxChi2,nSigma);
45 
46  glbMuonsToken=consumes<reco::TrackCollection>(inputCollection_);
47  linkCollectionToken=consumes<reco::MuonTrackLinksCollection>(inputLinksCollection_);
48 
49  produces<edm::ValueMap<reco::MuonQuality> >();
50 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackCollection > glbMuonsToken
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkCollectionToken
GlobalMuonTrackMatcher * theGlbMatcher
GlobalTrackQualityProducer::~GlobalTrackQualityProducer ( )
virtual

Definition at line 52 of file GlobalTrackQualityProducer.cc.

References theEstimator, theGlbMatcher, theGlbRefitter, and theService.

52  {
53  if (theService) delete theService;
54  if (theGlbRefitter) delete theGlbRefitter;
55  if (theGlbMatcher) delete theGlbMatcher;
56  if (theEstimator) delete theEstimator;
57 }
GlobalMuonTrackMatcher * theGlbMatcher

Member Function Documentation

std::pair< double, double > GlobalTrackQualityProducer::kink ( Trajectory muon) const
privatevirtual

Definition at line 175 of file GlobalTrackQualityProducer.cc.

References mps_update::diff, relativeConstraints::error, TrajectoryStateOnSurface::globalPosition(), edm::isNotFinite(), TrajectoryStateOnSurface::isValid(), visualization-live-secondInstance_cfg::m, M_PI, Trajectory::measurements(), convertSQLiteXML::ok, PV3DBase< T, PVType, FrameType >::phi(), GlobalErrorBase< T, ErrorWeightType >::phierr(), dt_dqm_sourceclient_common_cff::reco, mps_fire::result, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and DetId::Tracker.

Referenced by produce().

175  {
176 
177  const std::string theCategory = "Muon|RecoMuon|GlobalTrackQualityProducer";
178 
179  using namespace std;
180  using namespace edm;
181  using namespace reco;
182 
183  double result = 0.0;
184  double resultGlb = 0.0;
185 
186 
188  typedef ConstRecHitPointer RecHit;
189  typedef std::vector<TrajectoryMeasurement>::const_iterator TMI;
190 
191 
192  vector<TrajectoryMeasurement> meas = muon.measurements();
193 
194  for ( TMI m = meas.begin(); m != meas.end(); m++ ) {
196 
197  //not used double estimate = 0.0;
198 
199  RecHit rhit = (*m).recHit();
200  bool ok = false;
201  if ( rhit->isValid() ) {
202  if(DetId::Tracker == rhit->geographicalId().det()) ok = true;
203  }
204 
205  //if ( !ok ) continue;
206 
207  const TrajectoryStateOnSurface& tsos = (*m).predictedState();
208 
209 
210  if ( tsos.isValid() && rhit->isValid() && rhit->hit()->isValid()
211  && !edm::isNotFinite(rhit->localPositionError().xx()) //this is paranoia induced by reported case
212  && !edm::isNotFinite(rhit->localPositionError().xy()) //it's better to track down the origin of bad numbers
213  && !edm::isNotFinite(rhit->localPositionError().yy())
214  ) {
215 
216  double phi1 = tsos.globalPosition().phi();
217  if ( phi1 < 0 ) phi1 = 2*M_PI + phi1;
218 
219  double phi2 = rhit->globalPosition().phi();
220  if ( phi2 < 0 ) phi2 = 2*M_PI + phi2;
221 
222  double diff = fabs(phi1 - phi2);
223  if ( diff > M_PI ) diff = 2*M_PI - diff;
224 
225  GlobalPoint hitPos = rhit->globalPosition();
226 
227  GlobalError hitErr = rhit->globalPositionError();
228  //LogDebug(theCategory)<<"hitPos " << hitPos;
229  double error = hitErr.phierr(hitPos); // error squared
230 
231  double s = ( error > 0.0 ) ? (diff*diff)/error : (diff*diff);
232 
233  if(ok) result += s;
234  resultGlb += s;
235  }
236 
237  }
238 
239 
240  return std::pair<double,double>(result,resultGlb);
241 
242 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
list diff
Definition: mps_update.py:85
tuple result
Definition: mps_fire.py:95
T phierr(const GlobalPoint &aPoint) const
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
DataContainer const & measurements() const
Definition: Trajectory.h:250
bool isNotFinite(T x)
Definition: isFinite.h:10
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
#define M_PI
std::pair< double, double > GlobalTrackQualityProducer::newChi2 ( Trajectory muon) const
privatevirtual

Definition at line 244 of file GlobalTrackQualityProducer.cc.

References MeasurementEstimator::estimate(), TrajectoryStateOnSurface::isValid(), visualization-live-secondInstance_cfg::m, Trajectory::measurements(), DetId::Muon, dt_dqm_sourceclient_common_cff::reco, AlCaHLTBitMon_QueryRunRegistry::string, theEstimator, and DetId::Tracker.

Referenced by produce().

244  {
245  const std::string theCategory = "Muon|RecoMuon|GlobalTrackQualityProducer";
246 
247  using namespace std;
248  using namespace edm;
249  using namespace reco;
250 
251  double muChi2 = 0.0;
252  double tkChi2 = 0.0;
253  unsigned int muNdof = 0;
254  unsigned int tkNdof = 0;
255 
257  typedef ConstRecHitPointer RecHit;
258  typedef vector<TrajectoryMeasurement>::const_iterator TMI;
259 
260  vector<TrajectoryMeasurement> meas = muon.measurements();
261 
262  for ( TMI m = meas.begin(); m != meas.end(); m++ ) {
264  const TrajectoryStateOnSurface& uptsos = (*m).updatedState();
265  // FIXME FIXME CLONE!!!
266  // TrackingRecHit::RecHitPointer preciseHit = hit->clone(uptsos);
267  auto preciseHit = hit;
268  double estimate = 0.0;
269  if (preciseHit->isValid() && uptsos.isValid()) {
270  estimate = theEstimator->estimate(uptsos, *preciseHit ).second;
271  }
272 
273  //LogTrace(theCategory) << "estimate " << estimate << " TM.est " << m->estimate();
274  //UNUSED: double tkDiff = 0.0;
275  //UNUSED: double staDiff = 0.0;
276  if ( hit->isValid() && (hit->geographicalId().det()) == DetId::Tracker ) {
277  tkChi2 += estimate;
278  //UNUSED: tkDiff = estimate - m->estimate();
279  tkNdof += hit->dimension();
280  }
281  if ( hit->isValid() && (hit->geographicalId().det()) == DetId::Muon ) {
282  muChi2 += estimate;
283  //UNUSED staDiff = estimate - m->estimate();
284  muNdof += hit->dimension();
285  }
286  }
287 
288  if (tkNdof < 6 ) tkChi2 = tkChi2; // or should I set it to a large number ?
289  else tkChi2 /= (tkNdof-5.);
290 
291  if (muNdof < 6 ) muChi2 = muChi2; // or should I set it to a large number ?
292  else muChi2 /= (muNdof-5.);
293 
294  return std::pair<double,double>(tkChi2,muChi2);
295 
296 }
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
DataContainer const & measurements() const
Definition: Trajectory.h:250
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
void GlobalTrackQualityProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 60 of file GlobalTrackQualityProducer.cc.

References beam_dqm_sourceclient-live_cfg::chi2, reco::MuonQuality::chi2LocalMomentum, reco::MuonQuality::chi2LocalPosition, ztail::d, MuonServiceProxy::eventSetup(), edm::helper::Filler< Map >::fill(), edm::EventSetup::get(), edm::Event::getByToken(), edm::Event::getProvenance(), reco::MuonQuality::glbKink, glbMuonsToken, reco::MuonQuality::glbTrackProbability, reco::MuonQuality::globalDeltaEtaPhi, edm::Ref< C, T, F >::id(), edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::isNull(), edm::HandleBase::isValid(), kink(), linkCollectionToken, electronStore::links, reco::MuonQuality::localDistance, LogTrace, GlobalMuonTrackMatcher::match(), GlobalMuonTrackMatcher::matchTight(), bookConverter::max, newChi2(), edm::ESHandle< class >::product(), edm::Event::put(), GlobalMuonRefitter::refit(), GlobalMuonRefitter::setEvent(), GlobalMuonRefitter::setServices(), reco::MuonQuality::staRelChi2, AlCaHLTBitMon_QueryRunRegistry::string, theGlbMatcher, theGlbRefitter, theService, reco::MuonQuality::tightMatch, HLT_FULL_cff::TrackCand, trackProbability(), reco::MuonQuality::trkKink, reco::MuonQuality::trkRelChi2, MuonServiceProxy::update(), and reco::MuonQuality::updatedSta.

61 {
62  const std::string theCategory = "Muon|RecoMuon|GlobalTrackQualityProducer";
63 
64  theService->update(iSetup);
65 
66  theGlbRefitter->setEvent(iEvent);
67 
68  theGlbRefitter->setServices(theService->eventSetup());
69 
70  // Take the GLB muon container(s)
72  iEvent.getByToken(glbMuonsToken,glbMuons);
73 
75  iEvent.getByToken(linkCollectionToken,linkCollectionHandle);
76 
77  //Retrieve tracker topology from geometry
79  iSetup.get<TrackerTopologyRcd>().get(tTopoHand);
80  const TrackerTopology *tTopo=tTopoHand.product();
81 
82 
83  // reserve some space
84  std::vector<reco::MuonQuality> valuesQual;
85  valuesQual.reserve(glbMuons->size());
86 
87  int trackIndex = 0;
88  for (reco::TrackCollection::const_iterator track = glbMuons->begin(); track!=glbMuons->end(); ++track , ++trackIndex) {
89  reco::TrackRef glbRef(glbMuons,trackIndex);
90  reco::TrackRef staTrack = reco::TrackRef();
91 
92  std::vector<Trajectory> refitted=theGlbRefitter->refit(*track,1,tTopo);
93 
94  LogTrace(theCategory)<<"GLBQual N refitted " << refitted.size();
95 
96  std::pair<double,double> thisKink;
97  double relative_muon_chi2 = 0.0;
98  double relative_tracker_chi2 = 0.0;
99  double glbTrackProbability = 0.0;
100  if(refitted.size()>0) {
101  thisKink = kink(refitted.front()) ;
102  std::pair<double,double> chi = newChi2(refitted.front());
103  relative_muon_chi2 = chi.second; //normalized inside to /sum(muHits.dimension)
104  relative_tracker_chi2 = chi.first; //normalized inside to /sum(tkHits.dimension)
105  glbTrackProbability = trackProbability(refitted.front());
106  }
107 
108  LogTrace(theCategory)<<"GLBQual: Kink " << thisKink.first << " " << thisKink.second;
109  LogTrace(theCategory)<<"GLBQual: Rel Chi2 " << relative_tracker_chi2 << " " << relative_muon_chi2;
110  LogTrace(theCategory)<<"GLBQual: trackProbability " << glbTrackProbability;
111 
112  // Fill the STA-TK match information
113  float chi2, d, dist, Rpos;
114  chi2 = d = dist = Rpos = -1.0;
115  bool passTight = false;
117  if ( linkCollectionHandle.isValid() ) {
118  for ( reco::MuonTrackLinksCollection::const_iterator links = linkCollectionHandle->begin();
119  links != linkCollectionHandle->end(); ++links )
120  {
121  if ( links->trackerTrack().isNull() ||
122  links->standAloneTrack().isNull() ||
123  links->globalTrack().isNull() )
124  {
125  edm::LogWarning(theCategory) << "Global muon links to constituent tracks are invalid. There should be no such object. Muon is skipped.";
126  continue;
127  }
128  if (links->globalTrack() == glbRef) {
129  staTrack = !links->standAloneTrack().isNull() ? links->standAloneTrack() : reco::TrackRef();
130  TrackCand staCand = TrackCand((Trajectory*)(0),links->standAloneTrack());
131  TrackCand tkCand = TrackCand((Trajectory*)(0),links->trackerTrack());
132  chi2 = theGlbMatcher->match(staCand,tkCand,0,0);
133  d = theGlbMatcher->match(staCand,tkCand,1,0);
134  Rpos = theGlbMatcher->match(staCand,tkCand,2,0);
135  dist = theGlbMatcher->match(staCand,tkCand,3,0);
136  passTight = theGlbMatcher->matchTight(staCand,tkCand);
137  }
138  }
139  }
140 
141  if(!staTrack.isNull()) LogTrace(theCategory)<<"GLBQual: Used UpdatedAtVtx : " << (iEvent.getProvenance(staTrack.id()).productInstanceName() == std::string("UpdatedAtVtx"));
142 
143  float maxFloat01 = std::numeric_limits<float>::max()*0.1; // a better solution would be to use float above .. m/be not
144  reco::MuonQuality muQual;
145  if(!staTrack.isNull()) muQual.updatedSta = iEvent.getProvenance(staTrack.id()).productInstanceName() == std::string("UpdatedAtVtx");
146  muQual.trkKink = thisKink.first > maxFloat01 ? maxFloat01 : thisKink.first;
147  muQual.glbKink = thisKink.second > maxFloat01 ? maxFloat01 : thisKink.second;
148  muQual.trkRelChi2 = relative_tracker_chi2 > maxFloat01 ? maxFloat01 : relative_tracker_chi2;
149  muQual.staRelChi2 = relative_muon_chi2 > maxFloat01 ? maxFloat01 : relative_muon_chi2;
150  muQual.tightMatch = passTight;
151  muQual.chi2LocalPosition = dist;
152  muQual.chi2LocalMomentum = chi2;
153  muQual.localDistance = d;
154  muQual.globalDeltaEtaPhi = Rpos;
155  muQual.glbTrackProbability = glbTrackProbability;
156  valuesQual.push_back(muQual);
157  }
158 
159  /*
160  for(int i = 0; i < valuesTkRelChi2.size(); i++) {
161  LogTrace(theCategory)<<"value " << valuesTkRelChi2[i] ;
162  }
163  */
164 
165  // create and fill value maps
166  std::auto_ptr<edm::ValueMap<reco::MuonQuality> > outQual(new edm::ValueMap<reco::MuonQuality>());
167  edm::ValueMap<reco::MuonQuality>::Filler fillerQual(*outQual);
168  fillerQual.insert(glbMuons, valuesQual.begin(), valuesQual.end());
169  fillerQual.fill();
170 
171  // put value map into event
172  iEvent.put(outQual);
173 }
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
float chi2LocalMomentum
chi2 value for the STA-TK matching of local momentum
Definition: MuonQuality.h:21
std::pair< const Trajectory *, reco::TrackRef > TrackCand
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool updatedSta
bool returns true if standAloneMuon_updatedAtVtx was used in the fit
Definition: MuonQuality.h:9
float glbKink
value of the kink algorithm applied to the global track
Definition: MuonQuality.h:13
edm::EDGetTokenT< reco::TrackCollection > glbMuonsToken
bool matchTight(const TrackCand &sta, const TrackCand &track) const
check if two tracks are compatible (less than Chi2Cut, DeltaDCut, DeltaRCut)
float glbTrackProbability
the tail probability (-ln(P)) of the global fit
Definition: MuonQuality.h:29
void setServices(const edm::EventSetup &)
set the services needed by the TrackTransformer
float trkKink
value of the kink algorithm applied to the inner track stub
Definition: MuonQuality.h:11
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
Definition: MuonQuality.h:15
virtual std::pair< double, double > newChi2(Trajectory &muon) const
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
virtual double trackProbability(Trajectory &track) const
virtual std::pair< double, double > kink(Trajectory &muon) const
tuple d
Definition: ztail.py:151
bool tightMatch
if the STA-TK matching passed the tighter matching criteria
Definition: MuonQuality.h:27
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
float globalDeltaEtaPhi
global delta-Eta-Phi of STA-TK matching
Definition: MuonQuality.h:25
double match(const TrackCand &sta, const TrackCand &track, int matchOption=0, int surfaceOption=1) const
bool isValid() const
Definition: HandleBase.h:75
bool isNull() const
Checks for null.
Definition: Ref.h:249
#define LogTrace(id)
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
float staRelChi2
chi2 value for the outer track stub with respect to the global track
Definition: MuonQuality.h:17
const T & get() const
Definition: EventSetup.h:56
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
T const * product() const
Definition: ESHandle.h:86
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkCollectionToken
float localDistance
local distance seperation for STA-TK TSOS matching on same surface
Definition: MuonQuality.h:23
GlobalMuonTrackMatcher * theGlbMatcher
Provenance getProvenance(BranchID const &theID) const
Definition: Event.cc:80
std::vector< Trajectory > refit(const reco::Track &globalTrack, const int theMuonHitsOption, const TrackerTopology *tTopo) const
build combined trajectory from sta Track and tracker RecHits
double GlobalTrackQualityProducer::trackProbability ( Trajectory track) const
privatevirtual

Definition at line 302 of file GlobalTrackQualityProducer.cc.

References Trajectory::chiSquared(), LnChiSquaredProbability(), and Trajectory::ndof().

Referenced by produce().

302  {
303 
304  if ( track.ndof() > 0 && track.chiSquared() > 0 ) {
305  return -LnChiSquaredProbability(track.chiSquared(), track.ndof());
306  } else {
307  return 0.0;
308  }
309 
310 }
float LnChiSquaredProbability(double chiSquared, double nrDOF)
int ndof(bool bon=true) const
Definition: Trajectory.cc:85
float chiSquared() const
Definition: Trajectory.h:307

Member Data Documentation

edm::EDGetTokenT<reco::TrackCollection> GlobalTrackQualityProducer::glbMuonsToken
private

Definition at line 41 of file GlobalTrackQualityProducer.h.

Referenced by GlobalTrackQualityProducer(), and produce().

edm::InputTag GlobalTrackQualityProducer::inputCollection_
private

Definition at line 39 of file GlobalTrackQualityProducer.h.

Referenced by GlobalTrackQualityProducer().

edm::InputTag GlobalTrackQualityProducer::inputLinksCollection_
private

Definition at line 40 of file GlobalTrackQualityProducer.h.

Referenced by GlobalTrackQualityProducer().

edm::EDGetTokenT<reco::MuonTrackLinksCollection> GlobalTrackQualityProducer::linkCollectionToken
private

Definition at line 42 of file GlobalTrackQualityProducer.h.

Referenced by GlobalTrackQualityProducer(), and produce().

MeasurementEstimator* GlobalTrackQualityProducer::theEstimator
private
GlobalMuonTrackMatcher* GlobalTrackQualityProducer::theGlbMatcher
private
GlobalMuonRefitter* GlobalTrackQualityProducer::theGlbRefitter
private
MuonServiceProxy* GlobalTrackQualityProducer::theService
private