64 cout <<
"Reconstructing event number: " << iEvent.
id() <<
"\n";
71 cout <<
"Couln't find track collection: " << iEvent.
id() <<
"\n";
73 edm::LogInfo(
"RecoVertex/KineExample") <<
"Found: " << (*tks).size() <<
" reconstructed tracks" 75 cout <<
"got " << (*tks).size() <<
" tracks " << endl;
82 vector<TransientTrack> t_tks = (*theB).build(tks);
84 cout <<
"Found: " << t_tks.size() <<
" reconstructed tracks" 88 if (t_tks.size() > 3) {
96 vector<TransientTrack> ttv;
97 ttv.push_back(t_tks[0]);
98 ttv.push_back(t_tks[1]);
99 ttv.push_back(t_tks[2]);
100 ttv.push_back(t_tks[3]);
104 cout <<
"KVF failed\n";
120 float muon_sigma = 0.0000001;
121 float kaon_sigma = 0.000016;
128 vector<RefCountedKinematicParticle> muonParticles;
129 vector<RefCountedKinematicParticle> phiParticles;
130 vector<RefCountedKinematicParticle> allParticles;
131 muonParticles.push_back(pFactory.
particle(ttMuPlus, muon_mass, chi, ndf, muon_sigma));
132 muonParticles.push_back(pFactory.
particle(ttMuMinus, muon_mass, chi, ndf, muon_sigma));
133 allParticles.push_back(pFactory.
particle(ttMuPlus, muon_mass, chi, ndf, muon_sigma));
134 allParticles.push_back(pFactory.
particle(ttMuMinus, muon_mass, chi, ndf, muon_sigma));
136 phiParticles.push_back(pFactory.
particle(ttKPlus, kaon_mass, chi, ndf, kaon_sigma));
137 phiParticles.push_back(pFactory.
particle(ttKMinus, kaon_mass, chi, ndf, kaon_sigma));
138 allParticles.push_back(pFactory.
particle(ttKPlus, kaon_mass, chi, ndf, kaon_sigma));
139 allParticles.push_back(pFactory.
particle(ttKMinus, kaon_mass, chi, ndf, kaon_sigma));
147 cout <<
"Simple vertex fit with KinematicParticleVertexFitter:\n";
166 cout <<
"\nGlobal fit done:\n";
179 float jp_m_sigma = 0.00004;
183 jpTree = csFitter.
fit(jpsi_c2, jpTree);
187 jpTree->movePointerToTheTop();
189 phiParticles.push_back(jpsi_part);
195 cout <<
"Sequential fit done:\n";
214 cout <<
"Exception during event number: " << iEvent.
id() <<
"\n" << err.what() <<
"\n";
edm::EDGetTokenT< reco::TrackCollection > token_tracks
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &part)
void printout(const RefCountedKinematicVertex &myVertex) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, const std::vector< RefCountedKinematicTree > &trees) const
GlobalPoint position() const
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &particles) const
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const