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
TrackingRecHit
&
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:47
PosteriorWeightsCalculator::weights
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
Definition:
PosteriorWeightsCalculator.cc:9
TrackingRecHit
Definition:
TrackingRecHit.h:23
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
GsfChi2MeasurementEstimator::theEstimator
Chi2MeasurementEstimator theEstimator
Definition:
GsfChi2MeasurementEstimator.h:34
edm::LogError
Definition:
MessageLogger.h:164
GsfChi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition:
GsfChi2MeasurementEstimator.cc:9
create_public_pileup_plots.weights
list weights
Definition:
create_public_pileup_plots.py:205
hit
Definition:
SiStripHitEffFromCalibTree.cc:87
PosteriorWeightsCalculator.h
TrajectoryStateOnSurface.h
Chi2MeasurementEstimator::estimate
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition:
Chi2MeasurementEstimator.cc:35
GsfChi2MeasurementEstimator.h
beam_dqm_sourceclient-live_cfg.chi2
tuple chi2
Definition:
beam_dqm_sourceclient-live_cfg.py:337
TrajectoryStateOnSurface::components
std::vector< TrajectoryStateOnSurface > components() const
Definition:
TrajectoryStateOnSurface.h:132
Generated for CMSSW Reference Manual by
1.8.5