20 LogDebug(
"ConversionVertexFinder") <<
"ConversionVertexFinder CTOR "
27 kcvFitter_->setParameters(
conf_);
31 LogDebug(
"ConversionVertexFinder") <<
"ConversionVertexFinder DTOR "
37 std::vector<reco::TransientTrack> pair = _pair;
43 float sigma = 0.00000001;
46 float mass = 0.000511;
50 std::vector<RefCountedKinematicParticle> particles;
53 pFactory.
particle(pair[0], mass, chi, ndf, sigma, *pair[0].innermostMeasurementState().freeState()));
55 pFactory.
particle(pair[1], mass, chi, ndf, sigma, *pair[1].innermostMeasurementState().freeState()));
77 if (oldTree->isValid()) {
80 if (gamma_dec_vertex->vertexIsValid())
81 std::cout << gamma_dec_vertex->chiSquared() <<
" " << gamma_dec_vertex->degreesOfFreedom() << std::endl;
82 std::cout << oldTree->currentParticle()->currentState().globalMomentum()
83 << oldTree->currentParticle()->currentState().globalPosition() << std::endl;
84 std::vector<RefCountedKinematicParticle> fStates = oldTree->finalStateParticles();
85 for (
unsigned int kk = 0;
kk < fStates.size();
kk++) {
86 std::cout << fStates[
kk]->currentState().globalMomentum() << fStates[
kk]->currentState().globalPosition()
88 std::cout << fStates[
kk]->currentState().kinematicParametersError().matrix() << std::endl;
93 if (myTree->isValid()) {
96 if (gamma_dec_vertex->vertexIsValid())
97 std::cout << gamma_dec_vertex->chiSquared() <<
" " << gamma_dec_vertex->degreesOfFreedom() << std::endl;
98 std::cout << myTree->currentParticle()->currentState().globalMomentum()
99 << myTree->currentParticle()->currentState().globalPosition() << std::endl;
100 std::vector<RefCountedKinematicParticle> fStates = myTree->finalStateParticles();
101 for (
unsigned int kk = 0;
kk < fStates.size();
kk++) {
102 std::cout << fStates[
kk]->currentState().globalMomentum() << fStates[
kk]->currentState().globalPosition()
104 std::cout << fStates[
kk]->currentState().kinematicParametersError().matrix() << std::endl;
109 #endif // TemplateKineFitDebug
113 if (myTree->isValid()) {
114 myTree->movePointerToTheTop();
116 if (the_photon->currentState().isValid()) {
119 gamma_dec_vertex = myTree->currentDecayVertex();
120 if (gamma_dec_vertex->vertexIsValid()) {
121 const float chi2Prob =
125 the_vertex = *gamma_dec_vertex;
136 LogDebug(
"ConversionVertexFinder") <<
"ConversionVertexFinder run pair size " << pair.size() <<
"\n";
148 transientVtx = fitter.
vertex(pair);
ConversionVertexFinder(const edm::ParameterSet &config)
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &part)
TransientVertex run(const std::vector< reco::TransientTrack > &pair)
const std::string metname
virtual std::string explainSelf() const
double minChiSqImprovement_
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
void setParameters(const edm::ParameterSet &pSet)
float ChiSquaredProbability(double chiSquared, double nrDOF)
~ConversionVertexFinder()
T getParameter(std::string const &) const
tuple config
parse the configuration file
KinematicConstrainedVertexFitter * kcvFitter_
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
Log< level::Warning, false > LogWarning
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &part)