44 <<
"Initializing KVF TEST analyser - Output file: " << outputFile_ <<
"\n";
74 cout <<
"Reconstructing event number: " << iEvent.
id() <<
"\n";
82 <<
"Couln't find track collection: " << iEvent.
id()
87 <<
"Found: " << (*tks).size() <<
" reconstructed tracks" <<
"\n";
88 cout <<
"got " << (*tks).size() <<
" tracks " << endl;
95 vector<TransientTrack> t_tks = (*theB).build(tks);
97 cout <<
"Found: " << t_tks.size() <<
" reconstructed tracks" <<
"\n";
100 if (t_tks.size() > 3) {
109 vector<TransientTrack> ttv;
110 ttv.push_back(t_tks[0]); ttv.push_back(t_tks[1]); ttv.push_back(t_tks[2]);ttv.push_back(t_tks[3]);
129 float muon_sigma = 0.0000001;
130 float kaon_sigma = 0.000016;
137 vector<RefCountedKinematicParticle> muonParticles;
138 vector<RefCountedKinematicParticle> phiParticles;
139 vector<RefCountedKinematicParticle> allParticles;
140 muonParticles.push_back(pFactory.
particle (ttMuPlus,muon_mass,chi,ndf,muon_sigma));
141 muonParticles.push_back(pFactory.
particle (ttMuMinus,muon_mass,chi,ndf,muon_sigma));
142 allParticles.push_back(pFactory.
particle (ttMuPlus,muon_mass,chi,ndf,muon_sigma));
143 allParticles.push_back(pFactory.
particle (ttMuMinus,muon_mass,chi,ndf,muon_sigma));
145 phiParticles.push_back(pFactory.
particle (ttKPlus,kaon_mass,chi,ndf,kaon_sigma));
146 phiParticles.push_back(pFactory.
particle (ttKMinus,kaon_mass,chi,ndf,kaon_sigma));
147 allParticles.push_back(pFactory.
particle (ttKPlus,kaon_mass,chi,ndf,kaon_sigma));
148 allParticles.push_back(pFactory.
particle (ttKMinus,kaon_mass,chi,ndf,kaon_sigma));
156 cout <<
"Simple vertex fit with KinematicParticleVertexFitter:\n";
175 cout <<
"\nGlobal fit done:\n";
188 float jp_m_sigma = 0.00004;
192 jpTree = csFitter.
fit(jpsi_c2,jpTree);
196 jpTree->movePointerToTheTop();
198 phiParticles.push_back(jpsi_part);
204 cout <<
"Sequential fit done:\n";
226 cout <<
"Exception during event number: " << iEvent.
id()
227 <<
"\n" << err.what() <<
"\n";
234 if (myVertex->vertexIsValid()) {
235 cout <<
"Decay vertex: " << myVertex->position() <<myVertex->chiSquared()<<
" "<<myVertex->degreesOfFreedom()<<endl;
236 }
else cout <<
"Decay vertex Not valid\n";
241 cout <<
"Particle: \n";
243 AlgebraicVector7 bs_par = myParticle->currentState().kinematicParameters().vector();
247 cout <<
"Momentum at vertex: " << myParticle->currentState().globalMomentum ()<<endl;
248 cout <<
"Parameters at vertex: " << myParticle->currentState().kinematicParameters().vector()<<endl;
253 if (!myTree->isValid()) {
254 cout <<
"Tree is invalid. Fit failed.\n";
259 myTree->movePointerToTheTop();
271 vector< RefCountedKinematicParticle > bs_children = myTree->finalStateParticles();
273 for (
unsigned int i=0;
i< bs_children.size();++
i) {
278 bool child = myTree->movePointerToTheFirstChild();
280 if(child)
while (myTree->movePointerToTheNextChild()) {
292 iEvent.
getByLabel(
"trackingtruth",
"VertexTruth",TVCollectionH);
308 return *(tPC.begin());
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, std::vector< RefCountedKinematicTree > trees) const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
RefCountedKinematicTree fit(std::vector< RefCountedKinematicParticle > part)
TrackAssociatorByChi2 * associatorForParamAtPca
void printout(const RefCountedKinematicVertex &myVertex) const
#define DEFINE_FWK_MODULE(type)
edm::ParameterSet kvfPSet
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
KineExample(const edm::ParameterSet &)
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
ROOT::Math::SVector< double, 7 > AlgebraicVector7
GlobalPoint position() const
TrackingVertex getSimVertex(const edm::Event &iEvent) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RefCountedKinematicTree fit(std::vector< RefCountedKinematicParticle > particles) const
std::vector< TrackingVertex > TrackingVertexCollection
T const * product() const
T const * product() const
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const