Main Page
Namespaces
Classes
Package Documentation
TrackingTools
GsfTracking
src
GsfChi2MeasurementEstimator.cc
Go to the documentation of this file.
1
#include "
TrackingTools/GsfTracking/interface/GsfChi2MeasurementEstimator.h
"
2
#include "
TrackingTools/GsfTools/interface/GetComponents.h
"
3
4
#include "
TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h
"
5
#include "
TrackingTools/GsfTracking/interface/PosteriorWeightsCalculator.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
8
std::pair<bool,double>
9
GsfChi2MeasurementEstimator::estimate
(
const
TrajectoryStateOnSurface
& tsos,
10
const
TrackingRecHit
&
hit
)
const
{
11
12
GetComponents
comps(tsos);
13
auto
const
& tsvec = comps();
14
if
(tsvec.empty()) {
15
edm::LogError
(
"GsfChi2MeasurementEstimator"
)
16
<<
"Trying to calculate chi2 of hit with respect to empty mixture!"
;
17
return
std::make_pair(
false
,0.);
18
}
19
20
auto
const
&
weights
=
PosteriorWeightsCalculator
(tsvec).
weights
(hit);
21
if
(
weights
.empty() )
return
std::make_pair(
false
,0);
22
23
// Chi2MeasurementEstimator est(chiSquaredCut());
24
double
chi2
= 0.;
25
int
i
= 0;
26
for
(
auto
const
& ts : tsvec)
27
chi2 +=
weights
[i++] *
theEstimator
.
estimate
(ts,hit).second;
28
// Done - normalisation of weights is ensured
29
// by PosteriorWeightsCalculator
30
return
returnIt
(chi2);
31
}
32
GetComponents.h
MessageLogger.h
mps_fire.i
i
Definition:
mps_fire.py:156
PosteriorWeightsCalculator
Definition:
PosteriorWeightsCalculator.h:13
Chi2MeasurementEstimatorBase::returnIt
std::pair< bool, double > returnIt(double est) const
Definition:
Chi2MeasurementEstimatorBase.h:47
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
Definition:
PosteriorWeightsCalculator.cc:11
TrackingRecHit
Definition:
TrackingRecHit.h:23
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
GsfChi2MeasurementEstimator::theEstimator
Chi2MeasurementEstimator theEstimator
Definition:
GsfChi2MeasurementEstimator.h:34
edm::LogError
Definition:
MessageLogger.h:166
create_public_lumi_plots.weights
weights
Definition:
create_public_lumi_plots.py:1101
GsfChi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition:
GsfChi2MeasurementEstimator.cc:9
HiEvtPlane_cfi.chi2
chi2
Definition:
HiEvtPlane_cfi.py:24
hit
Definition:
SiStripHitEffFromCalibTree.cc:86
PosteriorWeightsCalculator.h
TrajectoryStateOnSurface.h
Chi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition:
Chi2MeasurementEstimator.cc:35
GsfChi2MeasurementEstimator.h
GetComponents
Definition:
GetComponents.h:4
Generated for CMSSW Reference Manual by
1.8.11