99 edm::LogInfo(
"RecoVertex/KineExample") <<
"Initializing KVF TEST analyser - Output file: " <<
outputFile_ <<
"\n";
126 edm::LogInfo(
"RecoVertex/KineExample") <<
"Found: " << (*tks).size() <<
" reconstructed tracks" 128 edm::LogPrint(
"KineExample") <<
"got " << (*tks).size() <<
" tracks " << endl;
134 vector<TransientTrack> t_tks = (*theB).build(tks);
136 edm::LogPrint(
"KineExample") <<
"Found: " << t_tks.size() <<
" reconstructed tracks" 140 if (t_tks.size() > 3) {
148 vector<TransientTrack> ttv;
149 ttv.push_back(t_tks[0]);
150 ttv.push_back(t_tks[1]);
151 ttv.push_back(t_tks[2]);
152 ttv.push_back(t_tks[3]);
172 float muon_sigma = 0.0000001;
173 float kaon_sigma = 0.000016;
180 vector<RefCountedKinematicParticle> muonParticles;
181 vector<RefCountedKinematicParticle> phiParticles;
182 vector<RefCountedKinematicParticle> allParticles;
183 muonParticles.push_back(pFactory.
particle(ttMuPlus, muon_mass, chi, ndf, muon_sigma));
184 muonParticles.push_back(pFactory.
particle(ttMuMinus, muon_mass, chi, ndf, muon_sigma));
185 allParticles.push_back(pFactory.
particle(ttMuPlus, muon_mass, chi, ndf, muon_sigma));
186 allParticles.push_back(pFactory.
particle(ttMuMinus, muon_mass, chi, ndf, muon_sigma));
188 phiParticles.push_back(pFactory.
particle(ttKPlus, kaon_mass, chi, ndf, kaon_sigma));
189 phiParticles.push_back(pFactory.
particle(ttKMinus, kaon_mass, chi, ndf, kaon_sigma));
190 allParticles.push_back(pFactory.
particle(ttKPlus, kaon_mass, chi, ndf, kaon_sigma));
191 allParticles.push_back(pFactory.
particle(ttKMinus, kaon_mass, chi, ndf, kaon_sigma));
199 edm::LogPrint(
"KineExample") <<
"Simple vertex fit with KinematicParticleVertexFitter:\n";
231 float jp_m_sigma = 0.00004;
235 jpTree = csFitter.
fit(jpsi_c2, jpTree);
239 jpTree->movePointerToTheTop();
241 phiParticles.push_back(jpsi_part);
265 edm::LogError(
"KineExample") <<
"Exception during event number: " <<
iEvent.id() <<
"\n" <<
err.what() <<
"\n";
270 if (myVertex->vertexIsValid()) {
271 edm::LogPrint(
"KineExample") <<
"Decay vertex: " << myVertex->position() << myVertex->chiSquared() <<
" " 272 << myVertex->degreesOfFreedom() << endl;
284 edm::LogPrint(
"KineExample") <<
"Momentum at vertex: " << myParticle->currentState().globalMomentum() << endl;
285 edm::LogPrint(
"KineExample") <<
"Parameters at vertex: " << myParticle->currentState().kinematicParameters().vector()
290 if (!myTree->isValid()) {
291 edm::LogPrint(
"KineExample") <<
"Tree is invalid. Fit failed.\n";
296 myTree->movePointerToTheTop();
308 vector<RefCountedKinematicParticle> bs_children = myTree->finalStateParticles();
310 for (
unsigned int i = 0;
i < bs_children.size(); ++
i) {
315 bool child = myTree->movePointerToTheFirstChild();
318 while (myTree->movePointerToTheNextChild()) {
345 return *(tPC.begin());
edm::EDGetTokenT< reco::TrackCollection > token_tracks
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &part)
T getParameter(std::string const &) const
GlobalPoint position() const
RefCountedKinematicTree fit(const std::vector< RefCountedKinematicParticle > &particles) const
#define DEFINE_FWK_MODULE(type)
edm::ParameterSet kvfPSet
T const * product() const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > estoken_mf
Log< level::Error, false > LogError
void analyze(const edm::Event &, const edm::EventSetup &) override
KineExample(const edm::ParameterSet &)
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
TrackingVertex getSimVertex(const edm::Event &iEvent) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet theConfig
edm::EDGetTokenT< TrackingVertexCollection > token_VertexTruth
void endRun(edm::Run const &, edm::EventSetup const &) override
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > estoken_ttk
void printout(const RefCountedKinematicVertex &myVertex) const
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
Log< level::Warning, true > LogPrint
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Info, false > LogInfo
std::vector< TrackingVertex > TrackingVertexCollection
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, const std::vector< RefCountedKinematicTree > &trees) const
void beginRun(edm::Run const &, edm::EventSetup const &) override