Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
TrackingTools
GsfTracking
src
GsfChi2MeasurementEstimator.cc
Go to the documentation of this file.
1
#include "
TrackingTools/GsfTracking/interface/GsfChi2MeasurementEstimator.h
"
2
3
// #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
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
TransientTrackingRecHit
&
hit
)
const
{
11
12
std::vector<TrajectoryStateOnSurface> tsvec = tsos.
components
();
13
if
(tsvec.empty()) {
14
edm::LogError
(
"GsfChi2MeasurementEstimator"
)
15
<<
"Trying to calculate chi2 of hit with respect to empty mixture!"
;
16
return
std::make_pair(
false
,0.);
17
}
18
19
std::vector<double>
weights
=
PosteriorWeightsCalculator
(tsvec).
weights
(hit);
20
if
( weights.empty() )
return
std::make_pair(
false
,0);
21
22
// Chi2MeasurementEstimator est(chiSquaredCut());
23
double
chi2 = 0.;
24
int
i
= 0;
25
for
(std::vector<TrajectoryStateOnSurface>::const_iterator it = tsvec.begin();
26
it != tsvec.end(); it++) {
27
chi2 += weights[i++] *
theEstimator
.
estimate
(*it,hit).second;
28
}
29
// Done - normalisation of weights is ensured
30
// by PosteriorWeightsCalculator
31
return
returnIt
(chi2);
32
}
33
i
int i
Definition:
DBlmapReader.cc:9
MessageLogger.h
PosteriorWeightsCalculator
Definition:
PosteriorWeightsCalculator.h:13
Chi2MeasurementEstimatorBase::returnIt
std::pair< bool, double > returnIt(double est) const
Definition:
Chi2MeasurementEstimatorBase.h:41
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:15
GsfChi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Definition:
GsfChi2MeasurementEstimator.cc:9
GsfChi2MeasurementEstimator::theEstimator
Chi2MeasurementEstimator theEstimator
Definition:
GsfChi2MeasurementEstimator.h:34
edm::LogError
Definition:
MessageLogger.h:164
Chi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Definition:
Chi2MeasurementEstimator.cc:8
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TransientTrackingRecHit &tsos) const
Create random state.
Definition:
PosteriorWeightsCalculator.cc:9
TransientTrackingRecHit
Definition:
TransientTrackingRecHit.h:21
create_public_pileup_plots.weights
list weights
Definition:
create_public_pileup_plots.py:205
hit
Definition:
SiStripHitEffFromCalibTree.cc:87
PosteriorWeightsCalculator.h
TrajectoryStateOnSurface.h
GsfChi2MeasurementEstimator.h
TrajectoryStateOnSurface::components
std::vector< TrajectoryStateOnSurface > components() const
Definition:
TrajectoryStateOnSurface.h:192
Generated for CMSSW Reference Manual by
1.8.5